From: tenplus1 Date: Thu, 4 Aug 2016 09:22:41 +0000 (+0100) Subject: Tnt: Limit blown up dropped stacks to stack_max X-Git-Tag: 0.4.15~112 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=14b99a72a90bcfe6712caa5c50255bce2e880b37;p=oweals%2Fminetest_game.git 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. --- diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 2e82c4ed..3a397a78 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/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,