diff options
author | Jeija <norrepli@gmail.com> | 2012-12-08 22:28:46 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-12-08 22:28:46 +0100 |
commit | cf6080f7237af1c55a6d80bea4725dcb5c8cb1eb (patch) | |
tree | 6e858459204230ad5cc0ea2c39c10a161a738d5e /mesecons_hydroturbine/init.lua | |
parent | 00e071b695574928fce2ca56e3e8eca6ad3d35ef (diff) |
Port more blocks to nodedef system: object detector, extrawires, water turbine, insulated wire
Diffstat (limited to 'mesecons_hydroturbine/init.lua')
-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 = { |