Page 1 of 1

[Genhis][2.0.11] LuaGame::merge_forces causes inventory losses in space platforms

Posted: Sun Oct 27, 2024 8:43 am
by RedRafe
Hi, here's a bug I think I found when using different forces.

Issue: when merging forces, spaceship hubs don't account for connected cargo bays increasing their inventory size for a split second, resulting in inventories being trimmed and items lost during the process.

Expected behavior: account for increased storage capacity from cargo bays throughout the merge forces process, to avoid inventories losing items

Steps to reproduce:
1. create another force, i.e. "test"
2. build a spaceship with cargo bays to increase its storage capacity
3. fill storage
4. merge force "test" into "player"
5. spaceship's inventory has been trimmed

Attached to this topic there's a save with already minimal setup to reproduce the issue.
Cheers

Re: [2.0.11] LuaGame::merge_forces causes inventory losses in space platforms

Posted: Sun Oct 27, 2024 9:05 am
by boskid
I suspect it will be caused by entity force changes causing cargo bays to temporarily disconnect from the hub due to force difference and that removes items that are above the hub capacity.

Re: [Genhis][2.0.11] LuaGame::merge_forces causes inventory losses in space platforms

Posted: Tue Nov 05, 2024 10:12 am
by Genhis
Thanks for the report, this is fixed for the next release.