Big Fat Emission PR (#18124)

* amogus

* Revert "amogus"

This reverts commit ebaa99c77b.

* Part 1

* rest of the airlocks

holy shit that took a long time

* part 2

* part 3

finale

* conflict resolution

* fixes warnings

* fixes paneloen airlock emissives

* adds back changes from #18145

* #18085 sprites

* SteelSlayer Review

readded process in status_display, idk why I removed it, it broke some functionality

* future proofing firedoors

Talked with the contributor who added emissive appearances to the codebase. As of now they wont block them unless they spawn as closed, but with future PR merges this code will work.

* solar panel PR conflict resolve

* pain

* small fix

* farie82 suggestions

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* farie82 suggestions part 2

* farie82 suggestions part 3

* finalle

pog champ ers 2000

* farie82 suggestions the sequel

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* SteelSlayer Suggestions

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Kugamo
2022-07-23 11:31:20 -05:00
committed by GitHub
co-authored by Farie82 SteelSlayer
parent ad7d3b443f
commit 38f335e8b9
58 changed files with 622 additions and 199 deletions
+23 -6
View File
@@ -247,6 +247,8 @@
make_terminal()
set_light(1, LIGHTING_MINIMUM_POWER)
addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/examine(mob/user)
@@ -330,7 +332,7 @@
if(force_update || update & 1) // Updating the icon state
..(UPDATE_ICON_STATE)
if(!(update_state & UPSTATE_ALLGOOD))
if(managed_overlays)
..(UPDATE_OVERLAYS)
@@ -360,16 +362,31 @@
/obj/machinery/power/apc/update_overlays()
. = ..()
underlays.Cut()
if(update_state & UPSTATE_BLUESCREEN)
underlays += emissive_appearance(icon, "emit_apcemag")
return
if(!(update_state & UPSTATE_ALLGOOD))
return
if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD)
. += status_overlays_lock[locked+1]
. += status_overlays_charging[charging+1]
var/image/statover_lock = status_overlays_lock[locked + 1]
var/image/statover_charg = status_overlays_charging[charging + 1]
. += statover_lock
. += statover_charg
underlays += emissive_appearance(icon, statover_lock.icon_state)
underlays += emissive_appearance(icon, statover_charg.icon_state)
if(operating)
. += status_overlays_equipment[equipment+1]
. += status_overlays_lighting[lighting+1]
. += status_overlays_environ[environ+1]
var/image/statover_equip = status_overlays_equipment[equipment + 1]
var/image/statover_light = status_overlays_lighting[lighting + 1]
var/image/statover_envir = status_overlays_environ[environ + 1]
. += statover_equip
. += statover_light
. += statover_envir
underlays += emissive_appearance(icon, statover_equip.icon_state)
underlays += emissive_appearance(icon, statover_light.icon_state)
underlays += emissive_appearance(icon, statover_envir.icon_state)
/obj/machinery/power/apc/proc/check_updates()
+15 -2
View File
@@ -282,7 +282,7 @@
/obj/machinery/light/update_icon_state()
switch(status) // set icon_states
if(LIGHT_OK)
if(emergency_mode)
if(emergency_mode || fire_mode)
icon_state = "[base_state]_emergency"
else
icon_state = "[base_state][on]"
@@ -296,6 +296,17 @@
icon_state = "[base_state]-broken"
on = FALSE
/obj/machinery/light/update_overlays()
. = ..()
underlays.Cut()
if(status != LIGHT_OK || !on || !turning_on)
return
if(nightshift_enabled || emergency_mode || fire_mode)
underlays += emissive_appearance(icon, "[base_state]_emergency_lightmask")
else
underlays += emissive_appearance(icon, "[base_state]_lightmask")
/**
* Updates the light's 'on' state and power consumption based on [/obj/machinery/light/var/on].
*
@@ -367,7 +378,6 @@
return // Nothing's changed here
switchcount++
update_icon()
if(trigger && (status == LIGHT_OK))
if(rigged)
log_admin("LOG: Rigged light explosion, last touched by [fingerprintslast].")
@@ -381,6 +391,7 @@
return
use_power = ACTIVE_POWER_USE
update_icon()
set_light(BR, PO, CO)
if(play_sound)
playsound(src, 'sound/machines/light_on.ogg', 60, TRUE)
@@ -572,9 +583,11 @@
return
if(fire_mode)
set_light(nightshift_light_range, nightshift_light_power, bulb_emergency_colour)
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
return
emergency_mode = TRUE
set_light(3, 1.7, bulb_emergency_colour)
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, .proc/update, override = TRUE)
/obj/machinery/light/proc/emergency_lights_off(area/current_area, obj/machinery/power/apc/current_apc)