Minetest mod that adds scifi themed nodes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
462 B

  1. scifi_nodes.get_switch_rules = function(param2)
  2. -- param2 = 2
  3. local rules = {
  4. {x=1, y=-1, z=-1},
  5. {x=1, y=-1, z=1},
  6. {x=0, y=-1, z=-1},
  7. {x=0, y=-1, z=1},
  8. }
  9. -- Left and right when looking to +y ?
  10. if param2 == 3 then
  11. rules = mesecon.rotate_rules_right(mesecon.rotate_rules_right (rules))
  12. elseif param2 == 4 then
  13. rules = mesecon.rotate_rules_right(rules)
  14. elseif param2 == 5 then
  15. rules = mesecon.rotate_rules_left(rules)
  16. end
  17. return rules
  18. end