Ven0maus / SOD.Common

A common library for shadows of doubt modding.
MIT License
4 stars 4 forks source link

[FEATURE] Item physics events and helpers #9

Open ReveredRedHood opened 8 months ago

ReveredRedHood commented 8 months ago

Introduction Add events related to picking up objects to carry them (not putting items in your inventory, but instead holding them in front of you), dropping them, and throwing them.

Description of the feature

OnItemPhysicsPickUp(Interactable) // controller.MoveablePickUpThis()
OnItemPhysicsDrop(Interactable) // InteractionController.Instance.carryingObject.DropThis(bool throwThis)
OnItemPhysicsThrow(Interactable) // InteractionController.Instance.carryingObject.DropThis(bool throwThis)
Lib.Player.DropCarriedItem => InteractionController.Instance.carryingObject.DropThis(false)
Lib.Player.ThrowCarriedItem => InteractionController.Instance.carryingObject.DropThis(true)

Feature usage A clear and concise description of how the feature should be used by the consumer.

Dependencies and Prerequisites Does this feature require any new dependencies? No

Implementation details As a Lib helper and patch(es) Low priority for me. I figured out how it works and want to document it here for later.