mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-06-29 23:00:49 +02:00
Better Hades Revisited support (#30)
* Fix spaces vs tabs in crafts.lua * Fix recipes, add telepoter device for teleporter tube recipe. * Override chests and furnaces in Hades as well.
This commit is contained in:
@ -1,8 +1,14 @@
|
||||
-- this file is basically a modified copy of
|
||||
-- minetest_game/mods/default/furnaces.lua
|
||||
|
||||
local def = table.copy(minetest.registered_nodes["default:furnace"])
|
||||
--local def_active = table.copy(minetest.registered_nodes["default:furnace_active"])
|
||||
local def--, def_active
|
||||
if minetest.get_modpath("default") then
|
||||
def = table.copy(minetest.registered_nodes["default:furnace"])
|
||||
--def_active = table.copy(minetest.registered_nodes["default:furnace_active"])
|
||||
elseif minetest.get_modpath("hades_furnaces") then
|
||||
def = table.copy(minetest.registered_nodes["hades_furnaces:furnace"])
|
||||
--def_active = table.copy(minetest.registered_nodes["hades_furnaces:furnace_active"])
|
||||
end
|
||||
|
||||
local tube_entry = "^pipeworks_tube_connection_stony.png"
|
||||
|
||||
@ -16,7 +22,7 @@ groups_active["not_in_creative_inventory"] = 1
|
||||
-- Node definitions
|
||||
--
|
||||
|
||||
minetest.override_item("default:furnace", {
|
||||
local override = {
|
||||
tiles = {
|
||||
"default_furnace_top.png"..tube_entry,
|
||||
"default_furnace_bottom.png"..tube_entry,
|
||||
@ -59,9 +65,9 @@ minetest.override_item("default:furnace", {
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
on_rotate = pipeworks.on_rotate
|
||||
})
|
||||
}
|
||||
|
||||
minetest.override_item("default:furnace_active", {
|
||||
local override_active = {
|
||||
tiles = {
|
||||
"default_furnace_top.png"..tube_entry,
|
||||
"default_furnace_bottom.png"..tube_entry,
|
||||
@ -110,5 +116,13 @@ minetest.override_item("default:furnace_active", {
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
on_rotate = pipeworks.on_rotate
|
||||
})
|
||||
}
|
||||
|
||||
if minetest.get_modpath("default") then
|
||||
minetest.override_item("default:furnace", override)
|
||||
minetest.override_item("default:furnace_active", override_active)
|
||||
elseif minetest.get_modpath("hades_furnaces") then
|
||||
minetest.override_item("hades_furnaces:furnace", override)
|
||||
minetest.override_item("hades_furnaces:furnace_active", override_active)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user