mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-05 23:12:26 +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:
@@ -320,10 +320,10 @@ var/global/list/light_type_cache = list()
|
||||
on = 0
|
||||
set_light(0)
|
||||
else
|
||||
use_power = 2
|
||||
update_use_power(USE_POWER_ACTIVE)
|
||||
set_light(brightness_range, brightness_power, brightness_color)
|
||||
else
|
||||
use_power = 1
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
set_light(0)
|
||||
|
||||
active_power_usage = ((light_range * light_power) * LIGHTING_POWER_FACTOR)
|
||||
|
||||
Reference in New Issue
Block a user