Fixed more breaking changes

This commit is contained in:
Cooldude2606
2024-10-19 17:49:04 +01:00
parent 88cd64e422
commit 90d0a122cd
10 changed files with 39 additions and 29 deletions

View File

@@ -136,7 +136,7 @@ end
function Common.optional_require(module_path)
local success, rtn = xpcall(require, traceback, module_path)
if success then return rtn end
if not rtn:find("not found; no such file", 0, true) then
if not rtn:find("no such file", 0, true) then
error(rtn, 2)
end
end
@@ -382,7 +382,7 @@ end
--- @param options Common.format_time_factory_param
--- @return fun(ticks: number|nil): LocalisedString
function Common.format_time_factory_locale(options)
local formatter, format, coefficient = Common.format_local_time, options.format, options.coefficient
local formatter, format, coefficient = Common.format_time_locale, options.format, options.coefficient
if coefficient then
return function(ticks) return formatter(ticks and ticks * coefficient or nil, format, options) end
end