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.

29 lines
825B

  1. --
  2. -- Minetest lurkcoin mod - ATM nodes
  3. --
  4. -- © 2019 by luk3yx
  5. --
  6. minetest.register_node('lurkcoin:atm', {
  7. description = 'ATM',
  8. groups = {cracky = 1},
  9. tiles = {'lurkcoin_atm_side.png', 'lurkcoin_atm_side.png',
  10. 'lurkcoin_atm_side.png', 'lurkcoin_atm_side.png',
  11. 'lurkcoin_atm_side.png', 'lurkcoin_atm_side.png^lurkcoin_atm_top.png'},
  12. paramtype2 = 'facedir',
  13. on_construct = function(pos)
  14. local meta = minetest.get_meta(pos)
  15. meta:set_string('infotext', 'ATM')
  16. meta:set_string('version', tostring(lurkcoin.version))
  17. if meta.mark_as_private then
  18. meta:mark_as_private('version')
  19. end
  20. end,
  21. on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
  22. return lurkcoin.show_atm(clicker:get_player_name())
  23. end,
  24. })