mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
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:
co-authored by
Farie82
SteelSlayer
parent
ad7d3b443f
commit
38f335e8b9
@@ -8,6 +8,8 @@
|
||||
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
||||
#define LIGHTING_ROUND_VALUE (1 / 64) //Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
||||
|
||||
#define LIGHTING_MINIMUM_POWER 0.1
|
||||
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
|
||||
|
||||
// If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting objects.
|
||||
|
||||
@@ -75,6 +75,13 @@ GLOBAL_VAR(bomb_set)
|
||||
|
||||
/obj/machinery/nuclearbomb/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
set_light(0)
|
||||
|
||||
if(!lighthack)
|
||||
underlays += emissive_appearance(icon, "nuclearbomb_lightmask")
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
if(panel_open)
|
||||
. += "npanel_open"
|
||||
|
||||
@@ -322,6 +329,7 @@ GLOBAL_VAR(bomb_set)
|
||||
if(!lighthack)
|
||||
flick("nuclearbombc", src)
|
||||
icon_state = "nuclearbomb1"
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
extended = TRUE
|
||||
return
|
||||
if("auth")
|
||||
@@ -401,6 +409,7 @@ GLOBAL_VAR(bomb_set)
|
||||
if(timing)
|
||||
if(!lighthack)
|
||||
icon_state = "nuclearbomb2"
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
if(!safety)
|
||||
message_admins("[key_name_admin(usr)] engaged a nuclear bomb [ADMIN_JMP(src)]")
|
||||
if(!is_syndicate)
|
||||
@@ -414,6 +423,7 @@ GLOBAL_VAR(bomb_set)
|
||||
GLOB.bomb_set = FALSE
|
||||
if(!lighthack)
|
||||
icon_state = "nuclearbomb1"
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/blob_act(obj/structure/blob/B)
|
||||
@@ -448,6 +458,7 @@ GLOBAL_VAR(bomb_set)
|
||||
safety = TRUE
|
||||
if(!lighthack)
|
||||
icon_state = "nuclearbomb3"
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
playsound(src,'sound/machines/alarm.ogg',100,0,5)
|
||||
if(SSticker && SSticker.mode)
|
||||
SSticker.mode.explosion_in_progress = TRUE
|
||||
@@ -502,6 +513,8 @@ GLOBAL_VAR(bomb_set)
|
||||
if(!lighthack)
|
||||
if(icon_state == "nuclearbomb2")
|
||||
icon_state = "nuclearbomb1"
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
else
|
||||
visible_message("<span class='notice'>[src] emits a quiet whirling noise!</span>")
|
||||
|
||||
|
||||
@@ -214,6 +214,17 @@
|
||||
luminosity = 0
|
||||
circuit = /obj/item/circuitboard/camera/telescreen/entertainment
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment/Initialize()
|
||||
. = ..()
|
||||
set_light(1, LIGHTING_MINIMUM_POWER) //so byond doesnt cull, and we get an emissive appearance
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
/obj/machinery/computer/security/wooden_tv
|
||||
name = "security camera monitor"
|
||||
desc = "An old TV hooked into the station's camera network."
|
||||
|
||||
@@ -76,6 +76,13 @@
|
||||
else
|
||||
icon_state = "disco0"
|
||||
|
||||
/obj/machinery/disco/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(active)
|
||||
underlays += emissive_appearance(icon, "disco_lightmask")
|
||||
|
||||
/obj/machinery/disco/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
@@ -125,7 +132,8 @@
|
||||
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
|
||||
return
|
||||
active = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon()
|
||||
set_light(1, LIGHTING_MINIMUM_POWER) //for emmisive appearance
|
||||
dance_setup()
|
||||
START_PROCESSING(SSobj, src)
|
||||
lights_spin()
|
||||
@@ -480,7 +488,8 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
dance_over()
|
||||
playsound(src,'sound/machines/terminal_off.ogg',50,1)
|
||||
icon_state = "disco0"
|
||||
update_icon()
|
||||
set_light(0)
|
||||
stop = world.time + 100
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
|
||||
GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
|
||||
/obj/machinery/door/airlock
|
||||
name = "airlock"
|
||||
@@ -97,6 +98,11 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
var/image/old_dam_overlay
|
||||
var/image/old_note_overlay
|
||||
|
||||
var/mutable_appearance/old_buttons_underlay
|
||||
var/mutable_appearance/old_lights_underlay
|
||||
var/mutable_appearance/old_damag_underlay
|
||||
var/mutable_appearance/old_sparks_underlay
|
||||
|
||||
var/doorOpen = 'sound/machines/airlock_open.ogg'
|
||||
var/doorClose = 'sound/machines/airlock_close.ogg'
|
||||
var/doorDeni = 'sound/machines/deniedbeep.ogg' // i'm thinkin' Deni's
|
||||
@@ -348,14 +354,20 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
var/image/sparks_overlay
|
||||
var/image/note_overlay
|
||||
var/notetype = note_type()
|
||||
var/mutable_appearance/buttons_underlay
|
||||
var/mutable_appearance/lights_underlay
|
||||
var/mutable_appearance/damag_underlay
|
||||
var/mutable_appearance/sparks_underlay
|
||||
switch(state)
|
||||
if(AIRLOCK_CLOSED)
|
||||
frame_overlay = get_airlock_overlay("closed", icon)
|
||||
buttons_underlay = get_airlock_emissive_underlay("closed_lightmask", overlays_file)
|
||||
if(airlock_material)
|
||||
filling_overlay = get_airlock_overlay("[airlock_material]_closed", overlays_file)
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_closed", icon)
|
||||
if(panel_open)
|
||||
buttons_underlay = null
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
|
||||
else
|
||||
@@ -364,13 +376,17 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay( "sparks_broken_lightmask", overlays_file)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay("sparks_damaged_lightmask", overlays_file)
|
||||
if(lights && arePowerSystemsOn())
|
||||
if(locked)
|
||||
lights_overlay = get_airlock_overlay("lights_bolts", overlays_file)
|
||||
lights_underlay = get_airlock_emissive_underlay("lights_bolts_lightmask", overlays_file)
|
||||
else if(emergency)
|
||||
lights_overlay = get_airlock_overlay("lights_emergency", overlays_file)
|
||||
lights_underlay = get_airlock_emissive_underlay("lights_emergency_lightmask", overlays_file)
|
||||
if(note)
|
||||
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
|
||||
|
||||
@@ -383,36 +399,45 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_closed", icon)
|
||||
if(panel_open)
|
||||
buttons_underlay = null
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay( "sparks_broken_lightmask", overlays_file)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay("sparks_damaged_lightmask", overlays_file)
|
||||
if(welded)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_denied", overlays_file)
|
||||
lights_underlay = get_airlock_emissive_underlay("lights_denied_lightmask", overlays_file)
|
||||
if(note)
|
||||
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
|
||||
|
||||
if(AIRLOCK_EMAG)
|
||||
frame_overlay = get_airlock_overlay("closed", icon)
|
||||
buttons_underlay = get_airlock_emissive_underlay("closed_lightmask", overlays_file)
|
||||
sparks_overlay = get_airlock_overlay("sparks", overlays_file)
|
||||
sparks_underlay = get_airlock_emissive_underlay("sparks_lightmask", overlays_file)
|
||||
if(airlock_material)
|
||||
filling_overlay = get_airlock_overlay("[airlock_material]_closed", overlays_file)
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_closed", icon)
|
||||
if(panel_open)
|
||||
buttons_underlay = null
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay( "sparks_broken_lightmask", overlays_file)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay("sparks_damaged_lightmask", overlays_file)
|
||||
if(welded)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
if(note)
|
||||
@@ -420,13 +445,16 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
|
||||
if(AIRLOCK_CLOSING)
|
||||
frame_overlay = get_airlock_overlay("closing", icon)
|
||||
buttons_underlay = get_airlock_emissive_underlay("closing_lightmask", overlays_file)
|
||||
if(airlock_material)
|
||||
filling_overlay = get_airlock_overlay("[airlock_material]_closing", overlays_file)
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_closing", icon)
|
||||
if(lights && arePowerSystemsOn())
|
||||
lights_overlay = get_airlock_overlay("lights_closing", overlays_file)
|
||||
lights_underlay = get_airlock_emissive_underlay("lights_closing_lightmask", overlays_file)
|
||||
if(panel_open)
|
||||
buttons_underlay = null
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_closing_protected", overlays_file)
|
||||
else
|
||||
@@ -447,18 +475,22 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
panel_overlay = get_airlock_overlay("panel_open", overlays_file)
|
||||
if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_open", overlays_file)
|
||||
damag_underlay = get_airlock_emissive_underlay("sparks_open_lightmask", overlays_file)
|
||||
if(note)
|
||||
note_overlay = get_airlock_overlay("[notetype]_open", note_overlay_file)
|
||||
|
||||
if(AIRLOCK_OPENING)
|
||||
frame_overlay = get_airlock_overlay("opening", icon)
|
||||
buttons_underlay = get_airlock_emissive_underlay("opening_lightmask", overlays_file)
|
||||
if(airlock_material)
|
||||
filling_overlay = get_airlock_overlay("[airlock_material]_opening", overlays_file)
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_opening", icon)
|
||||
if(lights && arePowerSystemsOn())
|
||||
lights_overlay = get_airlock_overlay("lights_opening", overlays_file)
|
||||
lights_underlay = get_airlock_emissive_underlay("lights_opening_lightmask", overlays_file)
|
||||
if(panel_open)
|
||||
buttons_underlay = null
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_opening_protected", overlays_file)
|
||||
else
|
||||
@@ -500,6 +532,24 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
overlays += note_overlay
|
||||
old_note_overlay = note_overlay
|
||||
|
||||
//EMISSIVE ICONS
|
||||
if(buttons_underlay != old_buttons_underlay)
|
||||
underlays -= old_buttons_underlay
|
||||
underlays += buttons_underlay
|
||||
old_buttons_underlay = buttons_underlay
|
||||
if(lights_underlay != old_lights_underlay)
|
||||
underlays -= old_lights_underlay
|
||||
underlays += lights_underlay
|
||||
old_lights_underlay = lights_underlay
|
||||
if(damag_underlay != old_damag_underlay)
|
||||
underlays -= old_damag_underlay
|
||||
underlays += damag_underlay
|
||||
old_damag_underlay = damag_underlay
|
||||
if(sparks_underlay != old_sparks_underlay)
|
||||
underlays -= old_sparks_underlay
|
||||
underlays += sparks_underlay
|
||||
old_sparks_underlay = sparks_underlay
|
||||
|
||||
/proc/get_airlock_overlay(icon_state, icon_file)
|
||||
var/iconkey = "[icon_state][icon_file]"
|
||||
if(GLOB.airlock_overlays[iconkey])
|
||||
@@ -507,6 +557,13 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
GLOB.airlock_overlays[iconkey] = image(icon_file, icon_state)
|
||||
return GLOB.airlock_overlays[iconkey]
|
||||
|
||||
/proc/get_airlock_emissive_underlay(icon_state, icon_file)
|
||||
var/iconkey = "[icon_state][icon_file]"
|
||||
if(GLOB.airlock_emissive_underlays[iconkey])
|
||||
return GLOB.airlock_emissive_underlays[iconkey]
|
||||
GLOB.airlock_emissive_underlays[iconkey] = emissive_appearance(icon_file, icon_state)
|
||||
return GLOB.airlock_emissive_underlays[iconkey]
|
||||
|
||||
/obj/machinery/door/airlock/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
closingLayer = CLOSED_FIREDOOR_LAYER
|
||||
auto_close_time = 5 SECONDS
|
||||
assemblytype = /obj/structure/firelock_frame
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
armor = list(MELEE = 30, BULLET = 30, LASER = 20, ENERGY = 20, BOMB = 10, BIO = 100, RAD = 100, FIRE = 95, ACID = 70)
|
||||
/// How long does opening by hand take, in deciseconds.
|
||||
var/manual_open_time = 5 SECONDS
|
||||
|
||||
@@ -25,7 +25,7 @@ FIRE ALARM
|
||||
power_channel = ENVIRON
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
light_power = 0
|
||||
light_power = LIGHTING_MINIMUM_POWER
|
||||
light_range = 7
|
||||
light_color = "#ff3232"
|
||||
|
||||
@@ -60,12 +60,15 @@ FIRE ALARM
|
||||
/obj/machinery/firealarm/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(is_station_contact(z) && show_alert_level)
|
||||
if(GLOB.security_level)
|
||||
. += "overlay_[get_security_level()]"
|
||||
if(light)
|
||||
underlays += emissive_appearance(icon, "firealarm_overlay_lightmask")
|
||||
if(light && !wiresexposed)
|
||||
. += "overlay_[get_security_level()]"
|
||||
underlays += emissive_appearance(icon, "firealarm_overlay_lightmask")
|
||||
|
||||
if(!wiresexposed)
|
||||
underlays += emissive_appearance(icon, "firealarm_lightmask")
|
||||
|
||||
/obj/machinery/firealarm/emag_act(mob/user)
|
||||
@@ -212,18 +215,26 @@ FIRE ALARM
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/firealarm/proc/update_fire_light(fire)
|
||||
if(fire == !!light_power)
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
return
|
||||
else if(GLOB.security_level == SEC_LEVEL_EPSILON)
|
||||
set_light(2, 1, COLOR_WHITE)
|
||||
return
|
||||
else if(fire == !!light_power || fire == !!(light_power - 0.1))
|
||||
return // do nothing if we're already active
|
||||
|
||||
if(fire)
|
||||
set_light(l_power = 0.8)
|
||||
else
|
||||
set_light(l_power = 0)
|
||||
set_light(l_power = LIGHTING_MINIMUM_POWER)
|
||||
|
||||
/obj/machinery/firealarm/power_change()
|
||||
if(powered(ENVIRON))
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
update_fire_light()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/attack_hand(mob/user)
|
||||
@@ -265,7 +276,6 @@ FIRE ALARM
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
A.firealert(src) // Manually trigger alarms if the alarm isn't reported
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/New(location, direction, building)
|
||||
. = ..()
|
||||
@@ -282,6 +292,7 @@ FIRE ALARM
|
||||
/obj/machinery/firealarm/Initialize(mapload)
|
||||
. = ..()
|
||||
name = "fire alarm"
|
||||
set_light(1, LIGHTING_MINIMUM_POWER) //for emissives
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/Destroy()
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
var/base_state = "mflash"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/flasher/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored
|
||||
name = "portable flasher"
|
||||
desc = "A portable flashing device. Wrench to activate and deactivate. Cannot detect slow movements."
|
||||
@@ -32,10 +36,29 @@
|
||||
/obj/machinery/flasher/power_change()
|
||||
if( powered() )
|
||||
stat &= ~NOPOWER
|
||||
icon_state = "[base_state]1"
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/flasher/update_icon_state()
|
||||
. = ..()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "[base_state]1-p"
|
||||
else
|
||||
icon_state = "[base_state]1"
|
||||
|
||||
/obj/machinery/flasher/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
underlays += emissive_appearance(icon, "[base_state]_lightmask")
|
||||
|
||||
|
||||
//Let the AI trigger them directly.
|
||||
/obj/machinery/flasher/attack_ai(mob/user)
|
||||
|
||||
@@ -83,10 +83,26 @@ GLOBAL_LIST_EMPTY(holopads)
|
||||
/obj/machinery/hologram/holopad/power_change()
|
||||
if(powered())
|
||||
stat &= ~NOPOWER
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
else
|
||||
stat |= NOPOWER
|
||||
if(outgoing_call)
|
||||
outgoing_call.ConnectionFailure(src)
|
||||
set_light(0)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/hologram/holopad/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
if(ringing)
|
||||
underlays += emissive_appearance(icon, "holopad_ringing_lightmask")
|
||||
else if(total_users)
|
||||
underlays += emissive_appearance(icon, "holopad1_lightmask")
|
||||
|
||||
/obj/machinery/hologram/holopad/obj_break()
|
||||
. = ..()
|
||||
@@ -407,7 +423,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
set_light(2)
|
||||
else
|
||||
set_light(0)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/hologram/holopad/update_icon_state()
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
|
||||
@@ -27,10 +27,30 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
use_power(50)
|
||||
src.on = !( src.on )
|
||||
src.icon_state = text("igniter[]", src.on)
|
||||
on = !on
|
||||
update_icon()
|
||||
if(on)
|
||||
set_light(1, 1, "#ff821c")
|
||||
else
|
||||
set_light(0)
|
||||
return
|
||||
|
||||
/obj/machinery/igniter/update_icon_state()
|
||||
. = ..()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
icon_state = "igniter0"
|
||||
return
|
||||
|
||||
icon_state = "igniter[on]"
|
||||
|
||||
/obj/machinery/igniter/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(on)
|
||||
underlays += emissive_appearance(icon, "igniter_lightmask")
|
||||
|
||||
/obj/machinery/igniter/process() //ugh why is this even in process()?
|
||||
if(src.on && !(stat & NOPOWER) )
|
||||
var/turf/location = src.loc
|
||||
@@ -40,13 +60,13 @@
|
||||
|
||||
/obj/machinery/igniter/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = "igniter[on]"
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/igniter/power_change()
|
||||
if(!( stat & NOPOWER) )
|
||||
icon_state = "igniter[src.on]"
|
||||
else
|
||||
icon_state = "igniter0"
|
||||
. = ..()
|
||||
if(stat & NOPOWER)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
// Wall mounted remote-control igniter.
|
||||
|
||||
|
||||
@@ -69,6 +69,15 @@
|
||||
return
|
||||
icon_state = "light[on]"
|
||||
|
||||
/obj/machinery/light_switch/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
underlays += emissive_appearance(icon, "light_lightmask")
|
||||
|
||||
/obj/machinery/light_switch/examine(mob/user)
|
||||
. = ..()
|
||||
. += "A light switch. It is [on ? "on" : "off"]."
|
||||
@@ -129,10 +138,12 @@
|
||||
if(!otherarea)
|
||||
if(powered(LIGHT))
|
||||
stat &= ~NOPOWER
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
else
|
||||
stat |= NOPOWER
|
||||
set_light(0)
|
||||
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/light_switch/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
charging = G
|
||||
use_power = ACTIVE_POWER_USE
|
||||
using_power = check_cell_needs_recharging(get_cell_from(G))
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] isn't connected to anything!</span>")
|
||||
return TRUE
|
||||
@@ -97,7 +97,7 @@
|
||||
user.put_in_hands(charging)
|
||||
charging = null
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/recharger/attack_tk(mob/user)
|
||||
if(charging)
|
||||
@@ -105,14 +105,14 @@
|
||||
charging.forceMove(loc)
|
||||
charging = null
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return
|
||||
|
||||
using_power = try_recharging_if_possible()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/recharger/emp_act(severity)
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
@@ -132,7 +132,11 @@
|
||||
|
||||
/obj/machinery/recharger/power_change()
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/recharger/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
@@ -146,6 +150,21 @@
|
||||
return
|
||||
icon_state = icon_state_idle
|
||||
|
||||
/obj/machinery/recharger/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(charging)
|
||||
if(using_power)
|
||||
underlays += emissive_appearance(icon, "[icon_state_charging]_lightmask")
|
||||
else
|
||||
underlays += emissive_appearance(icon, "[icon_state_charged]_lightmask")
|
||||
else
|
||||
underlays += emissive_appearance(icon, "[icon_state_idle]_lightmask")
|
||||
|
||||
/obj/machinery/recharger/proc/get_cell_from(obj/item/I)
|
||||
if(istype(I, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = I
|
||||
|
||||
@@ -73,7 +73,11 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
|
||||
|
||||
/obj/machinery/requests_console/power_change()
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/requests_console/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
@@ -82,6 +86,19 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
|
||||
else
|
||||
icon_state = "req_comp[newmessagepriority]"
|
||||
|
||||
/obj/machinery/requests_console/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(newmessagepriority == RQ_NONEW_MESSAGES)
|
||||
underlays += emissive_appearance(icon, "req_comp_lightmask")
|
||||
else
|
||||
underlays += emissive_appearance(icon, "req_comp2_lightmask")
|
||||
|
||||
|
||||
/obj/machinery/requests_console/Initialize(mapload)
|
||||
Radio = new /obj/item/radio(src)
|
||||
Radio.listening = TRUE
|
||||
@@ -336,7 +353,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
|
||||
capitalize(title)
|
||||
if(newmessagepriority < priority)
|
||||
newmessagepriority = priority
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
if(!silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, TRUE)
|
||||
atom_say(title)
|
||||
|
||||
@@ -59,6 +59,27 @@
|
||||
..()
|
||||
if(SSradio)
|
||||
SSradio.add_object(src, frequency)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/status_display/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(picture_state)
|
||||
. += picture_state
|
||||
|
||||
underlays += emissive_appearance(icon, "lightmask")
|
||||
|
||||
/obj/machinery/status_display/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
// timed process
|
||||
/obj/machinery/status_display/process()
|
||||
@@ -160,9 +181,9 @@
|
||||
index2 = 0
|
||||
|
||||
/obj/machinery/status_display/proc/set_picture(state)
|
||||
picture_state = state
|
||||
remove_display()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
picture_state = state
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/status_display/proc/update_display(line1, line2, warning = 0)
|
||||
line1 = uppertext(line1)
|
||||
@@ -172,10 +193,10 @@
|
||||
maptext = new_text
|
||||
|
||||
/obj/machinery/status_display/proc/remove_display()
|
||||
if(overlays.len)
|
||||
overlays.Cut()
|
||||
if(maptext)
|
||||
maptext = ""
|
||||
picture_state = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/status_display/receive_signal(datum/signal/signal)
|
||||
switch(signal.data["command"])
|
||||
@@ -213,85 +234,91 @@
|
||||
|
||||
var/emotion = "Neutral"
|
||||
|
||||
/obj/machinery/ai_status_display/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/ai_status_display/attack_ai(mob/living/silicon/ai/user)
|
||||
if(isAI(user))
|
||||
user.ai_statuschange()
|
||||
|
||||
/obj/machinery/ai_status_display/process()
|
||||
if(stat & NOPOWER)
|
||||
overlays.Cut()
|
||||
return
|
||||
if(spookymode)
|
||||
spookymode = FALSE
|
||||
overlays.Cut()
|
||||
return
|
||||
update()
|
||||
|
||||
/obj/machinery/ai_status_display/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
set_picture("ai_bsod")
|
||||
mode = 2
|
||||
update_icon()
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/ai_status_display/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
/obj/machinery/ai_status_display/flicker()
|
||||
if(stat & (NOPOWER | BROKEN))
|
||||
return FALSE
|
||||
|
||||
spookymode = TRUE
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/ai_status_display/proc/update()
|
||||
if(mode==0) //Blank
|
||||
overlays.Cut()
|
||||
/obj/machinery/ai_status_display/update_overlays()
|
||||
. = ..()
|
||||
|
||||
var/new_display
|
||||
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(mode==1) // AI emoticon
|
||||
switch(emotion)
|
||||
if("Very Happy")
|
||||
set_picture("ai_veryhappy")
|
||||
if("Happy")
|
||||
set_picture("ai_happy")
|
||||
if("Neutral")
|
||||
set_picture("ai_neutral")
|
||||
if("Unsure")
|
||||
set_picture("ai_unsure")
|
||||
if("Confused")
|
||||
set_picture("ai_confused")
|
||||
if("Sad")
|
||||
set_picture("ai_sad")
|
||||
if("Surprised")
|
||||
set_picture("ai_surprised")
|
||||
if("Upset")
|
||||
set_picture("ai_upset")
|
||||
if("Angry")
|
||||
set_picture("ai_angry")
|
||||
if("BSOD")
|
||||
set_picture("ai_bsod")
|
||||
if("Blank")
|
||||
set_picture("ai_off")
|
||||
if("Problems?")
|
||||
set_picture("ai_trollface")
|
||||
if("Awesome")
|
||||
set_picture("ai_awesome")
|
||||
if("Dorfy")
|
||||
set_picture("ai_urist")
|
||||
if("Facepalm")
|
||||
set_picture("ai_facepalm")
|
||||
if("Friend Computer")
|
||||
set_picture("ai_friend")
|
||||
return
|
||||
switch(mode)
|
||||
if(0) //Blank
|
||||
new_display = "ai_off"
|
||||
|
||||
if(mode==2) // BSOD
|
||||
set_picture("ai_bsod")
|
||||
return
|
||||
if(1) // AI emoticon
|
||||
switch(emotion)
|
||||
if("Very Happy")
|
||||
new_display = "ai_veryhappy"
|
||||
if("Happy")
|
||||
new_display = "ai_happy"
|
||||
if("Neutral")
|
||||
new_display = "ai_neutral"
|
||||
if("Unsure")
|
||||
new_display = "ai_unsure"
|
||||
if("Confused")
|
||||
new_display = "ai_confused"
|
||||
if("Sad")
|
||||
new_display = "ai_sad"
|
||||
if("Surprised")
|
||||
new_display = "ai_surprised"
|
||||
if("Upset")
|
||||
new_display = "ai_upset"
|
||||
if("Angry")
|
||||
new_display = "ai_angry"
|
||||
if("BSOD")
|
||||
new_display = "ai_bsod"
|
||||
if("Blank")
|
||||
new_display = "ai_off"
|
||||
if("Problems?")
|
||||
new_display = "ai_trollface"
|
||||
if("Awesome")
|
||||
new_display = "ai_awesome"
|
||||
if("Dorfy")
|
||||
new_display = "ai_urist"
|
||||
if("Facepalm")
|
||||
new_display = "ai_facepalm"
|
||||
if("Friend Computer")
|
||||
new_display = "ai_friend"
|
||||
|
||||
if(2) // BSOD
|
||||
new_display ="ai_bsod"
|
||||
|
||||
/obj/machinery/ai_status_display/proc/set_picture(state)
|
||||
picture_state = state
|
||||
if(overlays.len)
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
. += new_display
|
||||
underlays += emissive_appearance(icon, "lightmask")
|
||||
|
||||
#undef FONT_SIZE
|
||||
#undef FONT_COLOR
|
||||
|
||||
@@ -307,6 +307,24 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/**
|
||||
Internal helper function
|
||||
|
||||
Prevents AI from using the teleporter, prints out failure messages for clarity
|
||||
*/
|
||||
/obj/machinery/teleport/proc/blockAI(atom/A)
|
||||
if(istype(A, /mob/living/silicon/ai) || istype(A, /obj/structure/AIcore))
|
||||
visible_message("<span class='warning'>The teleporter rejects the AI unit.</span>")
|
||||
if(istype(A, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/T = A
|
||||
var/list/TPError = list("<span class='warning'>Firmware instructions dictate you must remain on your assigned station!</span>",
|
||||
"<span class='warning'>You cannot interface with this technology and get rejected!</span>",
|
||||
"<span class='warning'>External firewalls prevent you from utilizing this machine!</span>",
|
||||
"<span class='warning'>Your AI core's anti-bluespace failsafes trigger and prevent teleportation!</span>")
|
||||
to_chat(T, "[pick(TPError)]")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/teleport/hub
|
||||
name = "teleporter hub"
|
||||
desc = "It's the hub of a teleporting machine."
|
||||
@@ -413,6 +431,19 @@
|
||||
else
|
||||
icon_state = "tele0"
|
||||
|
||||
/obj/machinery/teleport/hub/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(power_station && power_station.engaged && !panel_open)
|
||||
underlays += emissive_appearance(icon, "tele1_lightmask")
|
||||
|
||||
/obj/machinery/teleport/hub/proc/update_lighting()
|
||||
if(power_station && power_station.engaged && !panel_open)
|
||||
set_light(2, 1, "#f1f1bd")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/teleport/perma
|
||||
name = "permanent teleporter"
|
||||
desc = "A teleporter with the target pre-set on the circuit board."
|
||||
@@ -425,6 +456,10 @@
|
||||
var/target
|
||||
var/tele_delay = 50
|
||||
|
||||
/obj/machinery/teleport/perma/Initialize(mapload)
|
||||
. = ..()
|
||||
update_lighting()
|
||||
|
||||
/obj/machinery/teleport/perma/RefreshParts()
|
||||
for(var/obj/item/circuitboard/teleporter_perma/C in component_parts)
|
||||
target = C.target
|
||||
@@ -434,24 +469,6 @@
|
||||
tele_delay = max(A, 0)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/**
|
||||
Internal helper function
|
||||
|
||||
Prevents AI from using the teleporter, prints out failure messages for clarity
|
||||
*/
|
||||
/obj/machinery/teleport/proc/blockAI(atom/A)
|
||||
if(istype(A, /mob/living/silicon/ai) || istype(A, /obj/structure/AIcore))
|
||||
visible_message("<span class='warning'>The teleporter rejects the AI unit.</span>")
|
||||
if(istype(A, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/T = A
|
||||
var/list/TPError = list("<span class='warning'>Firmware instructions dictate you must remain on your assigned station!</span>",
|
||||
"<span class='warning'>You cannot interface with this technology and get rejected!</span>",
|
||||
"<span class='warning'>External firewalls prevent you from utilizing this machine!</span>",
|
||||
"<span class='warning'>Your AI core's anti-bluespace failsafes trigger and prevent teleportation!</span>")
|
||||
to_chat(T, "[pick(TPError)]")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/teleport/perma/Bumped(atom/A)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
@@ -464,16 +481,19 @@
|
||||
use_power(5000)
|
||||
if(tele_delay)
|
||||
recalibrating = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
update_lighting()
|
||||
addtimer(CALLBACK(src, .proc/BumpedCallback), tele_delay)
|
||||
|
||||
/obj/machinery/teleport/perma/proc/BumpedCallback()
|
||||
recalibrating = FALSE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
update_lighting()
|
||||
|
||||
/obj/machinery/teleport/perma/power_change()
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
update_lighting()
|
||||
|
||||
/obj/machinery/teleport/perma/update_icon_state()
|
||||
if(panel_open)
|
||||
@@ -483,6 +503,19 @@
|
||||
else
|
||||
icon_state = "tele0"
|
||||
|
||||
/obj/machinery/teleport/perma/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(target && !recalibrating && !(stat & (BROKEN|NOPOWER)) && !panel_open)
|
||||
underlays += emissive_appearance(icon, "tele1_lightmask")
|
||||
|
||||
/obj/machinery/teleport/perma/proc/update_lighting()
|
||||
if(target && !recalibrating && !panel_open && !(stat & (BROKEN|NOPOWER)))
|
||||
set_light(2, 1, "#f1f1bd")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/teleport/perma/attackby(obj/item/I, mob/user, params)
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
@@ -584,7 +617,7 @@
|
||||
|
||||
/obj/machinery/teleport/station/screwdriver_act(mob/user, obj/item/I)
|
||||
if(default_deconstruction_screwdriver(user, "controller-o", "controller", I))
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/teleport/station/wirecutter_act(mob/user, obj/item/I)
|
||||
@@ -618,15 +651,23 @@
|
||||
else
|
||||
visible_message("<span class='alert'>No target detected.</span>")
|
||||
engaged = FALSE
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
teleporter_hub.update_lighting()
|
||||
if(istype(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/teleport/station/power_change()
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
teleporter_hub.update_lighting()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
/obj/machinery/teleport/station/update_icon_state()
|
||||
if(panel_open)
|
||||
@@ -635,3 +676,10 @@
|
||||
icon_state = "controller-p"
|
||||
else
|
||||
icon_state = "controller"
|
||||
|
||||
/obj/machinery/teleport/station/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(!(stat & NOPOWER) && !panel_open)
|
||||
underlays += emissive_appearance(icon, "controller_lightmask")
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
canhear_range = 2
|
||||
flags = CONDUCT
|
||||
blocks_emissive = FALSE
|
||||
var/circuitry_installed = 1
|
||||
var/buildstage = 0
|
||||
var/custom_name
|
||||
@@ -64,7 +65,7 @@
|
||||
b_stat = TRUE
|
||||
on = FALSE
|
||||
GLOB.global_intercoms.Add(src)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/radio/intercom/Initialize()
|
||||
. = ..()
|
||||
@@ -205,7 +206,7 @@
|
||||
on = FALSE
|
||||
b_stat = TRUE
|
||||
buildstage = 1
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
update_operating_status(FALSE)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
@@ -226,6 +227,13 @@
|
||||
else
|
||||
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
|
||||
|
||||
/obj/item/radio/intercom/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(on && buildstage == 3)
|
||||
underlays += emissive_appearance(icon, "intercom_lightmask")
|
||||
|
||||
/obj/item/radio/intercom/proc/update_operating_status(on = TRUE)
|
||||
var/area/current_area = get_area(src)
|
||||
if(!current_area)
|
||||
@@ -247,9 +255,11 @@
|
||||
var/area/current_area = get_area(src)
|
||||
if(!current_area)
|
||||
on = FALSE
|
||||
set_light(0)
|
||||
else
|
||||
on = current_area.powered(EQUIP) // set "on" to the equipment power status of our area.
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/intercom_electronics
|
||||
name = "intercom electronics"
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
armor = list(MELEE = 20, BULLET = 20, LASER = 20, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
|
||||
var/list/barsigns=list()
|
||||
var/list/hiddensigns
|
||||
var/prev_sign = ""
|
||||
var/datum/barsign/current_sign
|
||||
var/datum/barsign/prev_sign
|
||||
var/panel_open = FALSE
|
||||
blocks_emissive = FALSE
|
||||
does_emissive = TRUE
|
||||
|
||||
/obj/structure/sign/barsign/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -27,16 +30,39 @@
|
||||
/obj/structure/sign/barsign/proc/set_sign(datum/barsign/sign)
|
||||
if(!istype(sign))
|
||||
return
|
||||
icon_state = sign.icon
|
||||
current_sign = sign
|
||||
name = sign.name
|
||||
|
||||
if(sign.desc)
|
||||
desc = sign.desc
|
||||
else
|
||||
desc = "It displays \"[name]\"."
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/barsign/update_icon_state()
|
||||
. = ..()
|
||||
|
||||
if(!current_sign || broken)
|
||||
icon_state = "empty"
|
||||
return
|
||||
icon_state = current_sign.icon
|
||||
|
||||
/obj/structure/sign/barsign/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(current_sign == "empty" || broken || !current_sign)
|
||||
return
|
||||
|
||||
underlays |= emissive_appearance(icon, current_sign.icon)
|
||||
|
||||
/obj/structure/sign/barsign/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
broken = TRUE
|
||||
prev_sign = current_sign
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/barsign/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
@@ -53,8 +79,6 @@
|
||||
/obj/structure/sign/barsign/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attack_hand(mob/user as mob)
|
||||
if(!src.allowed(user))
|
||||
to_chat(user, "<span class = 'info'>Access denied.</span>")
|
||||
@@ -64,9 +88,6 @@
|
||||
return
|
||||
pick_sign()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
|
||||
if( istype(I, /obj/item/screwdriver))
|
||||
if(!panel_open)
|
||||
@@ -76,7 +97,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You close the maintenance panel.</span>")
|
||||
if(!broken && !emagged)
|
||||
set_sign(pick(barsigns))
|
||||
set_sign(prev_sign)
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
else if(emagged)
|
||||
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
|
||||
else
|
||||
@@ -100,15 +122,10 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emp_act(severity)
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
broken = TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emag_act(mob/user)
|
||||
if(broken || emagged)
|
||||
to_chat(user, "<span class='warning'>Nothing interesting happens!</span>")
|
||||
@@ -123,44 +140,30 @@
|
||||
emagged = TRUE
|
||||
req_access = list(ACCESS_SYNDICATE)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/proc/pick_sign()
|
||||
var/picked_name = input("Available Signage", "Bar Sign") as null|anything in barsigns
|
||||
if(!picked_name)
|
||||
return
|
||||
set_sign(picked_name)
|
||||
|
||||
|
||||
|
||||
//Code below is to define useless variables for datums. It errors without these
|
||||
|
||||
|
||||
|
||||
/datum/barsign
|
||||
var/name = "Name"
|
||||
var/icon = "Icon"
|
||||
var/desc = "desc"
|
||||
var/hidden = 0
|
||||
|
||||
|
||||
//Anything below this is where all the specific signs are. If people want to add more signs, add them below.
|
||||
|
||||
|
||||
|
||||
/datum/barsign/maltesefalcon
|
||||
name = "Maltese Falcon"
|
||||
icon = "maltesefalcon"
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
|
||||
|
||||
/datum/barsign/thebark
|
||||
name = "The Bark"
|
||||
icon = "thebark"
|
||||
desc = "Ian's bar of choice."
|
||||
|
||||
|
||||
/datum/barsign/harmbaton
|
||||
name = "The Harmbaton"
|
||||
icon = "theharmbaton"
|
||||
@@ -172,67 +175,56 @@
|
||||
icon = "thesingulo"
|
||||
desc = "Where people go that'd rather not be called by their name."
|
||||
|
||||
|
||||
/datum/barsign/thedrunkcarp
|
||||
name = "The Drunk Carp"
|
||||
icon = "thedrunkcarp"
|
||||
desc = "Don't drink and swim."
|
||||
|
||||
|
||||
/datum/barsign/scotchservinwill
|
||||
name = "Scotch Servin Willy's"
|
||||
icon = "scotchservinwill"
|
||||
desc = "Willy sure moved up in the world from clown to bartender."
|
||||
|
||||
|
||||
/datum/barsign/officerbeersky
|
||||
name = "Officer Beersky's"
|
||||
icon = "officerbeersky"
|
||||
desc = "Man eat a dong, these drinks are great."
|
||||
|
||||
|
||||
/datum/barsign/thecavern
|
||||
name = "The Cavern"
|
||||
icon = "thecavern"
|
||||
desc = "Fine drinks while listening to some fine tunes."
|
||||
|
||||
|
||||
/datum/barsign/theouterspess
|
||||
name = "The Outer Spess"
|
||||
icon = "theouterspess"
|
||||
desc = "This bar isn't actually located in outer space."
|
||||
|
||||
|
||||
/datum/barsign/slipperyshots
|
||||
name = "Slippery Shots"
|
||||
icon = "slipperyshots"
|
||||
desc = "Slippery slope to drunkeness with our shots!"
|
||||
|
||||
|
||||
/datum/barsign/thegreytide
|
||||
name = "The Grey Tide"
|
||||
icon = "thegreytide"
|
||||
desc = "Abandon your toolboxing ways and enjoy a lazy beer!"
|
||||
|
||||
|
||||
/datum/barsign/honkednloaded
|
||||
name = "Honked 'n' Loaded"
|
||||
icon = "honkednloaded"
|
||||
desc = "Honk."
|
||||
|
||||
|
||||
/datum/barsign/thenest
|
||||
name = "The Nest"
|
||||
icon = "thenest"
|
||||
desc = "A good place to retire for a drink after a long night of crime fighting."
|
||||
|
||||
|
||||
/datum/barsign/thecoderbus
|
||||
name = "The Coderbus"
|
||||
icon = "thecoderbus"
|
||||
desc = "A very controversial bar known for its wide variety of constantly-changing drinks."
|
||||
|
||||
|
||||
/datum/barsign/theadminbus
|
||||
name = "The Adminbus"
|
||||
icon = "theadminbus"
|
||||
@@ -391,27 +383,18 @@
|
||||
/datum/barsign/hiddensigns
|
||||
hidden = 1
|
||||
|
||||
|
||||
//Hidden signs list below this point
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/empbarsign
|
||||
name = "Haywire Barsign"
|
||||
icon = "empbarsign"
|
||||
desc = "Something has gone very wrong."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/syndibarsign
|
||||
name = "Syndi Cat Takeover"
|
||||
icon = "syndibarsign"
|
||||
desc = "Syndicate or die."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/signoff
|
||||
name = "Bar Sign"
|
||||
icon = "empty"
|
||||
desc = "This sign doesn't seem to be on."
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
/obj/structure/morgue/Initialize()
|
||||
. = ..()
|
||||
update_icon(update_state())
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
/obj/structure/morgue/proc/update_state()
|
||||
. = UPDATE_OVERLAYS
|
||||
@@ -69,8 +70,10 @@
|
||||
|
||||
/obj/structure/morgue/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
if(!connected)
|
||||
. += "morgue_[status]"
|
||||
underlays += emissive_appearance(icon, "morgue_[status]")
|
||||
if(name != initial(name))
|
||||
. += "morgue_label"
|
||||
|
||||
|
||||
@@ -8,6 +8,22 @@
|
||||
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
|
||||
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
var/does_emissive = FALSE
|
||||
|
||||
/obj/structure/sign/Initialize(mapload)
|
||||
. = ..()
|
||||
if(does_emissive)
|
||||
update_icon()
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
/obj/structure/sign/update_overlays()
|
||||
. = ..()
|
||||
|
||||
underlays.Cut()
|
||||
if(!does_emissive)
|
||||
return
|
||||
|
||||
underlays += emissive_appearance(icon,"[icon_state]_lightmask")
|
||||
|
||||
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
@@ -35,7 +51,6 @@
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
@@ -213,11 +228,15 @@
|
||||
name = "\improper barber shop sign"
|
||||
desc = "A spinning sign indicating a barbershop is near."
|
||||
icon_state = "barber"
|
||||
does_emissive = TRUE
|
||||
blocks_emissive = FALSE
|
||||
|
||||
/obj/structure/sign/chinese
|
||||
name = "\improper chinese restaurant sign"
|
||||
desc = "A glowing dragon invites you in."
|
||||
icon_state = "chinese"
|
||||
does_emissive = TRUE
|
||||
blocks_emissive = FALSE
|
||||
|
||||
/obj/structure/sign/science
|
||||
name = "\improper SCIENCE!"
|
||||
|
||||
@@ -392,6 +392,15 @@
|
||||
if(ATMOS_ALARM_DANGER)
|
||||
icon_state = "alarm1"
|
||||
|
||||
/obj/machinery/alarm/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER || buildstage != AIR_ALARM_READY || wiresexposed || shorted)
|
||||
return
|
||||
|
||||
underlays += emissive_appearance(icon, "alarm_lightmask")
|
||||
|
||||
/obj/machinery/alarm/proc/register_env_machine(m_id, device_type)
|
||||
var/new_name
|
||||
if(device_type=="AVP")
|
||||
@@ -994,7 +1003,7 @@
|
||||
coil.use(5)
|
||||
|
||||
buildstage = 2
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
first_run()
|
||||
return
|
||||
if(0)
|
||||
@@ -1039,7 +1048,7 @@
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
wiresexposed = !wiresexposed
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
if(wiresexposed)
|
||||
SCREWDRIVER_OPEN_PANEL_MESSAGE
|
||||
else
|
||||
@@ -1072,13 +1081,15 @@
|
||||
/obj/machinery/alarm/power_change()
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
else
|
||||
stat |= NOPOWER
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
set_light(0)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/alarm/obj_break(damage_flag)
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/alarm/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
@@ -1099,7 +1110,7 @@
|
||||
/obj/machinery/alarm/proc/unshort_callback()
|
||||
if(shorted)
|
||||
shorted = FALSE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/alarm/proc/enable_ai_control_callback()
|
||||
if(aidisabled)
|
||||
|
||||
@@ -40,6 +40,32 @@ log transactions
|
||||
. = ..()
|
||||
machine_id = "[station_name()] RT #[GLOB.num_financial_terminals++]"
|
||||
reconnect_database()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atm/update_icon_state()
|
||||
. = ..()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "atm_off"
|
||||
else
|
||||
icon_state = "atm"
|
||||
|
||||
/obj/machinery/atm/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
underlays += emissive_appearance(icon, "atm_lightmask")
|
||||
|
||||
/obj/machinery/atm/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atm/process()
|
||||
if(stat & NOPOWER)
|
||||
|
||||
@@ -933,6 +933,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
if(istype(M, /obj/machinery/ai_status_display))
|
||||
var/obj/machinery/ai_status_display/AISD = M
|
||||
AISD.emotion = emote
|
||||
AISD.update_icon()
|
||||
//if Friend Computer, change ALL displays
|
||||
else if(istype(M, /obj/machinery/status_display))
|
||||
|
||||
|
||||
@@ -102,6 +102,11 @@
|
||||
|
||||
/obj/machinery/newscaster/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(!(stat & NOPOWER))
|
||||
underlays += emissive_appearance(icon, "newscaster_lightmask")
|
||||
|
||||
if(!GLOB.news_network.wanted_issue && alert) //wanted icon state, there can be no overlays on it as it's a priority message
|
||||
. += "newscaster_alert"
|
||||
var/hp_percent = obj_integrity * 100 / max_integrity
|
||||
@@ -117,6 +122,10 @@
|
||||
|
||||
/obj/machinery/newscaster/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = TRUE, attack_dir)
|
||||
@@ -422,6 +431,8 @@
|
||||
return
|
||||
GLOB.news_network.wanted_issue = null
|
||||
set_temp("Wanted notice cleared.", update_now = TRUE)
|
||||
for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
|
||||
NC.update_icon()
|
||||
return FALSE
|
||||
if("toggle_mute")
|
||||
is_silent = !is_silent
|
||||
@@ -533,8 +544,7 @@
|
||||
SSblackbox.record_feedback("amount", "newscaster_stories", 1)
|
||||
var/announcement = FC.get_announce_text(title)
|
||||
// Announce it
|
||||
for(var/nc in GLOB.allNewscasters)
|
||||
var/obj/machinery/newscaster/NC = nc
|
||||
for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
|
||||
NC.alert_news(announcement)
|
||||
// Redirect and eject photo
|
||||
LAZYINITLIST(last_views[user_name])
|
||||
@@ -567,8 +577,7 @@
|
||||
WN.admin_locked = usr.can_admin_interact() && admin_locked
|
||||
WN.publish_time = world.time
|
||||
// Announce it and eject photo
|
||||
for(var/nc in GLOB.allNewscasters)
|
||||
var/obj/machinery/newscaster/NC = nc
|
||||
for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
|
||||
NC.alert_news(wanted_notice = TRUE)
|
||||
eject_photo(usr)
|
||||
set_temp("Wanted notice distributed.", "good")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
else if(mode==-1)
|
||||
mode=0
|
||||
to_chat(user, "You [mode ? "unfasten": "fasten"] the screws around the power connection.")
|
||||
update()
|
||||
|
||||
/obj/machinery/disposal/welder_act(mob/user, obj/item/I)
|
||||
if(mode != required_mode_to_deconstruct)
|
||||
@@ -315,30 +316,47 @@
|
||||
|
||||
// update the icon & overlays to reflect mode & status
|
||||
/obj/machinery/disposal/proc/update()
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "disposal-broken"
|
||||
mode = 0
|
||||
flush = 0
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/disposal/update_icon_state()
|
||||
. = ..()
|
||||
|
||||
if(stat & BROKEN)
|
||||
icon_state = "disposal-broken"
|
||||
return
|
||||
|
||||
// flush handle
|
||||
if(flush)
|
||||
overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle")
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
// only handle is shown if no power
|
||||
if(stat & NOPOWER || mode == -1)
|
||||
/obj/machinery/disposal/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(flush)
|
||||
. += "dispover-handle"
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) || mode == -1)
|
||||
return
|
||||
|
||||
// check for items in disposal - occupied light
|
||||
if(contents.len > 0)
|
||||
overlays += image('icons/obj/pipes/disposal.dmi', "dispover-full")
|
||||
. += "dispover-full"
|
||||
underlays += emissive_appearance(icon, "dispover-full")
|
||||
|
||||
// charging and ready light
|
||||
if(mode == 1)
|
||||
overlays += image('icons/obj/pipes/disposal.dmi', "dispover-charge")
|
||||
else if(mode == 2)
|
||||
overlays += image('icons/obj/pipes/disposal.dmi', "dispover-ready")
|
||||
switch(mode)
|
||||
if(-1)
|
||||
. += "dispover-unscrewed"
|
||||
if(1)
|
||||
. += "dispover-charge"
|
||||
. += "dispover-panel"
|
||||
underlays += emissive_appearance(icon, "dispover-charge")
|
||||
if(2)
|
||||
. += "dispover-ready"
|
||||
underlays += emissive_appearance(icon, "dispover-ready")
|
||||
|
||||
// timed process
|
||||
// charge the gas reservoir and perform flush if ready
|
||||
@@ -436,6 +454,10 @@
|
||||
/obj/machinery/disposal/power_change()
|
||||
..() // do default setting/reset of stat NOPOWER bit
|
||||
update() // update icon
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,22 @@
|
||||
req_access = list(ACCESS_KEYCARD_AUTH)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/machinery/keycard_auth/update_icon_state()
|
||||
. = ..()
|
||||
|
||||
if(event_triggered_by || event_source)
|
||||
icon_state = "auth_on"
|
||||
else
|
||||
icon_state = "auth_off"
|
||||
|
||||
/obj/machinery/keycard_auth/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
|
||||
if(event_triggered_by || event_source)
|
||||
underlays += emissive_appearance(icon, "auth_lightmask")
|
||||
|
||||
|
||||
/obj/machinery/keycard_auth/attack_ai(mob/user as mob)
|
||||
to_chat(user, "<span class='warning'>The station AI is not to interact with these devices.</span>")
|
||||
return
|
||||
@@ -57,9 +73,9 @@
|
||||
/obj/machinery/keycard_auth/power_change()
|
||||
if(powered(ENVIRON))
|
||||
stat &= ~NOPOWER
|
||||
icon_state = "auth_off"
|
||||
else
|
||||
stat |= NOPOWER
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/keycard_auth/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
@@ -115,12 +131,14 @@
|
||||
swiping = FALSE
|
||||
confirmed = FALSE
|
||||
event_source = null
|
||||
icon_state = "auth_off"
|
||||
event_triggered_by = null
|
||||
event_confirmed_by = null
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/keycard_auth/proc/broadcast_request()
|
||||
icon_state = "auth_on"
|
||||
update_icon()
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
for(var/obj/machinery/keycard_auth/KA in GLOB.machines)
|
||||
if(KA == src) continue
|
||||
KA.reset()
|
||||
@@ -138,19 +156,24 @@
|
||||
/obj/machinery/keycard_auth/proc/receive_request(obj/machinery/keycard_auth/source)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
set_light(1, LIGHTING_MINIMUM_POWER)
|
||||
|
||||
event_source = source
|
||||
busy = TRUE
|
||||
active = TRUE
|
||||
SStgui.update_uis(src)
|
||||
icon_state = "auth_on"
|
||||
update_icon()
|
||||
|
||||
sleep(confirm_delay)
|
||||
|
||||
event_source = null
|
||||
icon_state = "auth_off"
|
||||
update_icon()
|
||||
active = FALSE
|
||||
busy = FALSE
|
||||
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/keycard_auth/proc/trigger_event()
|
||||
switch(event)
|
||||
if("Red Alert")
|
||||
|
||||
@@ -123,6 +123,7 @@ GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/secur
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(is_station_contact(FA.z))
|
||||
FA.update_icon()
|
||||
FA.update_fire_light()
|
||||
|
||||
/proc/num2seclevel(num)
|
||||
switch(num)
|
||||
|
||||
Reference in New Issue
Block a user