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

Refactors light switches, igniter switches, mass driver buttons, and crematoriums? #18683

Merged
merged 5 commits into from
Aug 27, 2022

Conversation

AffectedArc07
Copy link
Member

What Does This PR Do

This PR removes the signal logic from light switches, mass driver buttons and igniter buttons. It also refactors light switches to make them take their current area and not store a ref to the area or a snowflake on/off var. This also fixes an indent and doesnt make an area call powerChange() * the amount of lightswitches in the area.

This PR also refactors the crematorium ignition buttons and cleans up crematorium and morgue code. Good god its a mess, and you can clearly tell the crematorium button was copied from the lightswitch code. It also kills off a for([x] in world) loop.

Why It's Good For The Game

This is part of my goal to kill off the ingame signalling system, because its quite honestly insane at how badly made it is and how much it hurts. Its extra lag for no reason when we can accomplish this just fine with refs.

Testing

  • Tested light switches and igniter buttons
  • Tested the crematorium button with and without access
  • Tested mass driver buttons

Changelog

🆑 AffectedArc07
add: Added a tiny bit of performance with light switches
/:cl:

@AffectedArc07 AffectedArc07 added Refactor This PR will clean up the code but have the same ingame outcome Performance This will increase performance on the server labels Aug 2, 2022
@ParadiseSS13-Bot ParadiseSS13-Bot added the -Status: Awaiting review This PR is awaiting review from the review team label Aug 2, 2022
@ParadiseSS13-Bot ParadiseSS13-Bot added the Testmerge Active This PR is currently testmerged on production label Aug 18, 2022
code/game/machinery/buttons.dm Outdated Show resolved Hide resolved
code/game/machinery/igniter.dm Outdated Show resolved Hide resolved
code/game/machinery/igniter.dm Show resolved Hide resolved
code/game/machinery/igniter.dm Outdated Show resolved Hide resolved
code/game/machinery/mass_driver.dm Outdated Show resolved Hide resolved
code/game/objects/structures/morgue.dm Show resolved Hide resolved
@AffectedArc07 AffectedArc07 marked this pull request as draft August 18, 2022 23:19
@AffectedArc07
Copy link
Member Author

Lightswitches are fucked

@ParadiseSS13-Bot ParadiseSS13-Bot removed the Testmerge Active This PR is currently testmerged on production label Aug 19, 2022
@ParadiseSS13-Bot ParadiseSS13-Bot added the Testmerge Active This PR is currently testmerged on production label Aug 19, 2022
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
@AffectedArc07 AffectedArc07 marked this pull request as ready for review August 24, 2022 18:16
@ParadiseSS13-Bot ParadiseSS13-Bot added Testmerge Active This PR is currently testmerged on production and removed Testmerge Active This PR is currently testmerged on production labels Aug 24, 2022
@hal9000PR hal9000PR merged commit 1c3dc66 into ParadiseSS13:master Aug 27, 2022
github-actions bot added a commit that referenced this pull request Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team Performance This will increase performance on the server Refactor This PR will clean up the code but have the same ingame outcome Testmerge Active This PR is currently testmerged on production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants