mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-16 23:30:34 +01:00
Split conductors into their own mod
This commit is contained in:
parent
a3042b44fc
commit
89214caa1c
|
@ -132,8 +132,5 @@ print("[OK] Mesecons")
|
|||
-- To be removed in future releases
|
||||
dofile(minetest.get_modpath("mesecons").."/legacy.lua");
|
||||
|
||||
--The actual wires
|
||||
dofile(minetest.get_modpath("mesecons").."/wires.lua");
|
||||
|
||||
--Services like turnoff receptor on dignode and so on
|
||||
dofile(minetest.get_modpath("mesecons").."/services.lua");
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
-- Dig and place services
|
||||
|
||||
-- Stub to "fake" updating conductors if not installed
|
||||
-- If it is installed, that mod handles these
|
||||
if not minetest.get_modpath("mesecons_conductors") then
|
||||
mesecon.update_autoconnect = function()
|
||||
return
|
||||
end
|
||||
mesecon.queue:add_function("update_autoconnect", mesecon.update_autoconnect)
|
||||
end
|
||||
|
||||
mesecon.on_placenode = function (pos, node)
|
||||
mesecon.update_autoconnect(pos, node)
|
||||
|
||||
|
@ -61,8 +70,6 @@ mesecon.on_dignode = function (pos, node)
|
|||
mesecon.queue:add_action(pos, "update_autoconnect", {node})
|
||||
end
|
||||
|
||||
mesecon.queue:add_function("update_autoconnect", mesecon.update_autoconnect)
|
||||
|
||||
minetest.register_on_placenode(mesecon.on_placenode)
|
||||
minetest.register_on_dignode(mesecon.on_dignode)
|
||||
|
||||
|
|
1
mesecons_conductors/depends.txt
Normal file
1
mesecons_conductors/depends.txt
Normal file
|
@ -0,0 +1 @@
|
|||
mesecons
|
|
@ -96,6 +96,8 @@ function mesecon.update_autoconnect(pos, node)
|
|||
update_on_place_dig(pos, node)
|
||||
end
|
||||
|
||||
mesecon.queue:add_function("update_autoconnect", mesecon.update_autoconnect)
|
||||
|
||||
-- ############################
|
||||
-- ## Wire node registration ##
|
||||
-- ############################
|
||||
|
@ -204,7 +206,7 @@ register_wires = function()
|
|||
groups_off["not_in_creative_inventory"] = 1
|
||||
end
|
||||
|
||||
mesecon.register_node("mesecons:wire_"..nodeid, {
|
||||
mesecon.register_node(":mesecons:wire_"..nodeid, {
|
||||
description = "Mesecon",
|
||||
drawtype = "nodebox",
|
||||
inventory_image = "mesecons_wire_inv.png",
|
Loading…
Reference in New Issue
Block a user