mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
[mcl_loot] fix warnings
This commit is contained in:
parent
f61102279f
commit
0cc11d0bbb
1 changed files with 3 additions and 4 deletions
|
@ -40,10 +40,9 @@ function mcl_loot.get_loot(loot_definitions, pr)
|
||||||
total_weight = total_weight + (loot_definitions.items[i].weight or 1)
|
total_weight = total_weight + (loot_definitions.items[i].weight or 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local stacks_min = loot_definitions.stacks_min
|
--local stacks_min = loot_definitions.stacks_min or 1
|
||||||
local stacks_max = loot_definitions.stacks_max
|
--local stacks_max = loot_definitions.stacks_max or 1
|
||||||
if not stacks_min then stacks_min = 1 end
|
|
||||||
if not stacks_max then stacks_max = 1 end
|
|
||||||
local stacks = pr:next(loot_definitions.stacks_min, loot_definitions.stacks_max)
|
local stacks = pr:next(loot_definitions.stacks_min, loot_definitions.stacks_max)
|
||||||
for s=1, stacks do
|
for s=1, stacks do
|
||||||
local r = pr:next(1, total_weight)
|
local r = pr:next(1, total_weight)
|
||||||
|
|
Loading…
Reference in a new issue