Fixed more breaking changes

This commit is contained in:
Cooldude2606 committed 2024-11-19 22:35:22 +00:00
1 parent 88cd64e422
commit 90d0a122cd
10 files changed
+39 -29

No files matched your search

+2 -2
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