Update all code styles

This commit is contained in:
Cooldude2606
2024-09-28 01:56:54 +01:00
parent 5e2a62ab27
commit 292c1a1b68
194 changed files with 9817 additions and 9703 deletions

View File

@@ -1,4 +1,4 @@
--luacheck:ignore global require
-- luacheck:ignore global require
local package = require("modules/exp_util/include/package")
local loaded = package.loaded
@@ -6,18 +6,18 @@ local _require = require
-- This replace function is used to avoid additional lines in stack traces during control stage
local function replace()
require = function(path)
if package.lifecycle == package.lifecycle_stage.runtime then
return loaded[path] or loaded[path:gsub(".", "/")] or error('Can only require files at runtime that have been required in the control stage.', 2)
else
return _require(path)
end
end
require = function(path)
if package.lifecycle == package.lifecycle_stage.runtime then
return loaded[path] or loaded[path:gsub(".", "/")] or error("Can only require files at runtime that have been required in the control stage.", 2)
else
return _require(path)
end
end
end
return setmetatable({
on_init = replace,
on_load = replace,
}, {
__call = _require
__call = _require,
})