[Genhis][2.0.11] LuaGame::merge_forces causes inventory losses in space platforms
Posted: Sun Oct 27, 2024 8:43 am
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
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