mirror of
https://github.com/mt-mods/xcompat.git
synced 2025-10-30 07:45:37 +01:00
refactor mod (#22)
This commit is contained in:
13
init.lua
13
init.lua
@@ -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")
|
||||
Reference in New Issue
Block a user