mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 23:14:18 +01:00
Adaptive lighting updates (#1679)
This PR simplifies the lighting update system (removes update_type) and instead makes the lighting system decide which update method to use based on server load. Instant updates are used during low-load, scheduled during high. Also removes: update_lights_now() (redundant), diff_light() (unused).
This commit is contained in:
@@ -24,10 +24,10 @@
|
||||
/obj/item/device/flashlight/update_icon()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on, update_type = UPDATE_NOW)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
set_light(0, update_type = UPDATE_NOW)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
/obj/item/device/flashlight/slime/New()
|
||||
..()
|
||||
set_light(brightness_on, update_type = UPDATE_NOW)
|
||||
set_light(brightness_on)
|
||||
|
||||
/obj/item/device/flashlight/slime/update_icon()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user