Closed stilnat closed 9 months ago
@cosmiccoincidence inventory slots rearranging is a bug on develop already, made an issue for it. The rest is hopefully fixed. Lmk
@cosmiccoincidence oops, toolbelt removed.
@cosmiccoincidence oops, toolbelt removed.
Same with backpack please... you didnt remove the old one (/Items/Functional/Storage/Objects/)
Summary
doc : https://ss3d.gitbook.io/systems/containers/setting-up-a-container/custom-storage-conditions
This PR allows player to wear a toolbelt. The toolbelt can't be put on without a jumpsuit, and the jumpsuit needs a toolbelt to be put on.
PR checklist
Pictures/Videos)
Testing
Try puttin the belt in its container while not wearing a jumpsuit and while wearing one. Try removing the jumpsuit while wearing a belt and while not wearing one.
Networking checklist
Changes
Did some changes in the container script. Container now check for a bunch of custom exterior conditions, which are script implementing the IStorageCondition interface on the same game objects as the container. This allow to add custom conditions to fullfil to add and/or remove stuff from a given container.
Refactored just a bit the container script as I noticed it was a bit messy regarding which method can add or delete things from the list of items in the container and it was causing small bugs like removing the toolbelt from hand if it could not go in the waist container.
Had to remove the bodypart asset database and put everything in the item one. I realized we can't put the same asset in two different addressable groups, which is an issue for body parts since they can be viewed as items and bodyparts. The best option is to have a single addressable group called "gameObject" which just contain every game object asset we have. not implemented here but it's kind of just renaming the asset database (and fixing eventual errors in code arising from the renaming)
Known issue
TODO