@@ -287,11 +287,8 @@ function love.keypressed(key,_,isRep)
|
|||||||
devMode=1
|
devMode=1
|
||||||
MES.new('info',"DEBUG ON",.2)
|
MES.new('info',"DEBUG ON",.2)
|
||||||
elseif key=="f11"then
|
elseif key=="f11"then
|
||||||
if kb.isDown("lctrl","rctrl")then
|
|
||||||
_G['\100\114\97\119\70\87\77']=NULL
|
|
||||||
else
|
|
||||||
switchFullscreen()
|
switchFullscreen()
|
||||||
end
|
saveSettings()
|
||||||
elseif not SCN.swapping then
|
elseif not SCN.swapping then
|
||||||
if SCN.keyDown then
|
if SCN.keyDown then
|
||||||
if EDITING==""then
|
if EDITING==""then
|
||||||
|
|||||||
6
main.lua
6
main.lua
@@ -354,9 +354,9 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
if needSave then
|
if needSave then
|
||||||
FILE.save(SETTING,'conf/settings')
|
saveStats()
|
||||||
FILE.save(RANKS,'conf/unlock')
|
saveProgress()
|
||||||
FILE.save(STAT,'conf/data')
|
saveSettings()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,15 @@ local SETTING,GAME,SCR=SETTING,GAME,SCR
|
|||||||
|
|
||||||
|
|
||||||
--System
|
--System
|
||||||
|
function saveStats()
|
||||||
|
FILE.save(STAT,'conf/data')
|
||||||
|
end
|
||||||
|
function saveProgress()
|
||||||
|
FILE.save(RANKS,'conf/unlock')
|
||||||
|
end
|
||||||
|
function saveSettings()
|
||||||
|
FILE.save(SETTING,'conf/settings')
|
||||||
|
end
|
||||||
function applySettings()
|
function applySettings()
|
||||||
love.window.setFullscreen(SETTING.fullscreen)
|
love.window.setFullscreen(SETTING.fullscreen)
|
||||||
LANG.set(SETTING.lang)
|
LANG.set(SETTING.lang)
|
||||||
@@ -304,7 +313,7 @@ function gameOver()--Save record
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if needSave then
|
if needSave then
|
||||||
FILE.save(RANKS,'conf/unlock')
|
saveProgress()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local D=M.score(P)
|
local D=M.score(P)
|
||||||
@@ -340,7 +349,7 @@ function trySave()
|
|||||||
STAT.game=STAT.game+1
|
STAT.game=STAT.game+1
|
||||||
mergeStat(STAT,PLAYERS[1].stat)
|
mergeStat(STAT,PLAYERS[1].stat)
|
||||||
STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time
|
STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time
|
||||||
FILE.save(STAT,'conf/data')
|
saveStats()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
do--function freshPlayerPosition(sudden)
|
do--function freshPlayerPosition(sudden)
|
||||||
|
|||||||
@@ -262,14 +262,14 @@ function NET.loadSavedData(sections)
|
|||||||
if STAT.version==NET.cloudData.STAT.version then
|
if STAT.version==NET.cloudData.STAT.version then
|
||||||
local success=true
|
local success=true
|
||||||
TABLE.update(NET.cloudData.STAT,STAT)
|
TABLE.update(NET.cloudData.STAT,STAT)
|
||||||
success=success and FILE.save(STAT,'conf/data')
|
success=success and saveStats()
|
||||||
|
|
||||||
TABLE.update(NET.cloudData.RANKS,RANKS)
|
TABLE.update(NET.cloudData.RANKS,RANKS)
|
||||||
success=success and FILE.save(RANKS,'conf/unlock')
|
success=success and saveProgress()
|
||||||
|
|
||||||
TABLE.update(NET.cloudData.SETTING,SETTING)
|
TABLE.update(NET.cloudData.SETTING,SETTING)
|
||||||
applySettings()
|
applySettings()
|
||||||
success=success and FILE.save(SETTING,'conf/settings')
|
success=success and saveSettings()
|
||||||
|
|
||||||
TABLE.update(NET.cloudData.keyMap,keyMap)
|
TABLE.update(NET.cloudData.keyMap,keyMap)
|
||||||
success=success and FILE.save(keyMap,'conf/key')
|
success=success and FILE.save(keyMap,'conf/key')
|
||||||
|
|||||||
@@ -656,9 +656,8 @@ local commands={}do
|
|||||||
if #key>0 then
|
if #key>0 then
|
||||||
if SETTING[key]~=nil then
|
if SETTING[key]~=nil then
|
||||||
SETTING[key]=nil
|
SETTING[key]=nil
|
||||||
if FILE.save(SETTING,'conf/settings')then
|
saveSettings()
|
||||||
log{C.Y,("Succesfully erased key '%s'"):format(key)}
|
log{C.Y,("Succesfully erased key '%s'"):format(key)}
|
||||||
end
|
|
||||||
else
|
else
|
||||||
log{C.R,"No key called "..key}
|
log{C.R,"No key called "..key}
|
||||||
end
|
end
|
||||||
@@ -683,7 +682,7 @@ local commands={}do
|
|||||||
if M.x then RANKS[name]=0 end
|
if M.x then RANKS[name]=0 end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
FILE.save(RANKS,'conf/unlock')
|
saveProgress()
|
||||||
log{C.lC,"\85\78\76\79\67\75\65\76\76"}
|
log{C.lC,"\85\78\76\79\67\75\65\76\76"}
|
||||||
SFX.play('clear_2')
|
SFX.play('clear_2')
|
||||||
else
|
else
|
||||||
@@ -719,7 +718,7 @@ local commands={}do
|
|||||||
code=function(bool)
|
code=function(bool)
|
||||||
if bool=="on"or bool=="off"then
|
if bool=="on"or bool=="off"then
|
||||||
SETTING.allowTAS=bool=="on"
|
SETTING.allowTAS=bool=="on"
|
||||||
FILE.save(SETTING,'conf/settings')
|
saveSettings()
|
||||||
log("Allow TAS: "..bool)
|
log("Allow TAS: "..bool)
|
||||||
if bool then
|
if bool then
|
||||||
log("Hot keys: f1=play/pause f2=slowdown f3=speedup/nextframe")
|
log("Hot keys: f1=play/pause f2=slowdown f3=speedup/nextframe")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ local langList={
|
|||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
FILE.save(SETTING,'conf/settings')
|
saveSettings()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _setLang(n)
|
local function _setLang(n)
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ local loadingThread=coroutine.wrap(function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if editFlag then
|
if editFlag then
|
||||||
FILE.save(RANKS,'conf/unlock')
|
saveProgress()
|
||||||
end
|
end
|
||||||
|
|
||||||
YIELD('loadOther')
|
YIELD('loadOther')
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ scene.widgetList={
|
|||||||
RANKS[k]=nil
|
RANKS[k]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if FILE.save(RANKS,'conf/unlock')then
|
saveProgress()
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
end
|
|
||||||
else
|
else
|
||||||
MES.new('error',text.dataCorrupted)
|
MES.new('error',text.dataCorrupted)
|
||||||
end
|
end
|
||||||
@@ -49,9 +48,8 @@ scene.widgetList={
|
|||||||
local D=parseCB()
|
local D=parseCB()
|
||||||
if D and D.version==STAT.version then
|
if D and D.version==STAT.version then
|
||||||
TABLE.update(D,STAT)
|
TABLE.update(D,STAT)
|
||||||
if FILE.save(STAT,'conf/data')then
|
saveStats()
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
end
|
|
||||||
else
|
else
|
||||||
MES.new('error',text.dataCorrupted)
|
MES.new('error',text.dataCorrupted)
|
||||||
end
|
end
|
||||||
@@ -62,9 +60,8 @@ scene.widgetList={
|
|||||||
if D then
|
if D then
|
||||||
TABLE.update(D,SETTING)
|
TABLE.update(D,SETTING)
|
||||||
applySettings()
|
applySettings()
|
||||||
if FILE.save(SETTING,'conf/settings')then
|
saveSettings()
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
end
|
|
||||||
else
|
else
|
||||||
MES.new('error',text.dataCorrupted)
|
MES.new('error',text.dataCorrupted)
|
||||||
end
|
end
|
||||||
@@ -74,9 +71,8 @@ scene.widgetList={
|
|||||||
local D=parseCB()
|
local D=parseCB()
|
||||||
if D then
|
if D then
|
||||||
TABLE.update(D,VK_org)
|
TABLE.update(D,VK_org)
|
||||||
if FILE.save(VK_org,'conf/virtualkey')then
|
FILE.save(VK_org,'conf/virtualkey')
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
end
|
|
||||||
else
|
else
|
||||||
MES.new('error',text.dataCorrupted)
|
MES.new('error',text.dataCorrupted)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ function scene.sceneInit()
|
|||||||
BG.set()
|
BG.set()
|
||||||
end
|
end
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
FILE.save(SETTING,'conf/settings')
|
saveSettings()
|
||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function scene.sceneInit()
|
|||||||
BG.set()
|
BG.set()
|
||||||
end
|
end
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
FILE.save(SETTING,'conf/settings')
|
saveSettings()
|
||||||
end
|
end
|
||||||
|
|
||||||
function scene.mouseDown(x,y)
|
function scene.mouseDown(x,y)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local gc=love.graphics
|
|||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
function scene.sceneBack()
|
function scene.sceneBack()
|
||||||
FILE.save(SETTING,'conf/settings')
|
saveSettings()
|
||||||
end
|
end
|
||||||
|
|
||||||
local fakeBlock={{true}}
|
local fakeBlock={{true}}
|
||||||
|
|||||||
Reference in New Issue
Block a user