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

Fix MaterialStorageMagnetPickup material duplication #2899

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

whatston3
Copy link
Contributor

About the PR

What it says on the tin.

Calls Del over QueueDel when inserting materials into material storage. Our MaterialStorageMagnetPickup doesn't account for duplication, relying on TryInsertMaterialEntity. Problem is that it queues the entity for deletion, which'll happen before the next tick, but after other lathes check their magnets.

Why / Balance

Bug report here: https://discord.com/channels/1123826877245694004/1338300489481326593

How to test

  1. Place two autolathes adjacent to each other.
  2. Enable the magnet on both lathes.
  3. Place a stack of steel sheets between both of the lathes where the cursor isn't highlighted.
  4. The material should only be inserted into one lathe.

Media

Requirements

Breaking changes

Changelog

No real in-game effect outside of abuse prevention, no changelog this time.

@whatston3 whatston3 added S: Needs Review This PR is awaiting reviews and removed S: Untriaged labels Feb 10, 2025
@whatston3
Copy link
Contributor Author

Alternatively, we could delete the entity in MaterialStorageMagnetPickupSystem instead and leave the material insertion as-is. Same end point, and I think only our MaterialStorageMagnetPickup system has this issue.

@dvir001 dvir001 merged commit a4bfbc8 into new-frontiers-14:master Feb 11, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# S: Needs Review This PR is awaiting reviews size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants