Skip to content

Commit

Permalink
Tnt: Limit blown up dropped stacks to stack_max
Browse files Browse the repository at this point in the history
This replaces the hardcoded 99 item limit and instead uses the
get_stack_max() limit for each item.
  • Loading branch information
tenplus1 authored and paramat committed Aug 9, 2016
1 parent 7621162 commit 14b99a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/tnt/init.lua
Expand Up @@ -47,7 +47,7 @@ end
local function eject_drops(drops, pos, radius)
local drop_pos = vector.new(pos)
for _, item in pairs(drops) do
local count = math.min(item:get_count(), 99)
local count = math.min(item:get_count(), item:get_stack_max())
while count > 0 do
local take = math.max(1,math.min(radius * radius,
count,
Expand Down

0 comments on commit 14b99a7

Please sign in to comment.