diff --git a/parts/data.lua b/parts/data.lua index 7685de1e..d5e37822 100644 --- a/parts/data.lua +++ b/parts/data.lua @@ -241,7 +241,7 @@ function DATA.copyQuestArgs() end do--function DATA.pasteQuestArgs(str) local sub=string.sub - function pasteQuestArgs(str) + function DATA.pasteQuestArgs(str) if #str<4 then return end local ENV=CUSTOMENV ENV.holdCount= byte(str,1)-48 diff --git a/parts/player/player.lua b/parts/player/player.lua index 0e1079c7..62328215 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -1604,7 +1604,7 @@ local function tick_lose(self) end end end -function tick_autoPause() +local function tick_autoPause() local time=0 while true do yield() diff --git a/parts/scenes/app_polyforge.lua b/parts/scenes/app_polyforge.lua index 9d122b15..2c95e065 100644 --- a/parts/scenes/app_polyforge.lua +++ b/parts/scenes/app_polyforge.lua @@ -23,7 +23,7 @@ local function new() end end -scene={} +local scene={} function scene.sceneInit() state=0 diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 66443914..d40b3380 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -75,7 +75,7 @@ function scene.keyDown(key) local args=STRING.split(str:sub((str:find(":")or 0)+1),"!") if #args<4 then goto THROW_fail end if not( - pasteQuestArgs(args[1])and + DATA.pasteQuestArgs(args[1])and DATA.pasteSequence(args[2])and DATA.pasteMission(args[3]) )then goto THROW_fail end diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index fba3c30f..23325b93 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -194,6 +194,7 @@ local baseRankColor={ {.85,.8,.3,.3}, {.4,.7,.4,.3}, } +local rankColor=rankColor local function drawModeShape(M,S,drawType) if M.shape==1 then--Rectangle gc.rectangle(drawType,M.x-S,M.y-S,2*S,2*S) diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index 34f55254..76ff2b7e 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -2,7 +2,8 @@ local gc=love.graphics local sin,log=math.sin,math.log10 local format=string.format -local SCR,setFont,mStr=SCR,setFont,mStr +local GAME,SCR=GAME,SCR +local setFont,mStr=setFont,mStr local fnsRankColor={ Z=COLOR.lY, @@ -311,12 +312,12 @@ function scene.draw() end scene.widgetList={ - WIDGET.newButton{name="setting", x=1120, y=70, w=240,h=90, color="lB",font=35,code=pressKey"s"}, - WIDGET.newButton{name="replay", x=535, y=250, w=200,h=100,color="lY",font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, - WIDGET.newButton{name="save", x=745, y=250, w=200,h=100,color="G",font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, - WIDGET.newButton{name="resume", x=640, y=367, w=240,h=100,color="lG",font=30,code=pressKey"escape"}, - WIDGET.newButton{name="restart", x=640, y=483, w=240,h=100,color="lR",font=35,code=pressKey"r"}, - WIDGET.newButton{name="quit", x=640, y=600, w=240,h=100,font=35,code=backScene}, + WIDGET.newButton{name="setting", x=1120,y=70,w=240,h=90, color="lB",font=35,code=pressKey"s"}, + WIDGET.newButton{name="replay", x=535,y=250,w=200,h=100,color="lY",font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, + WIDGET.newButton{name="save", x=745,y=250,w=200,h=100,color="G",font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, + WIDGET.newButton{name="resume", x=640,y=367,w=240,h=100,color="lG",font=30,code=pressKey"escape"}, + WIDGET.newButton{name="restart", x=640,y=483,w=240,h=100,color="lR",font=35,code=pressKey"r"}, + WIDGET.newButton{name="quit", x=640,y=600,w=240,h=100,font=35,code=backScene}, } return scene \ No newline at end of file