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

Add and remove individual hands #1230

Merged
merged 140 commits into from
Aug 12, 2023
Merged

Conversation

stilnat
Copy link
Contributor

@stilnat stilnat commented Jul 29, 2023

Summary

Following the inventory rework, this makes hands works properly when they are added or removed.
Currently, hands are controlled by a unique script, Hands.cs. This add another script, Hand.cs, representing a single hand.
Hands.cs becomes a controller for each hand on the player.

Server and client methods are also properly separated and varaibles synced, allowing only server to do things such as removing hands.

When a hand is removed, if it was the active hand, then another available hand become active, or none if there's none left.
It integrates nicely with interactions, as with no hands left it won't throw exceptions if the player tries to interact.

This is necessary to move on with basic health, as this will allow loosing hands properly.

File changes

  • LeftHand.prefab and rightHand.prefab now don't have the item component nor rigidbody.
  • Adding two prefabs for left and right hands, basically a copy of the old ones.
  • Added an assetdatabase for bodyparts (which generate 15+ extra files)

https://youtu.be/6u2Og_aA63w

TODO

  • Add adding hands properly
  • Add server command to test adding hands properly.

Known issues

no known issues

Fixes (optional)

no known fixes

stilnat added 30 commits May 18, 2023 19:53
this alleviates a bit the role of the inventory. Inventory should only handles what's on the player or hold by them. Opened Containers by the player should be displayed using another script, dedicated to that.
this prevents the conflit with Inventory namespace
@stilnat stilnat changed the title [WIP] Add and remove individual hands Add and remove individual hands Aug 3, 2023
stilnat and others added 20 commits August 10, 2023 14:40
@iamteapot422 iamteapot422 merged commit 28e5a23 into RE-SS3D:develop Aug 12, 2023
2 checks passed
@stilnat stilnat deleted the Individual-hands branch November 9, 2023 23:15
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.

3 participants