mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 14:33:30 +00:00
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:
@@ -211,10 +211,10 @@
|
||||
/obj/machinery/power/am_control_unit/proc/toggle_power()
|
||||
active = !active
|
||||
if(active)
|
||||
use_power = 2
|
||||
update_use_power(USE_POWER_ACTIVE)
|
||||
visible_message("The [src.name] starts up.")
|
||||
else
|
||||
use_power = 1
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
visible_message("The [src.name] shuts down.")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user