[MIRROR] Refactors how machines are deconstructed #1970
Merged
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.
Mirrored on Nova: NovaSector/NovaSector#910
Original PR: tgstation/tgstation#81291
About The Pull Request
This refactors how machines are deconstructed in the following ways
You can no longer override
obj/machinery/deconstruct()
. If you want customized behaviour then overrideon_deconstruction()
instead.This comes with the added benifit of no longer needing to check for the
NO_DECONSTRUCTION
flag because the machine base proc does that for us & if it finds that flag it won't proceed to callon_deconstruction()
meaning no machine will have a chance to spawn anything which is the current behaviour.This is required to make #81290 work for all machines at least so that machine can send the
COMSIG_OBJ_DECONSTRUCT
signal without subtypes overriding & forgetting to call the parent procdump_contents()
only gets called when the machine is deconstructed not destroyed thus not leaving behind any of its contents inside. Fixes Material container drops sheets only on object deconstruct & not destroy. tgstation/tgstation#81290 (comment)Changelog
🆑 SyncIt21
fix: machines that should not drop contents when deleted no longer do.
refactor: refactors how machines are deconstructed. report bugs on github.
/:cl: