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

Beds: allow digging stray top nodes #3173

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

SmallJoker
Copy link
Member

Stray nodes (or half beds) may occur by ...

  1. rotating the bottom bed node without calling the 'on_rotate' callback for various reasons
  2. and digging one of the two nodes.
    In master, the top node cannot be dug and is left in a bugged state. You cannot place another bed on top to fix it. The placement aborts. Hence this PR allows digging the top node as well without causing item duplication or item loss.

This PR might or might not fix #3171 (unconfirmed bug)

How to test

Test 1:

  1. Check whether normal bed placement and digging works.

Test 2:

  1. Rotate the bed (bottom) node using any manipulation tool. I used the technic sonic screwdriver for this.
  2. Dig the bottom node. -> You must receive a bed drop
  3. Dig the top node. -> There must not be a drop

Test 3:

  1. Rotate the bed (bottom) node
  2. Dig the top node. -> There must not be a drop
  3. Dig the bottom node. -> You must receive a bed drop

Test 4:

  1. Rotate the nodes in any way
  2. No errors or anomalies must occur.

This may occur by rotating the bottom bed node without
calling the 'on_rotate' callback for various reasons.
@SmallJoker
Copy link
Member Author

Fixes #3171 @Niklp09

Copy link
Contributor

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

tested

@sfan5 sfan5 merged commit 1f4291f into luanti-org:master Jan 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different param2 of the bed bottom the top causes crash on dig.
2 participants