Always call update_use_power() instead of directly setting the use_power var.

- This will let us react to the change appropriately.
- While we're here, lets define some constants so we can stop using bare numbers.
- Always use those constants when calling update_use_power()
This commit is contained in:
Leshana
2020-03-19 22:45:40 -04:00
parent efeaf058ff
commit c2d16acdca
52 changed files with 124 additions and 119 deletions

View File

@@ -38,9 +38,9 @@
/obj/machinery/ntnet_relay/process()
if(operable())
use_power = 2
update_use_power(USE_POWER_ACTIVE)
else
use_power = 1
update_use_power(USE_POWER_IDLE)
if(dos_overload)
dos_overload = max(0, dos_overload - dos_dissipate)