mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-23 04:36:16 +01:00
Revert "Merge branch 'master' into fairylights"
This reverts commit2947727659, reversing changes made to91063fe882.
This commit is contained in:
@@ -104,8 +104,6 @@
|
||||
var/icon_update_needed = FALSE
|
||||
var/obj/machinery/computer/apc_control/remote_control = null
|
||||
|
||||
var/obj/effect/light/lighteffect //light effect
|
||||
|
||||
/obj/machinery/power/apc/unlocked
|
||||
locked = FALSE
|
||||
|
||||
@@ -187,8 +185,6 @@
|
||||
addtimer(CALLBACK(src, .proc/update), 5)
|
||||
|
||||
/obj/machinery/power/apc/Destroy()
|
||||
if(lighteffect)
|
||||
lighteffect.Del()
|
||||
GLOB.apcs_list -= src
|
||||
|
||||
if(malfai && operating)
|
||||
@@ -324,13 +320,6 @@
|
||||
|
||||
// And now, separately for cleanness, the lighting changing
|
||||
if(update_state & UPSTATE_ALLGOOD)
|
||||
if(!lighteffect)//make the light
|
||||
lighteffect = new/obj/effect/light
|
||||
lighteffect.loc = src.loc
|
||||
lighteffect.alpha = 50
|
||||
lighteffect.pixel_x = pixel_x
|
||||
lighteffect.pixel_y = pixel_y
|
||||
|
||||
switch(charging)
|
||||
if(APC_NOT_CHARGING)
|
||||
light_color = LIGHT_COLOR_RED
|
||||
@@ -339,7 +328,6 @@
|
||||
if(APC_FULLY_CHARGED)
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
set_light(lon_range)
|
||||
lighteffect.color = light_color
|
||||
else if(update_state & UPSTATE_BLUESCREEN)
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
set_light(lon_range)
|
||||
@@ -348,10 +336,6 @@
|
||||
|
||||
icon_update_needed = FALSE
|
||||
|
||||
/obj/machinery/power/apc/Move()
|
||||
if(lighteffect)
|
||||
lighteffect.loc = src.loc //move the light overlay
|
||||
|
||||
/obj/machinery/power/apc/proc/check_updates()
|
||||
var/last_update_state = update_state
|
||||
var/last_update_overlay = update_overlay
|
||||
|
||||
@@ -223,9 +223,6 @@
|
||||
var/bulb_emergency_pow_mul = 0.75 // the multiplier for determining the light's power in emergency mode
|
||||
var/bulb_emergency_pow_min = 0.5 // the minimum value for the light's power in emergency mode
|
||||
|
||||
var/obj/effect/light/lighteffect //light effect
|
||||
|
||||
|
||||
/obj/machinery/light/broken
|
||||
status = LIGHT_BROKEN
|
||||
icon_state = "tube-broken"
|
||||
@@ -245,8 +242,6 @@
|
||||
icon_state = "bulb-broken"
|
||||
|
||||
/obj/machinery/light/Move()
|
||||
if(lighteffect)
|
||||
lighteffect.loc = src.loc
|
||||
if(status != LIGHT_BROKEN)
|
||||
break_light_tube(1)
|
||||
return ..()
|
||||
@@ -290,8 +285,6 @@
|
||||
|
||||
/obj/machinery/light/Destroy()
|
||||
var/area/A = get_area(src)
|
||||
if(lighteffect)
|
||||
lighteffect.Del()
|
||||
if(A)
|
||||
on = FALSE
|
||||
// A.update_lights()
|
||||
@@ -299,35 +292,24 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
if(!lighteffect) //dont have a light bloom, make it.
|
||||
lighteffect = new/obj/effect/light/large
|
||||
lighteffect.loc = src.loc
|
||||
cut_overlays()
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
var/area/A = get_area(src)
|
||||
if(emergency_mode || (A && A.fire))
|
||||
icon_state = "[base_state]_emergency"
|
||||
lighteffect.alpha = 0
|
||||
else
|
||||
icon_state = "[base_state]"
|
||||
if(on)
|
||||
lighteffect.alpha = CLAMP(light_power*35, 5, 100)
|
||||
lighteffect.color = light_color
|
||||
var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
glowybit.alpha = CLAMP(light_power*250, 30, 200)
|
||||
add_overlay(glowybit)
|
||||
if(LIGHT_EMPTY)
|
||||
icon_state = "[base_state]-empty"
|
||||
lighteffect.alpha = 0
|
||||
if(LIGHT_BURNED)
|
||||
icon_state = "[base_state]-burned"
|
||||
lighteffect.alpha = 0
|
||||
if(LIGHT_BROKEN)
|
||||
icon_state = "[base_state]-broken"
|
||||
lighteffect.alpha = 0
|
||||
if(!on)
|
||||
lighteffect.alpha = 0
|
||||
return
|
||||
|
||||
// update the icon_state and luminosity of the light depending on its state
|
||||
|
||||
Reference in New Issue
Block a user