summaryrefslogtreecommitdiff
path: root/ropes/loot.lua
blob: ed512be2b6f87b85397c1ab9ab3dafa9483f06b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
if not minetest.get_modpath("loot") then
	return
end

loot.register_loot({
	weights = { generic = 300 },
	payload = {
		stack = ItemStack("ropes:ropesegment"),
		min_size = 1,
		max_size = 50,
	},
})

if ropes.ropeLadderLength > 0 then
loot.register_loot({
	weights = { generic = 150 },
	payload = {
		stack = ItemStack("ropes:ropeladder_top"),
		min_size = 1,
		max_size = 20,
	},
})
end

if ropes.woodRopeBoxMaxMultiple > 0 then
loot.register_loot({
	weights = { generic = 100 },
	payload = {
		stack = ItemStack("ropes:wood1rope_block"),
		min_size = 1,
		max_size = 20,
	},
})
end

if ropes.copperRopeBoxMaxMultiple > 0 then
loot.register_loot({
	weights = { generic = 75 },
	payload = {
		stack = ItemStack("ropes:copper1rope_block"),
		min_size = 1,
		max_size = 15,
	},
})
end

if ropes.steelRopeBoxMaxMultiple > 0 then
loot.register_loot({
	weights = { generic = 50 },
	payload = {
		stack = ItemStack("ropes:steel1rope_block"),
		min_size = 1,
		max_size = 10,
	},
})
end