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

Raise DroppedEvent on items in pockets/suit storage. #2400

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

whatston3
Copy link
Contributor

@whatston3 whatston3 commented Nov 13, 2024

About the PR

Raises a DroppedEvent on all items in dependent inventory slot when unequipping its parent.

Why / Balance

When removing a piece of clothing in an outer slot, the dependent slots' contents (e.g. pockets, suit storage, belt) would not raise a DroppedEvent. Some items (jetpacks, health scanners, etc.) rely on this event to cut down on bookkeeping or maintain state.

Fixes https://discord.com/channels/1123826877245694004/1305455935216549940.

Issues

This fix depends on some existing behaviour - all existing code that raises DroppedEvent removing items from slots through interaction or the like only interacts with the item being dropped directly, ignoring any children (which it doesn't know about from the call). The contents of dependent slots are only removed and relocated without any event.

How to test

  1. Wear an EVA suit (any will work), have a mini jetpack in your suit storage.
  2. Waddle into space, turn your jetpack on.
  3. Spawn another suit, pick it up and wear it.
  4. Jetpack will fall into space.
  5. Try to move, your character will impotently wiggle, the jetpack will remain stationary.

Media

Requirements

Breaking changes

Changelog

Minor fix, difficult to describe to players, no changelog.

@github-actions github-actions bot added the C# label Nov 13, 2024
Copy link
Contributor

@ErhardSteinhauer ErhardSteinhauer left a comment

Choose a reason for hiding this comment

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

Works under testing

@dvir001 dvir001 merged commit 58904b5 into new-frontiers-14:master Nov 15, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants