diff options
Diffstat (limited to 'mesecons_hydroturbine')
-rw-r--r-- | mesecons_hydroturbine/init.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mesecons_hydroturbine/init.lua b/mesecons_hydroturbine/init.lua index 872d18d..70b7d28 100644 --- a/mesecons_hydroturbine/init.lua +++ b/mesecons_hydroturbine/init.lua @@ -1,9 +1,12 @@ -- HYDRO_TURBINE +-- Water turbine: +-- Active if flowing >water< above it +-- (does not work with other liquids) minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", { drawtype = "nodebox", tiles = {"jeija_hydro_turbine_off.png"}, - groups = {dig_immediate=2, mesecon = 2}, + groups = {dig_immediate=2}, description="Water Turbine", paramtype = "light", selection_box = { @@ -20,13 +23,16 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", { {-0.45, 1.15, -0.1, 0.45, 1.45, 0.1}, {-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}}, }, + mesecons = {receptor = { + state = mesecon.state.off + }} }) minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", { drawtype = "nodebox", tiles = {"jeija_hydro_turbine_on.png"}, drop = '"mesecons_hydroturbine:hydro_turbine_off" 1', - groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon = 2}, + groups = {dig_immediate=2,not_in_creative_inventory=1}, description="Water Turbine", paramtype = "light", selection_box = { @@ -43,6 +49,9 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", { {-0.5, 1.15, -0.1, 0.5, 1.45, 0.1}, {-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}}, }, + mesecons = {receptor = { + state = mesecon.state.on + }} }) @@ -74,9 +83,6 @@ nodenames = {"mesecons_hydroturbine:hydro_turbine_on"}, end, }) -mesecon:add_receptor_node("mesecons_hydroturbine:hydro_turbine_on") -mesecon:add_receptor_node_off("mesecons_hydroturbine:hydro_turbine_off") - minetest.register_craft({ output = '"mesecons_hydroturbine:hydro_turbine_off" 2', recipe = { |