refactor mod (#22)

This commit is contained in:
wsor4035
2024-05-26 11:07:43 -04:00
committed by GitHub
parent eb7d9fd4f6
commit 5b4b19a184
18 changed files with 683 additions and 549 deletions

View File

@@ -1,11 +1,16 @@
local modpath = minetest.get_modpath("xcompat")
xcompat = {
sounds = dofile(modpath .. "/src/sounds.lua"),
materials = dofile(modpath .. "/src/materials.lua"),
textures = dofile(modpath .. "/src/textures.lua"),
modpath = modpath,
}
xcompat.gameid = dofile(modpath .. "/src/gameid.lua")
xcompat.utilities = dofile(modpath .. "/src/utilities.lua")
xcompat.sounds = dofile(modpath .. "/src/sounds.lua")
xcompat.materials = dofile(modpath .. "/src/materials.lua")
xcompat.textures = dofile(modpath .. "/src/textures.lua")
local function validate_sound(key)
if key and xcompat.sounds[key] then
return true
@@ -35,3 +40,5 @@ minetest.register_on_mods_loaded(function()
old_reg_node(name, def)
end
end)
dofile(modpath .. "/src/commands.lua")