Uniform quotation format.

This commit is contained in:
GreenComfyTea
2022-07-19 17:01:50 +03:00
parent 56a6167466
commit 783993caa8
3 changed files with 11 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ function damage_hook.update_damage(enemy, enemy_calc_damage_info)
local attacker_type = get_damage_attacker_type_method:call(enemy_calc_damage_info);
local is_marionette_attack = is_marionette_attack_method:call(enemy_calc_damage_info)
-- 4 is virtual player in singleplayer that 'owns' 2nd otomo
-- 4 is virtual player in singleplayer that "owns" 2nd otomo
if not quest_status.is_online and attacker_id == 4 then
attacker_id = player.myself.player_id;
end

View File

@@ -4062,10 +4062,10 @@ end
function config.load()
local loaded_config = json.load_file(config.config_file_name);
if loaded_config ~= nil then
log.info('[MHR Overlay] config.json loaded successfully');
log.info("[MHR Overlay] config.json loaded successfully");
config.current_config = table_helpers.merge(config.default_config, loaded_config);
else
log.error('[MHR Overlay] Failed to load config.json');
log.error("[MHR Overlay] Failed to load config.json");
config.current_config = table_helpers.deep_copy(config.default_config);
end
end
@@ -4074,9 +4074,9 @@ function config.save()
-- save current config to disk, replacing any existing file
local success = json.dump_file(config.config_file_name, config.current_config);
if success then
log.info('[MHR Overlay] config.json saved successfully');
log.info("[MHR Overlay] config.json saved successfully");
else
log.error('[MHR Overlay] Failed to save config.json');
log.error("[MHR Overlay] Failed to save config.json");
end
end

View File

@@ -4,7 +4,7 @@ function table_helpers.deep_copy(original, copies)
copies = copies or {};
local original_type = type(original);
local copy;
if original_type == 'table' then
if original_type == "table" then
if copies[original] then
copy = copies[original];
else
@@ -62,15 +62,15 @@ function table_helpers.merge(...)
end
function table_helpers.tostring(table)
if type(table) == 'table' then
local s = '{ \n';
if type(table) == "table" then
local s = "{ \n";
for k,v in pairs(table) do
if type(k) ~= 'number' then
if type(k) ~= "number" then
k = '"' .. k .. '"';
end
s = s .. '\t['..k..'] = ' .. table_helpers.tostring(v) .. ',\n';
s = s .. "\t["..k.."] = " .. table_helpers.tostring(v) .. ",\n";
end
return s .. '} \n';
return s .. "} \n";
else
return tostring(table);
end