forked from MineClone5/MineClone5
Set rules for observer
This commit is contained in:
parent
b96974e253
commit
3627b03b2e
|
@ -1,3 +1,14 @@
|
|||
local rules_flat = {
|
||||
{ x = 0, y = 0, z = -1 },
|
||||
}
|
||||
local get_rules_flat = function(node)
|
||||
local rules = rules_flat
|
||||
for i=1, node.param2 do
|
||||
rules = mesecon.rotate_rules_left(rules)
|
||||
end
|
||||
return rules
|
||||
end
|
||||
|
||||
minetest.register_node("mcl_observers:observer", {
|
||||
description = "Observer",
|
||||
is_ground_content = false,
|
||||
|
@ -28,7 +39,9 @@ minetest.register_node("mcl_observers:observer", {
|
|||
_mcl_hardness = 3.5,
|
||||
-- TODO: Mesecons handling
|
||||
mesecons = {effector = {
|
||||
}}
|
||||
rules = get_rules_flat,
|
||||
}},
|
||||
on_rotate = false,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
Loading…
Reference in New Issue