mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 20:22:42 +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:
@@ -126,7 +126,7 @@
|
||||
GLOB.moved_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition)
|
||||
GLOB.dir_set_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition)
|
||||
GLOB.destroyed_event.register(watching_mob, src, /obj/machinery/station_map/proc/stopWatching)
|
||||
update_use_power(2)
|
||||
update_use_power(USE_POWER_ACTIVE)
|
||||
|
||||
if(bogus)
|
||||
to_chat(user, "<span class='warning'>The holomap failed to initialize. This area of space cannot be mapped.</span>")
|
||||
@@ -156,7 +156,7 @@
|
||||
GLOB.dir_set_event.unregister(watching_mob, src)
|
||||
GLOB.destroyed_event.unregister(watching_mob, src)
|
||||
watching_mob = null
|
||||
update_use_power(1)
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
|
||||
/obj/machinery/station_map/power_change()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user