几个全局变量名大写

This commit is contained in:
MrZ626
2020-11-09 23:23:47 +08:00
parent 2989067a55
commit 7b49053e6d
13 changed files with 32 additions and 32 deletions

View File

@@ -59,7 +59,7 @@ SETTING={
}
STAT={
version=gameVersion,
version=VERSION,
run=0,game=0,time=0,
key=0,rotate=0,hold=0,
extraPiece=0,finesseRate=0,

View File

@@ -62,7 +62,7 @@ function restoreVirtualKey()
end
function copyQuestArgs()
local ENV=customEnv
local ENV=CUSTOMENV
local str=""..
(ENV.hold and"H"or"Z")..
(ENV.ospin and"O"or"Z")..
@@ -71,7 +71,7 @@ function copyQuestArgs()
return str
end
function pasteQuestArgs(str)
local ENV=customEnv
local ENV=CUSTOMENV
ENV.hold= byte(str,1)~=90
ENV.ospin= byte(str,2)~=90
ENV.missionKill= byte(str,3)~=90

View File

@@ -11,11 +11,11 @@ local function notAir(L)
end
end
local customEnv=customEnv
local CUSTOMENV=CUSTOMENV
function sceneInit.customGame()
destroyPlayers()
BG.set(customEnv.bg)
BGM.play(customEnv.bgm)
BG.set(CUSTOMENV.bg)
BGM.play(CUSTOMENV.bgm)
sceneInit={initField=false}
for y=1,20 do
if notAir(FIELD[1][y])then
@@ -29,14 +29,14 @@ end
function keyDown.customGame(key)
if key=="return"or key=="return2"then
if customEnv.opponent>0 then
if customEnv.opponent>5 and customEnv.sequence=="fixed"then
if CUSTOMENV.opponent>0 then
if CUSTOMENV.opponent>5 and CUSTOMENV.sequence=="fixed"then
LOG.print(text.ai_fixed,"warn")
return
elseif customEnv.opponent>0 and #BAG>0 then
elseif CUSTOMENV.opponent>0 and #BAG>0 then
LOG.print(text.ai_prebag,"warn")
return
elseif customEnv.opponent>0 and #MISSION>0 then
elseif CUSTOMENV.opponent>0 and #MISSION>0 then
LOG.print(text.ai_mission,"warn")
return
end
@@ -141,11 +141,11 @@ function Pnt.customGame()
end
setFont(30)
gc.setColor(1,1,1)
gc.print(customEnv.sequence,330,510)
gc.print(CUSTOMENV.sequence,330,510)
--Sequence
if #MISSION>0 then
gc.setColor(1,customEnv.missionKill and 0 or 1,int(Timer()*6.26)%2)
gc.setColor(1,CUSTOMENV.missionKill and 0 or 1,int(Timer()*6.26)%2)
gc.print("#",610,545)
gc.print(#MISSION,640,545)
end
@@ -168,9 +168,9 @@ WIDGET.init("customGame",{
x=1070, y=150,w=250,color="yellow",
list={"none","grey","glow","rgb","flink","wing","fan","badapple","welcome","aura","bg1","bg2","rainbow","rainbow2","lightning","lightning2","matrix","space"},
disp=WIDGET.lnk.CUSval("bg"),
code=function(i)customEnv.bg=i BG.set(i)end
code=function(i)CUSTOMENV.bg=i BG.set(i)end
}),
WIDGET.newSelector({name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.list, disp=WIDGET.lnk.CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
WIDGET.newSelector({name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.list, disp=WIDGET.lnk.CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}),
--Copy/Paste/Start
WIDGET.newButton({name="copy", x=1070, y=310,w=310,h=70,color="lRed", font=25,code=WIDGET.lnk.pressKey("cC")}),

View File

@@ -15,7 +15,7 @@ WIDGET.init("custom_advance",{
--Control
WIDGET.newSlider({name="next", x=130, y=410,w=200,unit=6, disp=WIDGET.lnk.CUSval("next"), code=WIDGET.lnk.CUSsto("next")}),
WIDGET.newSwitch({name="hold", x=260, y=480, disp=WIDGET.lnk.CUSval("hold"), code=WIDGET.lnk.CUSrev("hold")}),
WIDGET.newSwitch({name="oncehold", x=260, y=560, disp=WIDGET.lnk.CUSval("oncehold"),code=WIDGET.lnk.CUSrev("oncehold"),hide=function()return not customEnv.hold end}),
WIDGET.newSwitch({name="oncehold", x=260, y=560, disp=WIDGET.lnk.CUSval("oncehold"),code=WIDGET.lnk.CUSrev("oncehold"),hide=function()return not CUSTOMENV.hold end}),
WIDGET.newSlider({name="mindas", x=180, y=150,w=400,unit=15,font=25, disp=WIDGET.lnk.CUSval("mindas"), code=WIDGET.lnk.CUSsto("mindas")}),
WIDGET.newSlider({name="minarr", x=180, y=220,w=400,unit=10,font=25, disp=WIDGET.lnk.CUSval("minarr"), code=WIDGET.lnk.CUSsto("minarr")}),

View File

@@ -24,7 +24,7 @@ function Pnt.main()
gc.draw(IMG.title_color,60,30,nil,1.3)
setFont(30)
gc.print(SYSTEM,610,50)
gc.print(gameVersion,610,90)
gc.print(VERSION,610,90)
gc.print(sceneTemp.tip,50,660)
local L=text.modes[STAT.lastPlay]
setFont(25)

View File

@@ -81,7 +81,7 @@ function Tick.httpREQ_launch(data)
err,res=json.decode(res.body)
if res then
LOG.print(res.notice,360,COLOR.sky)
if gameVersion==res.version then
if VERSION==res.version then
LOG.print(text.versionIsNew,360,COLOR.sky)
else
LOG.print(string.gsub(text.versionIsOld,"$1",res.version),"warn")