abstract most inventory handling code into a homedecor registration function

drawtype and param related defaults are being handled as well
for now we still leave the locked-node generation to locked.lua, due to its furnace-like node support

example:
homedecor.register("penbox", {
	<common defs>
	infotext=S("Penbox"),
	inventory = {
		size=8,
		formspec=…
		lockable=true -- will be supported later
	},
})
This commit is contained in:
Tim
2015-01-21 19:19:14 +01:00
committed by Vanessa Ezekowitz
parent 2cdf6667dc
commit b4b281d9ea
8 changed files with 203 additions and 512 deletions

View File

@ -222,8 +222,9 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
return isceiling, pos
end
-- load various other components
dofile(homedecor.modpath.."/registration_handler.lua")
-- load various other components
dofile(homedecor.modpath.."/misc-nodes.lua") -- the catch-all for all misc nodes
dofile(homedecor.modpath.."/tables.lua")
dofile(homedecor.modpath.."/electronics.lua")