Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tool belt #1349

Merged
merged 28 commits into from
Dec 2, 2023
Merged

Adding tool belt #1349

merged 28 commits into from
Dec 2, 2023

Conversation

stilnat
Copy link
Contributor

@stilnat stilnat commented Nov 21, 2023

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

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed.
  • Relevant code is documented.
  • Update the related GitBook document, or create a new one if needed.

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

  • Works from host in host mode.
  • Works from server in server mode.
  • Works on server in client mode.
  • Works and is syncronized across different clients.
  • Is persistent.

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

  • Seems like the belt onclient sometimes freeze mid air, I've no idea why this happen with this particular item. Might have to do with the belt topology and position, which makes it collide weirdly with the player. A solution could be to put the belt container slightly in front of the player so when it gets out it doesn't collide weirdly. It doesn't really happen on host though so not sure this is why.

TODO

  • small refactor of the container script to have all logic regarding adding and removing items in their respective method. (includes setting up properly container upon adding removal and the rest)

@stilnat stilnat changed the title [WIP] Adding tool belt Adding tool belt Nov 24, 2023
@stilnat stilnat mentioned this pull request Nov 24, 2023
12 tasks
cosmiccoincidence

This comment was marked as resolved.

cosmiccoincidence

This comment was marked as resolved.

cosmiccoincidence

This comment was marked as off-topic.

@stilnat

This comment was marked as outdated.

cosmiccoincidence

This comment was marked as resolved.

@stilnat

This comment was marked as resolved.

@cosmiccoincidence

This comment was marked as outdated.

cosmiccoincidence

This comment was marked as resolved.

Copy link
Member

@cosmiccoincidence cosmiccoincidence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Waiting on gitbook doc.

Copy link
Member

@cosmiccoincidence cosmiccoincidence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cosmiccoincidence cosmiccoincidence merged commit ef6cdff into RE-SS3D:develop Dec 2, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants