+local cast_iron_ingot
+if minetest.get_modpath("technic_worldgen") then
+ cast_iron_ingot = "technic:cast_iron_ingot"
+else
+ cast_iron_ingot = "default:steel_ingot"
+end
minetest.register_craft({
output = 'technic:iron_chest 1',
recipe = {
- {'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
- {'technic:cast_iron_ingot','default:chest','technic:cast_iron_ingot'},
- {'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
+ {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
+ {cast_iron_ingot,'default:chest',cast_iron_ingot},
+ {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
}
})
minetest.register_craft({
output = 'technic:iron_locked_chest 1',
recipe = {
- {'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
- {'technic:cast_iron_ingot','default:chest_locked','technic:cast_iron_ingot'},
- {'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
+ {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
+ {cast_iron_ingot,'default:chest_locked',cast_iron_ingot},
+ {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
}
})
minetest.register_craft({
output = 'technic:iron_locked_chest 1',
recipe = {
- {'technic:wrought_iron_ingot'},
+ {'default:steel_ingot'},
{'technic:iron_chest'},
}
})
local function check_color_buttons(pos, meta, chest_name, fields)
for i = 1, 16 do
if fields["color_button"..i] then
- technic.swap_node(pos, chest_name..colorid_to_postfix(i))
+ local node = minetest.get_node(pos)
+ node.name = chest_name..colorid_to_postfix(i)
+ minetest.swap_node(pos, node)
meta:set_string("color", i)
return
end