文件模块重构
This commit is contained in:
@@ -45,15 +45,9 @@ return{
|
||||
ai_fixed="The AI is incompatible with fixed sequences.",
|
||||
ai_prebag="The AI is incompatible with custom sequences.",
|
||||
ai_mission="The AI is incompatible with custom missions.",
|
||||
settingSaved="Settings Saved",
|
||||
settingSavingError="Failed to save settings:",
|
||||
keyMapSaved="Key settings saved",
|
||||
keyMapSavingError="Failed to save key settings:",
|
||||
VKSaved="Virtual keys saved",
|
||||
VKSavingError="Failed to save virtual key configuration:",
|
||||
statSavingError="Failed to save statistics:",
|
||||
unlockSavingError="Failed to save unlocked content:",
|
||||
recSavingError="Failed to save record:",
|
||||
saveDone="Data Saved",
|
||||
saveError="Failed to save:",
|
||||
loadError="Failed to read:",
|
||||
switchSpawnSFX="Switch on spawn SFX to play",
|
||||
ranks={"D","C","B","A","S"},
|
||||
|
||||
|
||||
@@ -48,15 +48,9 @@ return{
|
||||
ai_fixed="L'IA est incompatible avec les séquences fixes.",
|
||||
ai_prebag="L'IA est incompatible avec les séquences personnalisées.",
|
||||
ai_mission="L'IA est incompatible avec les missions personnalisées.",
|
||||
settingSaved="Paramètres sauvegardés",
|
||||
settingSavingError="Erreur de sauvegarde des paramètres :",
|
||||
keyMapSaved="Touches sauvegardées.",
|
||||
keyMapSavingError="Erreur de sauvegarde des touches :",
|
||||
VKSaved="Touches virtuelles sauvegardées",
|
||||
VKSavingError="Erreur de sauvegarde des touches virtuelles :",
|
||||
statSavingError="Erreur de sauvegarde des statistiques :",
|
||||
unlockSavingError="Erreur de sauvegarde du contenu débloqué :",
|
||||
recSavingError="Erreur de sauvegarde des records :",
|
||||
-- saveDone="Data Saved",
|
||||
-- saveError="Failed to save:",
|
||||
-- loadError="Failed to read:",
|
||||
switchSpawnSFX="Activez les effets sonores d'apparition des pièces pour jouer",
|
||||
getRank="Rang: ",
|
||||
|
||||
|
||||
@@ -48,14 +48,9 @@ return{
|
||||
ai_prebag="La IA no es compatible con secuencias de piezas personalizadas.",
|
||||
ai_mission="La IA no es compatible con misiones personalizadas.",
|
||||
settingSaved="Cambios guardados",
|
||||
settingSavingError="Error al guardar los cambios:",
|
||||
keyMapSaved="Configuración de controles guardada",
|
||||
keyMapSavingError="Error al guardar la configración de controles:",
|
||||
VKSaved="Configuración de botones en pantalla guardada",
|
||||
VKSavingError="Error al guardar la configuración de botones en pantalla:",
|
||||
statSavingError="Error al guardar las estadísticas:",
|
||||
unlockSavingError="Error al guardar el contenido desbloqueado:",
|
||||
recSavingError="Error al guardar la grabación:",
|
||||
-- saveDone="Data Saved",
|
||||
-- saveError="Failed to save:",
|
||||
-- loadError="Failed to read:",
|
||||
switchSpawnSFX="Habilita los sonidos de aparición de las piezas ;)",
|
||||
getRank="Rango obtenido:",
|
||||
|
||||
|
||||
@@ -38,15 +38,9 @@ return{
|
||||
ai_fixed="X!!!",
|
||||
ai_prebag="X!!!",
|
||||
ai_mission="X!!!",
|
||||
settingSaved="~~~",
|
||||
settingSavingError="x!:",
|
||||
keyMapSaved="~~~",
|
||||
keyMapSavingError="x!:",
|
||||
VKSaved="~~~",
|
||||
VKSavingError="x!:",
|
||||
statSavingError="x!:",
|
||||
unlockSavingError="x!:",
|
||||
recSavingError="x!:",
|
||||
saveDone="~~~",
|
||||
saveError="x!:",
|
||||
loadError="x!:",
|
||||
|
||||
needRestart="!!*#R#*!!",
|
||||
exportSuccess="~Out~",
|
||||
|
||||
@@ -46,15 +46,9 @@ return{
|
||||
ai_fixed="不能同时开启AI和固定序列",
|
||||
ai_prebag="不能同时开启AI和自定义序列",
|
||||
ai_mission="不能同时开启AI和自定义任务",
|
||||
settingSaved="设置已保存",
|
||||
settingSavingError="设置保存失败:",
|
||||
keyMapSaved="键位设置已保存",
|
||||
keyMapSavingError="键位保存失败:",
|
||||
VKSaved="虚拟按键设置已保存",
|
||||
VKSavingError="虚拟按键保存失败:",
|
||||
statSavingError="统计保存失败:",
|
||||
unlockSavingError="解锁保存失败:",
|
||||
recSavingError="纪录保存失败:",
|
||||
saveDone="保存成功!",
|
||||
saveError="保存失败:",
|
||||
loadError="读取失败:",
|
||||
switchSpawnSFX="请开启方块出生音效",
|
||||
ranks={"D","C","B","A","S"},
|
||||
|
||||
|
||||
@@ -1358,7 +1358,7 @@ end
|
||||
--------------------------<Events>--------------------------
|
||||
local function gameOver()--Save record
|
||||
if GAME.replaying then return end
|
||||
FILE.saveData()
|
||||
FILE.save(STAT,"data")
|
||||
local M=GAME.curMode
|
||||
local R=M.getRank
|
||||
if R then
|
||||
@@ -1388,7 +1388,7 @@ local function gameOver()--Save record
|
||||
end
|
||||
end
|
||||
if needSave then
|
||||
FILE.saveUnlock()
|
||||
FILE.save(RANKS,"unlock")
|
||||
end
|
||||
local D=M.score(P)
|
||||
local L=M.records
|
||||
@@ -1406,7 +1406,7 @@ local function gameOver()--Save record
|
||||
D.date=os.date("%Y/%m/%d %H:%M")
|
||||
ins(L,p+1,D)
|
||||
if L[11]then L[11]=nil end
|
||||
FILE.saveRecord(M.name,L)
|
||||
FILE.save(L,M.name,"",true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -82,7 +82,7 @@ function keyDown.calculator(k)
|
||||
RANKS[name]=M.score and 0 or 6
|
||||
end
|
||||
end
|
||||
FILE.saveUnlock()
|
||||
FILE.save(RANKS,"unlock")
|
||||
LOG.print("\68\69\86\58\85\78\76\79\67\75\65\76\76","message")
|
||||
SFX.play("clear_2")
|
||||
elseif v==1379e8+2626e4+1379 then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function sceneBack.lang()
|
||||
FILE.saveSetting()
|
||||
FILE.save(SETTING,"settings")
|
||||
end
|
||||
|
||||
local function setLang(n)return function()SETTING.lang=n LANG.set(n)end end
|
||||
|
||||
@@ -70,7 +70,7 @@ function Tmr.load()
|
||||
for k,v in next,m do
|
||||
M[k]=v
|
||||
end
|
||||
M.records=FILE.loadRecord(m.name)or M.score and{}
|
||||
M.records=FILE.load(m.name)or M.score and{}
|
||||
if M.score then
|
||||
if RANKS[M.name]==6 then
|
||||
RANKS[M.name]=0
|
||||
|
||||
@@ -117,7 +117,9 @@ function sceneBack.pause()
|
||||
if not GAME.replaying then
|
||||
mergeStat(STAT,PLAYERS[1].stat)
|
||||
end
|
||||
FILE.saveData()
|
||||
if not GAME.result then
|
||||
FILE.save(STAT,"data")
|
||||
end
|
||||
end
|
||||
|
||||
function keyDown.pause(key)
|
||||
|
||||
@@ -7,7 +7,7 @@ function sceneInit.setting_game()
|
||||
BG.set("space")
|
||||
end
|
||||
function sceneBack.setting_game()
|
||||
FILE.saveSetting()
|
||||
FILE.save(SETTING,"settings")
|
||||
end
|
||||
|
||||
function Pnt.setting_game()
|
||||
|
||||
@@ -13,7 +13,7 @@ function sceneInit.setting_key()
|
||||
}
|
||||
end
|
||||
function sceneBack.setting_key()
|
||||
FILE.saveKeyMap()
|
||||
FILE.save(keyMap,"key")
|
||||
end
|
||||
|
||||
function keyDown.setting_key(key)
|
||||
|
||||
@@ -13,7 +13,7 @@ function sceneInit.setting_sound()
|
||||
BG.set("space")
|
||||
end
|
||||
function sceneBack.setting_sound()
|
||||
FILE.saveSetting()
|
||||
FILE.save(SETTING,"settings")
|
||||
end
|
||||
|
||||
function mouseDown.setting_sound(x,y)
|
||||
|
||||
@@ -13,7 +13,7 @@ function sceneInit.setting_touch()
|
||||
}
|
||||
end
|
||||
function sceneBack.setting_touch()
|
||||
FILE.saveVK()
|
||||
FILE.save(VK_org,"virtualkey")
|
||||
end
|
||||
|
||||
local function onVK_org(x,y)
|
||||
|
||||
@@ -2,7 +2,7 @@ function sceneInit.setting_video()
|
||||
BG.set("space")
|
||||
end
|
||||
function sceneBack.setting_video()
|
||||
FILE.saveSetting()
|
||||
FILE.save(SETTING,"settings")
|
||||
end
|
||||
|
||||
WIDGET.init("setting_video",{
|
||||
|
||||
Reference in New Issue
Block a user