Skip to content

Commit

Permalink
fix: use NFS.load instead of require
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiz0 committed Jun 20, 2024
1 parent 8d28b46 commit e22164f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ SMODS.Atlas({

local mod_path = SMODS.current_mod.path
-- load config & utils
require(mod_path .. "utils")
require(mod_path .. "config")
-- NFS.load is a love2D function
NFS.load(mod_path .. "utils.lua")()
NFS.load(mod_path .. "config.lua")()

-- load all enabled jokers
-- only explicitly disabled jokers are disabled
-- jokers not listed are still enabled
for _, joker in ipairs(modules.jokers) do
local enabled = Aiz.config.jokers[joker] == nil or Aiz.config.jokers[joker]
if enabled then
require(mod_path .. "jokers/" .. joker)
NFS.load(mod_path .. "jokers/" .. joker .. ".lua")()
end
end

0 comments on commit e22164f

Please sign in to comment.