diff --git a/citadel.dme b/citadel.dme
index 6a72388ce388..88f6f9e0bf69 100644
--- a/citadel.dme
+++ b/citadel.dme
@@ -1069,7 +1069,7 @@
#include "code\game\atoms\atom-defense.dm"
#include "code\game\atoms\atom-examine.dm"
#include "code\game\atoms\atom-logging.dm"
-#include "code\game\atoms\atom_vv.dm"
+#include "code\game\atoms\atom-vv.dm"
#include "code\game\atoms\atoms_initializing_EXPENSIVE.dm"
#include "code\game\atoms\buckling.dm"
#include "code\game\atoms\defense_old.dm"
@@ -2480,10 +2480,10 @@
#include "code\modules\atmospherics\machinery\portable\powered.dm"
#include "code\modules\atmospherics\machinery\portable\pump.dm"
#include "code\modules\atmospherics\machinery\portable\scrubber.dm"
-#include "code\modules\automata\__automata.dm"
-#include "code\modules\automata\_wave.dm"
-#include "code\modules\automata\explosion.dm"
-#include "code\modules\automata\sonar.dm"
+#include "code\modules\automata\automata.dm"
+#include "code\modules\automata\types\explosion.dm"
+#include "code\modules\automata\types\sonar.dm"
+#include "code\modules\automata\types\wave.dm"
#include "code\modules\awaymissions\bluespaceartillery.dm"
#include "code\modules\awaymissions\corpse.dm"
#include "code\modules\awaymissions\exile.dm"
@@ -3567,7 +3567,6 @@
#include "code\modules\mining\drilling\drill.dm"
#include "code\modules\mining\drilling\scanner.dm"
#include "code\modules\mining\excavation\mine_outcrops.dm"
-#include "code\modules\mining\excavation\mineral_effect.dm"
#include "code\modules\mining\machinery\machine_input_output_plates.dm"
#include "code\modules\mining\machinery\machine_processing.dm"
#include "code\modules\mining\machinery\machine_stacking.dm"
diff --git a/code/__DEFINES/icon_smoothing.dm b/code/__DEFINES/icon_smoothing.dm
index 69c30a577fb1..559c60888efc 100644
--- a/code/__DEFINES/icon_smoothing.dm
+++ b/code/__DEFINES/icon_smoothing.dm
@@ -26,7 +26,6 @@ DEFINE_BITFIELD(smoothing_flags, list(
#define QUEUE_SMOOTH(thing_to_queue) if(IS_SMOOTH(thing_to_queue)) {SSicon_smooth.add_to_queue(thing_to_queue)}
#define QUEUE_SMOOTH_NEIGHBORS(thing_to_queue) for(var/neighbor in orange(1, thing_to_queue)) {var/atom/atom_neighbor = neighbor; QUEUE_SMOOTH(atom_neighbor)}
-
//! Smoothing Internals
#define NORTH_JUNCTION (1<<0) // NORTH
diff --git a/code/game/atoms/appearance.dm b/code/game/atoms/appearance.dm
index 4078f0f1a768..fc2a59df4cdb 100644
--- a/code/game/atoms/appearance.dm
+++ b/code/game/atoms/appearance.dm
@@ -1,4 +1,9 @@
-// todo: rethink everything about how to do signals for these.
+// todo: rethink everything about how to do signals for these, and general proc hierarchy
+// * update icon overrides are getting silly
+// * update flag is also kinda weird; most of the time you can't predict how things will react to not updating states / overlays together
+// * should name/desc really be their own proc??
+// * signals being able to block these things are also silly in most contexts, as a signal listener shouldn't have to know about
+// the implementation details of the sender?
/**
* Updates the appearence of the icon
diff --git a/code/game/atoms/atom_vv.dm b/code/game/atoms/atom-vv.dm
similarity index 98%
rename from code/game/atoms/atom_vv.dm
rename to code/game/atoms/atom-vv.dm
index d056489f6dd9..1ec689354fe9 100644
--- a/code/game/atoms/atom_vv.dm
+++ b/code/game/atoms/atom-vv.dm
@@ -245,3 +245,11 @@
else
return debug_variable(NAMEOF(src, base_layer), base_layer, 0, src)
return ..()
+
+/**
+ * VV wrapper, do not use.
+ */
+/atom/proc/vv_queue_smooth()
+ PRIVATE_PROC(TRUE)
+ QUEUE_SMOOTH(src)
+ QUEUE_SMOOTH_NEIGHBORS(src)
diff --git a/code/game/click/telekinesis.dm b/code/game/click/telekinesis.dm
index 15aad96ce438..b9ec3b51eefd 100644
--- a/code/game/click/telekinesis.dm
+++ b/code/game/click/telekinesis.dm
@@ -153,5 +153,6 @@ var/const/tk_maxrange = 15
/obj/item/tk_grab/update_icon()
cut_overlays()
+ . = ..()
if(focus && focus.icon && focus.icon_state)
add_overlay(image(focus.icon,focus.icon_state))
diff --git a/code/game/gamemodes/technomancer/spells/illusion.dm b/code/game/gamemodes/technomancer/spells/illusion.dm
index 080262c9115d..38bd9c7837f5 100644
--- a/code/game/gamemodes/technomancer/spells/illusion.dm
+++ b/code/game/gamemodes/technomancer/spells/illusion.dm
@@ -65,6 +65,7 @@
// Makes a tiny overlay of the thing the player has copied, so they can easily tell what they currently have.
/obj/item/spell/illusion/update_icon()
cut_overlays()
+ . = ..()
if(copied)
var/image/temp_image = image(copied)
var/matrix/M = matrix()
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 14d54e5a7a68..1fb7a028bb9a 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -275,8 +275,9 @@
else
toggle_pump()
-/obj/machinery/sleeper/update_icon()
+/obj/machinery/sleeper/update_icon_state()
icon_state = "sleeper_[occupant ? TRUE : FALSE]"
+ return ..()
/obj/machinery/sleeper/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/grab))
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index ae3898fc44ea..580aa6c68a21 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -630,6 +630,7 @@
return incoming
/obj/machinery/bodyscanner/update_icon()
+ . = ..()
if(machine_stat & (NOPOWER|BROKEN))
icon_state = "scanner_off"
set_light(0)
@@ -657,6 +658,7 @@
console.update_icon(h_ratio)
/obj/machinery/body_scanconsole/update_icon(var/h_ratio)
+ . = ..()
if(machine_stat & (NOPOWER|BROKEN))
icon_state = "scanner_terminal_off"
set_light(0)
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index d7b7a582f8dc..901d165d3971 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -22,11 +22,12 @@
..()
update_icon()
-/obj/machinery/ai_slipper/update_icon()
+/obj/machinery/ai_slipper/update_icon_state()
if(machine_stat & (NOPOWER|BROKEN))
icon_state = "motion0"
else
icon_state = disabled ? "motion0" : "motion3"
+ return ..()
/obj/machinery/ai_slipper/proc/setState(var/enabled, var/uses)
disabled = disabled
diff --git a/code/game/machinery/atm_ret_field.dm b/code/game/machinery/atm_ret_field.dm
index 27790055b186..2d21a9dfbe2a 100644
--- a/code/game/machinery/atm_ret_field.dm
+++ b/code/game/machinery/atm_ret_field.dm
@@ -83,7 +83,7 @@
. = ..()
generate_field()
-/obj/machinery/atmospheric_field_generator/update_icon()
+/obj/machinery/atmospheric_field_generator/update_icon_state()
if(machine_stat & BROKEN)
icon_state = "arfg_broken"
else if(hatch_open && wires_intact)
@@ -94,6 +94,7 @@
icon_state = "arfg_on"
else
icon_state = "arfg_off"
+ return ..()
/obj/machinery/atmospheric_field_generator/power_change()
var/oldstat
@@ -192,6 +193,7 @@
/obj/structure/atmospheric_retention_field/update_icon()
cut_overlays()
+ . = ..()
var/list/dirs = list()
for(var/obj/structure/atmospheric_retention_field/F in orange(src,1))
dirs += get_dir(src, F)
@@ -203,8 +205,6 @@
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
add_overlay(I)
- return
-
/obj/structure/atmospheric_retention_field/Initialize(mapload)
. = ..()
update_nearby_tiles() //Force ZAS update
diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm
index 5e548e8bb2ea..c054f4e03b50 100644
--- a/code/game/machinery/atmo_control.dm
+++ b/code/game/machinery/atmo_control.dm
@@ -20,8 +20,9 @@
var/datum/radio_frequency/radio_connection
-/obj/machinery/air_sensor/update_icon()
+/obj/machinery/air_sensor/update_icon_state()
icon_state = "gsensor[on]"
+ return ..()
/obj/machinery/air_sensor/process(delta_time)
if(on)
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index 6f17edab6d3c..82999429c1fd 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -249,6 +249,7 @@
/obj/machinery/biogenerator/update_icon()
cut_overlays()
+ . = ..()
if(beaker)
add_overlay("[base_icon_state]-standby")
if(processing)
diff --git a/code/game/machinery/bomb_tester.dm b/code/game/machinery/bomb_tester.dm
index 935abaed349e..d84cf342e8f7 100644
--- a/code/game/machinery/bomb_tester.dm
+++ b/code/game/machinery/bomb_tester.dm
@@ -62,6 +62,7 @@
/obj/machinery/bomb_tester/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
if(tank1)
overlays_to_add += image(icon, "[icon_name]-tank1")
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 673b3de996f2..956868ca2fb0 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -257,13 +257,14 @@ CREATE_WALL_MOUNTING_TYPES(/obj/machinery/camera)
if(isXRay())
P.SetSight(SEE_TURFS | SEE_MOBS | SEE_OBJS)
-/obj/machinery/camera/update_icon()
+/obj/machinery/camera/update_icon_state()
if (!status || (machine_stat & BROKEN))
icon_state = "[initial(icon_state)]1"
else if (machine_stat & EMPED)
icon_state = "[initial(icon_state)]emp"
else
icon_state = initial(icon_state)
+ return ..()
/obj/machinery/camera/proc/triggerCameraAlarm(duration = 0)
alarm_on = 1
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 2da823206971..4f7f6c71b52b 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -139,11 +139,12 @@
..()
-/obj/item/camera_assembly/update_icon()
+/obj/item/camera_assembly/update_icon_state()
if(anchored)
icon_state = "camera1"
else
icon_state = "cameracase"
+ return ..()
/obj/item/camera_assembly/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args)
if(!anchored)
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index f014be3d7768..feef4b5c3f14 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -17,21 +17,15 @@
circuit = /obj/item/circuitboard/cell_charger
/obj/machinery/cell_charger/update_icon()
+ cut_overlays()
icon_state = "ccharger[charging ? 1 : 0]"
+ . = ..()
if(charging && !(machine_stat & (BROKEN|NOPOWER)))
-
var/newlevel = round(charging.percent() * 4.0 / 99)
- //to_chat(world, "nl: [newlevel]")
-
if(chargelevel != newlevel)
-
- cut_overlays()
add_overlay("ccharger-o[newlevel]")
-
chargelevel = newlevel
- else
- cut_overlays()
/obj/machinery/cell_charger/examine(mob/user, dist)
. = ..()
diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm
index 43b425dfcfa8..eb7237046fac 100644
--- a/code/game/machinery/computer/aifixer.dm
+++ b/code/game/machinery/computer/aifixer.dm
@@ -115,18 +115,19 @@
if(oldstat != occupier.stat)
update_icon()
-/obj/machinery/computer/aifixer/update_icon()
- . = ..()
+/obj/machinery/computer/aifixer/make_legacy_overlays()
+ var/list/to_add_overlays = list()
if(machine_stat & (NOPOWER|BROKEN))
return
if(restoring)
- . += "ai-fixer-on"
+ to_add_overlays += "ai-fixer-on"
if (occupier)
switch (occupier.stat)
if (CONSCIOUS)
- . += "ai-fixer-full"
+ to_add_overlays += "ai-fixer-full"
if (UNCONSCIOUS)
- . += "ai-fixer-404"
+ to_add_overlays += "ai-fixer-404"
else
- . += "ai-fixer-empty"
+ to_add_overlays += "ai-fixer-empty"
+ add_overlay(to_add_overlays)
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index a99174ac3030..583df96c81fb 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -39,8 +39,11 @@
/obj/machinery/computer/update_icon()
cut_overlays()
+ . = ..()
+ make_legacy_overlays()
- . = list()
+/obj/machinery/computer/proc/make_legacy_overlays()
+ var/list/to_add_overlays = list()
// Connecty //TODO: Use TG Smoothing.
if(initial(icon_state) == "computer")
@@ -61,17 +64,17 @@
if(machine_stat & NOPOWER)
playsound(src, 'sound/machines/terminal_off.ogg', 50, 1)
return add_overlay("[icon_keyboard]_off")
- . += icon_keyboard
+ to_add_overlays += icon_keyboard
// This whole block lets screens ignore lighting and be visible even in the darkest room
var/overlay_state = icon_screen
if(machine_stat & BROKEN)
overlay_state = "[icon_state]_broken"
- . += overlay_state
+ to_add_overlays += overlay_state
//. += emissive_appearance(icon, overlay_state)
playsound(src, 'sound/machines/terminal_on.ogg', 50, 1)
- add_overlay(.)
+ add_overlay(to_add_overlays)
/obj/machinery/computer/power_change()
..()
diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm
index 5c6a922150ec..a6ef6e1eea42 100644
--- a/code/game/machinery/computer/timeclock_vr.dm
+++ b/code/game/machinery/computer/timeclock_vr.dm
@@ -34,13 +34,14 @@
card = null
. = ..()
-/obj/machinery/computer/timeclock/update_icon()
+/obj/machinery/computer/timeclock/update_icon_state()
if(inoperable())
icon_state = "[initial(icon_state)]_off"
else if(card)
icon_state = "[initial(icon_state)]_card"
else
icon_state = "[initial(icon_state)]"
+ return ..()
/obj/machinery/computer/timeclock/power_change()
var/old_stat = machine_stat
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 54b0538f3537..34318abdebc9 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -214,6 +214,7 @@
put_mob(target)
/obj/machinery/atmospherics/component/unary/cryo_cell/update_icon()
+ . = ..()
cut_overlay(fluid)
fluid.color = null
fluid.alpha = max(255 - air_contents.temperature, 50)
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 4b803e871166..b543c2eaaf2c 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -737,6 +737,7 @@
/obj/machinery/cryopod/robot/door/gateway/update_icon()
cut_overlays()
+ . = ..()
if(occupant)
var/image/I = image(icon, src, "[base_icon_state]_active_overlay")
I.plane = ABOVE_LIGHTING_PLANE
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index 7280a965dcc8..5b67dc5b601c 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -60,11 +60,12 @@
..()
update_icon()
-/obj/machinery/button/remote/update_icon()
+/obj/machinery/button/remote/update_icon_state()
if(machine_stat & NOPOWER)
icon_state = "doorctrl-p"
else
icon_state = "doorctrl0"
+ return ..()
/*
Airlock remote control
@@ -200,8 +201,9 @@
return
-/obj/machinery/button/remote/driver/update_icon()
+/obj/machinery/button/remote/driver/update_icon_state()
if(!active || (machine_stat & NOPOWER))
icon_state = "launcherbtt"
else
icon_state = "launcheract"
+ return ..()
diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm
index c2bd4e3c45ed..958655e768ab 100644
--- a/code/game/machinery/doorbell_vr.dm
+++ b/code/game/machinery/doorbell_vr.dm
@@ -34,6 +34,7 @@
/obj/machinery/doorbell_chime/update_icon()
cut_overlays()
+ . = ..()
if(panel_open)
add_overlay("dbchime-open")
if(inoperable())
@@ -105,11 +106,12 @@
..()
update_icon()
-/obj/machinery/button/doorbell/update_icon()
+/obj/machinery/button/doorbell/update_icon_state()
if(machine_stat & (NOPOWER|BROKEN))
icon_state = "doorbell-off"
else
icon_state = "doorbell-standby"
+ return ..()
/obj/machinery/button/doorbell/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
diff --git a/code/game/machinery/doors/airlock/airlock.dm b/code/game/machinery/doors/airlock/airlock.dm
index b18db9b23ca5..02249fca8ab7 100644
--- a/code/game/machinery/doors/airlock/airlock.dm
+++ b/code/game/machinery/doors/airlock/airlock.dm
@@ -499,8 +499,9 @@ About the new airlock wires panel:
return 0
-/obj/machinery/door/airlock/update_icon(var/doorstate)
- switch(doorstate)
+/obj/machinery/door/airlock/update_icon()
+ . = ..()
+ switch(state)
if(AIRLOCK_OPEN)
icon_state = "open"
if(AIRLOCK_CLOSED)
@@ -513,28 +514,43 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/custom_smooth()
return //we only custom smooth because we don't need to do anything else.
+// todo: Rework everything, fucks sakes
/obj/machinery/door/airlock/do_animate(animation)
switch(animation)
if(DOOR_ANIMATION_OPEN)
set_airlock_overlays(AIRLOCK_OPENING)
flick("opening", src)//[stat ? "_stat":]
- update_icon(AIRLOCK_OPEN)
+ state = AIRLOCK_OPENING
+ update_icon()
if(DOOR_ANIMATION_CLOSE)
set_airlock_overlays(AIRLOCK_CLOSING)
flick("closing", src)
- update_icon(AIRLOCK_CLOSED)
+ state = AIRLOCK_CLOSING
+ update_icon()
if(DOOR_ANIMATION_DENY)
set_airlock_overlays(AIRLOCK_DENY)
if(density && arePowerSystemsOn())
flick("deny", src)
if(speaker)
playsound(loc, denied_sound, 50, 0)
- update_icon(AIRLOCK_CLOSED)
+ var/old_state = state
+ state = AIRLOCK_DENY
+ update_icon()
+ state = old_state
+ spawn(3)
+ update_icon()
if(DOOR_ANIMATION_EMAG)
set_airlock_overlays(AIRLOCK_EMAG)
if(density && arePowerSystemsOn())
flick("deny", src)
+ var/old_state = state
+ state = AIRLOCK_EMAG
+ update_icon()
+ state = old_state
+ spawn(3)
+ update_icon()
else
+ state = AIRLOCK_EMAG
update_icon()
/obj/machinery/door/airlock/attack_ai(mob/user as mob)
@@ -890,7 +906,11 @@ About the new airlock wires panel:
if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density)
src.closeOther.close()
- return ..()
+ . = ..()
+ if(!.)
+ return
+ state = AIRLOCK_OPEN
+ update_icon()
/obj/machinery/door/airlock/close(var/forced=0)
if(!can_close(forced))
@@ -921,7 +941,11 @@ About the new airlock wires panel:
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis)
LEGACY_EX_ACT(killthis, 2, null)//Smashin windows
- return ..()
+ . = ..()
+ if(!.)
+ return
+ state = AIRLOCK_CLOSED
+ update_icon()
/obj/machinery/door/airlock/set_opacity_on_close()
if(visible)
diff --git a/code/game/machinery/doors/airlock/airlock_control.dm b/code/game/machinery/doors/airlock/airlock_control.dm
index 9fffbae73405..367614942f3c 100644
--- a/code/game/machinery/doors/airlock/airlock_control.dm
+++ b/code/game/machinery/doors/airlock/airlock_control.dm
@@ -168,7 +168,7 @@
var/previous_phoron
var/previous_temperature
-/obj/machinery/airlock_sensor/update_icon()
+/obj/machinery/airlock_sensor/update_icon_state()
if(on)
if(alert)
icon_state = "airlock_sensor_alert"
@@ -176,6 +176,7 @@
icon_state = "airlock_sensor_standby"
else
icon_state = "airlock_sensor_off"
+ return ..()
/obj/machinery/airlock_sensor/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args)
var/datum/signal/signal = new
@@ -267,12 +268,12 @@
var/on = 1
-
-/obj/machinery/access_button/update_icon()
+/obj/machinery/access_button/update_icon_state()
if(on)
icon_state = "access_button_standby"
else
icon_state = "access_button_off"
+ return ..()
/obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
//Swiping ID on the access button
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 9df2f78a99fd..5acf84f220d3 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -57,6 +57,7 @@
// Parameters: None
// Description: Updates icon of this object. Uses icon state variables.
/obj/machinery/door/blast/update_icon()
+ . = ..()
if(density)
icon_state = icon_state_closed
else
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 21071bb5c220..70693a9aafa8 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -290,11 +290,12 @@
open()
..()
-/obj/machinery/door/update_icon()
+/obj/machinery/door/update_icon_state()
if(density)
icon_state = "door1"
else
icon_state = "door0"
+ return ..()
/obj/machinery/door/proc/do_animate(animation)
switch(animation)
@@ -324,7 +325,7 @@
do_animate(DOOR_ANIMATION_OPEN)
set_opacity(0)
sleep(3)
- src.density = 0
+ set_density(FALSE)
update_nearby_tiles()
sleep(7)
src.layer = open_layer
@@ -350,7 +351,7 @@
close_door_at = 0
do_animate(DOOR_ANIMATION_CLOSE)
sleep(3)
- src.density = 1
+ set_density(TRUE)
explosion_resistance = initial(explosion_resistance)
src.layer = closed_layer
update_nearby_tiles()
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 423e176d4d09..38fe78736cd2 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -475,9 +475,11 @@ GLOBAL_LIST_INIT(firelock_align_types, typecacheof(list(
/obj/machinery/door/firedoor/update_icon()
- var/image/lights_overlay
cut_overlays()
+ . = ..()
+
set_light(0)
+ var/image/lights_overlay
var/do_set_light = FALSE
if(density)
@@ -505,8 +507,6 @@ GLOBAL_LIST_INIT(firelock_align_types, typecacheof(list(
if(do_set_light)
set_light(2, 0.25, COLOR_SUN)
- return
-
/obj/machinery/door/firedoor/border_only
/*
icon = 'icons/obj/doors/edge_Doorfire.dmi'
diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm
index e779c739be7b..b900a55de92e 100644
--- a/code/game/machinery/doors/firedoor_assembly.dm
+++ b/code/game/machinery/doors/firedoor_assembly.dm
@@ -8,11 +8,12 @@
density = 1
var/wired = 0
-/obj/structure/firedoor_assembly/update_icon()
+/obj/structure/firedoor_assembly/update_icon_state()
if(anchored)
icon_state = "door_anchored"
else
icon_state = "door_construction"
+ return ..()
/obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
if(istype(C, /obj/item/stack/cable_coil) && !wired && anchored)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index bf8007ae0194..5a2b684d6efe 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -25,6 +25,7 @@
src.base_state = src.icon_state
/obj/machinery/door/window/update_icon()
+ . = ..()
if(density)
icon_state = base_state
else
diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm
index a02ebf8320f8..9d7085022ce3 100644
--- a/code/game/machinery/embedded_controller/airlock_controllers.dm
+++ b/code/game/machinery/embedded_controller/airlock_controllers.dm
@@ -73,8 +73,7 @@
valid_actions = list("cycle_ext", "cycle_int", "force_ext", "force_int")
program = /datum/computer/file/embedded_program/airlock/access_controll
-
-/obj/machinery/embedded_controller/radio/airlock/access_controller/update_icon()
+/obj/machinery/embedded_controller/radio/airlock/access_controller/update_icon_state()
if(on && program)
if(program.memory["processing"])
icon_state = "access_control_process"
@@ -82,6 +81,7 @@
icon_state = "access_control_standby"
else
icon_state = "access_control_off"
+ return ..()
/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_data(mob/user, datum/tgui/ui)
. = list(
diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm
index 137e78cdbbbf..b0111938e2f6 100644
--- a/code/game/machinery/embedded_controller/embedded_controller_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm
@@ -86,7 +86,7 @@
radio_controller.remove_object(src,frequency)
..()
-/obj/machinery/embedded_controller/radio/update_icon()
+/obj/machinery/embedded_controller/radio/update_icon_state()
if(on && program)
if(program.memory["processing"])
icon_state = "airlock_control_process"
@@ -94,6 +94,7 @@
icon_state = "airlock_control_standby"
else
icon_state = "airlock_control_off"
+ return ..()
/obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal, var/radio_filter = null)
signal.transmission_method = TRANSMISSION_RADIO
diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm
index ac1e50634956..7ad9a9ae07a5 100644
--- a/code/game/machinery/exonet_node.dm
+++ b/code/game/machinery/exonet_node.dm
@@ -40,7 +40,7 @@ GLOBAL_LIST_EMPTY(exonet_nodes)
// Proc: update_icon()
// Parameters: None
// Description: Self explanatory.
-/obj/machinery/exonet_node/update_icon()
+/obj/machinery/exonet_node/update_icon_state()
if(on)
if(!allow_external_PDAs && !allow_external_communicators && !allow_external_newscasters)
icon_state = "[initial(icon_state)]_idle"
@@ -48,6 +48,7 @@ GLOBAL_LIST_EMPTY(exonet_nodes)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]_off"
+ return ..()
// Proc: update_power()
// Parameters: None
diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm
index 18e7b0188826..234cb0eac41b 100644
--- a/code/game/machinery/fire_alarm.dm
+++ b/code/game/machinery/fire_alarm.dm
@@ -53,6 +53,7 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/fire_alarm/alarms_hidden, 21)
/obj/machinery/fire_alarm/update_icon()
cut_overlays()
+ . = ..()
add_overlay("casing")
if(panel_open)
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 8548bc99021d..f5021db0c227 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -15,9 +15,9 @@
. = ..()
cell = new(src)
-/obj/machinery/floodlight/update_icon()
- cut_overlays()
+/obj/machinery/floodlight/update_icon_state()
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
+ return ..()
/obj/machinery/floodlight/process(delta_time)
if(!on)
diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm
index 6975c0a4f182..a952e821814e 100644
--- a/code/game/machinery/floor_light.dm
+++ b/code/game/machinery/floor_light.dm
@@ -122,6 +122,7 @@ var/list/floor_light_cache = list()
/obj/machinery/floor_light/update_icon()
cut_overlays()
+ . = ..()
if(use_power && !broken())
if(isnull(damaged))
var/cache_key = "floorlight-[default_light_colour]"
diff --git a/code/game/machinery/gear_painter.dm b/code/game/machinery/gear_painter.dm
index 8b23bdfd0507..f63dd55740aa 100644
--- a/code/game/machinery/gear_painter.dm
+++ b/code/game/machinery/gear_painter.dm
@@ -47,7 +47,7 @@
0, 0, 0,
)
-/obj/machinery/gear_painter/update_icon()
+/obj/machinery/gear_painter/update_icon_state()
if(panel_open)
icon_state = "colormate_open"
else if(inoperable())
@@ -56,6 +56,7 @@
icon_state = "colormate_active"
else
icon_state = "colormate"
+ return ..()
/obj/machinery/gear_painter/Destroy()
if(inserted) //please i beg you do not drop nulls
diff --git a/code/game/machinery/holoposter.dm b/code/game/machinery/holoposter.dm
index c8033af25273..9a876fb3ffdb 100644
--- a/code/game/machinery/holoposter.dm
+++ b/code/game/machinery/holoposter.dm
@@ -42,6 +42,7 @@ GLOBAL_LIST_EMPTY(holoposters)
. += examine_addon
/obj/machinery/holoposter/update_icon()
+ . = ..()
if(machine_stat & NOPOWER)
icon_state = "off"
examine_addon = "It appears to be powered off."
diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm
index 7b28e9b6766d..2c447ee36534 100644
--- a/code/game/machinery/holosign.dm
+++ b/code/game/machinery/holosign.dm
@@ -21,11 +21,12 @@
update_use_power(lit ? USE_POWER_ACTIVE : USE_POWER_IDLE)
update_icon()
-/obj/machinery/holosign/update_icon()
+/obj/machinery/holosign/update_icon_state()
if(!lit)
icon_state = off_icon
else
icon_state = on_icon
+ return ..()
/obj/machinery/holosign/power_change()
if(machine_stat & NOPOWER)
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 0d687a25a999..3b4ecc114a77 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -144,6 +144,7 @@
/obj/machinery/media/jukebox/update_icon()
cut_overlays()
+ . = ..()
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
if(machine_stat & BROKEN)
icon_state = "[state_base]-broken"
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 44386e2dcd30..d8c7dfee3206 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -196,14 +196,15 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
return ..()
/obj/machinery/newscaster/update_icon()
+ cut_overlays()
+ . = ..()
+
if(!ispowered || isbroken)
icon_state = "newscaster_off"
if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite.
set_overlays("crack3")
return
- cut_overlays() //reset overlays
-
if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message
icon_state = "newscaster_wanted"
return
@@ -215,7 +216,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
add_overlay("crack[hitstaken]")
icon_state = "newscaster_normal"
- return
/obj/machinery/newscaster/power_change()
if(isbroken) //Broken shit can't be powered.
diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm
index 7273710bbf41..16dcb4ad4f11 100644
--- a/code/game/machinery/pda_multicaster.dm
+++ b/code/game/machinery/pda_multicaster.dm
@@ -29,11 +29,12 @@
qdel(AM)
return ..()
-/obj/machinery/pda_multicaster/update_icon()
+/obj/machinery/pda_multicaster/update_icon_state()
if(on)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-p"
+ return ..()
/obj/machinery/pda_multicaster/attackby(obj/item/I, mob/user)
if(I.is_screwdriver())
diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm
index 11371572ea8a..744cb132ba28 100644
--- a/code/game/machinery/pointdefense.dm
+++ b/code/game/machinery/pointdefense.dm
@@ -153,11 +153,12 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
if(!id_tag)
. += "[desc_panel_image("multitool", user)]to set ident tag and connect to a mainframe."
-/obj/machinery/power/pointdefense/update_icon()
+/obj/machinery/power/pointdefense/update_icon_state()
if(!active || !id_tag || inoperable())
icon_state = "[initial(icon_state)]_off"
else
icon_state = initial(icon_state)
+ return ..()
/obj/machinery/power/pointdefense/default_unfasten_wrench(var/mob/user, var/obj/item/W, var/time)
if((. = ..()))
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 5bddf8fc4db8..726a50222889 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -209,11 +209,12 @@
..(severity)
-/obj/machinery/recharger/update_icon() //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(charging)
icon_state = icon_state_charging
else
icon_state = icon_state_idle
+ return ..()
/obj/machinery/recharger/RefreshParts()
var/E = 0
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 3f7b01c32662..e6fed7097d64 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -78,13 +78,14 @@ var/list/obj/machinery/requests_console/allConsoles = list()
..()
update_icon()
-/obj/machinery/requests_console/update_icon()
+/obj/machinery/requests_console/update_icon_state()
if(machine_stat & NOPOWER)
if(icon_state != "req_comp_off")
icon_state = "req_comp_off"
else
if(icon_state == "req_comp_off")
icon_state = "req_comp[newmessagepriority]"
+ return ..()
/obj/machinery/requests_console/Initialize(mapload, newdir)
. = ..()
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 4f2fd5f44d85..0a987fb6d337 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -20,6 +20,7 @@
/obj/machinery/space_heater/update_icon()
cut_overlays()
+ . = ..()
icon_state = "sheater[on]"
if(panel_open)
add_overlay("sheater-open")
@@ -287,6 +288,7 @@
/obj/machinery/power/thermoregulator/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
if(on)
overlays_to_add += "lasergen-on"
diff --git a/code/game/machinery/suit_storage/suit_storage_unit.dm b/code/game/machinery/suit_storage/suit_storage_unit.dm
index cb80c6ff01f4..572fb755b9a9 100644
--- a/code/game/machinery/suit_storage/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage/suit_storage_unit.dm
@@ -42,7 +42,7 @@
if(boots_stored_TYPE)
boots_stored = new boots_stored_TYPE(src)
-/obj/machinery/suit_storage_unit/update_icon()
+/obj/machinery/suit_storage_unit/update_icon_state()
var/hashelmet = 0
var/hassuit = 0
var/hashuman = 0
@@ -53,6 +53,7 @@
if(occupant)
hashuman = 1
icon_state = "suitstorage[hashelmet][hassuit][hashuman][isopen][islocked][isUV][ispowered][isbroken][issuperUV]"
+ return ..()
/obj/machinery/suit_storage_unit/power_change()
..()
diff --git a/code/game/machinery/telecomms/_telecomms.dm b/code/game/machinery/telecomms/_telecomms.dm
index 55cb28f8a702..dabe27fc8840 100644
--- a/code/game/machinery/telecomms/_telecomms.dm
+++ b/code/game/machinery/telecomms/_telecomms.dm
@@ -159,11 +159,12 @@
if(src != T)
links |= T
-/obj/machinery/telecomms/update_icon()
+/obj/machinery/telecomms/update_icon_state()
if(on)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]_off"
+ return ..()
/obj/machinery/telecomms/proc/update_power()
if(toggled)
diff --git a/code/game/machinery/teleporter/pad.dm b/code/game/machinery/teleporter/pad.dm
index 07aaac186824..ebc72dd6651c 100644
--- a/code/game/machinery/teleporter/pad.dm
+++ b/code/game/machinery/teleporter/pad.dm
@@ -21,6 +21,7 @@
/obj/machinery/tele_pad/update_icon()
cut_overlays()
+ . = ..()
if(com?.projector?.engaged)
update_use_power(USE_POWER_ACTIVE)
var/image/I = image(icon, src, "[initial(icon_state)]_active_overlay")
diff --git a/code/game/machinery/teleporter/projector.dm b/code/game/machinery/teleporter/projector.dm
index 594bf591400f..f989068a3b7d 100644
--- a/code/game/machinery/teleporter/projector.dm
+++ b/code/game/machinery/teleporter/projector.dm
@@ -77,6 +77,7 @@
/obj/machinery/tele_projector/update_icon()
cut_overlays()
+ . = ..()
if(engaged)
var/image/I = image(icon, src, "[initial(icon_state)]_active_overlay")
I.plane = ABOVE_LIGHTING_PLANE
diff --git a/code/game/machinery/turrets/turret.dm b/code/game/machinery/turrets/turret.dm
index a22964f65fd1..ef943140ac4c 100644
--- a/code/game/machinery/turrets/turret.dm
+++ b/code/game/machinery/turrets/turret.dm
@@ -190,6 +190,7 @@
return ..()
/obj/machinery/porta_turret/update_icon()
+ . = ..()
if(machine_stat & BROKEN) // Turret is dead.
icon_state = "destroyed_target_prism_[turret_type]"
diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm
index 92f25b7bb879..3e8e094da69f 100644
--- a/code/game/machinery/virtual_reality/vr_console.dm
+++ b/code/game/machinery/virtual_reality/vr_console.dm
@@ -50,8 +50,9 @@
visible_message("\The [src] sounds an alarm, swinging its hatch open.")
go_out()
-/obj/machinery/vr_sleeper/update_icon()
+/obj/machinery/vr_sleeper/update_icon_state()
icon_state = "[base_state][occupant ? "1" : "0"]"
+ return ..()
/obj/machinery/vr_sleeper/Topic(href, href_list)
if(..())
diff --git a/code/game/machinery/vitals_monitor.dm b/code/game/machinery/vitals_monitor.dm
index e5f0c1197e9d..cc02115fcb6f 100644
--- a/code/game/machinery/vitals_monitor.dm
+++ b/code/game/machinery/vitals_monitor.dm
@@ -87,6 +87,7 @@
/obj/machinery/vitals_monitor/update_icon()
cut_overlays()
+ . = ..()
if(machine_stat & NOPOWER)
return
add_overlay("screen")
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 7c0232aa5b14..e55b32f41d78 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -67,8 +67,9 @@
if(state in list(1,3,6))
usr.loc = src.loc
-/obj/machinery/washing_machine/update_icon()
+/obj/machinery/washing_machine/update_icon_state()
icon_state = "wm_[state][panel_open]"
+ return ..()
/obj/machinery/washing_machine/attackby(obj/item/W as obj, mob/user as mob)
if(state == 2 && washing.len < 1)
diff --git a/code/game/objects/effects/debris/cleanable/aliens.dm b/code/game/objects/effects/debris/cleanable/aliens.dm
index 5f40bfce1878..9fcd03427f69 100644
--- a/code/game/objects/effects/debris/cleanable/aliens.dm
+++ b/code/game/objects/effects/debris/cleanable/aliens.dm
@@ -11,9 +11,6 @@
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
basecolor = "#05EE05"
-/obj/effect/debris/cleanable/blood/gibs/xeno/update_icon()
- color = "#FFFFFF"
-
/obj/effect/debris/cleanable/blood/gibs/xeno/up
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
diff --git a/code/game/objects/effects/debris/cleanable/blood.dm b/code/game/objects/effects/debris/cleanable/blood.dm
index 6a318e6d8d11..1ee02af143cf 100644
--- a/code/game/objects/effects/debris/cleanable/blood.dm
+++ b/code/game/objects/effects/debris/cleanable/blood.dm
@@ -68,6 +68,7 @@ var/global/list/image/splatter_cache=list()
addtimer(CALLBACK(src, PROC_REF(dry)), BLOOD_DRYING_TIME * (amount + 1))
/obj/effect/debris/cleanable/blood/update_icon()
+ . = ..()
if(basecolor == "rainbow")
basecolor = "#[get_random_colour(1)]"
add_atom_color(basecolor)
@@ -206,6 +207,8 @@ var/global/list/image/splatter_cache=list()
var/fleshcolor = "#FFFFFF"
/obj/effect/debris/cleanable/blood/gibs/update_icon()
+ cut_overlays()
+ . = ..()
var/image/giblets = new(base_icon, "[icon_state]_flesh", dir)
if(!fleshcolor || fleshcolor == "rainbow")
@@ -217,7 +220,6 @@ var/global/list/image/splatter_cache=list()
blood.Blend(basecolor,ICON_MULTIPLY)
icon = blood
- cut_overlays()
add_overlay(giblets)
/obj/effect/debris/cleanable/blood/gibs/up
diff --git a/code/game/objects/effects/debris/cleanable/blood_tracks.dm b/code/game/objects/effects/debris/cleanable/blood_tracks.dm
index 570758172f0b..c2bff1d4fb24 100644
--- a/code/game/objects/effects/debris/cleanable/blood_tracks.dm
+++ b/code/game/objects/effects/debris/cleanable/blood_tracks.dm
@@ -125,6 +125,7 @@
/obj/effect/debris/cleanable/blood/tracks/update_icon()
cut_overlays()
+ . = ..()
color = "#FFFFFF"
var/truedir=0
diff --git a/code/game/objects/effects/debris/cleanable/robots.dm b/code/game/objects/effects/debris/cleanable/robots.dm
index 171b7a35f1e2..49c3ceb7a3cd 100644
--- a/code/game/objects/effects/debris/cleanable/robots.dm
+++ b/code/game/objects/effects/debris/cleanable/robots.dm
@@ -7,6 +7,7 @@
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
/obj/effect/debris/cleanable/blood/gibs/robot/update_icon()
+ . = ..()
color = "#FFFFFF"
/obj/effect/debris/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like
diff --git a/code/game/objects/effects/traps.dm b/code/game/objects/effects/traps.dm
index 6aa6397fc601..1d56f96417f3 100644
--- a/code/game/objects/effects/traps.dm
+++ b/code/game/objects/effects/traps.dm
@@ -106,11 +106,12 @@ Add those other swinging traps you mentioned above!
. = ..()
update_icon()
-/obj/effect/trap/update_icon()
+/obj/effect/trap/update_icon_state()
if(!tripped)
icon_state = "[initial(icon_state)]"
else if (tripped)
icon_state = "[initial(icon_state)]_visible"
+ return ..()
//////////////////
/// Pit Traps
@@ -396,13 +397,14 @@ Add those other swinging traps you mentioned above!
else
to_chat(user, "You can't pry this sculpture off of the wall.")
-/obj/effect/trap/launcher/update_icon()
+/obj/effect/trap/launcher/update_icon_state()
if(!tripped)
icon_state = "[initial(icon_state)]"
else if (tripped && !(atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_visible"
else if (tripped && (atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_jammed"
+ return ..()
//Stake Launcher
/obj/effect/trap/launcher/stake
@@ -473,13 +475,14 @@ Add those other swinging traps you mentioned above!
. = ..()
visible_message(SPAN_DANGER("\The [src] breaks! It was a trap!"))
-/obj/effect/trap/pop_up/update_icon()
+/obj/effect/trap/pop_up/update_icon_state()
if(!tripped)
icon_state = "[initial(icon_state)]"
else if(tripped && !(atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_visible"
else if (tripped && (atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_broken"
+ return ..()
//Spear Trap
@@ -708,13 +711,14 @@ if (istype(AM, /mob/living))
name = "crooked tile"
desc = "The edges of this tile are lifted slightly."
-/obj/effect/trap/pop_up/thrower/update_icon()
+/obj/effect/trap/pop_up/thrower/update_icon_state()
if(!tripped)
icon_state = "[initial(icon_state)]"
else if (tripped && !(atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_visible"
else if (tripped && (atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_jammed"
+ return ..()
//////////////////
// Falling Traps
@@ -743,13 +747,14 @@ if (istype(AM, /mob/living))
to_chat(user, "You cut the ropes suspending the [src], breaking it.")
update_icon()
-/obj/effect/trap/falling/update_icon()
+/obj/effect/trap/falling/update_icon_state()
if(!tripped)
icon_state = "[initial(icon_state)]"
else if (tripped && !(atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_visible"
else if (tripped && (atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_jammed"
+ return ..()
//Falling Log
/obj/effect/trap/falling/log
@@ -808,10 +813,11 @@ if (istype(AM, /mob/living))
desc = "There's something strange about the lighting around this tile."
update_icon()
-/obj/effect/trap/falling/log/update_icon()
+/obj/effect/trap/falling/log/update_icon_state()
if(!tripped)
icon_state = "[initial(icon_state)]"
else if (tripped && !(atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_visible"
else if (tripped && (atom_flags & ATOM_BROKEN))
icon_state = "[initial(icon_state)]_jammed"
+ return ..()
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index 9e4845a365f0..115c23d1fa33 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -114,7 +114,7 @@
var/obj/structure/morgue/M = loc
M.update(broadcast)
-/obj/structure/closet/body_bag/update_icon()
+/obj/structure/closet/body_bag/update_icon_state()
if(opened)
icon_state = icon_opened
else
@@ -122,7 +122,7 @@
icon_state = "bodybag_closed1"
else
icon_state = icon_closed
-
+ return ..()
/obj/item/bodybag/cryobag
name = "stasis bag"
diff --git a/code/game/objects/items/defib/defib_kit.dm b/code/game/objects/items/defib/defib_kit.dm
index aecb0f11b6ed..5e279ac659a6 100644
--- a/code/game/objects/items/defib/defib_kit.dm
+++ b/code/game/objects/items/defib/defib_kit.dm
@@ -40,8 +40,8 @@
bcell = /obj/item/cell/apc
/obj/item/defib_kit/update_icon()
-
cut_overlays()
+ . = ..()
var/list/new_overlays = list()
if(paddles && paddles.loc == src) //in case paddles got destroyed somehow.
diff --git a/code/game/objects/items/defib/shockpaddles.dm b/code/game/objects/items/defib/shockpaddles.dm
index 0d69c31f1ed8..57c2cbd2cb3f 100644
--- a/code/game/objects/items/defib/shockpaddles.dm
+++ b/code/game/objects/items/defib/shockpaddles.dm
@@ -47,6 +47,7 @@
..()
/obj/item/shockpaddles/update_icon()
+ . = ..()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
diff --git a/code/game/objects/items/devices/advnifrepair.dm b/code/game/objects/items/devices/advnifrepair.dm
index ffde2c060629..a3454b36eba9 100644
--- a/code/game/objects/items/devices/advnifrepair.dm
+++ b/code/game/objects/items/devices/advnifrepair.dm
@@ -32,6 +32,7 @@
return
/obj/item/nifrepairer/update_icon()
+ . = ..()
if(supply.total_volume)
icon_state = "[initial(icon_state)]2"
else
diff --git a/code/game/objects/items/devices/ai_detector.dm b/code/game/objects/items/devices/ai_detector.dm
index ee6fd8ed2dd8..91ec58a41b5a 100644
--- a/code/game/objects/items/devices/ai_detector.dm
+++ b/code/game/objects/items/devices/ai_detector.dm
@@ -82,6 +82,7 @@
return PROXIMITY_NONE
/obj/item/multitool/ai_detector/update_icon()
+ . = ..()
icon_state = "[initial(icon_state)][detect_state]"
/obj/item/multitool/ai_detector/proc/update_warning(var/old_state, var/new_state)
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index f16209aeb0f0..6202ccb61f78 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -90,6 +90,7 @@
/obj/item/aicard/update_icon()
cut_overlays()
+ . = ..()
if(carded_ai)
if (!carded_ai.control_disabled)
add_overlay("aicard-on")
@@ -174,6 +175,7 @@
/obj/item/aicard/aitater/update_icon()
cut_overlays()
+ . = ..()
if(carded_ai)
if (!carded_ai.control_disabled)
add_overlay("aitater-on")
@@ -191,6 +193,7 @@
/obj/item/aicard/aispook/update_icon()
cut_overlays()
+ . = ..()
if(carded_ai)
if (!carded_ai.control_disabled)
add_overlay("aispook-on")
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 833e6837bdc1..3ac0a399fbf5 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -62,6 +62,7 @@
..()
/obj/item/flash/update_icon()
+ . = ..()
var/obj/item/cell/battery = power_supply
if(use_external_power)
@@ -71,7 +72,6 @@
icon_state = "[base_icon]burnt"
else
icon_state = "[base_icon]"
- return
/obj/item/flash/get_cell(inducer)
return power_supply
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index bcc0961b5634..c0a49b8d4da1 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -69,6 +69,7 @@
/obj/item/gps/update_icon()
cut_overlays()
+ . = ..()
if(emped)
add_overlay("emp")
else if(on)
diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm
index 38c380ca2101..c59f50d59e0c 100644
--- a/code/game/objects/items/devices/holowarrant.dm
+++ b/code/game/objects/items/devices/holowarrant.dm
@@ -61,6 +61,7 @@
return CLICKCHAIN_DO_NOT_PROPAGATE
/obj/item/holowarrant/update_icon()
+ . = ..()
if(active)
icon_state = "holowarrant_filled"
else
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index e0cebf5059d3..d9a9bcfeb6f5 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -161,9 +161,9 @@
return new_bulbs
/obj/item/lightreplacer/update_icon()
+ . = ..()
icon_state = "lightreplacer[emagged]"
-
/obj/item/lightreplacer/proc/Use(var/mob/user)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm
index 8ad2c75ccaeb..0340c914df27 100644
--- a/code/game/objects/items/devices/radio/beacon.dm
+++ b/code/game/objects/items/devices/radio/beacon.dm
@@ -20,6 +20,7 @@ GLOBAL_LIST_BOILERPLATE(all_beacons, /obj/item/radio/beacon)
/obj/item/radio/beacon/update_icon()
cut_overlays()
+ . = ..()
if(!functioning)
add_overlay("[base_icon_state]_malfunction")
else
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index ae475848b9bf..fa64ba2b9c35 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -33,6 +33,7 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/item/radio/intercom, 28)
/obj/item/radio/intercom/update_icon(updates)
cut_overlays()
+ . = ..()
if(!on)
icon_state = "intercom-p"
else
diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm
index 825855051c91..e6592aa6e8ca 100644
--- a/code/game/objects/items/devices/radio/jammer.dm
+++ b/code/game/objects/items/devices/radio/jammer.dm
@@ -100,6 +100,8 @@ var/global/list/active_radio_jammers = list()
to_chat(user,"You insert \the [power_source] into \the [src].")
/obj/item/radio_jammer/update_icon()
+ cut_overlays()
+ . = ..()
if(on)
icon_state = active_state
else
@@ -111,12 +113,9 @@ var/global/list/active_radio_jammers = list()
else
overlay_percent = 0
- // Only Cut() if we need to.
- if(overlay_percent != last_overlay_percent)
- cut_overlays()
- var/image/I = image(src.icon, src, "jammer_overlay_[overlay_percent]")
- add_overlay(I)
- last_overlay_percent = overlay_percent
+ var/image/I = image(src.icon, src, "jammer_overlay_[overlay_percent]")
+ add_overlay(I)
+ last_overlay_percent = overlay_percent
//Unlimited use, unlimited range jammer for admins. Turn it on, drop it somewhere, it works.
/obj/item/radio_jammer/admin
diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm
index 30e29279ffac..1d3c0acd0eb1 100644
--- a/code/game/objects/items/devices/scanners_vr.dm
+++ b/code/game/objects/items/devices/scanners_vr.dm
@@ -265,9 +265,8 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
return
to_chat(usr,"Unable to find that mind in Soulcatcher!")
-
-
/obj/item/sleevemate/update_icon()
+ . = ..()
if(stored_mind)
icon_state = "[initial(icon_state)]_on"
else
diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm
index 275015610825..fcd03f85ef30 100644
--- a/code/game/objects/items/devices/t_scanner.dm
+++ b/code/game/objects/items/devices/t_scanner.dm
@@ -21,6 +21,7 @@
var/global/list/overlay_cache = list() //cache recent overlays
/obj/item/t_scanner/update_icon()
+ . = ..()
icon_state = "t-ray[on]"
/obj/item/t_scanner/AltClick()
diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm
index f118af45063a..edd1fd158641 100644
--- a/code/game/objects/items/glassjar.dm
+++ b/code/game/objects/items/glassjar.dm
@@ -84,6 +84,7 @@
/obj/item/glass_jar/update_icon() // Also updates name and desc
underlays.Cut()
cut_overlays()
+ . = ..()
switch(contains)
if(0)
name = initial(name)
diff --git a/code/game/objects/items/id_cards/cards.dm b/code/game/objects/items/id_cards/cards.dm
index 3b5d767cf5cc..c530e1f5549e 100644
--- a/code/game/objects/items/id_cards/cards.dm
+++ b/code/game/objects/items/id_cards/cards.dm
@@ -101,6 +101,7 @@
update_icon()
/obj/item/card_fluff/update_icon()
+ . = ..()
if(!sprite_stack || !istype(sprite_stack) || sprite_stack == list(""))
icon = base_icon
icon_state = initial(icon_state)
diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm
index 7c8297d4bd16..388380d3a893 100644
--- a/code/game/objects/items/stacks/marker_beacons.dm
+++ b/code/game/objects/items/stacks/marker_beacons.dm
@@ -47,8 +47,9 @@ var/list/marker_beacon_colors = list(
. += "Use in-hand to place a [singular_name]."
. += "Alt-click to select a color. Current color is [picked_color]."
-/obj/item/stack/marker_beacon/update_icon()
+/obj/item/stack/marker_beacon/update_icon_state()
icon_state = "[initial(icon_state)][lowertext(picked_color)]"
+ return ..()
/obj/item/stack/marker_beacon/attack_self(mob/user, datum/event_args/actor/actor)
. = ..()
@@ -94,6 +95,8 @@ var/list/marker_beacon_colors = list(
/obj/structure/marker_beacon/Initialize(mapload, set_color)
. = ..()
picked_color = set_color
+ if(!picked_color || !marker_beacon_colors[picked_color])
+ picked_color = pick(marker_beacon_colors)
update_icon()
/obj/structure/marker_beacon/examine(mob/user, dist)
@@ -101,8 +104,7 @@ var/list/marker_beacon_colors = list(
. += "Alt-click to select a color. Current color is [picked_color]."
/obj/structure/marker_beacon/update_icon()
- while(!picked_color || !marker_beacon_colors[picked_color])
- picked_color = pick(marker_beacon_colors)
+ . = ..()
icon_state = "[initial(icon_state)][lowertext(picked_color)]-on"
set_light(light_range, light_power, marker_beacon_colors[picked_color])
@@ -145,22 +147,8 @@ var/list/marker_beacon_colors = list(
/obj/structure/marker_beacon/red
picked_color = "Burgundy"
-/obj/structure/marker_beacon/red/update_icon()
- while(!picked_color || !marker_beacon_colors[picked_color])
- picked_color = "Burgundy"
- icon_state = "[initial(icon_state)][lowertext(picked_color)]-on"
- set_light(light_range, light_power, marker_beacon_colors[picked_color])
-
/obj/structure/marker_beacon/yellow
picked_color = "Yellow"
-/obj/structure/marker_beacon/yellow/update_icon()
- icon_state = "[initial(icon_state)][lowertext(picked_color)]-on"
- set_light(light_range, light_power, marker_beacon_colors[picked_color])
-
/obj/structure/marker_beacon/green
picked_color = "Green"
-
-/obj/structure/marker_beacon/green/update_icon()
- icon_state = "[initial(icon_state)][lowertext(picked_color)]-on"
- set_light(light_range, light_power, marker_beacon_colors[picked_color])
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 748b839080cb..3a57858b8877 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -432,12 +432,7 @@
icon_state = "primitive-splint"
amount = 5
-// Begin Citadel Changes - New advanced kit sprites
-/obj/item/stack/medical/advanced/Initialize(mapload)
- . = ..()
- update_icon()
-
-/obj/item/stack/medical/advanced/update_icon()
+/obj/item/stack/medical/advanced/update_icon_state()
switch(amount)
if(1 to 2)
icon_state = initial(icon_state)
@@ -451,7 +446,7 @@
icon_state = "[initial(icon_state)]_9"
else
icon_state = "[initial(icon_state)]_10"
-// End Citadel Changes
+ return ..()
//Ashlander Poultices - They basically use the same stack system as ointment and bruise packs. Gotta dupe some of the code since bruise pack/ointment chat messages are too specific.
/obj/item/stack/medical/poultice_brute
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index b36e45205058..aa74aa00e7f0 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -19,12 +19,13 @@
. += create_stack_recipe_datum(name = "grille", product = /obj/structure/grille, cost = 2, time = 1 SECONDS)
. += create_stack_recipe_datum(name = "catwalk", product = /obj/structure/catwalk, cost = 2, time = 1 SECONDS)
-/obj/item/stack/rods/update_icon()
+/obj/item/stack/rods/update_icon_state()
var/amount = get_amount()
if((amount <= 5) && (amount > 0))
icon_state = "rods-[amount]"
else
icon_state = "rods"
+ return ..()
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weldingtool))
diff --git a/code/game/objects/items/stacks/sandbag.dm b/code/game/objects/items/stacks/sandbag.dm
index b7d9b67d49ab..a445097edec6 100644
--- a/code/game/objects/items/stacks/sandbag.dm
+++ b/code/game/objects/items/stacks/sandbag.dm
@@ -19,7 +19,7 @@
. = ..()
update_icon()
-/obj/item/stack/emptysandbag/update_icon()
+/obj/item/stack/emptysandbag/update_icon_state()
var/amount = get_amount()
if((amount >= 35))
icon_state = "sandbag_empty_3"
@@ -27,6 +27,7 @@
icon_state = "sandbag_empty_2"
else
icon_state = "sandbag_empty"
+ return ..()
/obj/item/stack/emptysandbag/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/stack/ore/glass) && !interact(user, src))
@@ -66,7 +67,7 @@
. = ..()
update_icon()
-/obj/item/stack/sandbags/update_icon()
+/obj/item/stack/sandbags/update_icon_state()
var/amount = get_amount()
if((amount >= 35))
icon_state = "sandbags_3"
@@ -74,6 +75,7 @@
icon_state = "sandbags_2"
else
icon_state = "sandbags"
+ return ..()
/obj/item/stack/sandbags/generate_explicit_recipes()
. = list()
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 6aa51a10242d..743d774fca2a 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -83,6 +83,7 @@
update_icon()
/obj/item/stack/update_icon()
+ . = ..()
if(skip_legacy_icon_update)
return
if(no_variants)
diff --git a/code/game/objects/items/stacks/tickets.dm b/code/game/objects/items/stacks/tickets.dm
index a88abfc9fbb8..ae1ef53e8d13 100644
--- a/code/game/objects/items/stacks/tickets.dm
+++ b/code/game/objects/items/stacks/tickets.dm
@@ -11,7 +11,7 @@
. = ..()
update_icon()
-/obj/item/stack/arcadeticket/update_icon()
+/obj/item/stack/arcadeticket/update_icon_state()
var/amount = get_amount()
switch(amount)
if(12 to INFINITY)
@@ -22,6 +22,7 @@
icon_state = "arcade-ticket_2"
else
icon_state = "arcade-ticket"
+ return ..()
/obj/item/stack/arcadeticket/proc/pay_tickets()
amount -= 2
diff --git a/code/game/objects/items/storage/misc_legacy/fancy.dm b/code/game/objects/items/storage/misc_legacy/fancy.dm
index f90b8602fb9c..4a8aa3a8d47b 100644
--- a/code/game/objects/items/storage/misc_legacy/fancy.dm
+++ b/code/game/objects/items/storage/misc_legacy/fancy.dm
@@ -128,6 +128,7 @@
/obj/item/storage/fancy/crayons/update_icon()
cut_overlays()
+ . = ..()
for(var/obj/item/pen/crayon/crayon in contents)
add_overlay(crayon.crayon_color_name)
@@ -168,6 +169,7 @@
/obj/item/storage/fancy/markers/update_icon()
cut_overlays()
+ . = ..()
for(var/obj/item/pen/crayon/marker/marker in contents)
add_overlay("m[marker.crayon_color_name]")
@@ -205,6 +207,7 @@
/obj/item/storage/fancy/chalk/update_icon()
cut_overlays()
+ . = ..()
for(var/obj/item/pen/crayon/chalk/chalk in contents)
add_overlay("c[chalk.crayon_color_name]")
@@ -372,9 +375,9 @@
atom_flags |= NOREACT
create_reagents(15 * max_items)
-/obj/item/storage/fancy/cigar/update_icon()
+/obj/item/storage/fancy/cigar/update_icon_state()
icon_state = "[initial(icon_state)][contents.len]"
- return
+ return ..()
/obj/item/storage/fancy/cigar/Exited(atom/movable/AM, atom/newLoc)
. = ..()
@@ -436,11 +439,12 @@
update_icon()
/obj/item/storage/lockbox/vials/update_icon(itemremoved = 0)
+ cut_overlays()
+ . = ..()
+
var/total_contents = contents.len - itemremoved
icon_state = "vialbox[total_contents]"
- cut_overlays()
-
var/list/overlays_to_add = list()
if (!broken)
overlays_to_add += image(icon, src, "led[locked]")
@@ -486,6 +490,6 @@
. = ..()
update_icon()
-/obj/item/storage/fancy/heartbox/update_icon(var/itemremoved = 0)
- if (contents.len == 0)
- icon_state = "heartbox_empty"
+/obj/item/storage/fancy/heartbox/update_icon_state()
+ icon_state = length(contents) ? "chocolate" : "heartbox_empty"
+ return ..()
diff --git a/code/game/objects/items/storage/misc_legacy/misc.dm b/code/game/objects/items/storage/misc_legacy/misc.dm
index 4a8c429dc18a..86652e3efac2 100644
--- a/code/game/objects/items/storage/misc_legacy/misc.dm
+++ b/code/game/objects/items/storage/misc_legacy/misc.dm
@@ -21,10 +21,12 @@
/obj/item/storage/box/donut/update_icon()
cut_overlays()
+ . = ..()
var/i = 0
for(var/obj/item/reagent_containers/food/snacks/donut/D in contents)
- add_overlay("[i][D.overlay_state]")
- i++
+ add_overlay("[i++][D.overlay_state]")
+ if(i >= 6)
+ break
/obj/item/storage/box/donut/empty
empty = TRUE
@@ -50,9 +52,9 @@
. = ..()
obj_storage.update_icon_on_item_change = TRUE
-/obj/item/storage/box/wormcan/update_icon(var/itemremoved = 0)
- if (contents.len == 0)
- icon_state = "wormcan_empty"
+/obj/item/storage/box/wormcan/update_icon_state()
+ icon_state = length(contents) ? "wormcan" : "wormcan_empty"
+ return ..()
/obj/item/storage/box/wormcan/sickly
icon_state = "wormcan_sickly"
@@ -61,9 +63,9 @@
max_combined_volume = WEIGHT_VOLUME_TINY * 6
starts_with = list(/obj/item/reagent_containers/food/snacks/wormsickly = 6)
-/obj/item/storage/box/wormcan/sickly/update_icon(var/itemremoved = 0)
- if (contents.len == 0)
- icon_state = "wormcan_empty_sickly"
+/obj/item/storage/box/wormcan/sickly/update_icon_state()
+ icon_state = length(contents) ? "wormcan_empty_sickly" : "wormcan_sickly"
+ return ..()
/obj/item/storage/box/wormcan/deluxe
icon_state = "wormcan_deluxe"
@@ -73,8 +75,8 @@
starts_with = list(/obj/item/reagent_containers/food/snacks/wormdeluxe = 6)
/obj/item/storage/box/wormcan/deluxe/update_icon(var/itemremoved = 0)
- if (contents.len == 0)
- icon_state = "wormcan_empty_deluxe"
+ icon_state = length(contents) ? "wormcan_deluxe" : "wormcan_empty_deluxe"
+ return ..()
//Snowflake Survival Knife Code
/obj/item/storage/box/survival_knife
diff --git a/code/game/objects/items/storage/misc_legacy/trinket_box.dm b/code/game/objects/items/storage/misc_legacy/trinket_box.dm
index ba2c70fc545a..5fd868b2fb25 100644
--- a/code/game/objects/items/storage/misc_legacy/trinket_box.dm
+++ b/code/game/objects/items/storage/misc_legacy/trinket_box.dm
@@ -18,6 +18,7 @@
/obj/item/storage/trinketbox/update_icon()
cut_overlays()
+ . = ..()
if(open)
icon_state = open_state
diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm
index 07b417800323..b8ae16dde897 100644
--- a/code/game/objects/items/storage/wallets.dm
+++ b/code/game/objects/items/storage/wallets.dm
@@ -72,6 +72,7 @@
/obj/item/storage/wallet/update_icon()
cut_overlays()
+ . = ..()
if(front_id)
var/tiny_state = "id-generic"
if(("id-"+front_id.icon_state) in icon_states(icon))
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index a2eced2bcc8e..be0ad32a794e 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -743,6 +743,7 @@
return
/obj/item/weldingtool/electric/crystal/update_icon()
+ . = ..()
icon_state = welding ? "crystal_welder_on" : "crystal_welder"
item_state = welding ? "crystal_tool_lit" : "crystal_tool"
update_worn_icon()
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 069da682a19a..915f314f32cf 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -75,16 +75,14 @@
for(var/atom/A in get_turf(hit_atom))
src.reagents.touch(A)
src.icon_state = "burst"
- spawn(5)
- if(src)
- qdel(src)
- return
+ QDEL_IN(src, 5)
-/obj/item/toy/balloon/update_icon()
- if(src.reagents.total_volume >= 1)
+/obj/item/toy/balloon/update_icon_state()
+ if(reagents.total_volume)
icon_state = "waterballoon"
else
icon_state = "waterballoon-e"
+ return ..()
/obj/item/toy/syndicateballoon
name = "criminal balloon"
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index f1d8b52b6086..12eff7e01ba9 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -473,6 +473,7 @@
update_icon()
/obj/effect/constructing_effect/update_icon()
+ . = ..()
icon_state = "rcd"
if (delay < 10)
icon_state += "_shortest"
diff --git a/code/game/objects/items/weapons/barrier_tape.dm b/code/game/objects/items/weapons/barrier_tape.dm
index c12379f28bec..e4f3cf655366 100644
--- a/code/game/objects/items/weapons/barrier_tape.dm
+++ b/code/game/objects/items/weapons/barrier_tape.dm
@@ -40,6 +40,7 @@ var/list/tape_roll_applications = list()
var/icon_base = "tape"
/obj/item/barrier_tape_segment/update_icon()
+ . = ..()
//Possible directional bitflags: 0 (AIRLOCK), 1 (NORTH), 2 (SOUTH), 4 (EAST), 8 (WEST), 3 (VERTICAL), 12 (HORIZONTAL)
switch (tape_dir)
if(0) // AIRLOCK
@@ -50,7 +51,7 @@ var/list/tape_roll_applications = list()
icon_state = "[icon_base]_h_[crumpled]"
else // END POINT (1|2|4|8)
icon_state = "[icon_base]_dir_[crumpled]"
- dir = tape_dir
+ setDir(tape_dir)
/obj/item/barrier_tape_segment/Initialize(mapload)
. = ..()
@@ -115,6 +116,7 @@ var/list/tape_roll_applications = list()
/obj/item/barrier_tape_roll/update_icon()
cut_overlays()
+ . = ..()
var/image/overlay = image(icon = src.icon)
overlay.appearance_flags = RESET_COLOR
if(ismob(loc))
@@ -124,7 +126,6 @@ var/list/tape_roll_applications = list()
overlay.icon_state = "stop"
add_overlay(overlay)
-
/obj/item/barrier_tape_roll/dropped(mob/user, flags, atom/newLoc)
update_icon()
return ..()
diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm
index 733e0cac1d0c..ae5bc7ee4456 100644
--- a/code/game/objects/items/weapons/candle.dm
+++ b/code/game/objects/items/weapons/candle.dm
@@ -15,7 +15,7 @@
. = ..()
wax -= rand(800, 1000) // Enough for 27-33 minutes. 30 minutes on average.
-/obj/item/flame/candle/update_icon()
+/obj/item/flame/candle/update_icon_state()
var/i
if(wax > 1500)
i = 1
@@ -23,6 +23,7 @@
i = 2
else i = 3
icon_state = "[icon_type][i][lit ? "_lit" : ""]"
+ return ..()
/obj/item/flame/candle/attackby(obj/item/W as obj, mob/user as mob)
..()
@@ -103,6 +104,7 @@
wax = 20000
/obj/item/flame/candle/candelabra/update_icon()
+ . = ..()
if(wax == 0)
icon_state = "candelabra_melted"
else
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index eaaaa9069fcd..9f649d070145 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -45,6 +45,7 @@
/obj/item/flamethrower/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
if(igniter)
@@ -59,8 +60,6 @@
add_overlay(overlays_to_add)
- return
-
/obj/item/flamethrower/afterattack(atom/target, mob/user, clickchain_flags, list/params)
if(!(clickchain_flags & CLICKCHAIN_HAS_PROXIMITY)) return
// Make sure our user is still holding us
diff --git a/code/game/objects/items/weapons/grenades/supermatter.dm b/code/game/objects/items/weapons/grenades/supermatter.dm
index d63c30e26a52..cc194536a677 100644
--- a/code/game/objects/items/weapons/grenades/supermatter.dm
+++ b/code/game/objects/items/weapons/grenades/supermatter.dm
@@ -20,6 +20,7 @@
/obj/item/grenade/supermatter/update_icon()
cut_overlays()
+ . = ..()
if(implode_at)
add_overlay(image(icon = 'icons/rust.dmi', icon_state = "emfield_s1"))
diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm
index 9c5552e072f8..01ddebf4bb40 100644
--- a/code/game/objects/items/weapons/material/ashtray.dm
+++ b/code/game/objects/items/weapons/material/ashtray.dm
@@ -20,6 +20,7 @@ var/global/list/ashtray_cache = list()
color = null
cut_overlays()
+ . = ..()
var/datum/prototype/material/material = get_primary_material()
var/list/overlays_to_add = list()
diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm
index f59a85b91aa6..96403f333e51 100644
--- a/code/game/objects/items/weapons/material/chainsaw.dm
+++ b/code/game/objects/items/weapons/material/chainsaw.dm
@@ -107,6 +107,7 @@
return(BRUTELOSS)
/obj/item/chainsaw/update_icon()
+ . = ..()
if(on)
icon_state = "chainsaw1"
item_state = "chainsaw1"
@@ -160,6 +161,7 @@
update_icon()
/obj/item/chainsaw/chainsword/update_icon()
+ . = ..()
if(on)
icon_state = "chainsword1"
item_state = "chainsword1"
diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm
index 027a90f6b4d9..851f42171367 100644
--- a/code/game/objects/items/weapons/material/twohanded.dm
+++ b/code/game/objects/items/weapons/material/twohanded.dm
@@ -54,6 +54,7 @@
update_icon()
/obj/item/material/twohanded/update_icon()
+ . = ..()
icon_state = "[base_icon][wielded]"
item_state = icon_state
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 4a05db8d2370..6129f952413c 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -63,6 +63,7 @@
update_icon()
/obj/item/melee/baton/update_icon()
+ . = ..()
if(status)
icon_state = "[initial(icon_state)]_active"
else if(!bcell)
diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm
index e014dc527dfc..76d39175bc39 100644
--- a/code/game/objects/structures/bonfire.dm
+++ b/code/game/objects/structures/bonfire.dm
@@ -200,6 +200,7 @@
/obj/structure/bonfire/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
if(burning)
var/state
@@ -373,6 +374,7 @@
/obj/structure/fireplace/update_icon()
cut_overlays()
+ . = ..()
if(burning)
var/state
switch(get_fuel_amount())
diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm
index 3c7e21c9f3a4..45a93625c590 100644
--- a/code/game/objects/structures/coathanger.dm
+++ b/code/game/objects/structures/coathanger.dm
@@ -46,6 +46,7 @@
/obj/structure/coatrack/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat))
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
index 230c31e311ca..e503fe23d88e 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
@@ -82,7 +82,7 @@
/obj/item/mining_scanner,
/obj/item/gps/mining,
/obj/item/survivalcapsule,
- /obj/item/clothing/glasses/material,
+ /obj/item/clothing/glasses/meson,
/obj/item/clothing/suit/storage/hooded/miner,
/obj/item/clothing/suit/storage/hooded/wintercoat/miner,
/obj/item/clothing/shoes/boots/winter/mining,
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index 994b2e183976..09a66d6890bd 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -180,6 +180,7 @@
return
/obj/structure/fireaxecabinet/update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
+ . = ..()
hasaxe = 0
if(fireaxe)
hasaxe = 1
diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm
index e988470c54cd..6ce56654f822 100644
--- a/code/game/objects/structures/railing.dm
+++ b/code/game/objects/structures/railing.dm
@@ -93,10 +93,11 @@
R.update_icon(UpdateNeighbors = FALSE)
/obj/structure/railing/update_icon(updates, UpdateNeighbors = TRUE)
- NeighborsCheck(UpdateNeighbors)
//layer = (dir == SOUTH) ? FLY_LAYER : initial(layer) // wtf does this even do
cut_overlays()
+ . = ..()
+ NeighborsCheck(UpdateNeighbors)
if (!check || !anchored)//|| !anchored
icon_state = "railing0"
else
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 7f4641ea6de5..b1e99b3a065f 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -48,27 +48,24 @@ FLOOR SAFES
return 1
return 0
-
/obj/structure/safe/proc/decrement(num)
num -= 1
if(num < 0)
num = 71
return num
-
/obj/structure/safe/proc/increment(num)
num += 1
if(num > 71)
num = 0
return num
-
-/obj/structure/safe/update_icon()
+/obj/structure/safe/update_icon_state()
if(open)
icon_state = "[initial(icon_state)]-open"
else
icon_state = initial(icon_state)
-
+ return ..()
/obj/structure/safe/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args)
user.set_machine(src)
diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm
index 09824f2a6936..5fd867f87ef6 100644
--- a/code/game/objects/structures/simple_doors.dm
+++ b/code/game/objects/structures/simple_doors.dm
@@ -117,7 +117,7 @@
isSwitchingStates = 0
update_nearby_tiles()
-/obj/structure/simple_door/update_icon()
+/obj/structure/simple_door/update_icon_state()
var/datum/prototype/material/material = get_primary_material()
if(isnull(material))
icon_state = state? "open" : "closed"
@@ -126,6 +126,7 @@
icon_state = "[material.door_icon_base]open"
else
icon_state = material.door_icon_base
+ return ..()
/obj/structure/simple_door/attackby(obj/item/W as obj, mob/user as mob)
if(user.a_intent == INTENT_HARM)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
index d9e4a6b18fd1..b93d37331691 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
@@ -10,9 +10,6 @@
integrity = 100
integrity_max = 100
-/obj/structure/bed/nest/update_icon()
- return
-
/obj/structure/bed/nest/mob_resist_buckle(mob/M, semantic)
. = ..()
if(!.)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index d5b3423d2234..0df1a1ac8978 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -19,6 +19,8 @@
pass_flags_self = ATOM_PASS_TABLE | ATOM_PASS_OVERHEAD_THROW
buckle_dir = SOUTH
buckle_lying = 90
+ // todo: what a dumpster fire, unfuck / fully abstract this using new API,
+ // or get rid of it. wtf.
var/datum/prototype/material/material
var/datum/prototype/material/padding_material
var/base_icon = "bed"
@@ -40,9 +42,12 @@
// Reuse the cache/code from stools, todo maybe unify.
/obj/structure/bed/update_icon()
+ if(!material)
+ return ..()
+ cut_overlays()
+ . = ..()
// Prep icon.
icon_state = ""
- cut_overlays()
var/list/overlays_to_add = list()
// Base icon.
var/cache_key = "[base_icon]-[material.name]"
@@ -232,9 +237,6 @@
for(var/mob/M in old_buckled)
buckle_mob(M, BUCKLE_OP_FORCE)
-/obj/structure/bed/roller/update_icon()
- return
-
/obj/structure/bed/roller/attackby(obj/item/W as obj, mob/user as mob)
if(W.is_wrench() || istype(W,/obj/item/stack) || W.is_wirecutter())
return
@@ -375,8 +377,5 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "bed"
-/obj/structure/bed/alien/update_icon()
- return // Doesn't care about material or anything else.
-
/obj/structure/bed/alien/attackby(obj/item/W, mob/user)
return // No deconning.
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm
index 766492532319..30843bdca39f 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs_vr.dm
@@ -42,6 +42,7 @@
// Baystation12 chairs with their larger update_icons proc
/obj/structure/bed/chair/bay/update_icon()
+ // todo: this should call parent
// Strings.
desc = initial(desc)
if(padding_material)
diff --git a/code/game/objects/structures/tables/defense.dm b/code/game/objects/structures/tables/defense.dm
index 856ffe96aece..4c02505208ed 100644
--- a/code/game/objects/structures/tables/defense.dm
+++ b/code/game/objects/structures/tables/defense.dm
@@ -9,11 +9,11 @@
new carpeted_type(where)
else
if(prob(20))
- material_reinforcing.place_sheet(where, 1)
+ material_reinforcing?.place_sheet(where, 1)
else
material_reinforcing?.place_shard(where)
if(prob(20))
- material_base.place_sheet(where, 1)
+ material_base?.place_sheet(where, 1)
else
material_base?.place_shard(where)
new /obj/item/stack/rods(where, 2)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index e9574cada346..d22ccb6841c6 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -41,8 +41,9 @@
open = !open
update_icon()
-/obj/structure/toilet/update_icon()
+/obj/structure/toilet/update_icon_state()
icon_state = "toilet[open][cistern]"
+ return ..()
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
if(I.is_crowbar())
@@ -202,6 +203,7 @@
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
cut_overlays() //once it's been on for a while, in addition to handling the water overlay.
+ . = ..()
if(mymist)
qdel(mymist)
mymist = null
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index c5c1968e6ae9..9e55a20c5805 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -48,12 +48,13 @@
update_nearby_tiles()
/obj/structure/windoor_assembly/Destroy()
- density = 0
+ set_density(FALSE)
update_nearby_tiles()
- ..()
+ return ..()
-/obj/structure/windoor_assembly/update_icon()
+/obj/structure/windoor_assembly/update_icon_state()
icon_state = "[facing]_[secure]windoor_assembly[state]"
+ return ..()
/obj/structure/windoor_assembly/CanAllowThrough(atom/movable/mover, turf/target)
if(!(get_dir(loc, mover) & dir))
diff --git a/code/game/rendering/legacy/ability_screen_objects.dm b/code/game/rendering/legacy/ability_screen_objects.dm
index f0ed59a261ee..29e4f52a0af0 100644
--- a/code/game/rendering/legacy/ability_screen_objects.dm
+++ b/code/game/rendering/legacy/ability_screen_objects.dm
@@ -104,7 +104,9 @@
ability.maptext = "[ability.index]" // Slot number
i++
+// todo: what the fuck?
/atom/movable/screen/movable/ability_master/update_icon()
+ . = ..()
if(ability_objects.len)
invisibility = 0
else
@@ -249,6 +251,7 @@
// else
// icon_state = "[spell_base]_spell_ready"
cut_overlays()
+ . = ..()
icon_state = "[background_base_state]_spell_base"
add_overlay(ability_icon_state)
diff --git a/code/game/rendering/screen_legacy.dm b/code/game/rendering/screen_legacy.dm
index a73cce930e51..112f7981d4bb 100644
--- a/code/game/rendering/screen_legacy.dm
+++ b/code/game/rendering/screen_legacy.dm
@@ -118,6 +118,7 @@
/atom/movable/screen/zone_sel/update_icon()
cut_overlays()
+ . = ..()
add_overlay(image('icons/mob/zone_sel.dmi', "[selecting]"))
/// The UI Button to open the TGUI Crafting Menu
diff --git a/code/game/turfs/simulated/wall_types/shuttle.dm b/code/game/turfs/simulated/wall_types/shuttle.dm
index 347ccd03924b..fe61b5b91e95 100644
--- a/code/game/turfs/simulated/wall_types/shuttle.dm
+++ b/code/game/turfs/simulated/wall_types/shuttle.dm
@@ -167,6 +167,7 @@
update_icon()
/turf/simulated/shuttle/wall/voidcraft/update_icon()
+ . = ..()
if(stripe_color)
cut_overlays()
var/image/I = image(icon = src.icon, icon_state = "o_[icon_state]")
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 6cc9c57a6b7f..b8587accaec2 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -45,6 +45,7 @@
/obj/item/assembly_holder/update_icon()
cut_overlays()
+ . = ..()
if(a_left)
add_overlay("[a_left.icon_state]_left")
for(var/O in a_left.attached_overlays)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
index 2fb80cbb03af..687d758c207c 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
@@ -101,11 +101,12 @@ Thus, the two variables affect pump operation are set in New():
icon_state = "map_on-aux"
use_power = 1
-/obj/machinery/atmospherics/component/binary/pump/update_icon()
+/obj/machinery/atmospherics/component/binary/pump/update_icon_state()
if(!powered())
icon_state = "[base_icon]-off"
else
icon_state = "[use_power ? "[base_icon]-on" : "[base_icon]-off"]"
+ return ..()
/obj/machinery/atmospherics/component/binary/pump/update_underlays()
if(..())
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/valve.dm
index be7fc2a85e66..679bcc91a75e 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/valve.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/valve.dm
@@ -22,11 +22,11 @@
open = 1
icon_state = "map_valve1"
-/obj/machinery/atmospherics/valve/update_icon(animation)
- if(animation)
- flick("valve[src.open][!src.open]",src)
- else
- icon_state = "valve[open]"
+/obj/machinery/atmospherics/valve/update_icon_state()
+ // if(animation)
+ // flick("valve[src.open][!src.open]",src)
+ icon_state = "valve[open]"
+ return ..()
/obj/machinery/atmospherics/valve/update_underlays()
if(..())
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
index b5569a6e056f..1381d01cf4b5 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
@@ -13,8 +13,9 @@
use_power = USE_POWER_IDLE
icon_state = "map_on"
-/obj/machinery/atmospherics/component/binary/pump/high_power/update_icon()
+/obj/machinery/atmospherics/component/binary/pump/high_power/update_icon_state()
if(!powered())
icon_state = "off"
else
icon_state = "[use_power ? "on" : "off"]"
+ return ..()
diff --git a/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm b/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm
index 88d6a2837072..3402aca06c88 100644
--- a/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm
+++ b/code/modules/atmospherics/machinery/components/omni_devices/omni_base.dm
@@ -49,6 +49,7 @@
build_icons()
/obj/machinery/atmospherics/component/quaternary/update_icon()
+ . = ..()
if(machine_stat & NOPOWER)
set_overlays(overlays_off.Copy())
else if(error_check())
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
index 1af33310211e..8cd2766430db 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
@@ -20,7 +20,8 @@
//node 3 is the outlet, nodes 1 & 2 are intakes
-/obj/machinery/atmospherics/component/trinary/mixer/update_icon(var/safety = 0)
+/obj/machinery/atmospherics/component/trinary/mixer/update_icon()
+ . = ..()
if(tee)
icon_state = "t"
else if(mirrored)
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm b/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm
index 6df7bc5a6a39..f82149660609 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/tvalve.dm
@@ -27,8 +27,9 @@
icon_state = "map_tvalve1"
state = 1
-/obj/machinery/atmospherics/tvalve/update_icon(animation)
+/obj/machinery/atmospherics/tvalve/update_icon_state()
icon_state = "tvalve[mirrored ? "m" : ""][state]"
+ return ..()
/obj/machinery/atmospherics/tvalve/proc/animation()
flick("tvalve[mirrored ? "m" : ""][src.state][!src.state]",src)
diff --git a/code/modules/atmospherics/machinery/components/unary/gas_freezer.dm b/code/modules/atmospherics/machinery/components/unary/gas_freezer.dm
index e7c576661f2c..4a3b8d4dd0ad 100644
--- a/code/modules/atmospherics/machinery/components/unary/gas_freezer.dm
+++ b/code/modules/atmospherics/machinery/components/unary/gas_freezer.dm
@@ -46,7 +46,7 @@
if(node)
update_icon()
-/obj/machinery/atmospherics/component/unary/freezer/update_icon()
+/obj/machinery/atmospherics/component/unary/freezer/update_icon_state()
if(node)
if(use_power && cooling)
icon_state = "freezer_1"
@@ -54,7 +54,7 @@
icon_state = "freezer"
else
icon_state = "freezer_0"
- return
+ return ..()
/obj/machinery/atmospherics/component/unary/freezer/attack_ai(mob/user as mob)
ui_interact(user)
diff --git a/code/modules/atmospherics/machinery/components/unary/gas_heater.dm b/code/modules/atmospherics/machinery/components/unary/gas_heater.dm
index 022f5157f20b..dbf37cc78662 100644
--- a/code/modules/atmospherics/machinery/components/unary/gas_heater.dm
+++ b/code/modules/atmospherics/machinery/components/unary/gas_heater.dm
@@ -37,8 +37,7 @@
if(node)
update_icon()
-
-/obj/machinery/atmospherics/component/unary/heater/update_icon()
+/obj/machinery/atmospherics/component/unary/heater/update_icon_state()
if(node)
if(use_power && heating)
icon_state = "heater_1"
@@ -46,8 +45,7 @@
icon_state = "heater"
else
icon_state = "heater_0"
- return
-
+ return ..()
/obj/machinery/atmospherics/component/unary/heater/process(delta_time)
..()
diff --git a/code/modules/atmospherics/machinery/components/unary/generator_input.dm b/code/modules/atmospherics/machinery/components/unary/generator_input.dm
index f5b184e99dfe..d4fa86c80595 100644
--- a/code/modules/atmospherics/machinery/components/unary/generator_input.dm
+++ b/code/modules/atmospherics/machinery/components/unary/generator_input.dm
@@ -8,12 +8,12 @@
var/update_cycle
-/obj/machinery/atmospherics/component/unary/generator_input/update_icon()
+/obj/machinery/atmospherics/component/unary/generator_input/update_icon_state()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
- return
+ return ..()
/obj/machinery/atmospherics/component/unary/generator_input/proc/return_exchange_air()
return air_contents
diff --git a/code/modules/atmospherics/machinery/components/unary/heat_exchanger.dm b/code/modules/atmospherics/machinery/components/unary/heat_exchanger.dm
index 53a7aaf9d022..9a3279f6c2f1 100644
--- a/code/modules/atmospherics/machinery/components/unary/heat_exchanger.dm
+++ b/code/modules/atmospherics/machinery/components/unary/heat_exchanger.dm
@@ -16,11 +16,12 @@
/// * values above 1 currently do nothing
var/thermal_conduction_power = 1
-/obj/machinery/atmospherics/component/unary/heat_exchanger/update_icon()
+/obj/machinery/atmospherics/component/unary/heat_exchanger/update_icon_state()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
+ return ..()
/obj/machinery/atmospherics/component/unary/heat_exchanger/process()
..()
diff --git a/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm
index ca0498f07b66..77510a782b3f 100644
--- a/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm
+++ b/code/modules/atmospherics/machinery/components/unary/outlet_injector.dm
@@ -31,11 +31,12 @@
unregister_radio(src, frequency)
. = ..()
-/obj/machinery/atmospherics/component/unary/outlet_injector/update_icon()
+/obj/machinery/atmospherics/component/unary/outlet_injector/update_icon_state()
if(!powered())
icon_state = "off"
else
icon_state = "[use_power ? "on" : "off"]"
+ return ..()
/obj/machinery/atmospherics/component/unary/outlet_injector/update_underlays()
if(..())
diff --git a/code/modules/atmospherics/machinery/components/unary/oxygen_generator.dm b/code/modules/atmospherics/machinery/components/unary/oxygen_generator.dm
index d47883ae893d..fc787125d6e2 100644
--- a/code/modules/atmospherics/machinery/components/unary/oxygen_generator.dm
+++ b/code/modules/atmospherics/machinery/components/unary/oxygen_generator.dm
@@ -12,6 +12,7 @@
var/oxygen_content = 10
/obj/machinery/atmospherics/component/unary/oxygen_generator/update_icon()
+ . = ..()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
diff --git a/code/modules/atmospherics/machinery/components/unary/portables_connector.dm b/code/modules/atmospherics/machinery/components/unary/portables_connector.dm
index 525aeffd03eb..6115334e3a77 100644
--- a/code/modules/atmospherics/machinery/components/unary/portables_connector.dm
+++ b/code/modules/atmospherics/machinery/components/unary/portables_connector.dm
@@ -38,8 +38,9 @@
/obj/machinery/atmospherics/portables_connector/init_dir()
initialize_directions = dir
-/obj/machinery/atmospherics/portables_connector/update_icon()
+/obj/machinery/atmospherics/portables_connector/update_icon_state()
icon_state = "connector"
+ return ..()
/obj/machinery/atmospherics/portables_connector/update_underlays()
if(..())
diff --git a/code/modules/atmospherics/machinery/components/unary/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary/vent_pump.dm
index 2acade7a05d3..51a6c780bd8c 100644
--- a/code/modules/atmospherics/machinery/components/unary/vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/unary/vent_pump.dm
@@ -88,11 +88,13 @@
//QDEL_NULL(soundloop)
return ..()
-/obj/machinery/atmospherics/component/unary/vent_pump/update_icon(safety = 0)
+/obj/machinery/atmospherics/component/unary/vent_pump/update_icon()
+ cut_overlays()
+ . = ..()
+
if(!check_icon_cache())
return
- cut_overlays()
var/vent_icon = "vent"
diff --git a/code/modules/atmospherics/machinery/components/unary/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary/vent_scrubber.dm
index 2aa0c4a19f58..e0018fac2e08 100644
--- a/code/modules/atmospherics/machinery/components/unary/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary/vent_scrubber.dm
@@ -104,12 +104,12 @@
else if(isnum(key))
scrub_groups |= key
-/obj/machinery/atmospherics/component/unary/vent_scrubber/update_icon(safety = 0)
+/obj/machinery/atmospherics/component/unary/vent_scrubber/update_icon()
+ cut_overlays()
+ . = ..()
if(!check_icon_cache())
return
- cut_overlays()
-
var/scrubber_icon = "scrubber"
var/turf/T = get_turf(src)
@@ -428,12 +428,12 @@
/obj/machinery/atmospherics/component/unary/vent_scrubber/retro/on/welded
welded = 1
-/obj/machinery/atmospherics/component/unary/vent_scrubber/retro/update_icon(safety = 0)
+/obj/machinery/atmospherics/component/unary/vent_scrubber/retro/update_icon()
+ cut_overlays()
+ . = ..()
if(!check_icon_cache())
return
- cut_overlays()
-
var/scrubber_icon = "scrubber"
var/turf/T = get_turf(src)
diff --git a/code/modules/atmospherics/machinery/pipes/cap.dm b/code/modules/atmospherics/machinery/pipes/cap.dm
index 4bb605aa5eef..5c7b5b1cc8cf 100644
--- a/code/modules/atmospherics/machinery/pipes/cap.dm
+++ b/code/modules/atmospherics/machinery/pipes/cap.dm
@@ -45,7 +45,8 @@
if(node)
node.update_underlays()
-/obj/machinery/atmospherics/pipe/cap/update_icon(safety = 0)
+/obj/machinery/atmospherics/pipe/cap/update_icon()
+ . = ..()
if(!check_icon_cache())
return
diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm
index 81514c4bc765..f6999981c210 100644
--- a/code/modules/atmospherics/machinery/pipes/manifold.dm
+++ b/code/modules/atmospherics/machinery/pipes/manifold.dm
@@ -79,7 +79,8 @@
if(node3)
node3.update_underlays()
-/obj/machinery/atmospherics/pipe/manifold/update_icon(safety = 0)
+/obj/machinery/atmospherics/pipe/manifold/update_icon()
+ . = ..()
if(!check_icon_cache())
return
diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm
index bf2b52ea8d87..bf4626778a04 100644
--- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm
+++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm
@@ -79,7 +79,8 @@
if(node4)
node4.update_underlays()
-/obj/machinery/atmospherics/pipe/manifold4w/update_icon(safety = 0)
+/obj/machinery/atmospherics/pipe/manifold4w/update_icon()
+ . = ..()
if(!check_icon_cache())
return
diff --git a/code/modules/atmospherics/machinery/pipes/simple.dm b/code/modules/atmospherics/machinery/pipes/simple.dm
index 54e53ab5d648..f67ded35be67 100644
--- a/code/modules/atmospherics/machinery/pipes/simple.dm
+++ b/code/modules/atmospherics/machinery/pipes/simple.dm
@@ -98,7 +98,8 @@
if(node2)
node2.update_underlays()
-/obj/machinery/atmospherics/pipe/simple/update_icon(safety = 0)
+/obj/machinery/atmospherics/pipe/simple/update_icon()
+ . = ..()
if(!check_icon_cache())
return
diff --git a/code/modules/atmospherics/machinery/pipes/vent.dm b/code/modules/atmospherics/machinery/pipes/vent.dm
index 3510ddfb3d45..72600a4656a3 100644
--- a/code/modules/atmospherics/machinery/pipes/vent.dm
+++ b/code/modules/atmospherics/machinery/pipes/vent.dm
@@ -40,6 +40,7 @@
return list(node1)
/obj/machinery/atmospherics/pipe/vent/update_icon()
+ . = ..()
if(node1)
if(is_hidden_underfloor())
icon_state = "hintact"
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index be7402f1ffa5..1ad9bb188669 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -194,6 +194,7 @@
return 0
/obj/machinery/portable_atmospherics/canister/update_icon()
+ . = ..()
/*
update_flag
1 = holding
diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm
index 1e314a16cb8f..5073a2db087c 100644
--- a/code/modules/atmospherics/machinery/portable/pump.dm
+++ b/code/modules/atmospherics/machinery/portable/pump.dm
@@ -26,6 +26,7 @@
/obj/machinery/portable_atmospherics/powered/pump/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
if(on && cell && cell.charge)
@@ -39,7 +40,6 @@
if(connected_port)
overlays_to_add += "siphon-connector"
add_overlay(overlays_to_add)
- return
/obj/machinery/portable_atmospherics/powered/pump/emp_act(severity)
if(machine_stat & (BROKEN|NOPOWER))
@@ -207,7 +207,7 @@
/obj/machinery/portable_atmospherics/powered/pump/huge/update_icon()
cut_overlays()
-
+ . = ..()
if(on && !(machine_stat & (NOPOWER|BROKEN)))
icon_state = "siphon:1"
else
diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm
index 145bc59c2455..dd2f1c5f0243 100644
--- a/code/modules/atmospherics/machinery/portable/scrubber.dm
+++ b/code/modules/atmospherics/machinery/portable/scrubber.dm
@@ -139,6 +139,7 @@
/obj/machinery/portable_atmospherics/powered/scrubber/huge/update_icon()
cut_overlays()
+ . = ..()
if(on && !(machine_stat & (NOPOWER|BROKEN)))
icon_state = "scrubber:1"
diff --git a/code/modules/automata/__automata.dm b/code/modules/automata/automata.dm
similarity index 100%
rename from code/modules/automata/__automata.dm
rename to code/modules/automata/automata.dm
diff --git a/code/modules/automata/explosion.dm b/code/modules/automata/types/explosion.dm
similarity index 100%
rename from code/modules/automata/explosion.dm
rename to code/modules/automata/types/explosion.dm
diff --git a/code/modules/automata/sonar.dm b/code/modules/automata/types/sonar.dm
similarity index 100%
rename from code/modules/automata/sonar.dm
rename to code/modules/automata/types/sonar.dm
diff --git a/code/modules/automata/_wave.dm b/code/modules/automata/types/wave.dm
similarity index 100%
rename from code/modules/automata/_wave.dm
rename to code/modules/automata/types/wave.dm
diff --git a/code/modules/awaymissions/pamphlet.dm b/code/modules/awaymissions/pamphlet.dm
index 3170b322f928..f623f704b219 100644
--- a/code/modules/awaymissions/pamphlet.dm
+++ b/code/modules/awaymissions/pamphlet.dm
@@ -33,10 +33,6 @@
Though complete safety is assured, participants are advised to prepare for inhospitable \
environs."
-//we don't want the silly text overlay!
-/obj/item/paper/pamphlet/update_icon()
- return
-
/obj/item/paper/pamphlet/violent_video_games
name = "pamphlet - \'Violent Video Games and You\'"
desc = "A pamphlet encouraging the reader to maintain a balanced lifestyle and take care of their mental health, while still enjoying video games in a healthy way. You probably don't need this..."
diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm
index 505d6c155dab..63164294cd35 100644
--- a/code/modules/blob2/blobs/base_blob.dm
+++ b/code/modules/blob2/blobs/base_blob.dm
@@ -37,6 +37,7 @@ var/list/blobs = list()
return ..()
/obj/structure/blob/update_icon() //Updates color based on overmind color if we have an overmind.
+ . = ..()
if(overmind)
name = "[overmind.blob_type.name] [base_name]" // This is in update_icon() because inert blobs can turn into other blobs with magic if another blob core claims it with pulsing.
color = overmind.blob_type.color
diff --git a/code/modules/blob2/blobs/core.dm b/code/modules/blob2/blobs/core.dm
index 6a737206a128..8f799a5d1d8c 100644
--- a/code/modules/blob2/blobs/core.dm
+++ b/code/modules/blob2/blobs/core.dm
@@ -103,6 +103,7 @@ var/list/blob_cores = list()
/obj/structure/blob/core/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
color = null
var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob")
diff --git a/code/modules/blob2/blobs/node.dm b/code/modules/blob2/blobs/node.dm
index 7f39e3ad3afb..b4d4d8d45d72 100644
--- a/code/modules/blob2/blobs/node.dm
+++ b/code/modules/blob2/blobs/node.dm
@@ -22,6 +22,7 @@ var/list/blob_nodes = list()
/obj/structure/blob/node/update_icon()
cut_overlays()
+ . = ..()
var/list/overlays_to_add = list()
color = null
var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob")
diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm
index b44e788cc9d6..a3e5d4d52762 100644
--- a/code/modules/clothing/glasses/_glasses.dm
+++ b/code/modules/clothing/glasses/_glasses.dm
@@ -585,11 +585,12 @@ BLIND // can't see anything
update_worn_icon()
update_action_buttons()
-/obj/item/clothing/glasses/sunglasses/sechud/aviator/update_icon()
+/obj/item/clothing/glasses/sunglasses/sechud/aviator/update_icon_state()
if(on)
icon_state = initial(icon_state)
else
icon_state = inactive_icon_state
+ return ..()
/obj/item/clothing/glasses/sunglasses/sechud/aviator/prescription
name = "prescription security HUD aviators"
diff --git a/code/modules/mining/excavation/mineral_effect.dm b/code/modules/mining/excavation/mineral_effect.dm
deleted file mode 100644
index a39be6d0c3f5..000000000000
--- a/code/modules/mining/excavation/mineral_effect.dm
+++ /dev/null
@@ -1,31 +0,0 @@
-/obj/effect/mineral
- name = "mineral vein"
- icon = 'icons/obj/mining.dmi'
- desc = "Shiny."
- mouse_opacity = 0
- density = 0
- anchored = 1
- var/ore_key
- var/image/scanner_image
-
-// taemp check
-/obj/effect/mineral/New(loc, datum/ore/O)
- . = ..()
- ASSERT(O)
-
-/obj/effect/mineral/Initialize(mapload, datum/ore/M)
- . = ..()
- name = "[M.display_name] deposit"
- ore_key = M.name
- icon_state = "rock_[ore_key]"
- var/turf/T = get_turf(src)
- layer = T.layer+0.1
-
-/obj/effect/mineral/proc/get_scan_overlay()
- if(!scanner_image)
- var/datum/ore/O = GLOB.ore_data[ore_key]
- if(O)
- scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
- else
- to_chat(world, "No ore data for [src]!")
- return scanner_image
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index f0f201ae1238..fbce90f22a2b 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -12,8 +12,8 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral)
color = COLOR_ASTEROID_ROCK
smoothing_flags = SMOOTH_BITMASK
- smoothing_groups = (SMOOTH_GROUP_WALLS+SMOOTH_GROUP_MINERAL_WALLS)
- canSmoothWith = (SMOOTH_GROUP_WALLS + SMOOTH_GROUP_CLOSED_TURFS+SMOOTH_GROUP_MINERAL_WALLS)
+ smoothing_groups = (SMOOTH_GROUP_WALLS + SMOOTH_GROUP_MINERAL_WALLS)
+ canSmoothWith = (SMOOTH_GROUP_WALLS + SMOOTH_GROUP_CLOSED_TURFS + SMOOTH_GROUP_MINERAL_WALLS)
var/sand_icon = 'icons/turf/flooring/asteroid.dmi'
var/rock_side_icon_state = "rock_side"
@@ -137,6 +137,7 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
/turf/simulated/mineral/floor/icerock/airmix
initial_gas_mix = GAS_STRING_STP
+// todo: don't make this the same /turf path, it doesn't make semantic sense
/turf/simulated/mineral/proc/make_floor()
if(!density && !opacity)
return
@@ -149,9 +150,15 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
can_build_into_floor = TRUE
//SSplanets.addTurf(src) // Thank you Silicons, this was causing underground areas to have weather effects in them - Bloop
queue_zone_update()
- QUEUE_SMOOTH(src)
- QUEUE_SMOOTH_NEIGHBORS(src)
-
+ smoothing_groups = null
+ canSmoothWith = null
+ if(atom_flags & ATOM_INITIALIZED)
+ SETUP_SMOOTHING()
+ QUEUE_SMOOTH(src)
+ QUEUE_SMOOTH_NEIGHBORS(src)
+ update_icon()
+
+// todo: don't make this the same /turf path, it doesn't make semantic sense
/turf/simulated/mineral/proc/make_wall()
if(density && opacity)
return
@@ -164,8 +171,13 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
can_build_into_floor = FALSE
//SSplanets.removeTurf(src) // Thank you Silicons, this was causing underground areas to have weather effects in them as well -Bloop
queue_zone_update()
- QUEUE_SMOOTH(src)
- QUEUE_SMOOTH_NEIGHBORS(src)
+ smoothing_groups = (SMOOTH_GROUP_WALLS + SMOOTH_GROUP_MINERAL_WALLS)
+ canSmoothWith = (SMOOTH_GROUP_WALLS + SMOOTH_GROUP_CLOSED_TURFS + SMOOTH_GROUP_MINERAL_WALLS)
+ if(atom_flags & ATOM_INITIALIZED)
+ SETUP_SMOOTHING()
+ QUEUE_SMOOTH(src)
+ QUEUE_SMOOTH_NEIGHBORS(src)
+ update_icon()
/turf/simulated/mineral/Entered(atom/movable/M as mob|obj)
..()
@@ -181,10 +193,9 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
if(prob(20))
overlay_detail = "asteroid[rand(0,9)]"
if(mineral)
+ update_icon()
if(density)
MineralSpread()
- else
- UpdateMineral() // this'll work because we're initialized
/* custom smoothing code */
/turf/simulated/mineral/find_type_in_direction(direction)
@@ -193,9 +204,11 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
return NULLTURF_BORDER
return T.density? ADJ_FOUND : NO_ADJ_FOUND
-/turf/simulated/mineral/update_appearance(updates)
+/turf/simulated/mineral/update_icon()
+ cut_overlays()
. = ..()
+ var/list/to_add = list()
//We are a wall (why does this system work like this??)
// todo: refactor this shitheap because this is pants on fucking head awful
if(density)
@@ -207,51 +220,26 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
icon = 'icons/turf/walls/natural.dmi'
// icon_state = rock_icon_state
+ if(archaeo_overlay)
+ to_add += mutable_appearance(arch_icon, archaeo_overlay)
+ if(excav_overlay)
+ to_add += mutable_appearance(arch_icon, excav_overlay)
+ if(mineral)
+ to_add += image('icons/modules/mining/ore_overlay.dmi', "rock_[mineral.name]")
+
//We are a sand floor
else
name = "sand"
icon = sand_icon // So that way we can source from other files.
icon_state = sand_icon_state
-/turf/simulated/mineral/update_overlays()
- . = ..()
-
- //We are a wall (why does this system work like this??)
- // todo: refactor this shitheap because this is pants on fucking head awful
-
- if(density)
- /*
- // TODO: Replace these layers with defines. (I have some being added in another PR) @Zandario
- var/mutable_appearance/appearance
- if(!(smoothing_junction & NORTH_JUNCTION))
- appearance = mutable_appearance(icon, "[rock_side_icon_state]_s", layer = EDGE_LAYER)
- appearance.pixel_y = 32
- . += appearance
- if(!(smoothing_junction & SOUTH_JUNCTION))
- appearance = mutable_appearance(icon, "[rock_side_icon_state]_n", layer = EDGE_LAYER)
- appearance.pixel_y = -32
- . += appearance
- if(!(smoothing_junction & WEST_JUNCTION))
- appearance = mutable_appearance(icon, "[rock_side_icon_state]_e", layer = EDGE_LAYER)
- appearance.pixel_x = -32
- . += appearance
- if(!(smoothing_junction & EAST_JUNCTION))
- appearance = mutable_appearance(icon, "[rock_side_icon_state]_w", layer = EDGE_LAYER)
- appearance.pixel_x = 32
- . += appearance
- */
- if(archaeo_overlay)
- . += mutable_appearance(arch_icon, archaeo_overlay)
- if(excav_overlay)
- . += mutable_appearance(arch_icon, excav_overlay)
-
- //We are a sand floor
- else
if(sand_dug)
- . += mutable_appearance(icon, "dug_overlay")
+ to_add += mutable_appearance(icon, "dug_overlay")
if(overlay_detail)
- . += mutable_appearance('icons/turf/flooring/decals.dmi', overlay_detail)
+ to_add += mutable_appearance('icons/turf/flooring/decals.dmi', overlay_detail)
+ if(length(to_add))
+ add_overlay(to_add)
/turf/simulated/mineral/legacy_ex_act(severity)
@@ -317,22 +305,15 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
M.selected.action(src)
/turf/simulated/mineral/proc/MineralSpread()
- UpdateMineral()
if(mineral && mineral.spread)
for(var/trydir in GLOB.cardinal)
if(prob(mineral.spread_chance))
var/turf/simulated/mineral/target_turf = get_step(src, trydir)
if(istype(target_turf) && target_turf.density && !target_turf.mineral)
target_turf.mineral = mineral
+ target_turf.update_icon()
target_turf.MineralSpread()
-/turf/simulated/mineral/proc/UpdateMineral(update_neighbors)
- if(!(atom_flags & ATOM_INITIALIZED))
- return // /Initialize() will handle us
- clear_ore_effects()
- if(mineral && density)
- new /obj/effect/mineral(src, mineral)
-
//Not even going to touch this pile of spaghetti
/turf/simulated/mineral/attackby(obj/item/W as obj, mob/user as mob)
@@ -600,15 +581,10 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
if(updateIcon)
update_appearance()
-/turf/simulated/mineral/proc/clear_ore_effects()
- for(var/obj/effect/mineral/M in contents)
- qdel(M)
-
-/turf/simulated/mineral/proc/DropMineral(var/amount)
+/turf/simulated/mineral/proc/DropMineral(amount)
if(!mineral)
return
- clear_ore_effects()
- var/obj/item/stack/ore/O = new mineral.ore(src,amount)
+ var/obj/item/stack/ore/O = new mineral.ore(src, amount)
return O
/turf/simulated/mineral/proc/excavate_turf()
@@ -629,7 +605,6 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
GetDrilled(0)
else
GetDrilled(1)
- return
/turf/simulated/mineral/proc/GetDrilled(var/artifact_fail = 0)
@@ -643,6 +618,7 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
if (mineral && mineral.result_amount)
//if the turf has already been excavated, some of it's ore has been removed
DropMineral(mineral.result_amount - mined_ore)
+ mineral = null
//destroyed artifacts have weird, unpleasant effects
//make sure to destroy them before changing the turf though
@@ -741,4 +717,4 @@ CREATE_STANDARD_TURFS(/turf/simulated/mineral/icerock/floor/ignore_cavegen)
if(mineral_name && (mineral_name in GLOB.ore_data))
mineral = GLOB.ore_data[mineral_name]
if(atom_flags & ATOM_INITIALIZED)
- UpdateMineral()
+ update_icon()
diff --git a/code/modules/paperwork/paper/paper.dm b/code/modules/paperwork/paper/paper.dm
index f4ea2a42f554..be64ad1bb817 100644
--- a/code/modules/paperwork/paper/paper.dm
+++ b/code/modules/paperwork/paper/paper.dm
@@ -74,12 +74,11 @@
updateinfolinks()
/obj/item/paper/update_icon()
- if(icon_state == "paper_talisman")
- return
+ cut_overlays()
+ . = ..()
if(info)
- icon_state = "paper_words"
- return
- icon_state = "paper"
+ // todo: be like, `-content` or something not `_words`
+ add_overlay("[icon_state]_words")
/obj/item/paper/proc/update_space(var/new_text)
if(!new_text)
diff --git a/code/modules/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm
index aa9d20d5cc82..298646947306 100644
--- a/code/modules/rogueminer_vr/zonemaster.dm
+++ b/code/modules/rogueminer_vr/zonemaster.dm
@@ -336,13 +336,13 @@
// Ore-bearing rocks that were mined
for(var/turf/T in mineral_rocks)
- var/has_minerals = 0
- for(var/atom/I in T.contents)
- if(istype(I,/obj/effect/mineral))
- has_minerals++
- break
- if(has_minerals == 0)
- tally += RM_DIFF_VALUE_ORE
+ if(!istype(T, /turf/simulated/mineral))
+ continue
+ var/turf/simulated/mineral/mine_turf = T
+ if(mine_turf.mineral)
+ continue
+ // no mineral..
+ tally += RM_DIFF_VALUE_ORE
mineral_rocks.Cut() // For good measure, to prevent rescoring.
diff --git a/icons/modules/mining/ore_overlay.dmi b/icons/modules/mining/ore_overlay.dmi
new file mode 100644
index 000000000000..0ed15d389802
Binary files /dev/null and b/icons/modules/mining/ore_overlay.dmi differ
diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi
index 49db5abafc5b..6b24c51d56a0 100644
Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ
diff --git a/maps/sectors/surt/levels/surt_west.dmm b/maps/sectors/surt/levels/surt_west.dmm
index 2c7c480c7d07..b49cb8440f0f 100644
--- a/maps/sectors/surt/levels/surt_west.dmm
+++ b/maps/sectors/surt/levels/surt_west.dmm
@@ -1465,7 +1465,7 @@
req_one_access = list(48);
name = "Mining Storage"
},
-/obj/item/clothing/glasses/material,
+/obj/item/clothing/glasses/meson,
/turf/simulated/floor/tiled,
/area/sector/surt/mining_base/common)
"Hr" = (
@@ -2179,7 +2179,7 @@
req_one_access = list(48);
name = "Mining Storage"
},
-/obj/item/clothing/glasses/material,
+/obj/item/clothing/glasses/meson,
/turf/simulated/floor/tiled,
/area/sector/surt/mining_base/common)
"Wy" = (