Paradise icon indicating copy to clipboard operation
Paradise copied to clipboard

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

Open AffectedArc07 opened this issue 2 years ago • 0 comments

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

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

AffectedArc07 avatar Aug 02 '22 16:08 AffectedArc07