Identation Fixes
This commit is contained in:
parent
cbeab6f9b0
commit
72d63673ca
1
init.lua
1
init.lua
|
@ -49,6 +49,7 @@ g_modules.ensureModuleLoaded("game_interface")
|
||||||
g_modules.autoLoadModules(9999)
|
g_modules.autoLoadModules(9999)
|
||||||
|
|
||||||
local script = '/' .. g_app.getCompactName() .. 'rc'
|
local script = '/' .. g_app.getCompactName() .. 'rc'
|
||||||
|
|
||||||
if g_resources.fileExists(script) then
|
if g_resources.fileExists(script) then
|
||||||
dofile(script)
|
dofile(script)
|
||||||
end
|
end
|
|
@ -53,6 +53,9 @@ function startup()
|
||||||
end
|
end
|
||||||
|
|
||||||
function init()
|
function init()
|
||||||
|
connect(g_app, { onRun = startup,
|
||||||
|
onClose = exit })
|
||||||
|
|
||||||
g_window.setMinimumSize({ width = 600, height = 480 })
|
g_window.setMinimumSize({ width = 600, height = 480 })
|
||||||
g_sounds.preload(musicFilename)
|
g_sounds.preload(musicFilename)
|
||||||
|
|
||||||
|
@ -91,15 +94,12 @@ function init()
|
||||||
if not g_crypt.setMachineUUID(g_configs.get('uuid')) then
|
if not g_crypt.setMachineUUID(g_configs.get('uuid')) then
|
||||||
g_configs.set('uuid', g_crypt.getMachineUUID())
|
g_configs.set('uuid', g_crypt.getMachineUUID())
|
||||||
g_configs.save()
|
g_configs.save()
|
||||||
end
|
end
|
||||||
|
|
||||||
connect(g_app, {
|
|
||||||
onRun = startup,
|
|
||||||
onClose = exit,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function terminate()
|
function terminate()
|
||||||
|
disconnect(g_app, { onRun = startup,
|
||||||
|
onClose = exit })
|
||||||
-- save window configs
|
-- save window configs
|
||||||
g_settings.set('window-size', g_window.getUnmaximizedSize())
|
g_settings.set('window-size', g_window.getUnmaximizedSize())
|
||||||
g_settings.set('window-pos', g_window.getUnmaximizedPos())
|
g_settings.set('window-pos', g_window.getUnmaximizedPos())
|
||||||
|
@ -108,7 +108,7 @@ function terminate()
|
||||||
local protocolVersion = g_game.getProtocolVersion()
|
local protocolVersion = g_game.getProtocolVersion()
|
||||||
if protocolVersion ~= 0 then
|
if protocolVersion ~= 0 then
|
||||||
g_settings.set('protocol-version', protocolVersion)
|
g_settings.set('protocol-version', protocolVersion)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function exit()
|
function exit()
|
||||||
|
|
Loading…
Reference in New Issue