mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Set rules for observer
This commit is contained in:
parent
b96974e253
commit
3627b03b2e
1 changed files with 14 additions and 1 deletions
|
@ -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 a new issue