mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
parent
edf10893e9
commit
68f088e076
|
@ -12,6 +12,8 @@ ColumnLayout {
|
|||
text: Backend.translate("BGM Volume")
|
||||
}
|
||||
Slider {
|
||||
Layout.rightMargin: 16
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 100
|
||||
value: config.bgmVolume
|
||||
|
@ -26,6 +28,8 @@ ColumnLayout {
|
|||
text: Backend.translate("Effect Volume")
|
||||
}
|
||||
Slider {
|
||||
Layout.rightMargin: 16
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 100
|
||||
value: Backend.volume
|
||||
|
|
|
@ -13,6 +13,7 @@ ColumnLayout {
|
|||
text: Backend.translate("Lobby BG")
|
||||
}
|
||||
TextField {
|
||||
Layout.fillWidth: true
|
||||
text: config.lobbyBg
|
||||
}
|
||||
Button {
|
||||
|
@ -32,6 +33,7 @@ ColumnLayout {
|
|||
text: Backend.translate("Room BG")
|
||||
}
|
||||
TextField {
|
||||
Layout.fillWidth: true
|
||||
text: config.roomBg
|
||||
}
|
||||
Button {
|
||||
|
@ -51,6 +53,7 @@ ColumnLayout {
|
|||
text: Backend.translate("Game BGM")
|
||||
}
|
||||
TextField {
|
||||
Layout.fillWidth: true
|
||||
text: config.bgmFile
|
||||
}
|
||||
Button {
|
||||
|
@ -70,6 +73,7 @@ ColumnLayout {
|
|||
text: Backend.translate("Poster Girl")
|
||||
}
|
||||
TextField {
|
||||
Layout.fillWidth: true
|
||||
text: config.ladyImg
|
||||
}
|
||||
Button {
|
||||
|
|
|
@ -11,6 +11,7 @@ Flickable {
|
|||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
width: parent.width
|
||||
RowLayout {
|
||||
anchors.rightMargin: 8
|
||||
spacing: 16
|
||||
|
@ -21,6 +22,8 @@ Flickable {
|
|||
id: roomName
|
||||
maximumLength: 64
|
||||
font.pixelSize: 18
|
||||
Layout.rightMargin: 16
|
||||
Layout.fillWidth: true
|
||||
text: Backend.translate("$RoomName").arg(Self.screenName)
|
||||
}
|
||||
}
|
||||
|
@ -142,6 +145,8 @@ Flickable {
|
|||
id: roomPassword
|
||||
maximumLength: 16
|
||||
font.pixelSize: 18
|
||||
Layout.rightMargin: 16
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ ColumnLayout {
|
|||
maximumLength: 64
|
||||
font.pixelSize: 18
|
||||
text: Self.avatar
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Button {
|
||||
text: Backend.translate("Update Avatar")
|
||||
|
@ -54,6 +55,8 @@ ColumnLayout {
|
|||
id: oldPassword
|
||||
echoMode: TextInput.Password
|
||||
passwordCharacter: "*"
|
||||
Layout.rightMargin: 16
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,6 +70,7 @@ ColumnLayout {
|
|||
id: newPassword
|
||||
echoMode: TextInput.Password
|
||||
passwordCharacter: "*"
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Button {
|
||||
text: Backend.translate("Update Password")
|
||||
|
|
|
@ -189,7 +189,7 @@ callbacks["Chat"] = (jsonData) => {
|
|||
|
||||
callbacks["ServerMessage"] = (jsonData) => {
|
||||
const current = mainStack.currentItem; // lobby or room
|
||||
current.sendDanmaku('<font color="gold"><b>[Server] </b></font>' + jsonData);
|
||||
current.sendDanmaku('<font color="grey"><b>[Server] </b></font>' + jsonData);
|
||||
}
|
||||
|
||||
callbacks["ShowToast"] = (j) => toast.show(j);
|
||||
|
|
|
@ -23,8 +23,7 @@ function Traceback()
|
|||
end
|
||||
|
||||
local msgh = function(err)
|
||||
fk.qCritical(err)
|
||||
print(debug.traceback(nil, 2))
|
||||
fk.qCritical(err .. "\n" .. debug.traceback(nil, 2))
|
||||
end
|
||||
|
||||
function Pcall(f, ...)
|
||||
|
|
|
@ -185,14 +185,14 @@ GameEvent.functions[GameEvent.UseCard] = function(self)
|
|||
local room = self.room
|
||||
local logic = room.logic
|
||||
|
||||
sendCardEmotionAndLog(room, cardUseEvent)
|
||||
|
||||
room:moveCardTo(cardUseEvent.card, Card.Processing, nil, fk.ReasonUse)
|
||||
|
||||
if cardUseEvent.card.skill then
|
||||
cardUseEvent.card.skill:onUse(room, cardUseEvent)
|
||||
end
|
||||
|
||||
sendCardEmotionAndLog(room, cardUseEvent)
|
||||
|
||||
if logic:trigger(fk.PreCardUse, room:getPlayerById(cardUseEvent.from), cardUseEvent) then
|
||||
logic:breakEvent()
|
||||
end
|
||||
|
|
|
@ -179,8 +179,7 @@ function GameEvent:clear()
|
|||
if err == false then
|
||||
-- handle error, then break
|
||||
if not string.find(yield_result, "__manuallyBreak") then
|
||||
fk.qCritical(yield_result)
|
||||
print(debug.traceback(clear_co))
|
||||
fk.qCritical(yield_result .. "\n" .. debug.traceback(clear_co))
|
||||
end
|
||||
coroutine.close(clear_co)
|
||||
break
|
||||
|
@ -294,8 +293,7 @@ function GameEvent:exec()
|
|||
if err == false then
|
||||
-- handle error, then break
|
||||
if not string.find(yield_result, "__manuallyBreak") then
|
||||
fk.qCritical(yield_result)
|
||||
print(debug.traceback(co))
|
||||
fk.qCritical(yield_result .. "\n" .. debug.traceback(co))
|
||||
end
|
||||
self.interrupted = true
|
||||
self:clear()
|
||||
|
|
|
@ -127,8 +127,7 @@ function Room:resume()
|
|||
|
||||
-- handle error
|
||||
if ret == false then
|
||||
fk.qCritical(err_msg)
|
||||
print(debug.traceback(main_co))
|
||||
fk.qCritical(err_msg .. "\n" .. debug.traceback(main_co))
|
||||
goto GAME_OVER
|
||||
end
|
||||
|
||||
|
@ -968,7 +967,7 @@ end
|
|||
---@param skill_name nil @ 技能名
|
||||
---@param index integer | nil @ 语音编号,默认为-1(也就是随机播放)
|
||||
function Room:broadcastSkillInvoke(skill_name, index)
|
||||
print 'Room:broadcastSkillInvoke deprecated; use SPlayer:broadcastSkillInvoke'
|
||||
fk.qCritical 'Room:broadcastSkillInvoke deprecated; use SPlayer:broadcastSkillInvoke'
|
||||
index = index or -1
|
||||
self:sendLogEvent("PlaySkillSound", {
|
||||
name = skill_name,
|
||||
|
|
|
@ -34,8 +34,7 @@ local requestRoom = setmetatable({
|
|||
resume = function(self)
|
||||
local err, msg = coroutine.resume(requestCo, self)
|
||||
if err == false then
|
||||
fk.qCritical(msg)
|
||||
print(debug.traceback(requestCo))
|
||||
fk.qCritical(msg .. "\n" .. debug.traceback(requestCo))
|
||||
end
|
||||
return nil, 0
|
||||
end,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <readline/history.h>
|
||||
#include <readline/readline.h>
|
||||
#include <signal.h>
|
||||
#include <QJsonDocument>
|
||||
|
||||
static void sigintHandler(int) {
|
||||
fprintf(stderr, "\n");
|
||||
|
@ -81,7 +82,10 @@ void Shell::lsrCommand(QStringList &) {
|
|||
}
|
||||
qInfo("Current %lld running rooms are:", ServerInstance->rooms.size());
|
||||
foreach (auto room, ServerInstance->rooms) {
|
||||
qInfo() << room->getId() << "," << room->getName();
|
||||
auto config = QJsonDocument::fromJson(room->getSettings());
|
||||
auto pw = config["password"].toString();
|
||||
qInfo() << room->getId() << "," << (pw.isEmpty() ? QString("%1").arg(room->getName()) :
|
||||
QString("%1 [pw=%2]").arg(room->getName()).arg(pw));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user