Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-03-03 03:08:41 -07:00
485 changed files with 2456 additions and 2614 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
update_icon()
// update the icon_state
/obj/machinery/bluespace_beacon/update_icon()
/obj/machinery/bluespace_beacon/update_icon_state()
var/state="floor_beacon"
if(invisibility)
+10 -5
View File
@@ -9,16 +9,12 @@
var/list/colorlist = list()
/obj/machinery/pdapainter/update_icon()
cut_overlays()
/obj/machinery/pdapainter/update_icon_state()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
return
if(storedpda)
add_overlay("[initial(icon_state)]-closed")
if(powered())
icon_state = initial(icon_state)
else
@@ -26,6 +22,15 @@
return
/obj/machinery/pdapainter/update_overlays()
. = ..()
if(stat & BROKEN)
return
if(storedpda)
. += "[initial(icon_state)]-closed"
/obj/machinery/pdapainter/Initialize()
. = ..()
var/list/blocked = list(
+1 -1
View File
@@ -71,7 +71,7 @@
reagents.maximum_volume = (500*E)
/obj/machinery/sleeper/update_icon()
/obj/machinery/sleeper/update_icon_state()
icon_state = initial(icon_state)
if(state_open)
icon_state += "-open"
+1 -1
View File
@@ -113,7 +113,7 @@
id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR
master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER
/obj/machinery/airlock_sensor/update_icon()
/obj/machinery/airlock_sensor/update_icon_state()
if(on)
if(alert)
icon_state = "airlock_sensor_alert"
+6 -6
View File
@@ -32,22 +32,22 @@ GLOBAL_LIST_EMPTY(announcement_systems)
radio = new /obj/item/radio/headset/silicon/ai(src)
update_icon()
/obj/machinery/announcement_system/update_icon()
/obj/machinery/announcement_system/update_icon_state()
if(is_operational())
icon_state = (panel_open ? "AAS_On_Open" : "AAS_On")
else
icon_state = (panel_open ? "AAS_Off_Open" : "AAS_Off")
cut_overlays()
/obj/machinery/announcement_system/update_overlays()
. =..()
if(arrivalToggle)
add_overlay(greenlight)
. += greenlight
if(newheadToggle)
add_overlay(pinklight)
. += pinklight
if(stat & BROKEN)
add_overlay(errorlight)
. += errorlight
/obj/machinery/announcement_system/Destroy()
QDEL_NULL(radio)
+6 -6
View File
@@ -19,21 +19,21 @@
initial_icon_state = initial(icon_state)
return ..()
/obj/machinery/aug_manipulator/update_icon()
cut_overlays()
/obj/machinery/aug_manipulator/update_icon_state()
if(stat & BROKEN)
icon_state = "[initial_icon_state]-broken"
return
if(storedpart)
add_overlay("[initial_icon_state]-closed")
if(powered())
icon_state = initial_icon_state
else
icon_state = "[initial_icon_state]-off"
/obj/machinery/aug_manipulator/update_overlays()
. = ..()
if(storedpart)
. += "[initial_icon_state]-closed"
/obj/machinery/aug_manipulator/Destroy()
QDEL_NULL(storedpart)
return ..()
+11 -11
View File
@@ -54,16 +54,17 @@
efficiency = E
productivity = P
/obj/machinery/bloodbankgen/update_icon()
cut_overlays()
/obj/machinery/bloodbankgen/update_icon_state()
if(is_operational())
icon_state = "bloodbank-on"
icon_state = "bloodbank-[is_operational() ? "on" : "off"]"
/obj/machinery/bloodbankgen/update_overlays()
. = ..()
if(panel_open)
add_overlay("bloodbank-panel")
. += "bloodbank-panel"
if(src.bag)
add_overlay("bloodbag-input")
if(bag)
. += "bloodbag-input"
if(bag.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "input-reagent")
@@ -85,10 +86,10 @@
filling_overlay.icon_state = "input-reagent100"
filling_overlay.color = list(mix_color_from_reagents(bag.reagents.reagent_list))
add_overlay(filling_overlay)
. += filling_overlay
if(src.outbag)
add_overlay("bloodbag-output")
if(outbag)
. += "bloodbag-output"
if(outbag.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "output-reagent")
@@ -110,8 +111,7 @@
filling_overlay.icon_state = "output-reagent100"
filling_overlay.color = list(mix_color_from_reagents(outbag.reagents.reagent_list))
add_overlay(filling_overlay)
return
. += filling_overlay
/obj/machinery/bloodbankgen/process()
if(!is_operational())
+11 -12
View File
@@ -10,18 +10,19 @@
circuit = /obj/item/circuitboard/machine/cell_charger
pass_flags = PASSTABLE
var/obj/item/stock_parts/cell/charging = null
var/chargelevel = -1
var/charge_rate = 500
/obj/machinery/cell_charger/update_icon()
cut_overlays()
if(charging)
add_overlay(image(charging.icon, charging.icon_state))
add_overlay("ccharger-on")
if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100)
chargelevel = newlevel
add_overlay("ccharger-o[newlevel]")
/obj/machinery/cell_charger/update_overlays()
. += ..()
if(!charging)
return
. += image(charging.icon, charging.icon_state)
. += "ccharger-on"
if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100)
. += "ccharger-o[newlevel]"
/obj/machinery/cell_charger/examine(mob/user)
. = ..()
@@ -54,7 +55,6 @@
charging = W
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
chargelevel = -1
update_icon()
else
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
@@ -77,7 +77,6 @@
/obj/machinery/cell_charger/proc/removecell()
charging.update_icon()
charging = null
chargelevel = -1
update_icon()
/obj/machinery/cell_charger/attack_hand(mob/user)
+18 -18
View File
@@ -477,24 +477,30 @@
flesh_number = unattached_flesh.len
/obj/machinery/clonepod/update_icon()
cut_overlays()
/obj/machinery/clonepod/update_icon_state()
if(mess)
icon_state = "pod_g"
else if(occupant)
icon_state = "pod_1"
else
icon_state = "pod_0"
if(panel_open)
icon_state = "pod_0_maintenance"
/obj/machinery/clonepod/update_overlays()
. = ..()
if(mess)
var/image/gib1 = image(CRYOMOBS, "gibup")
var/image/gib2 = image(CRYOMOBS, "gibdown")
gib1.pixel_y = 27 + round(sin(world.time) * 3)
gib1.pixel_x = round(sin(world.time * 3))
gib2.pixel_y = 27 + round(cos(world.time) * 3)
gib2.pixel_x = round(cos(world.time * 3))
add_overlay(gib2)
add_overlay(gib1)
add_overlay("cover-on")
. += gib2
. += gib1
. += "cover-on"
else if(occupant)
icon_state = "pod_1"
var/image/occupant_overlay
var/completion = (flesh_number - unattached_flesh.len) / flesh_number
@@ -513,15 +519,9 @@
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
occupant_overlay.pixel_x = round(sin(world.time * 3))
add_overlay(occupant_overlay)
add_overlay("cover-on")
else
icon_state = "pod_0"
if(panel_open)
icon_state = "pod_0_maintenance"
add_overlay("panel")
. += occupant_overlay
. += "cover-on"
. += "panel"
/*
* Manual -- A big ol' manual.
+4 -4
View File
@@ -48,13 +48,13 @@
icon_state = initial(icon_state)
update_icon()
/obj/machinery/computer/update_icon()
cut_overlays()
/obj/machinery/computer/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(stat & NOPOWER)
add_overlay("[icon_keyboard]_off")
. += "[icon_keyboard]_off"
return
add_overlay(icon_keyboard)
. += icon_keyboard
// This whole block lets screens ignore lighting and be visible even in the darkest room
// We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it
+11 -12
View File
@@ -103,21 +103,20 @@
add_fingerprint(usr)
updateUsrDialog()
/obj/machinery/computer/aifixer/update_icon()
..()
/obj/machinery/computer/aifixer/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN))
return
if(active)
. += "ai-fixer-on"
if (occupier)
switch (occupier.stat)
if (0)
. += "ai-fixer-full"
if (2)
. += "ai-fixer-404"
else
if(active)
add_overlay("ai-fixer-on")
if (occupier)
switch (occupier.stat)
if (0)
add_overlay("ai-fixer-full")
if (2)
add_overlay("ai-fixer-404")
else
add_overlay("ai-fixer-empty")
. += "ai-fixer-empty"
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(!..())
+5 -8
View File
@@ -78,23 +78,20 @@
update_icon()
return
/obj/machinery/computer/atmos_alert/update_icon()
..()
cut_overlays()
/obj/machinery/computer/atmos_alert/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN))
add_overlay("[icon_keyboard]_off")
. |= "[icon_keyboard]_off"
return
add_overlay(icon_keyboard)
. |= icon_keyboard
if(priority_alarms.len)
overlay_state = "alert:2"
add_overlay("alert:2")
else if(minor_alarms.len)
overlay_state = "alert:1"
add_overlay("alert:1")
else
overlay_state = "alert:0"
add_overlay("alert:0")
. |= overlay_state
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
@@ -41,7 +41,7 @@
name = "incinerator chamber gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
/obj/machinery/air_sensor/update_icon()
/obj/machinery/air_sensor/update_icon_state()
icon_state = "gsensor[on]"
/obj/machinery/air_sensor/process_atmos()
+1 -2
View File
@@ -175,11 +175,10 @@
clockwork = TRUE //it'd look very weird
light_power = 0
/obj/machinery/computer/security/telescreen/update_icon()
/obj/machinery/computer/security/telescreen/update_icon_state()
icon_state = initial(icon_state)
if(stat & BROKEN)
icon_state += "b"
return
/obj/machinery/computer/security/telescreen/entertainment
name = "entertainment monitor"
+2 -2
View File
@@ -145,7 +145,7 @@
if(5)
dat += "<CENTER><B>Virus Database</B></CENTER>"
for(var/Dt in typesof(/datum/disease/))
var/datum/disease/Dis = new Dt(0)
var/datum/disease/Dis = new Dt(FALSE)
if(istype(Dis, /datum/disease/advance))
continue // TODO (tm): Add advance diseases to the virus database which no one uses.
if(!Dis.desc)
@@ -248,7 +248,7 @@
else if(href_list["vir"])
var/type = href_list["vir"]
var/datum/disease/Dis = new type(0)
var/datum/disease/Dis = new type(FALSE)
var/AfS = ""
for(var/mob/M in Dis.viable_mobtypes)
AfS += " [initial(M.name)];"
+8 -10
View File
@@ -75,25 +75,23 @@
L -= I
return !cleared
/obj/machinery/computer/station_alert/update_icon()
..()
cut_overlays()
/obj/machinery/computer/station_alert/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN))
add_overlay("[icon_keyboard]_off")
. |= "[icon_keyboard]_off"
return
add_overlay(icon_keyboard)
. |= icon_keyboard
var/active_alarms = FALSE
for(var/cat in alarms)
var/list/L = alarms[cat]
if(L.len)
if(length(alarms[cat]))
active_alarms = TRUE
break
if(active_alarms)
overlay_state = "alert:2"
add_overlay("alert:2")
else
overlay_state = "alert:0"
add_overlay("alert:0")
. |= overlay_state
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
@@ -44,8 +44,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
else
to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>")
/obj/machinery/computer/telecrystals/uplinker/update_icon()
..()
/obj/machinery/computer/telecrystals/uplinker/update_overlays()
. = ..()
if(uplinkholder)
add_overlay("[initial(icon_state)]-closed")
+1 -1
View File
@@ -45,7 +45,7 @@
return
return ..()
/obj/machinery/jukebox/update_icon()
/obj/machinery/jukebox/update_icon_state()
if(active)
icon_state = "[initial(icon_state)]-active"
else
+1 -1
View File
@@ -34,7 +34,7 @@
if(scan_level >= 3)
. += "<span class='notice'>Scanner has been upgraded to support autoprocessing.<span>"
/obj/machinery/dna_scannernew/update_icon()
/obj/machinery/dna_scannernew/update_icon_state()
//no power or maintenance
if(stat & (NOPOWER|BROKEN))
+1 -1
View File
@@ -428,7 +428,7 @@
else
return FALSE
/obj/machinery/door/airlock/update_icon(state=0, override=0)
/obj/machinery/door/airlock/update_icon_state(state=0, override=0)
if(operating && !override)
return
switch(state)
+1 -1
View File
@@ -230,7 +230,7 @@
/obj/machinery/door/proc/unelectrify()
secondsElectrified = 0
/obj/machinery/door/update_icon()
/obj/machinery/door/update_icon_state()
if(density)
icon_state = "door1"
else
+11 -8
View File
@@ -171,16 +171,20 @@
if("closing")
flick("door_closing", src)
/obj/machinery/door/firedoor/update_icon()
cut_overlays()
/obj/machinery/door/firedoor/update_icon_state()
if(density)
icon_state = "door_closed"
if(welded)
add_overlay("welded")
else
icon_state = "door_open"
if(welded)
add_overlay("welded_open")
/obj/machinery/door/firedoor/update_overlays()
. = ..()
if(!welded)
return
if(density)
. += "welded"
else
. += "welded_open"
/obj/machinery/door/firedoor/open()
. = ..()
@@ -283,8 +287,7 @@
if(CONSTRUCTION_NOCIRCUIT)
. += "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>"
/obj/structure/firelock_frame/update_icon()
..()
/obj/structure/firelock_frame/update_icon_state()
icon_state = "frame[constructionStep]"
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
+1 -1
View File
@@ -42,7 +42,7 @@
else
do_animate("deny")
/obj/machinery/door/password/update_icon()
/obj/machinery/door/password/update_icon_state()
if(density)
icon_state = "closed"
else
+1 -1
View File
@@ -77,7 +77,7 @@
flick("closing", src)
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
/obj/machinery/door/poddoor/update_icon()
/obj/machinery/door/poddoor/update_icon_state()
if(density)
icon_state = "closed"
else
+1 -1
View File
@@ -48,7 +48,7 @@
electronics = null
return ..()
/obj/machinery/door/window/update_icon()
/obj/machinery/door/window/update_icon_state()
if(density)
icon_state = base_state
else
+1 -1
View File
@@ -199,7 +199,7 @@
if(istype(a, dispense_type))
.++
/obj/machinery/droneDispenser/update_icon()
/obj/machinery/droneDispenser/update_icon_state()
if(stat & (BROKEN|NOPOWER))
icon_state = icon_off
else if(mode == DRONE_RECHARGING)
@@ -84,7 +84,7 @@
busy = FALSE
update_icon()
/obj/machinery/doorButtons/access_button/update_icon()
/obj/machinery/doorButtons/access_button/update_icon_state()
if(stat & NOPOWER)
icon_state = "access_button_off"
else
@@ -249,7 +249,7 @@
else if(A.id_tag == idExterior)
exteriorAirlock = A
/obj/machinery/doorButtons/airlock_controller/update_icon()
/obj/machinery/doorButtons/airlock_controller/update_icon_state()
if(stat & NOPOWER)
icon_state = "access_control_off"
return
@@ -255,7 +255,7 @@
new_prog.master = src
program = new_prog
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon()
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon_state()
if(on && program)
if(program.memory["processing"])
icon_state = "airlock_control_process"
@@ -33,8 +33,6 @@
popup.set_content(return_text())
popup.open()
/obj/machinery/embedded_controller/update_icon()
/obj/machinery/embedded_controller/proc/return_text()
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
@@ -54,7 +54,7 @@
new_prog.master = src
program = new_prog
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon()
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon_state()
if(on && program)
icon_state = "airlock_control_standby"
else
+11 -10
View File
@@ -55,10 +55,7 @@
..()
update_icon()
/obj/machinery/firealarm/update_icon()
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
/obj/machinery/firealarm/update_icon_state()
if(panel_open)
icon_state = "fire_b[buildstage]"
return
@@ -72,26 +69,30 @@
if(stat & NOPOWER)
return
add_overlay("fire_overlay")
/obj/machinery/firealarm/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
. += "fire_overlay"
if(is_station_level(z))
add_overlay("fire_[GLOB.security_level]")
. += "fire_[GLOB.security_level]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else
add_overlay("fire_[SEC_LEVEL_GREEN]")
. += "fire_[SEC_LEVEL_GREEN]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
var/area/A = src.loc
A = A.loc
if(!detecting || !A.fire)
add_overlay("fire_off")
. += "fire_off"
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else if(obj_flags & EMAGGED)
add_overlay("fire_emagged")
. += "fire_emagged"
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else
add_overlay("fire_on")
. += "fire_on"
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
/obj/machinery/firealarm/emp_act(severity)
+1 -1
View File
@@ -68,7 +68,7 @@ The console is located at computer/gulag_teleporter.dm
return ..()
/obj/machinery/gulag_teleporter/update_icon()
/obj/machinery/gulag_teleporter/update_icon_state()
icon_state = initial(icon_state) + (state_open ? "_open" : "")
//no power or maintenance
if(stat & (NOPOWER|BROKEN))
+9 -5
View File
@@ -11,6 +11,7 @@
light_color = LIGHT_COLOR_BLUE
var/interval = 20
var/harvesting = FALSE
var/warming_up = FALSE
var/list/operation_order = list() //Order of wich we harvest limbs.
var/allow_clothing = FALSE
var/allow_living = FALSE
@@ -27,12 +28,11 @@
max_time -= L.rating
interval = max(max_time,1)
/obj/machinery/harvester/update_icon(warming_up)
if(warming_up)
icon_state = initial(icon_state)+"-charging"
return
/obj/machinery/harvester/update_icon_state()
if(state_open)
icon_state = initial(icon_state)+"-open"
else if(warming_up)
icon_state = initial(icon_state)+"-charging"
else if(harvesting)
icon_state = initial(icon_state)+"-active"
else
@@ -43,6 +43,7 @@
return
. = ..()
harvesting = FALSE
warming_up = FALSE
/obj/machinery/harvester/attack_hand(mob/user)
if(state_open)
@@ -86,13 +87,15 @@
return
var/mob/living/carbon/C = occupant
operation_order = reverseList(C.bodyparts) //Chest and head are first in bodyparts, so we invert it to make them suffer more
warming_up = TRUE
harvesting = TRUE
visible_message("<span class='notice'>The [name] begins warming up!</span>")
say("Initializing harvest protocol.")
update_icon(TRUE)
update_icon()
addtimer(CALLBACK(src, .proc/harvest), interval)
/obj/machinery/harvester/proc/harvest()
warming_up = FALSE
update_icon()
if(!harvesting || state_open || !powered(EQUIP) || !occupant || !iscarbon(occupant))
return
@@ -127,6 +130,7 @@
addtimer(CALLBACK(src, .proc/harvest), interval)
/obj/machinery/harvester/proc/end_harvesting()
warming_up = FALSE
harvesting = FALSE
open_machine()
say("Subject has been successfully harvested.")
+1 -1
View File
@@ -441,7 +441,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
set_light(0)
update_icon()
/obj/machinery/holopad/update_icon()
/obj/machinery/holopad/update_icon_state()
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
if(ringing)
icon_state = "holopad_ringing"
+8 -7
View File
@@ -24,7 +24,7 @@
QDEL_NULL(beaker)
return ..()
/obj/machinery/iv_drip/update_icon()
/obj/machinery/iv_drip/update_icon_state()
if(attached)
if(mode)
icon_state = "injecting"
@@ -36,13 +36,14 @@
else
icon_state = "donateidle"
cut_overlays()
/obj/machinery/iv_drip/update_overlays()
. = ..()
if(beaker)
if(attached)
add_overlay("beakeractive")
. += "beakeractive"
else
add_overlay("beakeridle")
. += "beakeridle"
if(beaker.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent")
@@ -64,7 +65,7 @@
filling_overlay.icon_state = "reagent100"
filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list)
add_overlay(filling_overlay)
. += filling_overlay
/obj/machinery/iv_drip/MouseDrop(mob/living/target)
. = ..()
@@ -227,9 +228,9 @@
desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down."
icon_state = "iv_drip"
/obj/machinery/iv_drip/telescopic/update_icon()
/obj/machinery/iv_drip/telescopic/update_icon_state()
..()
icon_state = icon_state + "_tele"
icon_state += "_tele"
/obj/machinery/iv_drip/telescopic/AltClick(mob/user)
if (attached || beaker || !user.canUseTopic(src, BE_CLOSE))
+1 -1
View File
@@ -23,7 +23,7 @@
on = area.lightswitch
update_icon()
/obj/machinery/light_switch/update_icon()
/obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER)
icon_state = "light-p"
else
+1 -1
View File
@@ -49,7 +49,7 @@
update_icon()
// update the icon_state
/obj/machinery/magnetic_module/update_icon()
/obj/machinery/magnetic_module/update_icon_state()
var/state="floor_magnet"
var/onstate=""
if(!on)
+1 -1
View File
@@ -75,7 +75,7 @@
update_icon()
// update the icon_state
/obj/machinery/navbeacon/update_icon()
/obj/machinery/navbeacon/update_icon_state()
var/state="navbeacon[open]"
if(invisibility)
@@ -99,8 +99,7 @@
if(!has_cover)
INVOKE_ASYNC(src, .proc/popUp)
/obj/machinery/porta_turret/update_icon()
cut_overlays()
/obj/machinery/porta_turret/update_icon_state()
if(!anchored)
icon_state = "turretCover"
return
@@ -970,8 +969,7 @@
..()
update_icon()
/obj/machinery/turretid/update_icon()
..()
/obj/machinery/turretid/update_icon_state()
if(stat & NOPOWER)
icon_state = "control_off"
else if (enabled)
+14 -16
View File
@@ -10,6 +10,7 @@
pass_flags = PASSTABLE
var/obj/item/charging = null
var/recharge_coeff = 1
var/using_power = FALSE //Did we put power into "charging" last process()?
var/static/list/allowed_devices = typecacheof(list(
/obj/item/gun/energy,
@@ -45,9 +46,11 @@
if (new_charging)
START_PROCESSING(SSmachines, src)
use_power = ACTIVE_POWER_USE
update_icon(scan = TRUE)
using_power = TRUE
update_icon()
else
use_power = IDLE_POWER_USE
using_power = FALSE
update_icon()
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
@@ -120,23 +123,23 @@
if(stat & (NOPOWER|BROKEN) || !anchored)
return PROCESS_KILL
var/using_power = 0
using_power = FALSE
if(charging)
var/obj/item/stock_parts/cell/C = charging.get_cell()
if(C)
if(C.charge < C.maxcharge)
C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff)
using_power = 1
update_icon(using_power)
using_power = TRUE
update_icon()
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
var/obj/item/ammo_box/magazine/recharge/R = charging
if(R.stored_ammo.len < R.max_ammo)
R.stored_ammo += new R.ammo_type(R)
use_power(200 * recharge_coeff)
using_power = 1
update_icon(using_power)
using_power = TRUE
update_icon()
return
else
return PROCESS_KILL
@@ -161,20 +164,15 @@
B.cell.charge = 0
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
/obj/machinery/recharger/update_icon_state()
if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff"
return
if(scan)
icon_state = "rechargeroff"
return
if(panel_open)
else if(panel_open)
icon_state = "rechargeropen"
return
if(charging)
else if(charging)
if(using_power)
icon_state = "recharger1"
else
icon_state = "recharger2"
return
icon_state = "recharger0"
else
icon_state = "recharger0"
+1 -1
View File
@@ -112,7 +112,7 @@
use_power = ACTIVE_POWER_USE
add_fingerprint(occupant)
/obj/machinery/recharge_station/update_icon()
/obj/machinery/recharge_station/update_icon_state()
if(is_operational())
if(state_open)
icon_state = "borgcharger0"
+1 -2
View File
@@ -77,8 +77,7 @@
to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>")
return TRUE
/obj/machinery/recycler/update_icon()
..()
/obj/machinery/recycler/update_icon_state()
var/is_powered = !(stat & (BROKEN|NOPOWER))
if(safety_mode)
is_powered = FALSE
+1 -1
View File
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
..()
update_icon()
/obj/machinery/requests_console/update_icon()
/obj/machinery/requests_console/update_icon_state()
if(stat & NOPOWER)
set_light(0)
else
+1 -1
View File
@@ -208,7 +208,7 @@
to_chat(user, "<span class='warning'>You short out the access controller.</span>")
return TRUE
/obj/machinery/shieldgen/update_icon()
/obj/machinery/shieldgen/update_icon_state()
if(active)
icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon"
else
+1 -1
View File
@@ -56,7 +56,7 @@
money++ //SPESSH MAJICKS
/obj/machinery/computer/slot_machine/update_icon()
/obj/machinery/computer/slot_machine/update_icon_state()
if(stat & NOPOWER)
icon_state = "slots0"
+5 -4
View File
@@ -53,17 +53,18 @@
else
. += "There is no power cell installed."
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
/obj/machinery/space_heater/update_icon()
/obj/machinery/space_heater/update_icon_state()
if(on)
icon_state = "sheater-[mode]"
else
icon_state = "sheater-off"
cut_overlays()
/obj/machinery/space_heater/update_overlays()
. = ..()
if(panel_open)
add_overlay("sheater-open")
. += "sheater-open"
/obj/machinery/space_heater/process()
if(!on || !is_operational())
+17 -12
View File
@@ -75,6 +75,12 @@
suit_type = /obj/item/clothing/suit/space/hardsuit/medical
mask_type = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/paramedic
name = "paramedic suit storage unit"
suit_type = /obj/item/clothing/suit/space/eva/paramedic
helmet_type = /obj/item/clothing/head/helmet/space/eva/paramedic
mask_type = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/rd
suit_type = /obj/item/clothing/suit/space/hardsuit/rd
mask_type = /obj/item/clothing/mask/breath
@@ -134,29 +140,28 @@
QDEL_NULL(storage)
return ..()
/obj/machinery/suit_storage_unit/update_icon()
cut_overlays()
/obj/machinery/suit_storage_unit/update_overlays()
. = ..()
if(uv)
if(uv_super)
add_overlay("super")
. += "super"
else if(occupant)
add_overlay("uvhuman")
. += "uvhuman"
else
add_overlay("uv")
. += "uv"
else if(state_open)
if(stat & BROKEN)
add_overlay("broken")
. += "broken"
else
add_overlay("open")
. += "open"
if(suit)
add_overlay("suit")
. += "suit"
if(helmet)
add_overlay("helm")
. += "helm"
if(storage)
add_overlay("storage")
. += "storage"
else if(occupant)
add_overlay("human")
. += "human"
/obj/machinery/suit_storage_unit/power_change()
..()
+1 -1
View File
@@ -102,7 +102,7 @@
. = ..()
. += "A digital display on it reads \"[seconds_remaining()]\"."
/obj/machinery/syndicatebomb/update_icon()
/obj/machinery/syndicatebomb/update_icon_state()
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
/obj/machinery/syndicatebomb/proc/seconds_remaining()
@@ -74,7 +74,7 @@
if(!relay_information(signal, /obj/machinery/telecomms/hub))
relay_information(signal, /obj/machinery/telecomms/broadcaster)
/obj/machinery/telecomms/message_server/update_icon()
/obj/machinery/telecomms/message_server/update_icon_state()
if((stat & (BROKEN|NOPOWER)))
icon_state = "server-nopower"
else if (!toggled)
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
links |= T
T.links |= src
/obj/machinery/telecomms/update_icon()
/obj/machinery/telecomms/update_icon_state()
if(on)
if(panel_open)
icon_state = "[initial(icon_state)]_o"
+2 -2
View File
@@ -85,7 +85,7 @@
calibrated = FALSE
return
/obj/machinery/teleport/hub/update_icon()
/obj/machinery/teleport/hub/update_icon_state()
if(panel_open)
icon_state = "tele-o"
else if(is_ready())
@@ -218,7 +218,7 @@
if(teleporter_hub)
teleporter_hub.update_icon()
/obj/machinery/teleport/station/update_icon()
/obj/machinery/teleport/station/update_icon_state()
if(panel_open)
icon_state = "controller-o"
else if(stat & (BROKEN|NOPOWER))
+1 -2
View File
@@ -38,8 +38,7 @@
..()
update_icon()
/obj/machinery/transformer/update_icon()
..()
/obj/machinery/transformer/update_icon_state()
if(stat & (BROKEN|NOPOWER) || cooldown == 1)
icon_state = "separator-AO0"
else
+5 -3
View File
@@ -199,8 +199,7 @@
/obj/machinery/washing_machine/update_icon()
cut_overlays()
/obj/machinery/washing_machine/update_icon_state()
if(busy)
icon_state = "wm_running_[bloody_mess]"
else if(bloody_mess)
@@ -208,8 +207,11 @@
else
var/full = contents.len ? 1 : 0
icon_state = "wm_[state_open]_[full]"
/obj/machinery/washing_machine/update_overlays()
. = ..()
if(panel_open)
add_overlay("wm_panel")
. += "wm_panel"
/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params)
if(panel_open && !busy && default_unfasten_wrench(user, W))