Add short delay before showing nickname (again)

This commit is contained in:
SweetSea-ButImNotSweet
2024-01-08 19:49:24 +07:00
parent f2686fb5bd
commit c20e4ac845
5 changed files with 20 additions and 24 deletions

View File

@@ -994,7 +994,7 @@ do-- function dumpBasicConfig()
end end
end end
do-- function resetGameData(args) do-- function resetGameData(args)
local function task_showMods() -- TODO local function task_showMods(P) -- TODO
coroutine.yield() coroutine.yield()
local counter=0 local counter=0
@@ -1002,22 +1002,20 @@ do-- function resetGameData(args)
SFX.play('collect',.2) SFX.play('collect',.2)
TEXT.show(GAME.modApplyAt,640,26,45,'spin') TEXT.show(GAME.modApplyAt,640,26,45,'spin')
for _=1,90 do coroutine.yield() end for _=1,90 do coroutine.yield() end
end
for number,sel in next,GAME.mod do for number,sel in next,GAME.mod do
if sel>0 then if sel>0 then
if counter==0 then
coroutine.yield()
else
for _=1,20 do for _=1,20 do
coroutine.yield() coroutine.yield()
end end
local M=MODOPT[number]
SFX.play('collect',.2)
TEXT.show(M.id,640+(counter%5-2)*80,26,45,'spin')
counter=counter+1
end end
local M=MODOPT[number]
SFX.play('collect',.2)
TEXT.show(M.id,640+(counter%5-2)*80,26,45,'spin')
counter=counter+1
end end
for _=1,(counter%5)*20+90 do coroutine.yield() end
if GAME.playing then PLAYERS[1].showUsername=true end
end end
end end
local gameSetting={ local gameSetting={

View File

@@ -157,7 +157,8 @@ return {
tryAnotherBuild="Error.DecodeUTF8(); //如果你现在用的是Windows系统请重新下载 Techmino-32/64位 (和现在运行的不一样的那个)。", tryAnotherBuild="Error.DecodeUTF8(); //如果你现在用的是Windows系统请重新下载 Techmino-32/64位 (和现在运行的不一样的那个)。",
modInstruction="Mod.Instruction();\n/*选择你要使用的Mod\n不同Mod会用不同的方式改变初始游戏规则(可能导致不能正常游玩)\n提醒:开启一些Mod会让成绩无效你也可以用键盘开关Mod按住shift反向*/", modInstruction="Mod.Instruction();\n/*选择你要使用的Mod\n不同Mod会用不同的方式改变初始游戏规则(可能导致不能正常游玩)\n提醒:开启一些Mod会让成绩无效你也可以用键盘开关Mod按住shift反向*/",
-- modApplyAtInstruction="Mod.ApplyDuring='postInit' --[[\npreInit: Before loading the modes. The default option in V0.17.15 and earlier, but may cause problems with certain mods.\npostInit: After loading the game. This can fix some bugs in preInit, but some mods can still be disabled by modes in some situations.\nalways: Throughout the entire game. Keeps the effects of the mods in all situations.]]", -- [[[NEED TRANSLATING!]]]
modApplyAtInstruction="Mod.ApplyDuring=PLAYERS[1].username=='shoucandanghehe' ? 'preInit' : 'postInit' --[[\npreInit: Before loading the modes. The default option in V0.17.15 and earlier, but may cause problems with certain mods.\npostInit: After loading the game. This can fix some bugs in preInit, but some mods can still be disabled by modes in some situations.\nalways: Throughout the entire game. Keeps the effects of the mods in all situations.]]",
modInfo={ modInfo={
next="Mod.Next();\n//强制使用Next的个数", next="Mod.Next();\n//强制使用Next的个数",
hold="Mod.Hold\n//强制使用Hold的个数", hold="Mod.Hold\n//强制使用Hold的个数",

View File

@@ -787,9 +787,11 @@ function draw.norm(P,repMode)
gc_scale(P.size) gc_scale(P.size)
-- Draw username -- Draw username
setFont(30) if P.showUsername then
gc_setColor(GROUP_COLORS[P.group]) setFont(30)
GC.mStr(P.username or USERS.getUsername(P.uid),300,-60) gc_setColor(GROUP_COLORS[P.group])
GC.mStr(P.username or USERS.getUsername(P.uid),300,-60)
end
-- Draw HUD -- Draw HUD
if ENV.nextCount>0 then _drawNext(P,repMode) end if ENV.nextCount>0 then _drawNext(P,repMode) end

View File

@@ -498,6 +498,7 @@ function PLY.newAIPlayer(id,AIdata,mini,p)
group=0, group=0,
} if p then TABLE.coverR(p,pData) end } if p then TABLE.coverR(p,pData) end
P.username="BOT"..pData.uid P.username="BOT"..pData.uid
P.showUsername=true
P.sid=NET.uid_sid[pData.uid] or pData.uid P.sid=NET.uid_sid[pData.uid] or pData.uid
P.group=pData.group P.group=pData.group
if not (P.group%1==0 and P.group>=1 and P.group<=6) then P.group=0 end if not (P.group%1==0 and P.group>=1 and P.group<=6) then P.group=0 end
@@ -522,7 +523,7 @@ function PLY.newPlayer(id,mini,p)
else else
-- Default pid=1, and empty username -- Default pid=1, and empty username
pData.uid=1 pData.uid=1
P.username="" P.username="SWEETSEA"
end end
P.uid=pData.uid P.uid=pData.uid
P.sid=NET.uid_sid[pData.uid] or pData.uid P.sid=NET.uid_sid[pData.uid] or pData.uid
@@ -531,6 +532,8 @@ function PLY.newPlayer(id,mini,p)
_loadGameEnv(P) _loadGameEnv(P)
_applyGameEnv(P) _applyGameEnv(P)
P.showUsername=not (P.gameEnv.allowMod and usingMod())
end end
--------------------------</Public>-------------------------- --------------------------</Public>--------------------------
return PLY return PLY

View File

@@ -23,14 +23,6 @@ function scene.enter()
scene.widgetList.unranked.hide=scoreValid() scene.widgetList.unranked.hide=scoreValid()
BG.set('tunnel') BG.set('tunnel')
end end
function scene.back()
local totalModUsed=0
for i=1,#GAME.mod do
if GAME.mod[i]>0 then totalModUsed=totalModUsed+1
end
end
GAME.modUsed=totalModUsed>0 and totalModUsed or false
end
function scene.mouseMove(x,y) function scene.mouseMove(x,y)
selected=false selected=false