40 lines
1.3 KiB
TOML
40 lines
1.3 KiB
TOML
[manifest]
|
|
version = "1.0.0"
|
|
dump_lua = true
|
|
priority = 0
|
|
|
|
### Language API
|
|
|
|
# Game:set_language()
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = 'game.lua'
|
|
pattern = "if not (love.filesystem.read('localization/'..G.SETTINGS.language..'.lua')) or G.F_ENGLISH_ONLY then"
|
|
position = 'at'
|
|
payload = 'if false then'
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = 'game.lua'
|
|
pattern = "local localization = love.filesystem.getInfo('localization/'..G.SETTINGS.language..'.lua')"
|
|
position = 'at'
|
|
payload = "local localization = love.filesystem.getInfo('localization/'..G.SETTINGS.language..'.lua') or love.filesystem.getInfo('localization/en-us.lua')"
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = 'game.lua'
|
|
pattern = "self.localization = assert(loadstring(love.filesystem.read('localization/'..G.SETTINGS.language..'.lua')))()"
|
|
position = 'at'
|
|
payload = "self.localization = assert(loadstring(love.filesystem.read('localization/'..G.SETTINGS.language..'.lua') or love.filesystem.read('localization/en-us.lua')))()"
|
|
match_indent = true
|
|
|
|
# G.FUNCS.warn_lang (wtf)
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = 'functions/button_callbacks.lua'
|
|
pattern = 'if (_infotip_object.config.set ~= e.config.ref_table.label) and (not G.F_NO_ACHIEVEMENTS) then'
|
|
position = 'at'
|
|
payload = 'if (_infotip_object.config.set ~= e.config.ref_table.label) then'
|
|
match_indent = true |