Page 1 of 1

[boskid][1.1.77] spill_item_stack doesn't spread items on maps with large width or height

Posted: Wed Mar 08, 2023 10:03 am
by BurninSun

Code: Select all

/c for _ = 1,100 do game.player.surface.spill_item_stack(game.player.position, {name="empty-barrel", count = 1}, false, nil, false) end
Running this command results in a different outcome based on the surface map_gen_settings. If map_gen_settings.width or map_gen_settings.height >= 2^31 then the first 8 items place around the player, and the remaining 92 items appears right at the characters feet. Height and width being < 2^31 results in the item being evenly spread all around the character.

Top picture is with lower height and width spilling items as expected. Bottom picture shows the same command run on a surface with the larger height and width settings with 92 barrels stacked in the center.
stacking barrels.png
stacking barrels.png (304.72 KiB) Viewed 1669 times
Save file is also attached with surfaces created with different map_gen_settings. Nauvis, Nostos, Eostre, Fornax, Geras all work as expected. The other surfaces do not.

Re: [boskid][1.1.77] spill_item_stack doesn't spread items on maps with large width or height

Posted: Wed Mar 08, 2023 10:44 am
by boskid
Thanks for the report. Issue is now fixed for 1.1.78.