ropes/loot.lua

56 lines
980 B
Lua
Raw Permalink Normal View History

2017-02-11 08:42:11 +01:00
if not minetest.get_modpath("loot") then
return
end
loot.register_loot({
2017-02-11 08:56:56 +01:00
weights = { generic = 300 },
2017-02-11 08:42:11 +01:00
payload = {
stack = ItemStack("ropes:ropesegment"),
min_size = 1,
2017-02-11 22:50:03 +01:00
max_size = 50,
2017-02-11 08:42:11 +01:00
},
})
if ropes.ropeLadderLength > 0 then
loot.register_loot({
2017-02-11 08:56:56 +01:00
weights = { generic = 150 },
2017-02-11 08:42:11 +01:00
payload = {
stack = ItemStack("ropes:ropeladder_top"),
min_size = 1,
2017-02-11 22:50:03 +01:00
max_size = 20,
2017-02-11 08:42:11 +01:00
},
})
end
if ropes.woodRopeBoxMaxMultiple > 0 then
loot.register_loot({
2017-02-11 08:56:56 +01:00
weights = { generic = 100 },
2017-02-11 08:42:11 +01:00
payload = {
stack = ItemStack("ropes:wood1rope_block"),
min_size = 1,
2017-02-11 22:50:03 +01:00
max_size = 20,
2017-02-11 08:42:11 +01:00
},
})
end
if ropes.copperRopeBoxMaxMultiple > 0 then
loot.register_loot({
2017-02-11 08:56:56 +01:00
weights = { generic = 75 },
2017-02-11 08:42:11 +01:00
payload = {
stack = ItemStack("ropes:copper1rope_block"),
min_size = 1,
2017-02-11 22:50:03 +01:00
max_size = 15,
2017-02-11 08:42:11 +01:00
},
})
end
if ropes.steelRopeBoxMaxMultiple > 0 then
loot.register_loot({
weights = { generic = 50 },
payload = {
stack = ItemStack("ropes:steel1rope_block"),
min_size = 1,
2017-02-11 22:50:03 +01:00
max_size = 10,
2017-02-11 08:42:11 +01:00
},
})
end