Added math.floor

This commit is contained in:
Cooldude2606
2020-02-18 19:10:03 +00:00
parent c32f42494d
commit da4b14588a

View File

@@ -22,6 +22,7 @@ Event.add(defines.events.on_player_created, function(event)
local stats = player.force.item_production_statistics
local made = stats.get_input_count(item)
local success,count = pcall(callback,made,stats.get_input_count,player)
count = math.floor(count)
if success and count > 0 then
player.insert{name=item,count=count}
end