diff --git a/scripts/slaughterhouse/slaughterhouse.lua b/scripts/slaughterhouse/slaughterhouse.lua index 5d1c1a8d..836339b3 100644 --- a/scripts/slaughterhouse/slaughterhouse.lua +++ b/scripts/slaughterhouse/slaughterhouse.lua @@ -142,7 +142,10 @@ end function Slaughterhouse.set_recipe(player, entity, recipe) for item, count in pairs(entity.set_recipe(recipe)) do - player.insert{name = item, count = count} + count = count - player.insert{name = item, count = count} + if count > 0 then + player.surface.spill_item_stack(player.position, {name = item, count = count}, true) + end end player.opened = entity end