修复创建房间名错误
This commit is contained in:
2
main.lua
2
main.lua
@@ -371,6 +371,8 @@ do
|
||||
NOGAME=true
|
||||
fs.remove("conf/key")
|
||||
end
|
||||
USER.username=nil
|
||||
|
||||
if STAT.version~=VERSION_CODE then
|
||||
newVersionLaunch=true
|
||||
STAT.version=VERSION_CODE
|
||||
|
||||
@@ -950,7 +950,7 @@ do--function saveRecording()
|
||||
os.date("%Y/%m/%d_%A_%H:%M:%S\n")..
|
||||
GAME.curModeName.."\n"..
|
||||
VERSION_NAME.."\n"..
|
||||
(USER.username or"Player")
|
||||
(USER.name or"Player")
|
||||
local fileBody=
|
||||
GAME.seed.."\n"..
|
||||
json.encode(GAME.setting).."\n"..
|
||||
@@ -1051,13 +1051,12 @@ function TICK_httpREQ_getUserInfo(task)
|
||||
if response then
|
||||
local res=json.decode(response.body)
|
||||
if response.code==200 and res.message=="OK"then
|
||||
-- LOG.print(text.accessSuccessed)
|
||||
USER.username=res.username
|
||||
USER.name=res.username
|
||||
USER.motto=res.motto
|
||||
USER.avatar=res.avatar
|
||||
FILE.save(USER,"conf/user")
|
||||
else
|
||||
-- LOG.print(text.loginFailed..": "..text.httpCode..response.code.."-"..res.message,"warn")
|
||||
LOG.print("Get user info failed: "..text.httpCode..response.code.."-"..res.message,"warn")
|
||||
end
|
||||
return
|
||||
elseif request_error then
|
||||
|
||||
@@ -243,7 +243,7 @@ GAME={--Global game data
|
||||
RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes
|
||||
USER=FILE.load("conf/user")or{--User infomation
|
||||
--Network infos
|
||||
username=false,
|
||||
name=false,
|
||||
id=false,
|
||||
email=false,
|
||||
motto=false,
|
||||
|
||||
Reference in New Issue
Block a user