loot.lua 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. if not minetest.get_modpath("loot") then
  2. return
  3. end
  4. loot.register_loot({
  5. weights = { generic = 300 },
  6. payload = {
  7. stack = ItemStack("ropes:ropesegment"),
  8. min_size = 1,
  9. max_size = 50,
  10. },
  11. })
  12. if ropes.ropeLadderLength > 0 then
  13. loot.register_loot({
  14. weights = { generic = 150 },
  15. payload = {
  16. stack = ItemStack("ropes:ropeladder_top"),
  17. min_size = 1,
  18. max_size = 20,
  19. },
  20. })
  21. end
  22. if ropes.woodRopeBoxMaxMultiple > 0 then
  23. loot.register_loot({
  24. weights = { generic = 100 },
  25. payload = {
  26. stack = ItemStack("ropes:wood1rope_block"),
  27. min_size = 1,
  28. max_size = 20,
  29. },
  30. })
  31. end
  32. if ropes.copperRopeBoxMaxMultiple > 0 then
  33. loot.register_loot({
  34. weights = { generic = 75 },
  35. payload = {
  36. stack = ItemStack("ropes:copper1rope_block"),
  37. min_size = 1,
  38. max_size = 15,
  39. },
  40. })
  41. end
  42. if ropes.steelRopeBoxMaxMultiple > 0 then
  43. loot.register_loot({
  44. weights = { generic = 50 },
  45. payload = {
  46. stack = ItemStack("ropes:steel1rope_block"),
  47. min_size = 1,
  48. max_size = 10,
  49. },
  50. })
  51. end