This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
[MIRROR] Wooden tables now obey The Law of Conservation of Mass #574
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original PR: tgstation/tgstation#56156
About The Pull Request
Fixes Issue tgstation/tgstation#56152 making wood tables deconstruct at they should be.
Bug vivisection:
Okay, see here? This is the proc for creating a table, we can introduce three arguments. One of them is _buildstack. _buildstack overrides Buildstack on initialize, a variable used for storing the type of raw "ore" that the table is supposed to drop in deconstruction. Here is supposed to be null unless we want to override the buildstack with another ore.
What happened? The proc for building a wood table from a wooden frame, shown below, passed the "type" variable, used for storing the type of table_frame, as a _buildstack argument to the make_new_table proc. This overrides the buildstack variable of the final wooden table, causing it to drop a wooden frame as it was an ore on deconstruction.
This is funnier (not very much, to be honest) when we consider that deconstructing with a screwdriver would drop a frame normally, causing it to drop two frames. We could repeat this ad nauseam, essentially cloning wood frames in place as we pleased.
So TL;DR: this is another of those simple but hard to hunt bugs that would be prevented with testing and a null on its right place.
If this PR description is too long blame @聽LemonInTheDark
Why It's Good For The Game
A bugfix a day keeps the spaguetti chef away
Changelog
馃啈
fix: Fixed wood table and poker table construction/deconstruction
/:cl: