Delta-v
Delta-v copied to clipboard
Fix pseudoitem fitness check
About the PR
Allows felinids to enter bags even when there are other items inside, as long as there is enough space.
Why / Balance
This issue has been mentioned multiple times on discord
Technical details
Refactored SharedPseudoItemSystem.CheckItemFits. Instead of doing some forbidden magic knowledge of which has been lost to the flowing sands of time, it simply retrieves an ItemComponent from the pseudo-item entity, and if it doesn't exist, it creates a fake one based on the pseudo-item comp (that is, without actually adding it to the entity). It then simply passes the items and components, including the likely-fake item comp, to SharedStorageSystem.CanInsert, and returns its resullt.
Also removed the 3 auxiliary functions that were only used in the old implementation of CheckItemFits.
Media
https://github.com/DeltaV-Station/Delta-v/assets/69920617/06c050ad-2606-461b-9ade-e880a55c8b19
- [X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
Breaking changes
Changelog :cl:
- fix: Felinids can now be placed even inside bags that already contain items, as long as there is enough free space. Mrrrp.