From 520470275f1c216d27f05e83fa6ea4d7fa4203a8 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 4 Aug 2016 10:22:41 +0100 Subject: [PATCH] Tnt: Limit blown up dropped stacks to stack_max This replaces the hardcoded 99 item limit and instead uses the get_stack_max() limit for each item. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2e82c4e..3a397a7 100644 --- a/init.lua +++ b/init.lua @@ -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,