Skip to content

fix: house item transfer logic and bed sleeper reset on invalid state #3546

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dudantas
Copy link
Member

Description

This PR addresses two related issues in the house transfer and load logic.

  1. Improves the behavior of House::collectMovableItemsFromContainer to ensure the container itself is moved after its content is evaluated and collected, preserving nested container structure and avoiding data loss.

  2. Adds logging during house item transfer to show all items that were found and moved, including their names, IDs, and positions, improving traceability and debugging.

  3. Adjusts bed loading logic to clear the sleeper from a bed if its configuration is invalid or incomplete during the house map load phase, fixing potential stuck player bugs.

Behaviour

Actual

  • Items inside nested containers were not being transferred correctly, sometimes resulting in missing or skipped items.
  • Beds with missing components would retain invalid sleeper references, causing unexpected behavior.
  • No logs were provided to track transferred items clearly.

Expected

  • Items, including those inside containers, are properly transferred with the container.
  • Beds with invalid states do not retain sleepers.
  • Logs clearly indicate which items were transferred, their location, and ID.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Tested on a local dev server with:

  • Multiple houses containing nested containers.
  • Invalid beds with missing components.
  • Log output validated during transfer.
  • Checked depot inbox to ensure all items were received.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@dudantas dudantas force-pushed the dudantas/fix-sell-and-transfer-house-bugs branch from 2d63082 to 3d58caa Compare May 22, 2025 01:33
Copy link

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.

1 participant