diff --git a/lua/client/client.lua b/lua/client/client.lua index 07f1b4d945d9a87494a9298ea8c3cfffa0571ee6..bb5d71e2987117cc30866cc0197cce7dfbc1fc1d 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -243,7 +243,7 @@ fk.client_callback["EnterRoom"] = function(_data) local data = _data[3] ClientInstance.enter_room_data = json.encode(_data); - ClientInstance.room_settings = data + ClientInstance.settings = data table.insertTableIfNeed( data.disabledPack, Fk.game_mode_disabled[data.gameMode] @@ -1086,7 +1086,7 @@ fk.client_callback["GameOver"] = function(jsonData) c.record[2] = table.concat({ c.record[2], Self.player:getScreenName(), - c.room_settings.gameMode, + c.settings.gameMode, Self.general, Self.role, jsonData, @@ -1104,7 +1104,7 @@ fk.client_callback["EnterLobby"] = function(jsonData) c.record[2] = table.concat({ c.record[2], Self.player:getScreenName(), - c.room_settings.gameMode, + c.settings.gameMode, Self.general, Self.role, "", diff --git a/lua/client/client_util.lua b/lua/client/client_util.lua index 0c6f8fffb69f9a45f6723006fa232b6dd4e28a2a..f006a55711c091b758b7e01609a849cf48861f3d 100644 --- a/lua/client/client_util.lua +++ b/lua/client/client_util.lua @@ -761,7 +761,7 @@ end function ResetClientLua() local _data = ClientInstance.enter_room_data; - local data = ClientInstance.room_settings + local data = ClientInstance.settings Self = ClientPlayer:new(fk.Self) ClientInstance = Client:new() -- clear old client data ClientInstance.players = {Self} @@ -769,7 +769,7 @@ function ResetClientLua() ClientInstance.discard_pile = {} ClientInstance.enter_room_data = _data; - ClientInstance.room_settings = data + ClientInstance.settings = data ClientInstance.disabled_packs = data.disabledPack ClientInstance.disabled_generals = data.disabledGenerals @@ -781,7 +781,7 @@ function ResetAddPlayer(j) end function GetRoomConfig() - return ClientInstance.room_settings + return ClientInstance.settings end function GetPlayerGameData(pid) @@ -828,7 +828,7 @@ function SetReplayingShowCards(o) end function CheckSurrenderAvailable(playedTime) - local curMode = ClientInstance.room_settings.gameMode + local curMode = ClientInstance.settings.gameMode return Fk.game_modes[curMode]:surrenderFunc(playedTime) end diff --git a/lua/server/room.lua b/lua/server/room.lua index cfdf5b7453d9eb50ff4a693f1db8092bc20c341b..f146a6e470876a4ac9245a36cd05f602cdb2bbfe 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -2966,10 +2966,5 @@ function Room:removeTableMark(sth, mark, value) end end -function Room:__index(k) - if k == "room_settings" then - return self.settings - end -end return Room