Mesegrates now conduct mesecon signal. Still trying to work out a few kinks in the grate's mechanics. Also, added description.txt, mod.conf.

This commit is contained in:
rdococ 2017-08-10 23:40:03 +01:00
parent a35dfcd873
commit ad5cc79902
4 changed files with 27 additions and 11 deletions

1
description.txt Normal file
View File

@ -0,0 +1 @@
Multipurpose mod with conveyors, grates, crates and programming blocks.

View File

@ -59,7 +59,7 @@ local function attempt_flow_to(pos1, pos2, dec)
elseif pos2.y > pos1.y then return end
local new_level = level1 - dec
if gravity then new_level = 8 end
if gravity then new_level = 15 end
-- When water flows normally, it slowly decreases as it spreads outwards.
-- Dec is the variable applied to the originating liquid's level, which

View File

@ -5,11 +5,18 @@ minetest.register_node("rmod:mesegrate_off", {
use_texture_alpha = true,
--drawtype = "glasslike",
paramtype = "light",
mesecons = {effector = {
action_on = function (pos, node)
minetest.swap_node(pos, {name = "rmod:mesegrate_on", param2 = node.param2})
end,
}}
mesecons = {
conductor = {
-- rules = rules,
state = mesecon.state.off,
onstate = "rmod:mesegrate_on"
},
effector = {
action_on = function (pos, node)
minetest.swap_node(pos, {name = "rmod:mesegrate_on", param2 = node.param2})
end,
}
}
})
minetest.register_node("rmod:mesegrate_on", {
@ -19,10 +26,17 @@ minetest.register_node("rmod:mesegrate_on", {
use_texture_alpha = true,
drawtype = "glasslike",
paramtype = "light",
mesecons = {effector = {
action_off = function (pos, node)
minetest.swap_node(pos, {name = "rmod:mesegrate_off", param2 = node.param2})
end,
}},
mesecons = {
conductor = {
-- rules = rules,
state = mesecon.state.on,
offstate = "rmod:mesegrate_off"
},
effector = {
action_off = function (pos, node)
minetest.swap_node(pos, {name = "rmod:mesegrate_off", param2 = node.param2})
end,
}
},
drop = "rmod:mesegrate_off"
})

1
mod.conf Normal file
View File

@ -0,0 +1 @@
name = rmod