From fc8621da41d0a980939636bc6a345438c5e4ca6b Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 19 Aug 2015 22:37:45 +0200 Subject: [PATCH] manage all handler inits in their own init file --- homedecor/handlers/init.lua | 22 ++++++++++++++++++++++ homedecor/init.lua | 17 +++-------------- 2 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 homedecor/handlers/init.lua diff --git a/homedecor/handlers/init.lua b/homedecor/handlers/init.lua new file mode 100644 index 00000000..12003ca2 --- /dev/null +++ b/homedecor/handlers/init.lua @@ -0,0 +1,22 @@ +local handlerpath = homedecor.modpath .. "/handlers/" + +-- nodebox arithmetics and helpers +-- (please keep non-generic nodeboxes with their node definition) +dofile(handlerpath.."nodeboxes.lua") + +-- expand and unexpand decor +dofile(handlerpath.."expansion.lua") + +-- register nodes that cook stuff +dofile(handlerpath.."furnaces.lua") + +-- inventory related functionality, like initialization, ownership and spawning locked versions +dofile(handlerpath.."inventory.lua") + +-- glue it all together into a registration function +dofile(handlerpath.."registration.lua") + +-- some nodes have particle spawners +dofile(handlerpath.."water_particles.lua") + +dofile(handlerpath.."sit.lua") diff --git a/homedecor/init.lua b/homedecor/init.lua index d92a8afa..b0e44829 100644 --- a/homedecor/init.lua +++ b/homedecor/init.lua @@ -80,20 +80,9 @@ homedecor.white_wood = "(homedecor_generic_wood_plain.png^[colorize:#e0f0ff:200) homedecor.dark_wood = "(homedecor_generic_wood_plain.png^[colorize:#140900:200)^".. "(homedecor_generic_wood_boards_overlay.png^[colorize:#21110180:180)" --- nodebox arithmetics and helpers --- (please keep non-generic nodeboxes with their node definition) -dofile(modpath.."/handlers/nodeboxes.lua") --- expand and unexpand decor -dofile(modpath.."/handlers/expansion.lua") --- register nodes that cook stuff -dofile(modpath.."/handlers/furnaces.lua") --- register individual handlers used by the registration function -dofile(modpath.."/handlers/inventory.lua") --- glue it all together into a registration function -dofile(modpath.."/handlers/registration.lua") --- some nodes have particle spawners -dofile(modpath.."/handlers/water_particles.lua") -dofile(modpath.."/handlers/sit.lua") + +-- load different handler subsystems +dofile(modpath.."/handlers/init.lua") -- load various other components dofile(modpath.."/misc-nodes.lua") -- the catch-all for all misc nodes