自定义游戏设置会自动保存
This commit is contained in:
@@ -148,44 +148,6 @@ PLY_NET={}
|
|||||||
FIELD={}--Field(s) for custom game
|
FIELD={}--Field(s) for custom game
|
||||||
BAG={}--Sequence for custom game
|
BAG={}--Sequence for custom game
|
||||||
MISSION={}--Clearing mission for custom game
|
MISSION={}--Clearing mission for custom game
|
||||||
CUSTOMENV={--gameEnv for cutsom game
|
|
||||||
--Basic
|
|
||||||
drop=1e99,
|
|
||||||
lock=1e99,
|
|
||||||
wait=0,
|
|
||||||
fall=0,
|
|
||||||
|
|
||||||
--Control
|
|
||||||
nextCount=6,
|
|
||||||
holdCount=1,
|
|
||||||
infHold=true,
|
|
||||||
phyHold=false,
|
|
||||||
|
|
||||||
--Visual
|
|
||||||
bone=false,
|
|
||||||
|
|
||||||
--Rule
|
|
||||||
sequence="bag",
|
|
||||||
fieldH=20,
|
|
||||||
|
|
||||||
ospin=true,
|
|
||||||
fineKill=false,
|
|
||||||
b2bKill=false,
|
|
||||||
easyFresh=true,
|
|
||||||
deepDrop=false,
|
|
||||||
visible="show",
|
|
||||||
freshLimit=1e99,
|
|
||||||
|
|
||||||
|
|
||||||
opponent="X",
|
|
||||||
life=0,
|
|
||||||
pushSpeed=3,
|
|
||||||
missionKill=false,
|
|
||||||
|
|
||||||
--Else
|
|
||||||
bg="none",
|
|
||||||
bgm="infinite",
|
|
||||||
}
|
|
||||||
GAME={--Global game data
|
GAME={--Global game data
|
||||||
init=false, --If need initializing game when enter scene-play
|
init=false, --If need initializing game when enter scene-play
|
||||||
net=false, --If play net game
|
net=false, --If play net game
|
||||||
@@ -227,6 +189,47 @@ USER=FILE.load("conf/user")or{--User infomation
|
|||||||
--Local data
|
--Local data
|
||||||
xp=0,lv=1,
|
xp=0,lv=1,
|
||||||
}
|
}
|
||||||
|
CUSTOMENV=FILE.load("conf/customEnv")
|
||||||
|
if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV={--gameEnv for cutsom game
|
||||||
|
version=VERSION.code,
|
||||||
|
|
||||||
|
--Basic
|
||||||
|
drop=1e99,
|
||||||
|
lock=1e99,
|
||||||
|
wait=0,
|
||||||
|
fall=0,
|
||||||
|
|
||||||
|
--Control
|
||||||
|
nextCount=6,
|
||||||
|
holdCount=1,
|
||||||
|
infHold=true,
|
||||||
|
phyHold=false,
|
||||||
|
|
||||||
|
--Visual
|
||||||
|
bone=false,
|
||||||
|
|
||||||
|
--Rule
|
||||||
|
sequence="bag",
|
||||||
|
fieldH=20,
|
||||||
|
|
||||||
|
ospin=true,
|
||||||
|
fineKill=false,
|
||||||
|
b2bKill=false,
|
||||||
|
easyFresh=true,
|
||||||
|
deepDrop=false,
|
||||||
|
visible="show",
|
||||||
|
freshLimit=1e99,
|
||||||
|
|
||||||
|
|
||||||
|
opponent="X",
|
||||||
|
life=0,
|
||||||
|
pushSpeed=3,
|
||||||
|
missionKill=false,
|
||||||
|
|
||||||
|
--Else
|
||||||
|
bg="none",
|
||||||
|
bgm="infinite",
|
||||||
|
}end
|
||||||
SETTING={--Settings
|
SETTING={--Settings
|
||||||
--Tuning
|
--Tuning
|
||||||
das=10,arr=2,dascut=0,
|
das=10,arr=2,dascut=0,
|
||||||
|
|||||||
@@ -48,9 +48,11 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
if key=="return2"or kb.isDown("lalt","lctrl","lshift")then
|
if key=="return2"or kb.isDown("lalt","lctrl","lshift")then
|
||||||
if initField then
|
if initField then
|
||||||
|
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||||
loadGame("custom_puzzle",true)
|
loadGame("custom_puzzle",true)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||||
loadGame("custom_clear",true)
|
loadGame("custom_clear",true)
|
||||||
end
|
end
|
||||||
elseif key=="f"then
|
elseif key=="f"then
|
||||||
@@ -87,6 +89,7 @@ function scene.keyDown(key)
|
|||||||
do return end
|
do return end
|
||||||
::THROW_fail::LOG.print(text.dataCorrupted,COLOR.red)
|
::THROW_fail::LOG.print(text.dataCorrupted,COLOR.red)
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
|
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||||
SCN.back()
|
SCN.back()
|
||||||
else
|
else
|
||||||
WIDGET.keyPressed(key)
|
WIDGET.keyPressed(key)
|
||||||
@@ -171,7 +174,7 @@ scene.widgetList={
|
|||||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="pink", font=25,code=goScene"custom_sequence"},
|
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="pink", font=25,code=goScene"custom_sequence"},
|
||||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="sky", font=25,code=goScene"custom_mission"},
|
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="sky", font=25,code=goScene"custom_mission"},
|
||||||
|
|
||||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene},
|
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=pressKey"escape"},
|
||||||
}
|
}
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
Reference in New Issue
Block a user