添加几个房间内命令

添加房间被解散的语言文本
把一处神秘写法改正常一点
This commit is contained in:
MrZ_26
2022-11-05 02:08:13 +08:00
parent c2d29c3d6a
commit a2b762dcbc
11 changed files with 30 additions and 8 deletions

View File

@@ -186,6 +186,7 @@ return {
started="Playing", started="Playing",
joinRoom="$1 has entered the room.", joinRoom="$1 has entered the room.",
leaveRoom="$1 has left the room.", leaveRoom="$1 has left the room.",
roomRemoved="Room was removed",
ready="Ready", ready="Ready",
spectating="Spectating", spectating="Spectating",

View File

@@ -185,6 +185,7 @@ return {
started="En juego", started="En juego",
joinRoom="$1 entró a la sala.", joinRoom="$1 entró a la sala.",
leaveRoom="$1 salió de la sala.", leaveRoom="$1 salió de la sala.",
-- roomRemoved="Room was removed",
ready="LISTO", ready="LISTO",
spectating="Espectando", spectating="Espectando",

View File

@@ -177,13 +177,12 @@ return {
-- started="Playing", -- started="Playing",
joinRoom="$1 a rejoint le salon.", joinRoom="$1 a rejoint le salon.",
leaveRoom="$1 a quitté le salon.", leaveRoom="$1 a quitté le salon.",
-- roomRemoved="Room was removed",
-- ready="READY", -- ready="READY",
-- connStream="CONNECTING",
-- waitStream="WAITING",
-- spectating="Spectating", -- spectating="Spectating",
-- keySettingInstruction="Press to bind key\nescape: cancel\nbackspace: delete", -- keySettingInstruction="Press to bind key\nescape: cancel\nbackspace: delete",
-- customBGhelp="Drop image file here to apply custom background", -- customBGhelp="Drop image file here to apply custom background",
-- customBGloadFailed="Unsupport image format for custom background", -- customBGloadFailed="Unsupport image format for custom background",

View File

@@ -187,6 +187,7 @@ return {
started="Bermain", started="Bermain",
joinRoom="$1 telah memasuki ruangan.", joinRoom="$1 telah memasuki ruangan.",
leaveRoom="$1 telah keluar dari ruangan.", leaveRoom="$1 telah keluar dari ruangan.",
-- roomRemoved="Room was removed",
ready="Siap", ready="Siap",
spectating="Menonton", spectating="Menonton",

View File

@@ -186,6 +186,7 @@ return {
started="プレイ中", started="プレイ中",
joinRoom="$1 が入室しました", joinRoom="$1 が入室しました",
leaveRoom="$1 が退出しました", leaveRoom="$1 が退出しました",
-- roomRemoved="Room was removed",
ready="準備OK", ready="準備OK",
spectating="観戦中", spectating="観戦中",

View File

@@ -174,9 +174,8 @@ return {
-- started="Playing", -- started="Playing",
joinRoom="$1 Entrou a sala.", joinRoom="$1 Entrou a sala.",
leaveRoom="$1 Saiu da sala.", leaveRoom="$1 Saiu da sala.",
-- roomRemoved="Room was removed",
-- ready="READY", -- ready="READY",
-- connStream="CONNECTING",
-- waitStream="WAITING",
-- spectating="Spectating", -- spectating="Spectating",

View File

@@ -186,6 +186,7 @@ return {
started="游戏中", started="游戏中",
joinRoom="$1 进入房间", joinRoom="$1 进入房间",
leaveRoom="$1 离开房间", leaveRoom="$1 离开房间",
roomRemoved="房间被解散",
ready="各就各位!", ready="各就各位!",
spectating="观战中", spectating="观战中",

View File

@@ -135,6 +135,7 @@ return {
started="Room.Playing();", started="Room.Playing();",
joinRoom="Room.Join($1);", joinRoom="Room.Join($1);",
leaveRoom="Room.Leave($1);", leaveRoom="Room.Leave($1);",
roomRemoved="Room.Removed();",
ready="Ready();", ready="Ready();",
spectating="Room.Spectating();", spectating="Room.Spectating();",

View File

@@ -186,6 +186,7 @@ return {
started="遊戲中", started="遊戲中",
joinRoom="$1 進入房間", joinRoom="$1 進入房間",
leaveRoom="$1 離開房間", leaveRoom="$1 離開房間",
roomRemoved="房間被解散",
ready="準備!", ready="準備!",
spectating="旁觀中", spectating="旁觀中",

View File

@@ -23,8 +23,12 @@ function scene.sceneInit()
end end
function scene.keyDown(key,rep) function scene.keyDown(key,rep)
if key~='return' or rep then return true end if rep then return true end
_login() if key=='return' then
_login()
else
return true
end
end end
scene.widgetList={ scene.widgetList={

View File

@@ -132,16 +132,29 @@ function scene.keyDown(key,isRep)
if not inputBox.hide and #mes>0 then if not inputBox.hide and #mes>0 then
if mes:sub(1,1)=='/' then if mes:sub(1,1)=='/' then
local cmd=STRING.split(mes,' ') local cmd=STRING.split(mes,' ')
-- Common commands
if cmd[1]=='/kick' then if cmd[1]=='/kick' then
if tonumber(cmd[2]) then NET.room_kick(tonumber(cmd[2])) end if tonumber(cmd[2]) then NET.room_kick(tonumber(cmd[2])) end
elseif cmd[1]=='/pw' then
if cmd[2] then NET.room_setPW(cmd[2]) end
elseif cmd[1]=='/host' then elseif cmd[1]=='/host' then
if tonumber(cmd[2]) then NET.player_setHost(tonumber(cmd[2])) end if tonumber(cmd[2]) then NET.player_setHost(tonumber(cmd[2])) end
elseif cmd[1]=='/group' then elseif cmd[1]=='/group' then
if tonumber(cmd[2]) and tonumber(cmd[2])%1==0 and tonumber(cmd[2])>=0 and tonumber(cmd[2])<=6 then if tonumber(cmd[2]) and tonumber(cmd[2])%1==0 and tonumber(cmd[2])>=0 and tonumber(cmd[2])<=6 then
NET.player_joinGroup(tonumber(cmd[2])) NET.player_joinGroup(tonumber(cmd[2]))
end end
elseif cmd[1]=='/exit' or cmd[1]=='/quit'then elseif cmd[1]=='/exit' or cmd[1]=='/quit' then
_quit() _quit()
-- Admin commands
elseif cmd[1]=='/fkick' then
if tonumber(cmd[2]) then NET.room_kick(tonumber(cmd[2]),NET.roomState.roomId) end
elseif cmd[1]=='/fpw' then
if cmd[2] then NET.room_setPW(cmd[2],NET.roomState.roomId) end
elseif cmd[1]=='/fexit' or cmd[1]=='/fquit' then
NET.room_remove(NET.roomState.roomId)
else else
NET.textBox:push{COLOR.R,'Invalid command'} NET.textBox:push{COLOR.R,'Invalid command'}
end end