Call update procs instead of directly setting idle_power_usage or active_power_usage.

- Adds the update_idle_power_usage() and update_active_power_usage() procs for the respective vars.
- Switches all places modifying those vars directly to call the procs instead.
- This will let us react to the change appropriately, paving the way towards static area power.
- Adds update_power_channel proc for the sake of completeness, but no machines actually modify it so far.
This commit is contained in:
Leshana
2020-04-21 12:48:13 -04:00
parent 5a92fc4ec9
commit 66b40b2c71
16 changed files with 38 additions and 27 deletions

View File

@@ -24,7 +24,7 @@
/obj/machinery/particle_accelerator/control_box/New()
wires = new(src)
connected_parts = list()
active_power_usage = initial(active_power_usage) * (strength + 1)
update_active_power_usage(initial(active_power_usage) * (strength + 1))
..()
/obj/machinery/particle_accelerator/control_box/Destroy()