forked from Mirrorlandia_minetest/mesecons
Merge branch 'master' of github.com:Jeija/minetest-mod-mesecons
This commit is contained in:
commit
2c05a92897
@ -7,9 +7,15 @@ minetest.register_alias("jeija:wireless_inverter", "jeija:wireless_inverter_on")
|
||||
minetest.register_alias("jeija:wireless_receiver", "jeija:wireless_receiver_off")
|
||||
minetest.register_alias("jeija:wireless_transmitter", "jeija:wireless_transmitter_off")
|
||||
minetest.register_alias("jeija:switch", "jeija:mesecon_switch_off")
|
||||
minetest.register_alias("jeija:wall_button", "jeija:wall_button_off")
|
||||
minetest.register_alias("jeija:piston", "jeija:piston_normal")
|
||||
minetest.register_alias("jeija:blinky_plant", "jeija:blinky_plant_off")
|
||||
minetest.register_alias("jeija:mesecon_torch", "jeija:mesecon_torch_on")
|
||||
minetest.register_alias("jeija:hydro_turbine", "jeija:hydro_turbine_off")
|
||||
minetest.register_alias("jeija:pressure_plate_stone", "jeija:pressure_plate_stone_off")
|
||||
minetest.register_alias("jeija:pressure_plate_wood", "jeija:pressure_plate_wood_off")
|
||||
|
||||
if ENABLE_TEMPEREST==1 then
|
||||
minetest.register_alias("jeija:mesecon_socket", "jeija:mesecon_socket_off")
|
||||
minetest.register_alias("jeija:mesecon_inverter", "jeija:mesecon_inverter_off")
|
||||
end
|
@ -862,7 +862,7 @@ dofile(minetest.get_modpath("jeija").."/switch.lua")
|
||||
dofile(minetest.get_modpath("jeija").."/pistons.lua")
|
||||
--TEMPEREST's STUFF
|
||||
if ENABLE_TEMPEREST==1 then
|
||||
dofile(minetest.get_modpath("jeija").."temperest.lua")
|
||||
dofile(minetest.get_modpath("jeija").."/temperest.lua")
|
||||
end
|
||||
|
||||
--INIT
|
||||
|
@ -1,6 +1,7 @@
|
||||
--TEMPEREST-PLUG
|
||||
|
||||
minetest.register_node("jeija:mesecon_plug", {
|
||||
description = "Plug",
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
@ -16,7 +17,7 @@ minetest.register_node("jeija:mesecon_plug", {
|
||||
mesecon:register_on_signal_on(function(pos, node)
|
||||
if node.name=="jeija:mesecon_plug" then
|
||||
local set_node_on = function(pos)
|
||||
node = minetest.env:get_node(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
if node.name=="jeija:mesecon_socket_off" then
|
||||
minetest.env:add_node(pos, {name="jeija:mesecon_socket_on"})
|
||||
nodeupdate(pos)
|
||||
@ -28,16 +29,16 @@ mesecon:register_on_signal_on(function(pos, node)
|
||||
end
|
||||
end
|
||||
|
||||
lnode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away
|
||||
local lnode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away
|
||||
if lnode.name=="air" then set_node_on({x=pos.x-2, y=pos.y, z=pos.z}) end
|
||||
|
||||
lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away
|
||||
local lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away
|
||||
if lnode.name=="air" then set_node_on({x=pos.x+2, y=pos.y, z=pos.z}) end
|
||||
|
||||
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z-1}) --a node between this node and the one two nodes away
|
||||
local lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z-1}) --a node between this node and the one two nodes away
|
||||
if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z-2}) end
|
||||
|
||||
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
||||
local lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
||||
if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z+2}) end
|
||||
end
|
||||
end)
|
||||
@ -113,6 +114,7 @@ minetest.register_craft({
|
||||
--TEMPEREST-SOCKET
|
||||
|
||||
minetest.register_node("jeija:mesecon_socket_off", {
|
||||
description = "Socket",
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
@ -136,7 +138,7 @@ minetest.register_node("jeija:mesecon_socket_on", {
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
},
|
||||
dug_item='node "jeija:mesecon_socket_off" 1',
|
||||
drop='node "jeija:mesecon_socket_off" 1',
|
||||
})
|
||||
|
||||
minetest.register_on_dignode(
|
||||
@ -162,6 +164,7 @@ minetest.register_craft({
|
||||
--TEMPEREST-INVERTER
|
||||
|
||||
minetest.register_node("jeija:mesecon_inverter_off", {
|
||||
description = "Inverter",
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
@ -185,7 +188,7 @@ minetest.register_node("jeija:mesecon_inverter_on", {
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
},
|
||||
dug_item='node "jeija:mesecon_inverter_off" 1',
|
||||
drop='node "jeija:mesecon_inverter_off" 1',
|
||||
})
|
||||
|
||||
minetest.register_on_dignode(
|
||||
|
Loading…
Reference in New Issue
Block a user