[MIRROR] LateInitialize is not allowed to call parent anymore #2823
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#1876
Original PR: tgstation/tgstation#82540
About The Pull Request
I've seen a few cases in the past where LateInitialize is done cause of the init return value being set to do so for no real reason, I thought I should try to avoid that by ensuring LateInitialize isn't ever called without overriding.
This fixes a ton of machine's LateInitialize not calling parent (mechpad, door buttons, message monitor, a lot of tram machines, abductor console, holodeck computer & disposal bin), avoiding having to set itself up to be connected to power. If they were intended to not connect to power, they should be using
NO_POWER_USE
instead.Also removes a ton of returns to LateInit when it's already getting it from parent regardless (many cases of that in machine code).
Why It's Good For The Game
I think this is better for coding standard reasons as well as just making sure we're not calling this proc on things that does absolutely nothing with them. A machine not using power can be seen evidently not using power with
NO_POWER_USE
, not so much if it's LateInitialize not calling parent.Changelog
🆑 JohnFulpWillard
fix: Mech pads, door buttons, message monitors, tram machines, abductor consoles & holodeck computers now use power.
/:cl: