traps.lua 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. local traps = {
  2. {'desertsandstonebrick', 'Trap Desert Sandstone Brick', 'default_desert_sandstone_brick.png', 'default:desert_sandstone_brick'},
  3. {'sandstonebrick', 'Trap Sandstone Brick', 'default_sandstone_brick.png', 'default:sandstonebrick'},
  4. {'stonebrick', 'Trap Stone Brick', 'default_stone_brick.png', 'default:stonebrick'},
  5. {'cobble', 'Trap Cobblestone', 'default_cobble.png', 'default:cobble'},
  6. {'mossycobble', 'Trap Mossy Cobblestone', 'default_mossycobble.png', 'default:mossycobble'},
  7. {'ice', 'Trap Ice', 'default_ice.png', 'default:ice'}
  8. }
  9. for i in ipairs (traps) do
  10. local name = traps[i][1]
  11. local desc = traps[i][2]
  12. local text = traps[i][3]
  13. local reci = traps[i][4]
  14. minetest.register_node('epic:'..name, {
  15. description = desc,
  16. drawtype = 'glasslike_framed',
  17. tiles = {text},
  18. walkable = false,
  19. groups = {cracky = 2, traps=1},
  20. paramtype = 'light',
  21. })
  22. minetest.register_craft({
  23. output = 'epic:'..name,
  24. recipe = {{'default:mese_crystal_fragment', reci}}
  25. })
  26. end