-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Machinery Destroy() side effect clean up (#2011)
* Machinery Destroy() side effect clean up (#82659) ## About The Pull Request I have combed over implementations of `Destroy()` for `obj/machinery`, and noticed quite a few was spawning items or playing sounds. **Slot machines**: Moved payout to on_deconstruction() **Windoors**: Break sound moved to on_deconstruction(). I have also slightly cleaned up Destroy(), the windoor calls air_update_turf directly, as that proc already retrieves the turf it is on. **Atmospheric pipe**: Releases air and deconstructs meter objects on_deconstruction(). **Portable atmospheric devices**: Drop hyper noblium crystal on on_destruction(). **Pump, Scrubbers**: Releases air on_deconstruction(). **PACMAN power generator**: Spawns dropped fuel on_deconstruction(). **Runic vendor**: Moved vanishing effects to on_deconstruction(). I did not change Destroy side effects in the following instances: - side effects are critical for the round (e.g. doomsday device, nuke, blackbox recorder dropping the tape, gulag item reclaimer [less critical but still]) - might spawn messages and noises, but moving them to on_deconstruct would put linked items into an unusable state if deleted directly (e.g. express order console, cyborg lockdown console, tram paired sensors) - would potentially delete mobs we don't want deleted (e.g. disposals, slime camera console) Out of 220 Destroy defines, I found only 8 side effects that could not be moved to other procs, so `machinery\Destroy()` has almost always been used properly! I really hope `structure` will be as well made. Other changes: - Stasis beds had a completely empty destroy, removed - Mass drivers had two destroy procs, merged ## Why It's Good For The Game The Destroy() proc should only contain reference clean ups, barring edge cases that would harm playability. ## Changelog Nothing player facing. * Machinery Destroy() side effect clean up --------- Co-authored-by: Profakos <[email protected]>
- Loading branch information
1 parent
4777227
commit 912dbbc
Showing
11 changed files
with
38 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters