From 95c9a1d63845b7f7aeaab83a703819f5e1038d97 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 22 Apr 2021 21:54:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8Cro?= =?UTF-8?q?yaleData=E6=94=B9=E4=B8=BA=E5=85=A8=E5=A4=A7=E5=86=99=EF=BC=8C?= =?UTF-8?q?=E6=94=BE=E5=85=A5globalTables=E6=96=87=E4=BB=B6=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=98=E9=87=8F=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/gametoolfunc.lua | 24 +++++++++++------------- parts/globalTables.lua | 4 ++++ parts/modes/techmino49_e.lua | 6 ++---- parts/modes/techmino49_h.lua | 6 ++---- parts/modes/techmino49_u.lua | 6 ++---- parts/modes/techmino99_e.lua | 6 ++---- parts/modes/techmino99_h.lua | 6 ++---- parts/modes/techmino99_u.lua | 6 ++---- parts/player/player.lua | 4 ++-- parts/scenes/main.lua | 1 - 10 files changed, 29 insertions(+), 40 deletions(-) diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 9e79e36f..4ad49776 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -478,21 +478,19 @@ do--function drawFWM() mStr(m[_G["\83\69\84\84\73\78\71"]["\108\97\110\103"]or m[1]],240,60+26*sin(t)) end end -do--function drawSelfProfile() - function drawSelfProfile() - local selfAvatar=USERS.getAvatar(USER.uid) - gc_push("transform") - gc_translate(1280,0) +function drawSelfProfile() + local selfAvatar=USERS.getAvatar(USER.uid) + gc_push("transform") + gc_translate(1280,0) - --Draw avatar - gc_setLineWidth(2) - gc_setColor(.3,.3,.3,.8)gc_rectangle("fill",-260,0,260,80) - gc_setColor(1,1,1)gc_rectangle("line",-260,0,260,80) - gc_rectangle("line",-73,7,66,66,2) - gc_draw(selfAvatar,-72,8,nil,.5) + --Draw avatar + gc_setLineWidth(2) + gc_setColor(.3,.3,.3,.8)gc_rectangle("fill",-260,0,260,80) + gc_setColor(1,1,1)gc_rectangle("line",-260,0,260,80) + gc_rectangle("line",-73,7,66,66,2) + gc_draw(selfAvatar,-72,8,nil,.5) - gc_pop() - end + gc_pop() end function drawWarning() if SETTING.warn and GAME.warnLVL>0 then diff --git a/parts/globalTables.lua b/parts/globalTables.lua index f56f1a75..163cc4c9 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -178,6 +178,10 @@ GAME={--Global game data mostDangerous=false,--Most dangerous player secDangerous=false, --Second dangerous player } +ROYALEDATA={ + powerUp=false, + stage=false, +} --Userdata tables RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes diff --git a/parts/modes/techmino49_e.lua b/parts/modes/techmino49_e.lua index 05caf981..291cd1ba 100644 --- a/parts/modes/techmino49_e.lua +++ b/parts/modes/techmino49_e.lua @@ -28,10 +28,8 @@ return{ bg="rainbow",bgm="sugar fairy", }, load=function() - royaleData={ - powerUp={2,5,10,20}, - stage={30,20,15,10,5}, - } + ROYALEDATA.powerUp={2,5,10,20} + ROYALEDATA.stage={30,20,15,10,5} PLY.newPlayer(1) local L={}for i=1,49 do L[i]=true end local t=CC and 2 or 0 diff --git a/parts/modes/techmino49_h.lua b/parts/modes/techmino49_h.lua index 8f2efa53..15b79b49 100644 --- a/parts/modes/techmino49_h.lua +++ b/parts/modes/techmino49_h.lua @@ -28,10 +28,8 @@ return{ bg="rainbow",bgm="rockblock", }, load=function() - royaleData={ - powerUp={2,5,10,20}, - stage={30,20,15,10,5}, - } + ROYALEDATA.powerUp={2,5,10,20} + ROYALEDATA.stage={30,20,15,10,5} PLY.newPlayer(1) local L={}for i=1,49 do L[i]=true end local t=CC and 4 or 0 diff --git a/parts/modes/techmino49_u.lua b/parts/modes/techmino49_u.lua index fdc11d4a..1c0cdd9e 100644 --- a/parts/modes/techmino49_u.lua +++ b/parts/modes/techmino49_u.lua @@ -28,10 +28,8 @@ return{ bg="rainbow",bgm="magicblock", }, load=function() - royaleData={ - powerUp={2,5,10,20}, - stage={30,20,15,10,5}, - } + ROYALEDATA.powerUp={2,5,10,20} + ROYALEDATA.stage={30,20,15,10,5} PLY.newPlayer(1) local L={}for i=1,49 do L[i]=true end local t=CC and 6 or 0 diff --git a/parts/modes/techmino99_e.lua b/parts/modes/techmino99_e.lua index 9ef69fe9..984bed37 100644 --- a/parts/modes/techmino99_e.lua +++ b/parts/modes/techmino99_e.lua @@ -28,10 +28,8 @@ return{ bg="rainbow",bgm="sugar fairy", }, load=function() - royaleData={ - powerUp={2,6,14,30}, - stage={75,50,35,20,10}, - } + ROYALEDATA.powerUp={2,6,14,30} + ROYALEDATA.stage={75,50,35,20,10} PLY.newPlayer(1) local L={}for i=1,100 do L[i]=true end local t=CC and 4 or 0 diff --git a/parts/modes/techmino99_h.lua b/parts/modes/techmino99_h.lua index 6479e695..7edf5f6b 100644 --- a/parts/modes/techmino99_h.lua +++ b/parts/modes/techmino99_h.lua @@ -28,10 +28,8 @@ return{ bg="rainbow",bgm="rockblock", }, load=function() - royaleData={ - powerUp={2,6,14,30}, - stage={75,50,35,20,10}, - } + ROYALEDATA.powerUp={2,6,14,30} + ROYALEDATA.stage={75,50,35,20,10} PLY.newPlayer(1) local L={}for i=1,100 do L[i]=true end local t=CC and 4 or 0 diff --git a/parts/modes/techmino99_u.lua b/parts/modes/techmino99_u.lua index a6440694..2e7a2f95 100644 --- a/parts/modes/techmino99_u.lua +++ b/parts/modes/techmino99_u.lua @@ -28,10 +28,8 @@ return{ bg="rainbow",bgm="magicblock", }, load=function() - royaleData={ - powerUp={2,6,14,30}, - stage={75,50,35,20,10}, - } + ROYALEDATA.powerUp={2,6,14,30} + ROYALEDATA.stage={75,50,35,20,10} PLY.newPlayer(1) local L={}for i=1,100 do L[i]=true end local t=CC and 4 or 0 diff --git a/parts/player/player.lua b/parts/player/player.lua index ea651fbc..0e1079c7 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -1798,7 +1798,7 @@ function Player:lose(force) end A.modeData.ko,A.badge=A.modeData.ko+1,A.badge+self.badge+1 for j=A.strength+1,4 do - if A.badge>=royaleData.powerUp[j]then + if A.badge>=ROYALEDATA.powerUp[j]then A.strength=j A.frameColor=A.strength end @@ -1814,7 +1814,7 @@ function Player:lose(force) freshMostBadge() freshMostDangerous() - if #PLY_ALIVE==royaleData.stage[GAME.stage]then + if #PLY_ALIVE==ROYALEDATA.stage[GAME.stage]then royaleLevelup() end self:showTextF(self.modeData.place,0,120,60,"appear",.26,.9) diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 9cbc7ac9..1a7f1af0 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -32,7 +32,6 @@ function scene.sceneInit() --Set quick-play-button text scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1]) - quickSure=false --Create demo player destroyPlayers()