default_data文件改名globalTables,main中全局table声明统一放到里面

This commit is contained in:
MrZ626
2020-11-19 20:39:15 +08:00
parent 55fc778d38
commit 1c31015fa8
8 changed files with 423 additions and 208 deletions

View File

@@ -533,8 +533,8 @@ function draw.norm(P)
--Other messages
gc.setColor(1,1,1)
if CURMODE.mesDisp then
CURMODE.mesDisp(P)
if GAME.curMode.mesDisp then
GAME.curMode.mesDisp(P)
end
--Missions

View File

@@ -192,15 +192,11 @@ end
local function loadGameEnv(P)--Load gameEnv
P.gameEnv={}--Current game setting environment
local ENV=P.gameEnv
local MODOPT=MODOPT
local GAME=GAME
local SETTING=SETTING
--Load game settings
for k,v in next,gameEnv0 do
if MODOPT[k]~=nil then
v=MODOPT[k] --Mod setting
-- DBP("mod-"..k..":"..tostring(v))
elseif MODEENV[k]~=nil then
if MODEENV[k]~=nil then
v=MODEENV[k] --Mode setting
-- DBP("mode-"..k..":"..tostring(v))
elseif GAME.setting[k]~=nil then

View File

@@ -1327,7 +1327,7 @@ end
local function gameOver()--Save record
if GAME.replaying then return end
FILE.saveData()
local M=CURMODE
local M=GAME.curMode
local R=M.getRank
if R then
local P=PLAYERS[1]
@@ -1411,7 +1411,7 @@ function Player.win(P,result)
BGM.play("8-bit happiness")
end
end
if CURMODE.id=="custom_puzzle"then
if GAME.curMode.id=="custom_puzzle"then
P:showTextF(text.win,0,0,90,"beat",.4)
else
P:showTextF(text.win,0,0,90,"beat",.5,.2)