diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
index 86a87223ebc..896ad49eaca 100644
--- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
@@ -64,7 +64,7 @@
if(!check_icon_cache())
return
- overlays.Cut()
+ cut_overlays()
var/vent_icon = "vent"
@@ -80,7 +80,7 @@
else
vent_icon += "[use_power ? "[pump_direction ? "out" : "in"]" : "off"]"
- overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
+ add_overlay(icon_manager.get_atmos_icon("device", , , vent_icon))
/obj/machinery/atmospherics/binary/dp_vent_pump/update_underlays()
if(..())
diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
index 7ef1858b2f5..c111b36b0a6 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
@@ -73,15 +73,15 @@
network2.update = 1
/obj/machinery/atmospherics/pipeturbine/update_icon()
- overlays.Cut()
+ cut_overlays()
if (dP > 10)
- overlays += image('icons/obj/pipeturbine.dmi', "moto-turb")
+ add_overlay(image('icons/obj/pipeturbine.dmi', "moto-turb"))
if (kin_energy > 100000)
- overlays += image('icons/obj/pipeturbine.dmi', "low-turb")
+ add_overlay(image('icons/obj/pipeturbine.dmi', "low-turb"))
if (kin_energy > 500000)
- overlays += image('icons/obj/pipeturbine.dmi', "med-turb")
+ add_overlay(image('icons/obj/pipeturbine.dmi', "med-turb"))
if (kin_energy > 1000000)
- overlays += image('icons/obj/pipeturbine.dmi', "hi-turb")
+ add_overlay(image('icons/obj/pipeturbine.dmi', "hi-turb"))
/obj/machinery/atmospherics/pipeturbine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index 792d53d65d9..488855a71f6 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -19,6 +19,7 @@
power_rating = 30000 //7500 W ~ 10 HP //VOREStation Edit - 30000 W
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY //connects to regular and supply pipes
+ blocks_emissive = FALSE
var/area/initial_loc
level = 1
@@ -141,7 +142,7 @@
if(!check_icon_cache())
return
- overlays.Cut()
+ cut_overlays()
var/vent_icon = "vent"
@@ -159,7 +160,7 @@
else
vent_icon += "[pump_direction ? "out" : "in"]"
- overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
+ add_overlay(icon_manager.get_atmos_icon("device", , , vent_icon))
/obj/machinery/atmospherics/unary/vent_pump/update_underlays()
if(..())
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 1443b296d0e..515cd37e7f4 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -54,7 +54,7 @@
if(!check_icon_cache())
return
- overlays.Cut()
+ cut_overlays()
var/scrubber_icon = "scrubber"
@@ -67,7 +67,7 @@
else
scrubber_icon += "[use_power ? "[scrubbing ? "on" : "in"]" : "off"]"
- overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon)
+ add_overlay(icon_manager.get_atmos_icon("device", , , scrubber_icon))
/obj/machinery/atmospherics/unary/vent_scrubber/update_underlays()
if(..())
diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm
index 2a63bb3a20a..72c9e829917 100644
--- a/code/ATMOSPHERICS/pipes/cap.dm
+++ b/code/ATMOSPHERICS/pipes/cap.dm
@@ -53,9 +53,9 @@
alpha = 255
- overlays.Cut()
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap[icon_connect_type]")
-
+ cut_overlays()
+ add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "cap[icon_connect_type]"))
+
/obj/machinery/atmospherics/pipe/cap/atmos_init()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
if (can_be_node(target, 1))
diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm
index a17f78e50df..a02f0e66de0 100644
--- a/code/ATMOSPHERICS/pipes/manifold.dm
+++ b/code/ATMOSPHERICS/pipes/manifold.dm
@@ -102,9 +102,9 @@
alpha = 255
- overlays.Cut()
- overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
- overlays += icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)
+ cut_overlays()
+ add_overlay(icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type))
+ add_overlay(icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type))
underlays.Cut()
var/turf/T = get_turf(src)
diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm
index 7273ac5288e..eac8494a65d 100644
--- a/code/ATMOSPHERICS/pipes/manifold4w.dm
+++ b/code/ATMOSPHERICS/pipes/manifold4w.dm
@@ -102,9 +102,9 @@
alpha = 255
- overlays.Cut()
- overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
- overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)
+ cut_overlays()
+ add_overlay(icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type))
+ add_overlay(icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type))
underlays.Cut()
var/turf/T = get_turf(src)
diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm
index e0f6f7d9516..1f427fb151d 100644
--- a/code/ATMOSPHERICS/pipes/simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple.dm
@@ -117,12 +117,12 @@
alpha = 255
- overlays.Cut()
+ cut_overlays()
if(node1 && node2)
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
+ add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]"))
else
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")
+ add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]"))
/obj/machinery/atmospherics/pipe/simple/update_underlays()
return
diff --git a/code/ATMOSPHERICS/pipes/universal.dm b/code/ATMOSPHERICS/pipes/universal.dm
index a72ef219f78..e1df93ee673 100644
--- a/code/ATMOSPHERICS/pipes/universal.dm
+++ b/code/ATMOSPHERICS/pipes/universal.dm
@@ -16,8 +16,8 @@
alpha = 255
- overlays.Cut()
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
+ cut_overlays()
+ add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "universal"))
underlays.Cut()
if (node1)
@@ -54,8 +54,8 @@
alpha = 255
- overlays.Cut()
- overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
+ cut_overlays()
+ add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "universal"))
underlays.Cut()
if (node1)
diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm
index be103e7a55f..7f7b5752469 100644
--- a/code/ZAS/Controller.dm
+++ b/code/ZAS/Controller.dm
@@ -170,7 +170,7 @@ Class Procs:
if(T.needs_air_update) return
tiles_to_update |= T
#ifdef ZASDBG
- T.overlays += mark
+ T.add_overlay(mark)
#endif
T.needs_air_update = 1
diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm
index 6f0a67fd3eb..5aa2c73df20 100644
--- a/code/ZAS/Debug.dm
+++ b/code/ZAS/Debug.dm
@@ -12,8 +12,8 @@ var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark")
/turf/var/tmp/dbg_img
/turf/proc/dbg(image/img, d = 0)
if(d > 0) img.dir = d
- overlays -= dbg_img
- overlays += img
+ cut_overlay(dbg_img)
+ add_overlay(img)
dbg_img = img
proc/soft_assert(thing,fail)
diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm
index e12beb900ff..4017d0a74a7 100644
--- a/code/ZAS/Phoron.dm
+++ b/code/ZAS/Phoron.dm
@@ -63,11 +63,11 @@ obj/var/contaminated = 0
else
if(!contaminated)
contaminated = 1
- overlays += contamination_overlay
+ add_overlay(contamination_overlay)
/obj/item/proc/decontaminate()
contaminated = 0
- overlays -= contamination_overlay
+ cut_overlay(contamination_overlay)
/mob/proc/contaminate()
diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm
index 23a29367c0b..cb500b4fe3a 100644
--- a/code/_onclick/hud/ability_screen_objects.dm
+++ b/code/_onclick/hud/ability_screen_objects.dm
@@ -218,7 +218,7 @@
// if((last_charge == spell.charge_counter || !handle_icon_updates) && !forced_update)
// return //nothing to see here
-// overlays -= spell.hud_state
+// cut_overlay(spell.hud_state)
// if(spell.charge_type == Sp_RECHARGE || spell.charge_type == Sp_CHARGES)
// if(spell.charge_counter < spell.charge_max)
@@ -228,27 +228,27 @@
// partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_max))
// overlays += partial_charge
// if(last_charged_icon)
-// overlays -= last_charged_icon
+// cut_overlay(last_charged_icon)
// last_charged_icon = partial_charge
// else if(last_charged_icon)
-// overlays -= last_charged_icon
+// cut_overlay(last_charged_icon)
// last_charged_icon = null
// else
// icon_state = "[spell_base]_spell_ready"
// if(last_charged_icon)
-// overlays -= last_charged_icon
+// cut_overlay(last_charged_icon)
// else
// icon_state = "[spell_base]_spell_ready"
- overlays.Cut()
+ cut_overlays()
icon_state = "[background_base_state]_spell_base"
overlays += ability_icon_state
// last_charge = spell.charge_counter
-// overlays -= "silence"
+// cut_overlay("silence")
// if(spell.silenced)
-// overlays += "silence"
+// add_overlay("silence")
/obj/screen/ability/Click()
if(!usr)
diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm
index 160413135b0..d725fb8064e 100644
--- a/code/_onclick/hud/action.dm
+++ b/code/_onclick/hud/action.dm
@@ -134,7 +134,7 @@
icon = owner.button_icon
icon_state = owner.background_icon_state
- overlays.Cut()
+ cut_overlays()
var/image/img
if(owner.action_type == AB_ITEM && owner.target)
var/obj/item/I = owner.target
@@ -143,7 +143,7 @@
img = image(owner.button_icon,src,owner.button_icon_state)
img.pixel_x = 0
img.pixel_y = 0
- overlays += img
+ add_overlay(img)
if(!owner.IsAvailable())
color = rgb(128,0,0,128)
@@ -178,9 +178,9 @@
return
/obj/screen/movable/action_button/hide_toggle/UpdateIcon()
- overlays.Cut()
+ cut_overlays()
var/image/img = image(icon,src,hidden?"show":"hide")
- overlays += img
+ add_overlay(img)
return
//This is the proc used to update all the action buttons. Properly defined in /mob/living/
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 22e8e459fc5..45c94e9fcfd 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -291,8 +291,8 @@
zone_sel.icon = HUD.ui_style
zone_sel.color = HUD.ui_color
zone_sel.alpha = HUD.ui_alpha
- zone_sel.overlays.Cut()
- zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
+ zone_sel.cut_overlays()
+ zone_sel.add_overlay(image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]"))
hud_elements |= zone_sel
//Handle the gun settings buttons
diff --git a/code/_onclick/hud/picture_in_picture.dm b/code/_onclick/hud/picture_in_picture.dm
index 3df659a6873..4f9450db289 100644
--- a/code/_onclick/hud/picture_in_picture.dm
+++ b/code/_onclick/hud/picture_in_picture.dm
@@ -139,7 +139,7 @@
y_off = -height * world.icon_size - 16
- overlays.Cut()
+ cut_overlays()
add_background()
add_buttons()
if(do_refresh)
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 95ff6e1104f..22ea9bf5628 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -141,8 +141,8 @@ var/obj/screen/robot_inventory
zone_sel = new /obj/screen/zone_sel()
zone_sel.icon = HUD.ui_style
zone_sel.alpha = HUD.ui_alpha
- zone_sel.overlays.Cut()
- zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
+ zone_sel.cut_overlays()
+ zone_sel.add_overlay(image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]"))
//Handle the gun settings buttons
gun_setting_icon = new /obj/screen/gun/mode(null)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 8ba8059def1..257760845e6 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -602,11 +602,11 @@
if(!handcuff_overlay)
var/state = (hud.l_hand_hud_object == src) ? "l_hand_hud_handcuffs" : "r_hand_hud_handcuffs"
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
- overlays.Cut()
+ cut_overlays()
if(hud.mymob && iscarbon(hud.mymob))
var/mob/living/carbon/C = hud.mymob
if(C.handcuffed)
- overlays |= handcuff_overlay
+ add_overlay(handcuff_overlay)
// PIP stuff
/obj/screen/component_button
diff --git a/code/_onclick/hud/spell_screen_objects.dm b/code/_onclick/hud/spell_screen_objects.dm
index 92d9487401b..1215218ebe1 100644
--- a/code/_onclick/hud/spell_screen_objects.dm
+++ b/code/_onclick/hud/spell_screen_objects.dm
@@ -181,7 +181,7 @@
if((last_charge == spell.charge_counter || !handle_icon_updates) && !forced_update)
return //nothing to see here
- overlays -= spell.hud_state
+ cut_overlay(spell.hud_state)
if(spell.charge_type == Sp_RECHARGE || spell.charge_type == Sp_CHARGES)
if(spell.charge_counter < spell.charge_max)
@@ -191,23 +191,23 @@
partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_max))
overlays += partial_charge
if(last_charged_icon)
- overlays -= last_charged_icon
+ cut_overlay(last_charged_icon)
last_charged_icon = partial_charge
else if(last_charged_icon)
- overlays -= last_charged_icon
+ cut_overlay(last_charged_icon)
last_charged_icon = null
else
icon_state = "[spell_base]_spell_ready"
if(last_charged_icon)
- overlays -= last_charged_icon
+ cut_overlay(last_charged_icon)
else
icon_state = "[spell_base]_spell_ready"
- overlays += spell.hud_state
+ add_overlay(spell.hud_state)
last_charge = spell.charge_counter
- overlays -= "silence"
+ cut_overlay("silence")
if(spell.silenced)
overlays += "silence"
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 4398dbf7e60..049db78c3af 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -163,7 +163,7 @@ var/const/tk_maxrange = 15
return
/obj/item/tk_grab/update_icon()
- overlays.Cut()
+ cut_overlays()
if(focus && focus.icon && focus.icon_state)
- overlays += icon(focus.icon,focus.icon_state)
+ add_overlay(icon(focus.icon, focus.icon_state))
return
diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm
index 548e0bdb5c4..5334586dd06 100644
--- a/code/controllers/subsystems/air.dm
+++ b/code/controllers/subsystems/air.dm
@@ -124,7 +124,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
T.post_update_air_properties()
T.needs_air_update = 0
#ifdef ZASDBG
- T.overlays -= mark
+ T.cut_overlay(mark)
#endif
if(MC_TICK_CHECK)
return
@@ -139,7 +139,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
T.post_update_air_properties()
T.needs_air_update = 0
#ifdef ZASDBG
- T.overlays -= mark
+ T.cut_overlay(mark)
#endif
if(MC_TICK_CHECK)
return
diff --git a/code/controllers/subsystems/skybox.dm b/code/controllers/subsystems/skybox.dm
index 6befac0b605..05053fbb0f7 100644
--- a/code/controllers/subsystems/skybox.dm
+++ b/code/controllers/subsystems/skybox.dm
@@ -37,7 +37,8 @@ SUBSYSTEM_DEF(skybox)
im.alpha = 128 //80
im.blend_mode = BLEND_ADD
- MA.overlays = list(im)
+ MA.cut_overlays()
+ MA.add_overlay(im)
dust_cache["[i]"] = MA
@@ -48,7 +49,8 @@ SUBSYSTEM_DEF(skybox)
var/image/im = image('icons/turf/space_dust_transit.dmi', "speedspace_ns_[i]")
im.plane = DUST_PLANE
im.blend_mode = BLEND_ADD
- MA.overlays = list(im)
+ MA.cut_overlays()
+ MA.add_overlay(im)
speedspace_cache["NS_[i]"] = MA
// EAST/WEST
MA = new(normal_space)
@@ -56,7 +58,8 @@ SUBSYSTEM_DEF(skybox)
im.plane = DUST_PLANE
im.blend_mode = BLEND_ADD
- MA.overlays = list(im)
+ MA.cut_overlays()
+ MA.add_overlay(im)
speedspace_cache["EW_[i]"] = MA
diff --git a/code/game/gamemodes/changeling/powers/lesser_form.dm b/code/game/gamemodes/changeling/powers/lesser_form.dm
index d7b9cb0489c..ef82337d521 100644
--- a/code/game/gamemodes/changeling/powers/lesser_form.dm
+++ b/code/game/gamemodes/changeling/powers/lesser_form.dm
@@ -67,7 +67,7 @@
C.transforming = 1
C.canmove = 0
C.icon = null
- C.overlays.Cut()
+ C.cut_overlays()
C.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
animation.icon_state = "blank"
diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm
index 8b4e1f27676..a7cf71b8f0b 100644
--- a/code/game/gamemodes/technomancer/instability.dm
+++ b/code/game/gamemodes/technomancer/instability.dm
@@ -90,9 +90,9 @@
last_instability_event = world.time
spawn(1)
var/image/instability_flash = image('icons/obj/spells.dmi',"instability")
- overlays |= instability_flash
+ add_overlay(instability_flash)
sleep(4)
- overlays.Remove(instability_flash)
+ cut_overlay(instability_flash)
qdel(instability_flash)
/mob/living/silicon/instability_effects()
diff --git a/code/game/gamemodes/technomancer/spell_objs.dm b/code/game/gamemodes/technomancer/spell_objs.dm
index 2c80ac39fd9..a9eb862ee93 100644
--- a/code/game/gamemodes/technomancer/spell_objs.dm
+++ b/code/game/gamemodes/technomancer/spell_objs.dm
@@ -168,9 +168,9 @@
/obj/item/weapon/spell/update_icon()
if(toggled)
var/image/new_overlay = image('icons/obj/spells.dmi',"toggled")
- overlays |= new_overlay
+ add_overlay(new_overlay)
else
- overlays.Cut()
+ cut_overlays()
..()
// Proc: run_checks()
diff --git a/code/game/gamemodes/technomancer/spells/illusion.dm b/code/game/gamemodes/technomancer/spells/illusion.dm
index 2d33f6e9260..5d626f7c479 100644
--- a/code/game/gamemodes/technomancer/spells/illusion.dm
+++ b/code/game/gamemodes/technomancer/spells/illusion.dm
@@ -65,11 +65,11 @@
// Makes a tiny overlay of the thing the player has copied, so they can easily tell what they currently have.
/obj/item/weapon/spell/illusion/update_icon()
- overlays.Cut()
+ cut_overlays()
if(copied)
var/image/temp_image = image(copied)
var/matrix/M = matrix()
M.Scale(0.5, 0.5)
temp_image.transform = M
// temp_image.pixel_y = 8
- src.overlays.Add(temp_image)
+ add_overlay(temp_image)
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 2d5e39b1b71..8895844b008 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -141,20 +141,20 @@ update_flag
if(check_change()) //Returns 1 if no change needed to icons.
return
- src.overlays = 0
+ cut_overlays()
if(update_flag & 1)
- overlays += "can-open"
+ add_overlay("can-open")
if(update_flag & 2)
- overlays += "can-connector"
+ add_overlay("can-connector")
if(update_flag & 4)
- overlays += "can-o0"
+ add_overlay("can-o0")
if(update_flag & 8)
- overlays += "can-o1"
+ add_overlay("can-o1")
else if(update_flag & 16)
- overlays += "can-o2"
+ add_overlay("can-o2")
else if(update_flag & 32)
- overlays += "can-o3"
+ add_overlay("can-o3")
return
/obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm
index 74e48046613..f97a66bd78b 100644
--- a/code/game/machinery/atmoalter/pump.dm
+++ b/code/game/machinery/atmoalter/pump.dm
@@ -29,7 +29,7 @@
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
/obj/machinery/portable_atmospherics/powered/pump/update_icon()
- src.overlays = 0
+ cut_overlays()
if(on && cell && cell.charge)
icon_state = "psiphon:1"
@@ -37,10 +37,10 @@
icon_state = "psiphon:0"
if(holding)
- overlays += "siphon-open"
+ add_overlay("siphon-open")
if(connected_port)
- overlays += "siphon-connector"
+ add_overlay("siphon-connector")
return
diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index 1f9d1908003..f154e64d896 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -36,7 +36,7 @@
..(severity)
/obj/machinery/portable_atmospherics/powered/scrubber/update_icon()
- src.overlays = 0
+ cut_overlays()
if(on && cell && cell.charge)
icon_state = "pscrubber:1"
@@ -44,10 +44,10 @@
icon_state = "pscrubber:0"
if(holding)
- overlays += "scrubber-open"
+ add_overlay("scrubber-open")
if(connected_port)
- overlays += "scrubber-connector"
+ add_overlay("scrubber-connector")
return
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 80fba122b42..8fa51418392 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -241,12 +241,12 @@
return FALSE
/obj/machinery/autolathe/update_icon()
- overlays.Cut()
+ cut_overlays()
icon_state = initial(icon_state)
if(panel_open)
- overlays.Add(image(icon, "[icon_state]_panel"))
+ add_overlay("[icon_state]_panel")
if(stat & NOPOWER)
return
if(busy)
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index 2b768fb3e64..4cfdb16dd06 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -27,12 +27,12 @@
if(chargelevel != newlevel)
- overlays.Cut()
- overlays += "ccharger-o[newlevel]"
+ cut_overlays()
+ add_overlay("ccharger-o[newlevel]")
chargelevel = newlevel
else
- overlays.Cut()
+ cut_overlays()
/obj/machinery/cell_charger/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 97558066e96..6288de28b24 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -13,6 +13,8 @@
power_channel = ENVIRON
explosion_resistance = 10
+ blocks_emissive = EMISSIVE_BLOCK_GENERIC // Not quite as nice as /tg/'s custom masks. We should make those sometime
+
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
var/hackProof = 0 // if 1, this door can't be hacked by the AI
var/electrified_until = 0 //World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
@@ -791,35 +793,34 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/update_icon()
- if(overlays) overlays.Cut()
+ cut_overlays()
if(density)
if(locked && lights && src.arePowerSystemsOn())
icon_state = "door_locked"
else
icon_state = "door_closed"
if(p_open || welded)
- overlays = list()
if(p_open)
- overlays += image(icon, "panel_open")
+ add_overlay("panel_open")
if (!(stat & NOPOWER))
if(stat & BROKEN)
- overlays += image(icon, "sparks_broken")
+ add_overlay("sparks_broken")
else if (health < maxhealth * 3/4)
- overlays += image(icon, "sparks_damaged")
+ add_overlay("sparks_damaged")
if(welded)
- overlays += image(icon, "welded")
+ add_overlay("welded")
else if (health < maxhealth * 3/4 && !(stat & NOPOWER))
- overlays += image(icon, "sparks_damaged")
+ add_overlay("sparks_damaged")
else
icon_state = "door_open"
if((stat & BROKEN) && !(stat & NOPOWER))
- overlays += image(icon, "sparks_open")
+ add_overlay("sparks_open")
return
/obj/machinery/door/airlock/do_animate(animation)
switch(animation)
if("opening")
- if(overlays) overlays.Cut()
+ cut_overlay()
if(p_open)
spawn(2) // The only work around that works. Downside is that the door will be gone for a millisecond.
flick("o_door_opening", src) //can not use flick due to BYOND bug updating overlays right before flicking
@@ -828,7 +829,7 @@ About the new airlock wires panel:
flick("door_opening", src)//[stat ? "_stat":]
update_icon()
if("closing")
- if(overlays) overlays.Cut()
+ cut_overlay()
if(p_open)
spawn(2)
flick("o_door_closing", src)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 6cae2617fd4..e9585aa8121 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -444,29 +444,29 @@
/obj/machinery/door/firedoor/update_icon()
- overlays.Cut()
+ cut_overlays()
if(density)
icon_state = "door_closed"
if(prying)
icon_state = "prying_closed"
if(hatch_open)
- overlays += "hatch"
+ add_overlay("hatch")
if(blocked)
- overlays += "welded"
+ add_overlay("welded")
if(pdiff_alert)
- overlays += "palert"
+ add_overlay("palert")
if(dir_alerts)
for(var/d=1;d<=4;d++)
var/cdir = cardinal[d]
for(var/i=1;i<=ALERT_STATES.len;i++)
if(dir_alerts[d] & (1<<(i-1)))
- overlays += new/icon(icon,"alert_[ALERT_STATES[i]]", dir=cdir)
+ add_overlay(new/icon(icon,"alert_[ALERT_STATES[i]]", dir=cdir))
else
icon_state = "door_open"
if(prying)
icon_state = "prying_open"
if(blocked)
- overlays += "welded_open"
+ add_overlay("welded_open")
return
//These are playing merry hell on ZAS. Sorry fellas :(
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 84aa62b1557..e4b961eebe3 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -16,7 +16,7 @@
..()
/obj/machinery/floodlight/update_icon()
- overlays.Cut()
+ cut_overlays()
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
/obj/machinery/floodlight/process()
diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm
index 0a3f13fedcc..b1211f1fd2e 100644
--- a/code/game/machinery/floor_light.dm
+++ b/code/game/machinery/floor_light.dm
@@ -103,7 +103,7 @@ var/list/floor_light_cache = list()
update_icon()
/obj/machinery/floor_light/update_icon()
- overlays.Cut()
+ cut_overlays()
if(use_power && !broken())
if(isnull(damaged))
var/cache_key = "floorlight-[default_light_colour]"
@@ -112,7 +112,7 @@ var/list/floor_light_cache = list()
I.color = default_light_colour
I.layer = layer+0.001
floor_light_cache[cache_key] = I
- overlays |= floor_light_cache[cache_key]
+ add_overlay(floor_light_cache[cache_key])
else
if(damaged == 0) //Needs init.
damaged = rand(1,4)
@@ -122,7 +122,7 @@ var/list/floor_light_cache = list()
I.color = default_light_colour
I.layer = layer+0.001
floor_light_cache[cache_key] = I
- overlays |= floor_light_cache[cache_key]
+ add_overlay(floor_light_cache[cache_key])
/obj/machinery/floor_light/proc/broken()
return (stat & (BROKEN|NOPOWER))
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 0f57b816d06..5a63fd03beb 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -16,7 +16,7 @@
else
icon_state = ""
- overlays = null
+ cut_overlays()
if(beaker)
var/datum/reagents/reagents = beaker.reagents
@@ -34,7 +34,7 @@
if(91 to INFINITY) filling.icon_state = "reagent100"
filling.icon += reagents.get_color()
- overlays += filling
+ add_overlay(filling)
/obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
..()
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index c8683e0d00c..06323a4f066 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -140,7 +140,7 @@
update_icon()
/obj/machinery/media/jukebox/update_icon()
- overlays.Cut()
+ cut_overlays()
if(stat & (NOPOWER|BROKEN) || !anchored)
if(stat & BROKEN)
icon_state = "[state_base]-broken"
@@ -150,11 +150,11 @@
icon_state = state_base
if(playing)
if(emagged)
- overlays += "[state_base]-emagged"
+ add_overlay("[state_base]-emagged")
else
- overlays += "[state_base]-running"
+ add_overlay("[state_base]-running")
if (panel_open)
- overlays += "panel_open"
+ add_overlay("panel_open")
/obj/machinery/media/jukebox/interact(mob/user)
if(inoperable())
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index df9547692e2..8cc0c56e5fe 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -186,21 +186,20 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
if(!ispowered || isbroken)
icon_state = "newscaster_off"
if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite.
- overlays.Cut()
- overlays += image(icon, "crack3")
+ cut_overlays()
+ add_overlay("crack3")
return
- overlays.Cut() //reset overlays
-
+ 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
if(alert) //new message alert overlay
- overlays += "newscaster_alert"
+ add_overlay("newscaster_alert")
if(hitstaken > 0) //Cosmetic damage overlay
- overlays += image(icon, "crack[hitstaken]")
+ add_overlay("crack[hitstaken]")
icon_state = "newscaster_normal"
return
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index 8d6a55b3fd0..536da9fd0bd 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -61,19 +61,19 @@ var/bomb_set
if(auth)
if(opened == 0)
opened = 1
- overlays += image(icon, "npanel_open")
+ add_overlay("npanel_open")
to_chat(user, "You unscrew the control panel of [src].")
else
opened = 0
- overlays -= image(icon, "npanel_open")
+ cut_overlay("npanel_open")
to_chat(user, "You screw the control panel of [src] back on.")
else
if(opened == 0)
to_chat(user, "The [src] emits a buzzing noise, the panel staying locked in.")
if(opened == 1)
opened = 0
- overlays -= image(icon, "npanel_open")
+ cut_overlay("npanel_open")
to_chat(user, "You screw the control panel of [src] back on.")
flick("nuclearbombc", src)
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index 34d988e4837..cf2d4a978d5 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -197,20 +197,20 @@
desc += "
It is capable of repairing burn damage."
/obj/machinery/recharge_station/proc/build_overlays()
- overlays.Cut()
+ cut_overlay()
switch(round(chargepercentage()))
if(1 to 20)
- overlays += image('icons/obj/objects.dmi', "statn_c0")
+ add_overlay("statn_c0")
if(21 to 40)
- overlays += image('icons/obj/objects.dmi', "statn_c20")
+ add_overlay("statn_c20")
if(41 to 60)
- overlays += image('icons/obj/objects.dmi', "statn_c40")
+ add_overlay("statn_c40")
if(61 to 80)
- overlays += image('icons/obj/objects.dmi', "statn_c60")
+ add_overlay("statn_c60")
if(81 to 98)
- overlays += image('icons/obj/objects.dmi', "statn_c80")
+ add_overlay("statn_c80")
if(99 to 110)
- overlays += image('icons/obj/objects.dmi', "statn_c100")
+ add_overlay("statn_c100")
/obj/machinery/recharge_station/update_icon()
..()
diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm
index 5bbb4ac6be0..109e17d6a16 100644
--- a/code/game/machinery/robot_fabricator.dm
+++ b/code/game/machinery/robot_fabricator.dm
@@ -16,7 +16,7 @@
var/obj/item/stack/M = O
if(metal_amount < 150000.0)
var/count = 0
- overlays += "fab-load-metal"
+ add_overlay("fab-load-metal")
spawn(15)
if(M)
if(!M.get_amount())
@@ -27,7 +27,7 @@
count++
to_chat(user, "You insert [count] metal sheet\s into the fabricator.")
- overlays -= "fab-load-metal"
+ cut_overlay("fab-load-metal")
updateDialog()
else
to_chat(user, "The robot part maker is full. Please remove metal from the robot part maker in order to insert more.")
@@ -121,7 +121,7 @@ Please wait until completion...
being_built = new building(src)
- overlays += "fab-active"
+ add_overlay("fab-active")
updateUsrDialog()
spawn (build_time)
@@ -130,7 +130,7 @@ Please wait until completion...
being_built = null
update_use_power(USE_POWER_IDLE)
operating = 0
- overlays -= "fab-active"
+ cut_overlay("fab-active")
return
for (var/mob/M in viewers(1, src))
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 54aac0a5ffb..6497d8a2178 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -20,10 +20,10 @@
update_icon()
/obj/machinery/space_heater/update_icon()
- overlays.Cut()
+ cut_overlays()
icon_state = "sheater[on]"
if(panel_open)
- overlays += "sheater-open"
+ add_overlay("sheater-open")
if(on)
set_light(3, 3, "#FFCC00")
else
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 949b8a4df6e..819774d0e30 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -198,7 +198,7 @@
if(!picture || picture_state != state)
picture_state = state
picture = image('icons/obj/status_display.dmi', icon_state=picture_state)
- overlays |= picture
+ add_overlay(picture)
/obj/machinery/status_display/proc/update_display(line1, line2)
var/new_text = {"
[line1]
[line2]
"}
@@ -234,8 +234,7 @@
return ""
/obj/machinery/status_display/proc/remove_display()
- if(overlays.len)
- overlays.Cut()
+ cut_overlays()
if(maptext)
maptext = ""
diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm
index 4a88b7248b7..4f8d9f89547 100644
--- a/code/game/machinery/status_display_ai.dm
+++ b/code/game/machinery/status_display_ai.dm
@@ -90,7 +90,7 @@ var/list/ai_status_emotions = list(
/obj/machinery/ai_status_display/proc/update()
if(mode==0) //Blank
- overlays.Cut()
+ cut_overlays()
return
if(mode==1) // AI emoticon
@@ -104,14 +104,12 @@ var/list/ai_status_emotions = list(
/obj/machinery/ai_status_display/proc/set_picture(var/state)
picture_state = state
- if(overlays.len)
- overlays.Cut()
- overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
+ cut_overlays()
+ add_overlay(picture_state)
/obj/machinery/ai_status_display/power_change()
..()
if(stat & NOPOWER)
- if(overlays.len)
- overlays.Cut()
+ cut_overlays()
else
update()
diff --git a/code/game/mecha/equipment/tools/shield.dm b/code/game/mecha/equipment/tools/shield.dm
index 497d670313a..8ee94b162e1 100644
--- a/code/game/mecha/equipment/tools/shield.dm
+++ b/code/game/mecha/equipment/tools/shield.dm
@@ -28,7 +28,7 @@
return
/obj/item/mecha_parts/mecha_equipment/combat_shield/Destroy()
- chassis.overlays -= drone_overlay
+ chassis.cut_overlay(drone_overlay)
my_shield.forceMove(src)
my_shield.destroy_shields()
my_shield.my_tool = null
@@ -41,7 +41,7 @@
..()
if(!drone_overlay)
drone_overlay = new(src.icon, icon_state = "shield_droid")
- M.overlays += drone_overlay
+ M.add_overlay(drone_overlay)
return
/obj/item/mecha_parts/mecha_equipment/combat_shield/attach(obj/mecha/M as obj)
@@ -53,7 +53,7 @@
return
/obj/item/mecha_parts/mecha_equipment/combat_shield/detach()
- chassis.overlays -= drone_overlay
+ chassis.cut_overlay(drone_overlay)
..()
my_shield.destroy_shields()
my_shield.my_mecha = null
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index 4a3a105e9af..92215b3963b 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -630,9 +630,9 @@
flick("[loading_icon_state]", src)
// yess hacky but whatever
if(loading_icon_state == "mechfab-idle")
- overlays += "mechfab-load-metal"
+ add_overlay("mechfab-load-metal")
spawn(10)
- overlays -= "mechfab-load-metal"
+ cut_overlays("mechfab-load-metal")
while(materials[S.material.name] + amnt <= res_max_amount && S.get_amount() >= 1)
materials[S.material.name] += amnt
S.use(1)
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index e345013e3d1..467145309bc 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -79,7 +79,7 @@
/datum/construction/mecha/ripley_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
@@ -291,7 +291,7 @@
/datum/construction/mecha/gygax_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
@@ -575,7 +575,7 @@
/datum/construction/mecha/serenity_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
@@ -860,7 +860,7 @@
/datum/construction/mecha/firefighter_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
user.drop_item()
qdel(I)
return 1
@@ -1085,7 +1085,7 @@
/datum/construction/mecha/durand_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
@@ -1369,7 +1369,7 @@
/datum/construction/mecha/odysseus_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
@@ -1582,7 +1582,7 @@
/datum/construction/mecha/phazon_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
@@ -1864,7 +1864,7 @@
/datum/construction/mecha/janus_chassis/custom_action(step, obj/item/I, mob/user)
user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
- holder.overlays += I.icon_state+"+o"
+ holder.add_overlay(I.icon_state+"+o")
qdel(I)
return 1
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index 2a37edf7088..c9ae326bf2f 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -87,10 +87,10 @@ var/global/list/image/splatter_cache=list()
if(!S.blood_DNA)
S.blood_DNA = list()
S.blood_overlay.color = basecolor
- S.overlays += S.blood_overlay
+ S.add_overlay(S.blood_overlay)
if(S.blood_overlay && S.blood_overlay.color != basecolor)
S.blood_overlay.color = basecolor
- S.overlays += S.blood_overlay
+ S.add_overlay(S.blood_overlay)
S.blood_DNA |= blood_DNA.Copy()
perp.update_inv_shoes()
@@ -191,8 +191,8 @@ var/global/list/image/splatter_cache=list()
blood.Blend(basecolor,ICON_MULTIPLY)
icon = blood
- overlays.Cut()
- overlays += giblets
+ cut_overlays()
+ add_overlay(giblets)
/obj/effect/decal/cleanable/blood/gibs/up
random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6","gibup1","gibup1","gibup1")
diff --git a/code/game/objects/effects/decals/Cleanable/tracks.dm b/code/game/objects/effects/decals/Cleanable/tracks.dm
index 934068f25bb..a650980779d 100644
--- a/code/game/objects/effects/decals/Cleanable/tracks.dm
+++ b/code/game/objects/effects/decals/Cleanable/tracks.dm
@@ -129,7 +129,7 @@ var/global/list/image/fluidtrack_cache=list()
update_icon()
update_icon()
- overlays.Cut()
+ cut_overlays()
color = "#FFFFFF"
var/truedir=0
@@ -150,7 +150,7 @@ var/global/list/image/fluidtrack_cache=list()
track.fresh=0
track.overlay=I
stack[stack_idx]=track
- overlays += I
+ add_overlay(I)
updatedtracks=0 // Clear our memory of updated tracks.
/obj/effect/decal/cleanable/blood/tracks/footprints
diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm
index 55bb54b8036..8ae1fd4bb0a 100644
--- a/code/game/objects/effects/decals/crayon.dm
+++ b/code/game/objects/effects/decals/crayon.dm
@@ -24,7 +24,7 @@
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
- overlays += mainOverlay
- overlays += shadeOverlay
+ add_overlay(mainOverlay)
+ add_overlay(shadeOverlay)
add_hiddenprint(usr)
\ No newline at end of file
diff --git a/code/game/objects/effects/decals/warning_stripes.dm b/code/game/objects/effects/decals/warning_stripes.dm
index 0e3d12897d8..e69c90a8d84 100644
--- a/code/game/objects/effects/decals/warning_stripes.dm
+++ b/code/game/objects/effects/decals/warning_stripes.dm
@@ -6,5 +6,5 @@
var/turf/T=get_turf(src)
var/image/I=image(icon, icon_state = icon_state, dir = dir)
I.color=color
- T.overlays += I
+ T.add_overlay(I)
return INITIALIZE_HINT_QDEL
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index b49ee7a70f1..ca026e138b3 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -51,7 +51,7 @@
if (t)
src.name = "body bag - "
src.name += t
- src.overlays += image(src.icon, "bodybag_label")
+ add_overlay("bodybag_label")
else
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
@@ -59,7 +59,7 @@
else if(W.is_wirecutter())
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
- src.overlays.Cut()
+ cut_overlays()
return
/obj/structure/closet/body_bag/store_mobs(var/stored_units)
@@ -107,10 +107,10 @@
else
icon_state = "closed_unlocked"
- src.overlays.Cut()
+ cut_overlays()
/* Ours don't have toetags
if(has_label)
- src.overlays += image(src.icon, "bodybag_label")
+ add_overlay("bodybag_label")
*/
@@ -172,11 +172,11 @@
/obj/structure/closet/body_bag/cryobag/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
var/image/I = image(icon, "indicator[opened]")
I.appearance_flags = RESET_COLOR
I.color = COLOR_LIME
- overlays += I
+ add_overlay(I)
/obj/structure/closet/body_bag/cryobag/MouseDrop(over_object, src_location, over_location)
. = ..()
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index fd9767dd877..e1a295dfc4e 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -87,10 +87,10 @@
return TRUE
/obj/item/device/aicard/update_icon()
- overlays.Cut()
+ cut_overlays()
if(carded_ai)
if (!carded_ai.control_disabled)
- overlays += image('icons/obj/pda.dmi', "aicard-on")
+ add_overlay("aicard-on")
if(carded_ai.stat)
icon_state = "aicard-404"
else
diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm
index 2058395d855..6e9cff65e93 100644
--- a/code/game/objects/items/devices/defib.dm
+++ b/code/game/objects/items/devices/defib.dm
@@ -43,25 +43,23 @@
/obj/item/device/defib_kit/update_icon()
- var/list/new_overlays = list()
+ cut_overlays()
if(paddles && paddles.loc == src) //in case paddles got destroyed somehow.
- new_overlays += "[initial(icon_state)]-paddles"
+ add_overlay("[initial(icon_state)]-paddles")
if(bcell && paddles)
if(bcell.check_charge(paddles.chargecost))
if(paddles.combat)
- new_overlays += "[initial(icon_state)]-combat"
+ add_overlay("[initial(icon_state)]-combat")
else if(!paddles.safety)
- new_overlays += "[initial(icon_state)]-emagged"
+ add_overlay("[initial(icon_state)]-emagged")
else
- new_overlays += "[initial(icon_state)]-powered"
+ add_overlay("[initial(icon_state)]-powered")
var/ratio = CEILING(bcell.percent()/25, 1) * 25
- new_overlays += "[initial(icon_state)]-charge[ratio]"
+ add_overlay("[initial(icon_state)]-charge[ratio]")
else
- new_overlays += "[initial(icon_state)]-nocell"
-
- overlays = new_overlays
+ add_overlay("[initial(icon_state)]-nocell")
/obj/item/device/defib_kit/ui_action_click()
toggle_paddles()
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index c3850ad0dd8..db88469a47f 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -24,7 +24,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
/obj/item/device/paicard/New()
..()
- overlays += "pai-off"
+ add_overlay("pai-off")
/obj/item/device/paicard/Destroy()
//Will stop people throwing friend pAIs into the singularity so they can respawn
@@ -304,34 +304,34 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
src.pai = personality
- src.overlays += "pai-happy"
+ add_overlay("pai-happy")
/obj/item/device/paicard/proc/removePersonality()
src.pai = null
- src.overlays.Cut()
- src.overlays += "pai-off"
+ cut_overlays()
+ add_overlay("pai-off")
/obj/item/device/paicard
var/current_emotion = 1
/obj/item/device/paicard/proc/setEmotion(var/emotion)
if(pai)
- src.overlays.Cut()
+ cut_overlays()
switch(emotion)
- if(1) src.overlays += "pai-happy"
- if(2) src.overlays += "pai-cat"
- if(3) src.overlays += "pai-extremely-happy"
- if(4) src.overlays += "pai-face"
- if(5) src.overlays += "pai-laugh"
- if(6) src.overlays += "pai-off"
- if(7) src.overlays += "pai-sad"
- if(8) src.overlays += "pai-angry"
- if(9) src.overlays += "pai-what"
- if(10) src.overlays += "pai-neutral"
- if(11) src.overlays += "pai-silly"
- if(12) src.overlays += "pai-nose"
- if(13) src.overlays += "pai-smirk"
- if(14) src.overlays += "pai-exclamation"
- if(15) src.overlays += "pai-question"
+ if(1) add_overlay("pai-happy")
+ if(2) add_overlay("pai-cat")
+ if(3) add_overlay("pai-extremely-happy")
+ if(4) add_overlay("pai-face")
+ if(5) add_overlay("pai-laugh")
+ if(6) add_overlay("pai-off")
+ if(7) add_overlay("pai-sad")
+ if(8) add_overlay("pai-angry")
+ if(9) add_overlay("pai-what")
+ if(10) add_overlay("pai-neutral")
+ if(11) add_overlay("pai-silly")
+ if(12) add_overlay("pai-nose")
+ if(13) add_overlay("pai-smirk")
+ if(14) add_overlay("pai-exclamation")
+ if(15) add_overlay("pai-question")
current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm
index b59101cc663..ed527079042 100644
--- a/code/game/objects/items/devices/radio/jammer.dm
+++ b/code/game/objects/items/devices/radio/jammer.dm
@@ -109,8 +109,7 @@ var/global/list/active_radio_jammers = list()
// Only Cut() if we need to.
if(overlay_percent != last_overlay_percent)
- overlays.Cut()
- var/image/I = image(src.icon, src, "jammer_overlay_[overlay_percent]")
- overlays += I
+ cut_overlays()
+ add_overlay("jammer_overlay_[overlay_percent]")
last_overlay_percent = overlay_percent
diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm
index 0709429ac1b..bd96945fc64 100644
--- a/code/game/objects/items/devices/t_scanner.dm
+++ b/code/game/objects/items/devices/t_scanner.dm
@@ -28,7 +28,7 @@
/obj/item/device/t_scanner/proc/set_active(var/active)
on = active
if(on)
- START_PROCESSING(SSobj, src)
+ START_PROCESSING(SSobj, src)
flicker = 0
else
STOP_PROCESSING(SSobj, src)
@@ -87,7 +87,7 @@
if(istype(scanned, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = scanned
I.color = P.pipe_color
- I.overlays += P.overlays
+ I.add_overlay(P.overlays)
I.alpha = 128
I.mouse_opacity = 0
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 4e5032b6b9f..a7786526863 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -372,9 +372,9 @@
/obj/item/device/tape/update_icon()
- overlays.Cut()
+ cut_overlays()
if(ruined)
- overlays += "ribbonoverlay"
+ add_overlay("ribbonoverlay")
/obj/item/device/tape/fire_act()
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index f72c3c4d24f..dc27b39fce5 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -119,7 +119,7 @@
VARSET_IN(src, toggle, TRUE, 5 SECONDS)
/obj/item/device/transfer_valve/update_icon()
- overlays.Cut()
+ cut_overlays()
underlays = null
if(!tank_one && !tank_two && !attached_device)
@@ -128,13 +128,13 @@
icon_state = "valve"
if(tank_one)
- overlays += "[tank_one.icon_state]"
+ add_overlay("[tank_one.icon_state]")
if(tank_two)
var/icon/J = new(icon, icon_state = "[tank_two.icon_state]")
J.Shift(WEST, 13)
underlays += J
if(attached_device)
- overlays += "device"
+ add_overlay("device")
/obj/item/device/transfer_valve/proc/remove_tank(obj/item/weapon/tank/T)
if(tank_one == T)
diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm
index 9db0d88010f..1c066117a93 100644
--- a/code/game/objects/items/glassjar.dm
+++ b/code/game/objects/items/glassjar.dm
@@ -86,7 +86,7 @@
/obj/item/glass_jar/update_icon() // Also updates name and desc
underlays.Cut()
- overlays.Cut()
+ cut_overlays()
switch(contains)
if(JAR_NOTHING)
name = initial(name)
@@ -138,7 +138,7 @@
/obj/item/glass_jar/fish/update_icon() // Also updates name and desc
underlays.Cut()
- overlays.Cut()
+ cut_overlays()
if(filled)
underlays += image(icon, "[icon_state]_water")
diff --git a/code/game/objects/items/robobag.dm b/code/game/objects/items/robobag.dm
index 33c3ba89ed9..4c54a5d78fa 100644
--- a/code/game/objects/items/robobag.dm
+++ b/code/game/objects/items/robobag.dm
@@ -32,7 +32,7 @@
. += "[src] has a [corptag] attached to it."
/obj/structure/closet/body_bag/cryobag/robobag/update_icon()
- overlays.Cut()
+ cut_overlays()
..()
if(corptag)
var/corptag_icon_state = "tag_blank"
@@ -45,8 +45,7 @@
else if(istype(corptag, /obj/item/clothing/accessory/badge/corporate_tag))
corptag_icon_state = corptag.icon_state
- var/image/I = image(icon, corptag_icon_state)
- overlays += I
+ add_overlay(corptag_icon_state)
/obj/structure/closet/body_bag/cryobag/robobag/AltClick(mob/user)
if(!Adjacent(user))
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 554663727fb..87361c2e05b 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -76,19 +76,19 @@
src.updateicon()
/obj/item/robot_parts/robot_suit/proc/updateicon()
- src.overlays.Cut()
+ cut_overlays()
if(src.l_arm)
- src.overlays += "l_arm+o"
+ add_overlay("l_arm+o")
if(src.r_arm)
- src.overlays += "r_arm+o"
+ add_overlay("r_arm+o")
if(src.chest)
- src.overlays += "chest+o"
+ add_overlay("chest+o")
if(src.l_leg)
- src.overlays += "l_leg+o"
+ add_overlay("l_leg+o")
if(src.r_leg)
- src.overlays += "r_leg+o"
+ add_overlay("r_leg+o")
if(src.head)
- src.overlays += "head+o"
+ add_overlay("head+o")
/obj/item/robot_parts/robot_suit/proc/check_completion()
if(src.l_arm && src.r_arm)
diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm
index 982236f43c3..d25e96f0788 100644
--- a/code/game/objects/items/shooting_range.dm
+++ b/code/game/objects/items/shooting_range.dm
@@ -36,7 +36,7 @@
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
- overlays.Cut()
+ cut_overlays()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
return
@@ -139,7 +139,7 @@
virtualIcon.DrawBox(null, B.b1x1, B.b1y, B.b1x2, B.b1y) // horizontal line, left to right
virtualIcon.DrawBox(null, B.b2x, B.b2y1, B.b2x, B.b2y2) // vertical line, top to bottom
- overlays += bmark // add the decal
+ add_overlay(bmark) // add the decal
icon = virtualIcon // apply bulletholes over decals
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index c4d0bf657e7..d81e6e444e3 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -65,7 +65,7 @@
message_admins("[key_name(user, user.client)](?) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
- target.overlays += image_overlay
+ target.add_overlay(image_overlay, TRUE)
to_chat(user, "Bomb has been planted. Timer counting down from [timer].")
spawn(timer*10)
explode(get_turf(target))
@@ -87,7 +87,7 @@
else
target.ex_act(1)
if(target)
- target.overlays -= image_overlay
+ target.cut_overlay(image_overlay, TRUE)
qdel(src)
/obj/item/weapon/plastique/attack(mob/M as mob, mob/user as mob, def_zone)
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index b2e783ba69a..ad23dc4f2a2 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -46,13 +46,13 @@
/obj/item/weapon/flamethrower/update_icon()
- overlays.Cut()
+ cut_overlays()
if(igniter)
- overlays += "+igniter[status]"
+ add_overlay("+igniter[status]")
if(ptank)
- overlays += "+ptank"
+ add_overlay("+ptank")
if(lit)
- overlays += "+lit"
+ add_overlay("+lit")
item_state = "flamethrower_1"
else
item_state = "flamethrower_0"
diff --git a/code/game/objects/items/weapons/grenades/supermatter.dm b/code/game/objects/items/weapons/grenades/supermatter.dm
index 7eff5accd45..988c00d0b26 100644
--- a/code/game/objects/items/weapons/grenades/supermatter.dm
+++ b/code/game/objects/items/weapons/grenades/supermatter.dm
@@ -19,9 +19,9 @@
playsound(src, 'sound/weapons/wave.ogg', 100)
/obj/item/weapon/grenade/supermatter/update_icon()
- overlays.Cut()
+ cut_overlays()
if(implode_at)
- overlays += image(icon = 'icons/rust.dmi', icon_state = "emfield_s1")
+ add_overlay(image(icon = 'icons/rust.dmi', icon_state = "emfield_s1"))
/obj/item/weapon/grenade/supermatter/process()
if(!isturf(loc))
diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm
index 95e558b36aa..a06e0afe933 100644
--- a/code/game/objects/items/weapons/material/ashtray.dm
+++ b/code/game/objects/items/weapons/material/ashtray.dm
@@ -22,23 +22,23 @@ var/global/list/ashtray_cache = list()
/obj/item/weapon/material/ashtray/update_icon()
color = null
- overlays.Cut()
+ cut_overlays()
var/cache_key = "base-[material.name]"
if(!ashtray_cache[cache_key])
var/image/I = image('icons/obj/objects.dmi',"ashtray")
I.color = material.icon_colour
ashtray_cache[cache_key] = I
- overlays |= ashtray_cache[cache_key]
+ add_overlay(ashtray_cache[cache_key])
if (contents.len == max_butts)
if(!ashtray_cache["full"])
ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full")
- overlays |= ashtray_cache["full"]
+ add_overlay(ashtray_cache["full"])
desc = "It's stuffed full."
else if (contents.len > max_butts/2)
if(!ashtray_cache["half"])
ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half")
- overlays |= ashtray_cache["half"]
+ add_overlay(ashtray_cache["half"])
desc = "It's half-filled."
else
desc = "An ashtray made of [material.display_name]."
diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm
index e52b2add285..909b3f0618a 100644
--- a/code/game/objects/items/weapons/material/kitchen.dm
+++ b/code/game/objects/items/weapons/material/kitchen.dm
@@ -49,7 +49,7 @@
return
M.visible_message("\The [user] feeds some [loaded] to \the [M] with \the [src].")
playsound(src,'sound/items/eatfood.ogg', rand(10,40), 1)
- overlays.Cut()
+ cut_overlays()
return
else
to_chat(user, "You don't have anything on \the [src].") //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK
diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm
index 61162363ee6..9cb6f78daae 100644
--- a/code/game/objects/items/weapons/policetape.dm
+++ b/code/game/objects/items/weapons/policetape.dm
@@ -114,7 +114,7 @@ var/list/tape_roll_applications = list()
color = COLOR_DEEP_SKY_BLUE
/obj/item/taperoll/update_icon()
- overlays.Cut()
+ cut_overlays()
var/image/overlay = image(icon = src.icon)
overlay.appearance_flags = RESET_COLOR
if(ismob(loc))
@@ -122,7 +122,7 @@ var/list/tape_roll_applications = list()
overlay.icon_state = "start"
else
overlay.icon_state = "stop"
- overlays += overlay
+ add_overlay(overlay)
/obj/item/taperoll/dropped(mob/user)
@@ -303,11 +303,11 @@ var/list/tape_roll_applications = list()
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
user.visible_message("\The [user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
- F.overlays -= hazard_overlay
+ F.cut_overlay(hazard_overlay)
tape_roll_applications[F] &= ~direction
else
user.visible_message("\The [user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
- F.overlays |= hazard_overlay
+ F.add_overlay(hazard_overlay)
tape_roll_applications[F] |= direction
return
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index e1ff8f0ce5a..4d06d52314a 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -125,9 +125,9 @@
/obj/item/weapon/storage/fancy/crayons/update_icon()
var/mutable_appearance/ma = new(src)
- ma.overlays = list()
+ ma.cut_overlays()
for(var/obj/item/weapon/pen/crayon/crayon in contents)
- ma.overlays += image('icons/obj/crayons.dmi',crayon.colourName)
+ add_overlay(image('icons/obj/crayons.dmi',crayon.colourName))
appearance = ma
/obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob)
@@ -167,9 +167,9 @@
/obj/item/weapon/storage/fancy/markers/update_icon()
var/mutable_appearance/ma = new(src)
- ma.overlays = list()
+ ma.cut_overlays()
for(var/obj/item/weapon/pen/crayon/marker/marker in contents)
- ma.overlays += image('icons/obj/crayons.dmi',"m"+marker.colourName)
+ ma.add_overlay(image('icons/obj/crayons.dmi',"m"+marker.colourName))
appearance = ma
/obj/item/weapon/storage/fancy/markers/attackby(obj/item/W as obj, mob/user as mob)
@@ -398,14 +398,13 @@
/obj/item/weapon/storage/lockbox/vials/update_icon(var/itemremoved = 0)
var/total_contents = contents.len - itemremoved
icon_state = "vialbox[total_contents]"
- overlays.Cut()
+ cut_overlays()
if (!broken)
- overlays += image(icon, src, "led[locked]")
+ add_overlay("led[locked]")
if(locked)
- overlays += image(icon, src, "cover")
+ add_overlay("cover")
else
- overlays += image(icon, src, "ledb")
- return
+ add_overlay("ledb")
/obj/item/weapon/storage/lockbox/vials/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm
index 9b87ee51d39..bb6bb1032c4 100644
--- a/code/game/objects/items/weapons/storage/firstaid.dm
+++ b/code/game/objects/items/weapons/storage/firstaid.dm
@@ -200,11 +200,11 @@
update_icon()
/obj/item/weapon/storage/pill_bottle/update_icon()
- overlays.Cut()
+ cut_overlays()
if(wrapper_color)
var/image/I = image(icon, "pillbottle_wrap")
I.color = wrapper_color
- overlays += I
+ add_overlay(I)
/obj/item/weapon/storage/pill_bottle/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen))
diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm
index 9f6d4929b84..5c9be66e260 100644
--- a/code/game/objects/items/weapons/storage/misc.dm
+++ b/code/game/objects/items/weapons/storage/misc.dm
@@ -18,10 +18,10 @@
update_icon()
/obj/item/weapon/storage/box/donut/update_icon()
- overlays.Cut()
+ cut_overlays()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
- overlays += image('icons/obj/food.dmi', "[i][D.overlay_state]")
+ add_overlay("[i][D.overlay_state]")
i++
/obj/item/weapon/storage/box/donut/empty
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index 436b1da8c6f..957a3c73f68 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -111,15 +111,15 @@
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
- src.overlays = null
- overlays += image('icons/obj/storage.dmi', icon_opened)
+ cut_overlays()
+ add_overlay(icon_opened)
src.code = null
else
src.code = "ERROR"
else
if ((digit == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
- src.overlays = null
+ cut_overlays()
src.code = null
src.close(usr)
else
@@ -133,10 +133,10 @@
/obj/item/weapon/storage/secure/emag_act(var/remaining_charges, var/mob/user, var/feedback)
if(!emagged)
emagged = 1
- src.overlays += image('icons/obj/storage.dmi', icon_sparking)
+ src.add_overlay(icon_sparking)
sleep(6)
- src.overlays = null
- overlays += image('icons/obj/storage.dmi', icon_locking)
+ cut_overlays()
+ add_overlay(icon_locking)
locked = 0
to_chat(user, (feedback ? feedback : "You short out the lock of \the [src]."))
return 1
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 72070edf31b..66e23467d5a 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -226,7 +226,7 @@
var/stored_cap_width = 4 //length of sprite for start and end of the box representing the stored item
var/storage_width = min( round( 224 * max_storage_space/baseline_max_storage_space ,1) ,274) //length of sprite for the box representing total storage space
- storage_start.overlays.Cut()
+ storage_start.cut_overlays()
var/matrix/M = matrix()
M.Scale((storage_width-storage_cap_width*2+3)/32,1)
@@ -253,9 +253,9 @@
src.stored_start.transform = M_start
src.stored_continue.transform = M_continue
src.stored_end.transform = M_end
- storage_start.overlays += src.stored_start
- storage_start.overlays += src.stored_continue
- storage_start.overlays += src.stored_end
+ storage_start.add_overlay(stored_start)
+ storage_start.add_overlay(stored_continue)
+ storage_start.add_overlay(stored_end)
O.screen_loc = "4:[round((startpoint+endpoint)/2)+2],2:16"
O.maptext = ""
@@ -701,7 +701,7 @@
var/closed_state
/obj/item/weapon/storage/trinketbox/update_icon()
- overlays.Cut()
+ cut_overlays()
if(open)
icon_state = open_state
@@ -714,7 +714,7 @@
else if(istype(contents[1], /obj/item/clothing/accessory/medal))
contained_image = "medal_trinket"
if(contained_image)
- overlays += contained_image
+ add_overlay(contained_image)
else
icon_state = closed_state
diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm
index 90b465efaea..4161ae740b9 100644
--- a/code/game/objects/items/weapons/storage/wallets.dm
+++ b/code/game/objects/items/weapons/storage/wallets.dm
@@ -67,14 +67,14 @@
update_icon()
/obj/item/weapon/storage/wallet/update_icon()
- overlays.Cut()
+ cut_overlays()
if(front_id)
var/tiny_state = "id-generic"
if("id-[front_id.icon_state]" in cached_icon_states(icon))
tiny_state = "id-"+front_id.icon_state
var/image/tiny_image = new/image(icon, icon_state = tiny_state)
tiny_image.appearance_flags = RESET_COLOR
- overlays += tiny_image
+ add_overlay(tiny_image)
/obj/item/weapon/storage/wallet/GetID()
return front_id
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index ad3c856f973..6fc53235b55 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -85,14 +85,14 @@
add_fingerprint(user)
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
- overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
+ cut_overlays()
var/icon/I = new /icon(src.icon, src.icon_state)
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
blood_overlay = I
- overlays += blood_overlay
+ add_overlay(blood_overlay)
return
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index abe2db0d532..bd6f3842803 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -138,7 +138,7 @@ var/list/global/tank_gauge_cache = list()
to_chat(user, "You carefully begin clipping the wires that attach to the tank.")
if(do_after(user, 100,src))
wired = 0
- src.overlays -= "bomb_assembly"
+ cut_overlay("bomb_assembly")
to_chat(user, "You cut the wire and remove the device.")
var/obj/item/device/assembly_holder/assy = src.proxyassembly.assembly
@@ -153,7 +153,7 @@ var/list/global/tank_gauge_cache = list()
assy.a_right = null
src.proxyassembly.assembly = null
qdel(assy)
- src.overlays.Cut()
+ cut_overlays()
last_gauge_pressure = 0
update_gauge()
@@ -166,7 +166,7 @@ var/list/global/tank_gauge_cache = list()
if(do_after(user, 10, src))
to_chat(user, "You quickly clip the wire from the tank.")
wired = 0
- src.overlays -= "bomb_assembly"
+ cut_overlay("bomb_assembly")
else
to_chat(user, "There are no wires to cut!")
@@ -352,12 +352,12 @@ var/list/global/tank_gauge_cache = list()
/obj/item/weapon/tank/proc/add_bomb_overlay()
if(src.wired)
- src.overlays += "bomb_assembly"
+ add_overlay("bomb_assembly")
if(src.proxyassembly.assembly)
var/icon/test = getFlatIcon(src.proxyassembly.assembly)
test.Shift(SOUTH,1)
test.Shift(WEST,3)
- overlays += test
+ add_overlay(test)
/obj/item/weapon/tank/proc/update_gauge()
@@ -373,12 +373,12 @@ var/list/global/tank_gauge_cache = list()
return
last_gauge_pressure = gauge_pressure
- overlays.Cut()
+ cut_overlays()
add_bomb_overlay()
var/indicator = "[gauge_icon][(gauge_pressure == -1) ? "overload" : gauge_pressure]"
if(!tank_gauge_cache[indicator])
tank_gauge_cache[indicator] = image(icon, indicator)
- overlays += tank_gauge_cache[indicator]
+ add_overlay(tank_gauge_cache[indicator])
@@ -562,7 +562,7 @@ var/list/global/tank_gauge_cache = list()
H.update_icon()
- src.overlays += "bomb_assembly"
+ add_overlay("bomb_assembly")
/obj/item/weapon/tank/phoron/onetankbomb/New()
@@ -658,10 +658,10 @@ var/list/global/tank_gauge_cache = list()
/obj/item/device/tankassemblyproxy/update_icon()
if(assembly)
tank.update_icon()
- tank.overlays += "bomb_assembly"
+ tank.add_overlay("bomb_assembly")
else
tank.update_icon()
- tank.overlays -= "bomb_assembly"
+ tank.cut_overlay("bomb_assembly")
/obj/item/device/tankassemblyproxy/HasProximity(turf/T, atom/movable/AM, old_loc)
assembly?.HasProximity(T, AM, old_loc)
diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm
index af92a574545..46d2b50f13a 100644
--- a/code/game/objects/items/weapons/tools/weldingtool.dm
+++ b/code/game/objects/items/weapons/tools/weldingtool.dm
@@ -208,11 +208,10 @@
/obj/item/weapon/weldingtool/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
// Welding overlay.
if(welding)
- var/image/I = image(icon, src, "[icon_state]-on")
- overlays.Add(I)
+ add_overlay("[icon_state]-on")
item_state = "[initial(item_state)]1"
else
item_state = initial(item_state)
@@ -221,8 +220,7 @@
if(change_icons && get_max_fuel())
var/ratio = get_fuel() / get_max_fuel()
ratio = CEILING(ratio * 4, 1) * 25
- var/image/I = image(icon, src, "[icon_state][ratio]")
- overlays.Add(I)
+ add_overlay("[icon_state][ratio]")
// Lights
if(welding && flame_intensity)
diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm
index 6809ae45470..3215af0a102 100644
--- a/code/game/objects/items/weapons/trays.dm
+++ b/code/game/objects/items/weapons/trays.dm
@@ -19,7 +19,7 @@
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
user.setClickCooldown(user.get_attack_speed(src))
// Drop all the things. All of them.
- overlays.Cut()
+ cut_overlays()
for(var/obj/item/I in carrying)
I.loc = M.loc
carrying.Remove(I)
@@ -193,7 +193,7 @@
var/obj/item/weapon/material/O = I
if(O.applies_material_colour)
Img.color = O.color
- overlays += Img
+ add_overlay(Img)
/obj/item/weapon/tray/dropped(mob/user)
var/noTable = null
@@ -203,7 +203,7 @@
noTable = 1
if(isturf(loc) && !(locate(/mob/living) in src.loc))
- overlays.Cut()
+ cut_overlays()
for(var/obj/item/I in carrying)
I.forceMove(src.loc)
carrying.Remove(I)
diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm
index f07fb8d1dc3..8b1780f077c 100644
--- a/code/game/objects/structures/bonfire.dm
+++ b/code/game/objects/structures/bonfire.dm
@@ -184,7 +184,7 @@
L.IgniteMob()
/obj/structure/bonfire/update_icon()
- overlays.Cut()
+ cut_overlays()
if(burning)
var/state
switch(get_fuel_amount())
@@ -194,14 +194,14 @@
state = "bonfire_hot"
var/image/I = image(icon, state)
I.appearance_flags = RESET_COLOR
- overlays += I
+ add_overlay(I)
if(has_buckled_mobs() && get_fuel_amount() >= 5)
I = image(icon, "bonfire_intense")
I.pixel_y = 13
I.layer = MOB_LAYER + 0.1
I.appearance_flags = RESET_COLOR
- overlays += I
+ add_overlay(I)
var/light_strength = max(get_fuel_amount() / 2, 2)
set_light(light_strength, light_strength, "#FF9933")
@@ -211,7 +211,7 @@
if(grill)
var/image/grille_image = image(icon, "bonfire_grill")
grille_image.appearance_flags = RESET_COLOR
- overlays += grille_image
+ add_overlay(grille_image)
/obj/structure/bonfire/process()
@@ -373,7 +373,7 @@
O.fire_act(null, 1000, 500)
/obj/structure/fireplace/update_icon()
- overlays.Cut()
+ cut_overlays()
if(burning)
var/state
switch(get_fuel_amount())
@@ -385,7 +385,7 @@
state = "fireplace_intense" //don't need to throw a corpse inside to make it burn hotter.
var/image/I = image(icon, state)
I.appearance_flags = RESET_COLOR
- overlays += I
+ add_overlay(I)
var/light_strength = max(get_fuel_amount() / 2, 2)
set_light(light_strength, light_strength, "#FF9933")
diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm
index 848168dd08e..9da45df7beb 100644
--- a/code/game/objects/structures/coathanger.dm
+++ b/code/game/objects/structures/coathanger.dm
@@ -43,10 +43,10 @@
return 1
/obj/structure/coatrack/update_icon()
- overlays.Cut()
+ cut_overlays()
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat))
- overlays += image(icon, icon_state = "coat_lab")
+ add_overlay("coat_lab")
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat/cmo))
- overlays += image(icon, icon_state = "coat_cmo")
+ add_overlay("coat_cmo")
if (istype(coat, /obj/item/clothing/suit/storage/det_trench))
- overlays += image(icon, icon_state = "coat_det")
+ add_overlay("coat_det")
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm
index b69a3ff368d..028f67f06d5 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm
@@ -14,9 +14,9 @@
update_icon()
/obj/structure/closet/secure_closet/guncabinet/update_icon()
- overlays.Cut()
+ cut_overlays()
if(opened)
- overlays += icon(icon,"door_open")
+ add_overlay("door_open")
else
var/lazors = 0
var/shottas = 0
@@ -35,17 +35,17 @@
shottas--
gun.icon_state = "projectile"
gun.pixel_x = i*4
- overlays += gun
+ add_overlay(gun)
- overlays += icon(src.icon, "door")
+ add_overlay("door")
if(sealed)
- overlays += icon(src.icon,"sealed")
+ add_overlay("sealed")
if(broken)
- overlays += icon(src.icon,"broken")
+ add_overlay("broken")
else if (locked)
- overlays += icon(src.icon,"locked")
+ add_overlay("locked")
else
- overlays += icon(src.icon,"open")
+ add_overlay("open")
diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm
index b98636eb16c..31862846ff1 100644
--- a/code/game/objects/structures/crates_lockers/vehiclecage.dm
+++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm
@@ -44,13 +44,13 @@
/obj/structure/vehiclecage/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
underlays.Cut()
var/image/framepaint = new(icon = 'icons/obj/storage.dmi', icon_state = "[initial(icon_state)]_a", layer = MOB_LAYER + 1.1)
framepaint.plane = MOB_PLANE
framepaint.color = paint_color
- overlays += framepaint
+ add_overlay(framepaint)
for(var/obj/vehicle/V in src.contents)
var/image/showcase = new(V)
diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm
index b3f174e25a5..ca515e230f8 100644
--- a/code/game/objects/structures/electricchair.dm
+++ b/code/game/objects/structures/electricchair.dm
@@ -6,9 +6,9 @@
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1.0
-/obj/structure/bed/chair/e_chair/New()
- ..()
- overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
+/obj/structure/bed/chair/e_chair/Initialize()
+ . = ..()
+ add_overlay(image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir))
return
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -39,8 +39,8 @@
/obj/structure/bed/chair/e_chair/rotate_clockwise()
..()
- overlays.Cut()
- overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
+ cut_overlays()
+ add_overlay(image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)) //there's probably a better way of handling this, but eh. -Pete
return
/obj/structure/bed/chair/e_chair/proc/shock()
diff --git a/code/game/objects/structures/flora/trees.dm b/code/game/objects/structures/flora/trees.dm
index a9f3658ff6e..8eefe0c3134 100644
--- a/code/game/objects/structures/flora/trees.dm
+++ b/code/game/objects/structures/flora/trees.dm
@@ -115,7 +115,7 @@
is_stump = TRUE
density = FALSE
icon_state = "[base_state]_stump"
- overlays.Cut() // For the Sif tree and other future glowy trees.
+ cut_overlays() // For the Sif tree and other future glowy trees.
set_light(0)
/obj/structure/flora/tree/ex_act(var/severity)
diff --git a/code/game/objects/structures/holoplant.dm b/code/game/objects/structures/holoplant.dm
index dbd39361d6e..01a0436be93 100644
--- a/code/game/objects/structures/holoplant.dm
+++ b/code/game/objects/structures/holoplant.dm
@@ -46,12 +46,13 @@
return
plant = prepare_icon(emagged ? "emagged" : null)
- overlays = list(plant)
+ cut_overlays()
+ add_overlay(plant)
set_light(2)
update_use_power(USE_POWER_ACTIVE)
/obj/machinery/holoplant/proc/deactivate()
- overlays.Cut()
+ cut_overlays()
QDEL_NULL(plant)
set_light(0)
update_use_power(USE_POWER_OFF)
@@ -66,16 +67,16 @@
/obj/machinery/holoplant/proc/flicker()
interference = TRUE
spawn(0)
- overlays.Cut()
+ cut_overlays()
set_light(0)
sleep(rand(2,4))
- overlays = list(plant)
+ add_overlay(plant)
set_light(2)
sleep(rand(2,4))
- overlays.Cut()
+ cut_overlays()
set_light(0)
sleep(rand(2,4))
- overlays = list(plant)
+ add_overlay(plant)
set_light(2)
interference = FALSE
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index a6dc8e42ac4..fba31409f51 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -288,22 +288,22 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
return TRUE
/obj/structure/janitorialcart/update_icon()
- overlays.Cut()
+ cut_overlays()
if(mybucket)
- overlays += "cart_bucket"
+ add_overlay("cart_bucket")
if(mybucket.reagents.total_volume >= 1)
- overlays += "water_cart"
+ add_overlay("water_cart")
if(mybag)
- overlays += "cart_garbage"
+ add_overlay("cart_garbage")
if(mymop)
- overlays += "cart_mop"
+ add_overlay("cart_mop")
if(myspray)
- overlays += "cart_spray"
+ add_overlay("cart_spray")
if(myreplacer)
- overlays += "cart_replacer"
+ add_overlay("cart_replacer")
if(signs)
- overlays += "cart_sign[signs]"
+ add_overlay("cart_sign[signs]")
//This is called if the cart is caught in an explosion, or destroyed by weapon fire
/obj/structure/janitorialcart/proc/spill(var/chance = 100)
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index b8597d6d292..8c1879ec80a 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -82,7 +82,7 @@
//if(!(istype(src.loc, /turf/space)))
// qdel(src)
spawn(1)
- overlays = list()
+ cut_overlays()
var/dir_sum = 0
diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm
index 5a4ce00a8ce..e039f7806f9 100644
--- a/code/game/objects/structures/railing.dm
+++ b/code/game/objects/structures/railing.dm
@@ -108,27 +108,27 @@
/obj/structure/railing/update_icon(var/UpdateNeighgors = 1)
NeighborsCheck(UpdateNeighgors)
//layer = (dir == SOUTH) ? FLY_LAYER : initial(layer) // wtf does this even do
- overlays.Cut()
+ cut_overlays()
if (!check || !anchored)//|| !anchored
icon_state = "[icon_modifier]railing0"
else
icon_state = "[icon_modifier]railing1"
if (check & 32)
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]corneroverlay")
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]corneroverlay"))
if ((check & 16) || !(check & 32) || (check & 64))
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]frontoverlay_l")
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]frontoverlay_l"))
if (!(check & 2) || (check & 1) || (check & 4))
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]frontoverlay_r")
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]frontoverlay_r"))
if(check & 4)
switch (src.dir)
if (NORTH)
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = 32)
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = 32))
if (SOUTH)
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = -32)
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = -32))
if (EAST)
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = -32)
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = -32))
if (WEST)
- overlays += image ('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = 32)
+ add_overlay(image('icons/obj/railing.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = 32))
/obj/structure/railing/verb/rotate_counterclockwise()
set name = "Rotate Railing Counter-Clockwise"
diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm
index 15919a754a5..9a2b18e8c66 100644
--- a/code/game/objects/structures/tank_dispenser.dm
+++ b/code/game/objects/structures/tank_dispenser.dm
@@ -28,13 +28,13 @@
update_icon()
/obj/structure/dispenser/update_icon()
- overlays.Cut()
+ cut_overlays()
switch(oxygentanks)
- if(1 to 3) overlays += "oxygen-[oxygentanks]"
- if(4 to INFINITY) overlays += "oxygen-4"
+ if(1 to 3) add_overlay("oxygen-[oxygentanks]")
+ if(4 to INFINITY) add_overlay("oxygen-4")
switch(phorontanks)
- if(1 to 4) overlays += "phoron-[phorontanks]"
- if(5 to INFINITY) overlays += "phoron-5"
+ if(1 to 4) add_overlay("phoron-[phorontanks]")
+ if(5 to INFINITY) add_overlay("phoron-5")
/obj/structure/dispenser/attack_ai(mob/user)
// This looks silly, but robots also call attack_ai, and they're allowed physical state stuff.
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 6b95d902111..47a37334435 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -179,13 +179,13 @@
add_fingerprint(user)
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
- overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
+ cut_overlay() //once it's been on for a while, in addition to handling the water overlay.
if(mymist)
qdel(mymist)
mymist = null
if(on)
- overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
+ add_overlay(image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir))
if(temperature_settings[watertemp] < T20C)
return //no mist for cold water
if(!ismist)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 2cf49eb2b53..b0670868861 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -1,689 +1,688 @@
-/obj/structure/window
- name = "window"
- desc = "A window."
- icon = 'icons/obj/structures_vr.dmi' // VOREStation Edit - New icons
- density = 1
- can_atmos_pass = ATMOS_PASS_PROC
- w_class = ITEMSIZE_NORMAL
-
- layer = WINDOW_LAYER
- pressure_resistance = 4*ONE_ATMOSPHERE
- anchored = 1.0
- flags = ON_BORDER
- var/maxhealth = 14.0
- var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
- var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
- var/health
- var/force_threshold = 0
- var/ini_dir = null
- var/state = 2
- var/reinf = 0
- var/basestate
- var/shardtype = /obj/item/weapon/material/shard
- var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
- var/silicate = 0 // number of units of silicate
- var/fulltile = FALSE // Set to true on full-tile variants.
-
-/obj/structure/window/examine(mob/user)
- . = ..()
-
- if(health == maxhealth)
- . += "It looks fully intact."
- else
- var/perc = health / maxhealth
- if(perc > 0.75)
- . += "It has a few cracks."
- else if(perc > 0.5)
- . += "It looks slightly damaged."
- else if(perc > 0.25)
- . += "It looks moderately damaged."
- else
- . += "It looks heavily damaged."
- if(silicate)
- if (silicate < 30)
- . += "It has a thin layer of silicate."
- else if (silicate < 70)
- . += "It is covered in silicate."
- else
- . += "There is a thick layer of silicate covering it."
-
-/obj/structure/window/examine_icon()
- return icon(icon=initial(icon),icon_state=initial(icon_state))
-
-/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
- var/initialhealth = health
-
- if(silicate)
- damage = damage * (1 - silicate / 200)
-
- health = max(0, health - damage)
-
- if(health <= 0)
- shatter()
- else
- if(sound_effect)
- playsound(src, 'sound/effects/Glasshit.ogg', 100, 1)
- if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
- visible_message("[src] looks like it's about to shatter!" )
- update_icon()
- else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
- visible_message("[src] looks seriously damaged!" )
- update_icon()
- else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
- visible_message("Cracks begin to appear in [src]!" )
- update_icon()
- return
-
-/obj/structure/window/proc/apply_silicate(var/amount)
- if(health < maxhealth) // Mend the damage
- health = min(health + amount * 3, maxhealth)
- if(health == maxhealth)
- visible_message("[src] looks fully repaired." )
- else // Reinforce
- silicate = min(silicate + amount, 100)
- updateSilicate()
-
-/obj/structure/window/proc/updateSilicate()
- if (overlays)
- overlays.Cut()
- update_icon()
-
- var/image/img = image(src)
- img.color = "#ffffff"
- img.alpha = silicate * 255 / 100
- overlays += img
-
-/obj/structure/window/proc/shatter(var/display_message = 1)
- playsound(src, "shatter", 70, 1)
- if(display_message)
- visible_message("[src] shatters!")
- new shardtype(loc)
- if(reinf)
- new /obj/item/stack/rods(loc)
- if(is_fulltile())
- new shardtype(loc) //todo pooling?
- if(reinf)
- new /obj/item/stack/rods(loc)
- qdel(src)
- return
-
-
-/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
-
- var/proj_damage = Proj.get_structure_damage()
- if(!proj_damage) return
-
- ..()
- take_damage(proj_damage)
- return
-
-
-/obj/structure/window/ex_act(severity)
- switch(severity)
- if(1.0)
- qdel(src)
- return
- if(2.0)
- shatter(0)
- return
- if(3.0)
- if(prob(50))
- shatter(0)
- return
-
-/obj/structure/window/blob_act()
- take_damage(50)
-
-/obj/structure/window/CanPass(atom/movable/mover, turf/target)
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return TRUE
- if(is_fulltile())
- return FALSE //full tile window, you can't move into it!
- if((get_dir(loc, target) & dir) || (get_dir(mover, target) == turn(dir, 180)))
- return !density
- else
- return TRUE
-
-
-/obj/structure/window/CanZASPass(turf/T, is_zone)
- if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
- return !anchored // If it's anchored, it'll block air.
- return TRUE // Don't stop airflow from the other sides.
-
-/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
- if(istype(O) && O.checkpass(PASSGLASS))
- return 1
- if(get_dir(O.loc, target) == dir)
- return 0
- return 1
-
-/obj/structure/window/hitby(AM as mob|obj)
- ..()
- visible_message("[src] was hit by [AM].")
- var/tforce = 0
- if(ismob(AM))
- tforce = 40
- else if(isobj(AM))
- var/obj/item/I = AM
- tforce = I.throwforce
- if(reinf) tforce *= 0.25
- if(health - tforce <= 7 && !reinf)
- anchored = 0
- update_verbs()
- update_nearby_icons()
- step(src, get_dir(AM, src))
- take_damage(tforce)
-
-/obj/structure/window/attack_tk(mob/user as mob)
- user.visible_message("Something knocks on [src].")
- playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
-
-/obj/structure/window/attack_hand(mob/user as mob)
- user.setClickCooldown(user.get_attack_speed())
- if(HULK in user.mutations)
- user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
- user.visible_message("[user] smashes through [src]!")
- user.do_attack_animation(src)
- shatter()
-
- else if (usr.a_intent == I_HURT)
-
- if (istype(usr,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = usr
- if(H.species.can_shred(H))
- attack_generic(H,25)
- return
-
- playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
- user.do_attack_animation(src)
- usr.visible_message("\The [usr] bangs against \the [src]!",
- "You bang against \the [src]!",
- "You hear a banging sound.")
- else
- playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
- usr.visible_message("[usr.name] knocks on the [src.name].",
- "You knock on the [src.name].",
- "You hear a knocking sound.")
- return
-
-/obj/structure/window/attack_generic(var/mob/user, var/damage)
- user.setClickCooldown(user.get_attack_speed())
- if(!damage)
- return
- if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
- visible_message("[user] smashes into [src]!")
- if(reinf)
- damage = damage / 2
- take_damage(damage)
- else
- visible_message("\The [user] bonks \the [src] harmlessly.")
- user.do_attack_animation(src)
- return 1
-
-/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
- if(!istype(W)) return//I really wish I did not need this
-
- // Fixing.
- if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
- var/obj/item/weapon/weldingtool/WT = W
- if(health < maxhealth)
- if(WT.remove_fuel(1 ,user))
- to_chat(user, "You begin repairing [src]...")
- playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 40 * WT.toolspeed, target = src))
- health = maxhealth
- // playsound(src, 'sound/items/Welder.ogg', 50, 1)
- update_icon()
- to_chat(user, "You repair [src].")
- else
- to_chat(user, "[src] is already in good condition!")
- return
-
- // Slamming.
- if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
- var/obj/item/weapon/grab/G = W
- if(istype(G.affecting,/mob/living))
- var/mob/living/M = G.affecting
- var/state = G.state
- qdel(W) //gotta delete it here because if window breaks, it won't get deleted
- switch (state)
- if(1)
- M.visible_message("[user] slams [M] against \the [src]!")
- M.apply_damage(7)
- hit(10)
- if(2)
- M.visible_message("[user] bashes [M] against \the [src]!")
- if (prob(50))
- M.Weaken(1)
- M.apply_damage(10)
- hit(25)
- if(3)
- M.visible_message("[user] crushes [M] against \the [src]!")
- M.Weaken(5)
- M.apply_damage(20)
- hit(50)
- return
-
- if(W.flags & NOBLUDGEON) return
-
- if(W.is_screwdriver())
- if(reinf && state >= 1)
- state = 3 - state
- update_nearby_icons()
- playsound(src, W.usesound, 75, 1)
- to_chat(user, "You have [state == 1 ? "un" : ""]fastened the window [state ? "from" : "to"] the frame.")
- else if(reinf && state == 0)
- anchored = !anchored
- update_nearby_icons()
- update_verbs()
- playsound(src, W.usesound, 75, 1)
- to_chat(user, "You have [anchored ? "" : "un"]fastened the frame [anchored ? "to" : "from"] the floor.")
- else if(!reinf)
- anchored = !anchored
- update_nearby_icons()
- update_verbs()
- playsound(src, W.usesound, 75, 1)
- to_chat(user, "You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.")
- else if(W.is_crowbar() && reinf && state <= 1)
- state = 1 - state
- playsound(src, W.usesound, 75, 1)
- to_chat(user, "You have pried the window [state ? "into" : "out of"] the frame.")
- else if(W.is_wrench() && !anchored && (!state || !reinf))
- if(!glasstype)
- to_chat(user, "You're not sure how to dismantle \the [src] properly.")
- else
- playsound(src, W.usesound, 75, 1)
- visible_message("[user] dismantles \the [src].")
- var/obj/item/stack/material/mats = new glasstype(loc)
- if(is_fulltile())
- mats.amount = 4
- qdel(src)
- else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
- var/obj/item/stack/cable_coil/C = W
- if (C.use(1))
- playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
- user.visible_message( \
- "\The [user] begins to wire \the [src] for electrochromic tinting.", \
- "You begin to wire \the [src] for electrochromic tinting.", \
- "You hear sparks.")
- if(do_after(user, 20 * C.toolspeed, src) && state == 0)
- playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
- if(is_fulltile())
- P.fulltile = TRUE
- P.icon_state = "fwindow"
- P.maxhealth = maxhealth
- P.health = health
- P.state = state
- P.anchored = anchored
- qdel(src)
- else if(istype(W,/obj/item/frame) && anchored)
- var/obj/item/frame/F = W
- F.try_build(src, user)
- else
- user.setClickCooldown(user.get_attack_speed(W))
- if(W.damtype == BRUTE || W.damtype == BURN)
- user.do_attack_animation(src)
- hit(W.force)
- if(health <= 7)
- anchored = 0
- update_nearby_icons()
- step(src, get_dir(user, src))
- else
- playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
- ..()
- return
-
-/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
- if(damage < force_threshold || force_threshold < 0)
- return
- if(reinf) damage *= 0.5
- take_damage(damage)
- return
-
-
-/obj/structure/window/verb/rotate_counterclockwise()
- set name = "Rotate Window Counterclockwise"
- set category = "Object"
- set src in oview(1)
-
- if(usr.incapacitated())
- return 0
-
- if(is_fulltile())
- return 0
-
- if(anchored)
- to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
- return 0
-
- update_nearby_tiles(need_rebuild=1) //Compel updates before
- src.set_dir(turn(src.dir, 90))
- updateSilicate()
- update_nearby_tiles(need_rebuild=1)
- return
-
-
-/obj/structure/window/verb/rotate_clockwise()
- set name = "Rotate Window Clockwise"
- set category = "Object"
- set src in oview(1)
-
- if(usr.incapacitated())
- return 0
-
- if(is_fulltile())
- return 0
-
- if(anchored)
- to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
- return 0
-
- update_nearby_tiles(need_rebuild=1) //Compel updates before
- src.set_dir(turn(src.dir, 270))
- updateSilicate()
- update_nearby_tiles(need_rebuild=1)
- return
-
-/obj/structure/window/New(Loc, start_dir=null, constructed=0)
- ..()
-
- if (start_dir)
- set_dir(start_dir)
-
- //player-constructed windows
- if (constructed)
- anchored = 0
- state = 0
- update_verbs()
-
- health = maxhealth
-
- ini_dir = dir
-
- update_nearby_tiles(need_rebuild=1)
- update_nearby_icons()
-
-
-/obj/structure/window/Destroy()
- density = 0
- update_nearby_tiles()
- var/turf/location = loc
- . = ..()
- for(var/obj/structure/window/W in orange(location, 1))
- W.update_icon()
-
-/obj/structure/window/Move()
- var/ini_dir = dir
- update_nearby_tiles(need_rebuild=1)
- . = ..()
- set_dir(ini_dir)
- update_nearby_tiles(need_rebuild=1)
-
-//checks if this window is full-tile one
-/obj/structure/window/proc/is_fulltile()
- return fulltile
-
-/obj/structure/window/is_between_turfs(var/turf/origin, var/turf/target)
- if(fulltile)
- return TRUE
- return ..()
-
-//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
-/obj/structure/window/proc/update_nearby_icons()
- update_icon()
- for(var/obj/structure/window/W in orange(src, 1))
- W.update_icon()
-
-//Updates the availabiliy of the rotation verbs
-/obj/structure/window/proc/update_verbs()
- if(anchored || is_fulltile())
- verbs -= /obj/structure/window/verb/rotate_counterclockwise
- verbs -= /obj/structure/window/verb/rotate_clockwise
- else if(!is_fulltile())
- verbs += /obj/structure/window/verb/rotate_counterclockwise
- verbs += /obj/structure/window/verb/rotate_clockwise
-
-//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
-/obj/structure/window/update_icon()
- //A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
- //this way it will only update full-tile ones
- overlays.Cut()
- if(!is_fulltile())
- // Rotate the sprite somewhat so non-fulltiled windows can be seen as needing repair.
- var/full_tilt_degrees = 15
- var/tilt_to_apply = abs((health / maxhealth) - 1)
- if(tilt_to_apply && prob(50))
- tilt_to_apply = -tilt_to_apply
- adjust_rotation(LERP(0, full_tilt_degrees, tilt_to_apply))
-
- icon_state = "[basestate]"
- return
- var/list/dirs = list()
- if(anchored)
- for(var/obj/structure/window/W in orange(src,1))
- if(W.anchored && W.density && W.glasstype == src.glasstype && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
- dirs += get_dir(src, W)
-
- var/list/connections = dirs_to_corner_states(dirs)
-
- icon_state = ""
- for(var/i = 1 to 4)
- var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
- overlays += I
-
- // Damage overlays.
- var/ratio = health / maxhealth
- ratio = CEILING(ratio * 4, 1) * 25
-
- if(ratio > 75)
- return
- var/image/I = image(icon, "damage[ratio]", layer = layer + 0.1)
- overlays += I
-
- return
-
-/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(exposed_temperature > maximal_heat)
- hit(damage_per_fire_tick, 0)
- ..()
-
-
-
-/obj/structure/window/basic
- desc = "It looks thin and flimsy. A few knocks with... almost anything, really should shatter it."
- icon_state = "window"
- basestate = "window"
- glasstype = /obj/item/stack/material/glass
- maximal_heat = T0C + 100
- damage_per_fire_tick = 2.0
- maxhealth = 12.0
- force_threshold = 3
-
-/obj/structure/window/basic/full
- icon_state = "window-full"
- maxhealth = 24
- fulltile = TRUE
-
-/obj/structure/window/phoronbasic
- name = "phoron window"
- desc = "A borosilicate alloy window. It seems to be quite strong."
- basestate = "phoronwindow"
- icon_state = "phoronwindow"
- shardtype = /obj/item/weapon/material/shard/phoron
- glasstype = /obj/item/stack/material/glass/phoronglass
- maximal_heat = T0C + 2000
- damage_per_fire_tick = 1.0
- maxhealth = 40.0
- force_threshold = 5
-
-/obj/structure/window/phoronbasic/full
- icon_state = "phoronwindow-full"
- maxhealth = 80
- fulltile = TRUE
-
-/obj/structure/window/phoronreinforced
- name = "reinforced borosilicate window"
- desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
- basestate = "phoronrwindow"
- icon_state = "phoronrwindow"
- shardtype = /obj/item/weapon/material/shard/phoron
- glasstype = /obj/item/stack/material/glass/phoronrglass
- reinf = 1
- maximal_heat = T0C + 4000
- damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
- maxhealth = 80.0
- force_threshold = 10
-
-/obj/structure/window/phoronreinforced/full
- icon_state = "phoronrwindow-full"
- maxhealth = 160
- fulltile = TRUE
-
-/obj/structure/window/reinforced
- name = "reinforced window"
- desc = "It looks rather strong. Might take a few good hits to shatter it."
- icon_state = "rwindow"
- basestate = "rwindow"
- maxhealth = 40.0
- reinf = 1
- maximal_heat = T0C + 750
- damage_per_fire_tick = 2.0
- glasstype = /obj/item/stack/material/glass/reinforced
- force_threshold = 6
-
-/obj/structure/window/reinforced/full
- icon_state = "rwindow-full"
- maxhealth = 80
- fulltile = TRUE
-
-/obj/structure/window/reinforced/tinted
- name = "tinted window"
- desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
- icon_state = "twindow"
- basestate = "twindow"
- opacity = 1
-
-/obj/structure/window/reinforced/tinted/frosted
- name = "frosted window"
- desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
- icon_state = "fwindow"
- basestate = "fwindow"
- maxhealth = 30
- force_threshold = 5
-
-/obj/structure/window/shuttle
- name = "shuttle window"
- desc = "It looks rather strong. Might take a few good hits to shatter it."
- icon = 'icons/obj/podwindows.dmi'
- icon_state = "window"
- basestate = "window"
- maxhealth = 40
- reinf = 1
- basestate = "w"
- dir = 5
- force_threshold = 7
-
-/obj/structure/window/reinforced/polarized
- name = "electrochromic window"
- desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
- var/id
-
-/obj/structure/window/reinforced/polarized/full
- icon_state = "rwindow-full"
- maxhealth = 80
- fulltile = TRUE
-
-/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W, /obj/item/device/multitool) && !anchored) // Only allow programming if unanchored!
- var/obj/item/device/multitool/MT = W
- // First check if they have a windowtint button buffered
- if(istype(MT.connectable, /obj/machinery/button/windowtint))
- var/obj/machinery/button/windowtint/buffered_button = MT.connectable
- src.id = buffered_button.id
- to_chat(user, "\The [src] is linked to \the [buffered_button].")
- return TRUE
- // Otherwise fall back to asking them
- var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN)
- if (!t && user.get_active_hand() != W && in_range(src, user))
- src.id = t
- to_chat(user, "The new ID of \the [src] is [id]")
- return TRUE
- . = ..()
-
-/obj/structure/window/reinforced/polarized/proc/toggle()
- if(opacity)
- animate(src, color="#FFFFFF", time=5)
- set_opacity(0)
- else
- animate(src, color="#222222", time=5)
- set_opacity(1)
-
-
-
-/obj/machinery/button/windowtint
- name = "window tint control"
- icon = 'icons/obj/stationobjs_vr.dmi' // VOREStation Edit - New icons
- icon_state = "light0"
- desc = "A remote control switch for polarized windows."
- var/range = 7
-
-/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
- if(..())
- return 1
-
- toggle_tint()
-
-/obj/machinery/button/windowtint/proc/toggle_tint()
- use_power(5)
-
- active = !active
- update_icon()
-
- for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
- if (W.id == src.id || !W.id)
- spawn(0)
- W.toggle()
- return
-
-/obj/machinery/button/windowtint/power_change()
- ..()
- if(active && !powered(power_channel))
- toggle_tint()
-
-/obj/machinery/button/windowtint/update_icon()
- icon_state = "light[active]"
-
-/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W, /obj/item/device/multitool))
- var/obj/item/device/multitool/MT = W
- if(!id)
- // If no ID is set yet (newly built button?) let them select an ID for first-time use!
- var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN)
- if (t && user.get_active_hand() != W && in_range(src, user))
- src.id = t
- to_chat(user, "The new ID of \the [src] is [id]")
- if(id)
- // It already has an ID (or they just set one), buffer it for copying to windows.
- to_chat(user, "You store \the [src] in \the [MT]'s buffer!")
- MT.connectable = src
- MT.update_icon()
- return TRUE
- . = ..()
-
-/obj/structure/window/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
- switch(passed_mode)
- if(RCD_DECONSTRUCT)
- return list(
- RCD_VALUE_MODE = RCD_DECONSTRUCT,
- RCD_VALUE_DELAY = 5 SECONDS,
- RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5
- )
-
-/obj/structure/window/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
- switch(passed_mode)
- if(RCD_DECONSTRUCT)
- to_chat(user, span("notice", "You deconstruct \the [src]."))
- qdel(src)
- return TRUE
- return FALSE
+/obj/structure/window
+ name = "window"
+ desc = "A window."
+ icon = 'icons/obj/structures_vr.dmi' // VOREStation Edit - New icons
+ density = 1
+ can_atmos_pass = ATMOS_PASS_PROC
+ w_class = ITEMSIZE_NORMAL
+
+ layer = WINDOW_LAYER
+ pressure_resistance = 4*ONE_ATMOSPHERE
+ anchored = 1.0
+ flags = ON_BORDER
+ var/maxhealth = 14.0
+ var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
+ var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
+ var/health
+ var/force_threshold = 0
+ var/ini_dir = null
+ var/state = 2
+ var/reinf = 0
+ var/basestate
+ var/shardtype = /obj/item/weapon/material/shard
+ var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
+ var/silicate = 0 // number of units of silicate
+ var/fulltile = FALSE // Set to true on full-tile variants.
+
+/obj/structure/window/examine(mob/user)
+ . = ..()
+
+ if(health == maxhealth)
+ . += "It looks fully intact."
+ else
+ var/perc = health / maxhealth
+ if(perc > 0.75)
+ . += "It has a few cracks."
+ else if(perc > 0.5)
+ . += "It looks slightly damaged."
+ else if(perc > 0.25)
+ . += "It looks moderately damaged."
+ else
+ . += "It looks heavily damaged."
+ if(silicate)
+ if (silicate < 30)
+ . += "It has a thin layer of silicate."
+ else if (silicate < 70)
+ . += "It is covered in silicate."
+ else
+ . += "There is a thick layer of silicate covering it."
+
+/obj/structure/window/examine_icon()
+ return icon(icon=initial(icon),icon_state=initial(icon_state))
+
+/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
+ var/initialhealth = health
+
+ if(silicate)
+ damage = damage * (1 - silicate / 200)
+
+ health = max(0, health - damage)
+
+ if(health <= 0)
+ shatter()
+ else
+ if(sound_effect)
+ playsound(src, 'sound/effects/Glasshit.ogg', 100, 1)
+ if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
+ visible_message("[src] looks like it's about to shatter!" )
+ update_icon()
+ else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
+ visible_message("[src] looks seriously damaged!" )
+ update_icon()
+ else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
+ visible_message("Cracks begin to appear in [src]!" )
+ update_icon()
+ return
+
+/obj/structure/window/proc/apply_silicate(var/amount)
+ if(health < maxhealth) // Mend the damage
+ health = min(health + amount * 3, maxhealth)
+ if(health == maxhealth)
+ visible_message("[src] looks fully repaired." )
+ else // Reinforce
+ silicate = min(silicate + amount, 100)
+ updateSilicate()
+
+/obj/structure/window/proc/updateSilicate()
+ cut_overlays()
+ update_icon()
+
+ var/image/img = image(src)
+ img.color = "#ffffff"
+ img.alpha = silicate * 255 / 100
+ add_overlay(img)
+
+/obj/structure/window/proc/shatter(var/display_message = 1)
+ playsound(src, "shatter", 70, 1)
+ if(display_message)
+ visible_message("[src] shatters!")
+ new shardtype(loc)
+ if(reinf)
+ new /obj/item/stack/rods(loc)
+ if(is_fulltile())
+ new shardtype(loc) //todo pooling?
+ if(reinf)
+ new /obj/item/stack/rods(loc)
+ qdel(src)
+ return
+
+
+/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
+
+ var/proj_damage = Proj.get_structure_damage()
+ if(!proj_damage) return
+
+ ..()
+ take_damage(proj_damage)
+ return
+
+
+/obj/structure/window/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ qdel(src)
+ return
+ if(2.0)
+ shatter(0)
+ return
+ if(3.0)
+ if(prob(50))
+ shatter(0)
+ return
+
+/obj/structure/window/blob_act()
+ take_damage(50)
+
+/obj/structure/window/CanPass(atom/movable/mover, turf/target)
+ if(istype(mover) && mover.checkpass(PASSGLASS))
+ return TRUE
+ if(is_fulltile())
+ return FALSE //full tile window, you can't move into it!
+ if((get_dir(loc, target) & dir) || (get_dir(mover, target) == turn(dir, 180)))
+ return !density
+ else
+ return TRUE
+
+
+/obj/structure/window/CanZASPass(turf/T, is_zone)
+ if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
+ return !anchored // If it's anchored, it'll block air.
+ return TRUE // Don't stop airflow from the other sides.
+
+/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
+ if(istype(O) && O.checkpass(PASSGLASS))
+ return 1
+ if(get_dir(O.loc, target) == dir)
+ return 0
+ return 1
+
+/obj/structure/window/hitby(AM as mob|obj)
+ ..()
+ visible_message("[src] was hit by [AM].")
+ var/tforce = 0
+ if(ismob(AM))
+ tforce = 40
+ else if(isobj(AM))
+ var/obj/item/I = AM
+ tforce = I.throwforce
+ if(reinf) tforce *= 0.25
+ if(health - tforce <= 7 && !reinf)
+ anchored = 0
+ update_verbs()
+ update_nearby_icons()
+ step(src, get_dir(AM, src))
+ take_damage(tforce)
+
+/obj/structure/window/attack_tk(mob/user as mob)
+ user.visible_message("Something knocks on [src].")
+ playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
+
+/obj/structure/window/attack_hand(mob/user as mob)
+ user.setClickCooldown(user.get_attack_speed())
+ if(HULK in user.mutations)
+ user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
+ user.visible_message("[user] smashes through [src]!")
+ user.do_attack_animation(src)
+ shatter()
+
+ else if (usr.a_intent == I_HURT)
+
+ if (istype(usr,/mob/living/carbon/human))
+ var/mob/living/carbon/human/H = usr
+ if(H.species.can_shred(H))
+ attack_generic(H,25)
+ return
+
+ playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
+ user.do_attack_animation(src)
+ usr.visible_message("\The [usr] bangs against \the [src]!",
+ "You bang against \the [src]!",
+ "You hear a banging sound.")
+ else
+ playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
+ usr.visible_message("[usr.name] knocks on the [src.name].",
+ "You knock on the [src.name].",
+ "You hear a knocking sound.")
+ return
+
+/obj/structure/window/attack_generic(var/mob/user, var/damage)
+ user.setClickCooldown(user.get_attack_speed())
+ if(!damage)
+ return
+ if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD)
+ visible_message("[user] smashes into [src]!")
+ if(reinf)
+ damage = damage / 2
+ take_damage(damage)
+ else
+ visible_message("\The [user] bonks \the [src] harmlessly.")
+ user.do_attack_animation(src)
+ return 1
+
+/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
+ if(!istype(W)) return//I really wish I did not need this
+
+ // Fixing.
+ if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
+ var/obj/item/weapon/weldingtool/WT = W
+ if(health < maxhealth)
+ if(WT.remove_fuel(1 ,user))
+ to_chat(user, "You begin repairing [src]...")
+ playsound(src, WT.usesound, 50, 1)
+ if(do_after(user, 40 * WT.toolspeed, target = src))
+ health = maxhealth
+ // playsound(src, 'sound/items/Welder.ogg', 50, 1)
+ update_icon()
+ to_chat(user, "You repair [src].")
+ else
+ to_chat(user, "[src] is already in good condition!")
+ return
+
+ // Slamming.
+ if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
+ var/obj/item/weapon/grab/G = W
+ if(istype(G.affecting,/mob/living))
+ var/mob/living/M = G.affecting
+ var/state = G.state
+ qdel(W) //gotta delete it here because if window breaks, it won't get deleted
+ switch (state)
+ if(1)
+ M.visible_message("[user] slams [M] against \the [src]!")
+ M.apply_damage(7)
+ hit(10)
+ if(2)
+ M.visible_message("[user] bashes [M] against \the [src]!")
+ if (prob(50))
+ M.Weaken(1)
+ M.apply_damage(10)
+ hit(25)
+ if(3)
+ M.visible_message("[user] crushes [M] against \the [src]!")
+ M.Weaken(5)
+ M.apply_damage(20)
+ hit(50)
+ return
+
+ if(W.flags & NOBLUDGEON) return
+
+ if(W.is_screwdriver())
+ if(reinf && state >= 1)
+ state = 3 - state
+ update_nearby_icons()
+ playsound(src, W.usesound, 75, 1)
+ to_chat(user, "You have [state == 1 ? "un" : ""]fastened the window [state ? "from" : "to"] the frame.")
+ else if(reinf && state == 0)
+ anchored = !anchored
+ update_nearby_icons()
+ update_verbs()
+ playsound(src, W.usesound, 75, 1)
+ to_chat(user, "You have [anchored ? "" : "un"]fastened the frame [anchored ? "to" : "from"] the floor.")
+ else if(!reinf)
+ anchored = !anchored
+ update_nearby_icons()
+ update_verbs()
+ playsound(src, W.usesound, 75, 1)
+ to_chat(user, "You have [anchored ? "" : "un"]fastened the window [anchored ? "to" : "from"] the floor.")
+ else if(W.is_crowbar() && reinf && state <= 1)
+ state = 1 - state
+ playsound(src, W.usesound, 75, 1)
+ to_chat(user, "You have pried the window [state ? "into" : "out of"] the frame.")
+ else if(W.is_wrench() && !anchored && (!state || !reinf))
+ if(!glasstype)
+ to_chat(user, "You're not sure how to dismantle \the [src] properly.")
+ else
+ playsound(src, W.usesound, 75, 1)
+ visible_message("[user] dismantles \the [src].")
+ var/obj/item/stack/material/mats = new glasstype(loc)
+ if(is_fulltile())
+ mats.amount = 4
+ qdel(src)
+ else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
+ var/obj/item/stack/cable_coil/C = W
+ if (C.use(1))
+ playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
+ user.visible_message( \
+ "\The [user] begins to wire \the [src] for electrochromic tinting.", \
+ "You begin to wire \the [src] for electrochromic tinting.", \
+ "You hear sparks.")
+ if(do_after(user, 20 * C.toolspeed, src) && state == 0)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
+ if(is_fulltile())
+ P.fulltile = TRUE
+ P.icon_state = "fwindow"
+ P.maxhealth = maxhealth
+ P.health = health
+ P.state = state
+ P.anchored = anchored
+ qdel(src)
+ else if(istype(W,/obj/item/frame) && anchored)
+ var/obj/item/frame/F = W
+ F.try_build(src, user)
+ else
+ user.setClickCooldown(user.get_attack_speed(W))
+ if(W.damtype == BRUTE || W.damtype == BURN)
+ user.do_attack_animation(src)
+ hit(W.force)
+ if(health <= 7)
+ anchored = 0
+ update_nearby_icons()
+ step(src, get_dir(user, src))
+ else
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
+ ..()
+ return
+
+/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
+ if(damage < force_threshold || force_threshold < 0)
+ return
+ if(reinf) damage *= 0.5
+ take_damage(damage)
+ return
+
+
+/obj/structure/window/verb/rotate_counterclockwise()
+ set name = "Rotate Window Counterclockwise"
+ set category = "Object"
+ set src in oview(1)
+
+ if(usr.incapacitated())
+ return 0
+
+ if(is_fulltile())
+ return 0
+
+ if(anchored)
+ to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
+ return 0
+
+ update_nearby_tiles(need_rebuild=1) //Compel updates before
+ src.set_dir(turn(src.dir, 90))
+ updateSilicate()
+ update_nearby_tiles(need_rebuild=1)
+ return
+
+
+/obj/structure/window/verb/rotate_clockwise()
+ set name = "Rotate Window Clockwise"
+ set category = "Object"
+ set src in oview(1)
+
+ if(usr.incapacitated())
+ return 0
+
+ if(is_fulltile())
+ return 0
+
+ if(anchored)
+ to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
+ return 0
+
+ update_nearby_tiles(need_rebuild=1) //Compel updates before
+ src.set_dir(turn(src.dir, 270))
+ updateSilicate()
+ update_nearby_tiles(need_rebuild=1)
+ return
+
+/obj/structure/window/New(Loc, start_dir=null, constructed=0)
+ ..()
+
+ if (start_dir)
+ set_dir(start_dir)
+
+ //player-constructed windows
+ if (constructed)
+ anchored = 0
+ state = 0
+ update_verbs()
+
+ health = maxhealth
+
+ ini_dir = dir
+
+ update_nearby_tiles(need_rebuild=1)
+ update_nearby_icons()
+
+
+/obj/structure/window/Destroy()
+ density = 0
+ update_nearby_tiles()
+ var/turf/location = loc
+ . = ..()
+ for(var/obj/structure/window/W in orange(location, 1))
+ W.update_icon()
+
+/obj/structure/window/Move()
+ var/ini_dir = dir
+ update_nearby_tiles(need_rebuild=1)
+ . = ..()
+ set_dir(ini_dir)
+ update_nearby_tiles(need_rebuild=1)
+
+//checks if this window is full-tile one
+/obj/structure/window/proc/is_fulltile()
+ return fulltile
+
+/obj/structure/window/is_between_turfs(var/turf/origin, var/turf/target)
+ if(fulltile)
+ return TRUE
+ return ..()
+
+//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
+/obj/structure/window/proc/update_nearby_icons()
+ update_icon()
+ for(var/obj/structure/window/W in orange(src, 1))
+ W.update_icon()
+
+//Updates the availabiliy of the rotation verbs
+/obj/structure/window/proc/update_verbs()
+ if(anchored || is_fulltile())
+ verbs -= /obj/structure/window/verb/rotate_counterclockwise
+ verbs -= /obj/structure/window/verb/rotate_clockwise
+ else if(!is_fulltile())
+ verbs += /obj/structure/window/verb/rotate_counterclockwise
+ verbs += /obj/structure/window/verb/rotate_clockwise
+
+//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
+/obj/structure/window/update_icon()
+ //A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
+ //this way it will only update full-tile ones
+ cut_overlays()
+ if(!is_fulltile())
+ // Rotate the sprite somewhat so non-fulltiled windows can be seen as needing repair.
+ var/full_tilt_degrees = 15
+ var/tilt_to_apply = abs((health / maxhealth) - 1)
+ if(tilt_to_apply && prob(50))
+ tilt_to_apply = -tilt_to_apply
+ adjust_rotation(LERP(0, full_tilt_degrees, tilt_to_apply))
+
+ icon_state = "[basestate]"
+ return
+ var/list/dirs = list()
+ if(anchored)
+ for(var/obj/structure/window/W in orange(src,1))
+ if(W.anchored && W.density && W.glasstype == src.glasstype && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
+ dirs += get_dir(src, W)
+
+ var/list/connections = dirs_to_corner_states(dirs)
+
+ icon_state = ""
+ for(var/i = 1 to 4)
+ var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
+ add_overlay(I)
+
+ // Damage overlays.
+ var/ratio = health / maxhealth
+ ratio = CEILING(ratio * 4, 1) * 25
+
+ if(ratio > 75)
+ return
+ var/image/I = image(icon, "damage[ratio]", layer = layer + 0.1)
+ add_overlay(I)
+
+ return
+
+/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(exposed_temperature > maximal_heat)
+ hit(damage_per_fire_tick, 0)
+ ..()
+
+
+
+/obj/structure/window/basic
+ desc = "It looks thin and flimsy. A few knocks with... almost anything, really should shatter it."
+ icon_state = "window"
+ basestate = "window"
+ glasstype = /obj/item/stack/material/glass
+ maximal_heat = T0C + 100
+ damage_per_fire_tick = 2.0
+ maxhealth = 12.0
+ force_threshold = 3
+
+/obj/structure/window/basic/full
+ icon_state = "window-full"
+ maxhealth = 24
+ fulltile = TRUE
+
+/obj/structure/window/phoronbasic
+ name = "phoron window"
+ desc = "A borosilicate alloy window. It seems to be quite strong."
+ basestate = "phoronwindow"
+ icon_state = "phoronwindow"
+ shardtype = /obj/item/weapon/material/shard/phoron
+ glasstype = /obj/item/stack/material/glass/phoronglass
+ maximal_heat = T0C + 2000
+ damage_per_fire_tick = 1.0
+ maxhealth = 40.0
+ force_threshold = 5
+
+/obj/structure/window/phoronbasic/full
+ icon_state = "phoronwindow-full"
+ maxhealth = 80
+ fulltile = TRUE
+
+/obj/structure/window/phoronreinforced
+ name = "reinforced borosilicate window"
+ desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
+ basestate = "phoronrwindow"
+ icon_state = "phoronrwindow"
+ shardtype = /obj/item/weapon/material/shard/phoron
+ glasstype = /obj/item/stack/material/glass/phoronrglass
+ reinf = 1
+ maximal_heat = T0C + 4000
+ damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
+ maxhealth = 80.0
+ force_threshold = 10
+
+/obj/structure/window/phoronreinforced/full
+ icon_state = "phoronrwindow-full"
+ maxhealth = 160
+ fulltile = TRUE
+
+/obj/structure/window/reinforced
+ name = "reinforced window"
+ desc = "It looks rather strong. Might take a few good hits to shatter it."
+ icon_state = "rwindow"
+ basestate = "rwindow"
+ maxhealth = 40.0
+ reinf = 1
+ maximal_heat = T0C + 750
+ damage_per_fire_tick = 2.0
+ glasstype = /obj/item/stack/material/glass/reinforced
+ force_threshold = 6
+
+/obj/structure/window/reinforced/full
+ icon_state = "rwindow-full"
+ maxhealth = 80
+ fulltile = TRUE
+
+/obj/structure/window/reinforced/tinted
+ name = "tinted window"
+ desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
+ icon_state = "twindow"
+ basestate = "twindow"
+ opacity = 1
+
+/obj/structure/window/reinforced/tinted/frosted
+ name = "frosted window"
+ desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
+ icon_state = "fwindow"
+ basestate = "fwindow"
+ maxhealth = 30
+ force_threshold = 5
+
+/obj/structure/window/shuttle
+ name = "shuttle window"
+ desc = "It looks rather strong. Might take a few good hits to shatter it."
+ icon = 'icons/obj/podwindows.dmi'
+ icon_state = "window"
+ basestate = "window"
+ maxhealth = 40
+ reinf = 1
+ basestate = "w"
+ dir = 5
+ force_threshold = 7
+
+/obj/structure/window/reinforced/polarized
+ name = "electrochromic window"
+ desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
+ var/id
+
+/obj/structure/window/reinforced/polarized/full
+ icon_state = "rwindow-full"
+ maxhealth = 80
+ fulltile = TRUE
+
+/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/device/multitool) && !anchored) // Only allow programming if unanchored!
+ var/obj/item/device/multitool/MT = W
+ // First check if they have a windowtint button buffered
+ if(istype(MT.connectable, /obj/machinery/button/windowtint))
+ var/obj/machinery/button/windowtint/buffered_button = MT.connectable
+ src.id = buffered_button.id
+ to_chat(user, "\The [src] is linked to \the [buffered_button].")
+ return TRUE
+ // Otherwise fall back to asking them
+ var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN)
+ if (!t && user.get_active_hand() != W && in_range(src, user))
+ src.id = t
+ to_chat(user, "The new ID of \the [src] is [id]")
+ return TRUE
+ . = ..()
+
+/obj/structure/window/reinforced/polarized/proc/toggle()
+ if(opacity)
+ animate(src, color="#FFFFFF", time=5)
+ set_opacity(0)
+ else
+ animate(src, color="#222222", time=5)
+ set_opacity(1)
+
+
+
+/obj/machinery/button/windowtint
+ name = "window tint control"
+ icon = 'icons/obj/stationobjs_vr.dmi' // VOREStation Edit - New icons
+ icon_state = "light0"
+ desc = "A remote control switch for polarized windows."
+ var/range = 7
+
+/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
+ if(..())
+ return 1
+
+ toggle_tint()
+
+/obj/machinery/button/windowtint/proc/toggle_tint()
+ use_power(5)
+
+ active = !active
+ update_icon()
+
+ for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
+ if (W.id == src.id || !W.id)
+ spawn(0)
+ W.toggle()
+ return
+
+/obj/machinery/button/windowtint/power_change()
+ ..()
+ if(active && !powered(power_channel))
+ toggle_tint()
+
+/obj/machinery/button/windowtint/update_icon()
+ icon_state = "light[active]"
+
+/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/device/multitool))
+ var/obj/item/device/multitool/MT = W
+ if(!id)
+ // If no ID is set yet (newly built button?) let them select an ID for first-time use!
+ var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN)
+ if (t && user.get_active_hand() != W && in_range(src, user))
+ src.id = t
+ to_chat(user, "The new ID of \the [src] is [id]")
+ if(id)
+ // It already has an ID (or they just set one), buffer it for copying to windows.
+ to_chat(user, "You store \the [src] in \the [MT]'s buffer!")
+ MT.connectable = src
+ MT.update_icon()
+ return TRUE
+ . = ..()
+
+/obj/structure/window/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
+ switch(passed_mode)
+ if(RCD_DECONSTRUCT)
+ return list(
+ RCD_VALUE_MODE = RCD_DECONSTRUCT,
+ RCD_VALUE_DELAY = 5 SECONDS,
+ RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5
+ )
+
+/obj/structure/window/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
+ switch(passed_mode)
+ if(RCD_DECONSTRUCT)
+ to_chat(user, span("notice", "You deconstruct \the [src]."))
+ qdel(src)
+ return TRUE
+ return FALSE
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index e7c3a34c11f..96761437512 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -1609,7 +1609,7 @@ datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies
if(!P.stamped)
P.stamped = new
P.stamped += /obj/item/weapon/stamp/centcomm
- P.overlays += stampoverlay
+ P.add_overlay(stampoverlay)
var/obj/item/rcvdcopy
rcvdcopy = destination.copy(P)
diff --git a/code/modules/ai/ai_holder_movement.dm b/code/modules/ai/ai_holder_movement.dm
index bc5916917a9..50624926844 100644
--- a/code/modules/ai/ai_holder_movement.dm
+++ b/code/modules/ai/ai_holder_movement.dm
@@ -126,7 +126,7 @@
if(path_display)
var/turf/T = src.path[1]
- T.overlays -= path_overlay
+ T.cut_overlay(path_overlay)
// step_towards(holder, src.path[1])
if(holder.IMove(get_step_towards(holder, src.path[1])) != MOVEMENT_ON_COOLDOWN)
diff --git a/code/modules/ai/ai_holder_pathfinding.dm b/code/modules/ai/ai_holder_pathfinding.dm
index 1a20c6f682b..fed867ee244 100644
--- a/code/modules/ai/ai_holder_pathfinding.dm
+++ b/code/modules/ai/ai_holder_pathfinding.dm
@@ -14,7 +14,7 @@
ai_log("forget_path() : Entering.", AI_LOG_DEBUG)
if(path_display)
for(var/turf/T in path)
- T.overlays -= path_overlay
+ T.cut_overlay(path_overlay)
path.Cut()
ai_log("forget_path() : Exiting.", AI_LOG_DEBUG)
@@ -49,7 +49,7 @@
ai_log("get_path() : Made new path.",AI_LOG_DEBUG)
if(path_display)
for(var/turf/T in path)
- T.overlays |= path_overlay
+ T.add_overlay(path_overlay)
else
ai_log("get_path() : Failed to make new path. Exiting.",AI_LOG_DEBUG)
return 0
diff --git a/code/modules/ai/ai_holder_targeting.dm b/code/modules/ai/ai_holder_targeting.dm
index 3b3878babee..a243ab8a582 100644
--- a/code/modules/ai/ai_holder_targeting.dm
+++ b/code/modules/ai/ai_holder_targeting.dm
@@ -222,17 +222,17 @@
lose_target_position()
if(last_turf_display && target_last_seen_turf)
- target_last_seen_turf.overlays -= last_turf_overlay
+ target_last_seen_turf.cut_overlay(last_turf_overlay)
target_last_seen_turf = get_turf(target)
if(last_turf_display)
- target_last_seen_turf.overlays += last_turf_overlay
+ target_last_seen_turf.add_overlay(last_turf_overlay)
// Resets the last known position to null.
/datum/ai_holder/proc/lose_target_position()
if(last_turf_display && target_last_seen_turf)
- target_last_seen_turf.overlays -= last_turf_overlay
+ target_last_seen_turf.cut_overlay(last_turf_overlay)
ai_log("lose_target_position() : Last position is being reset.", AI_LOG_INFO)
target_last_seen_turf = null
diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm
index fa8b7838157..30f002de7d2 100644
--- a/code/modules/assembly/timer.dm
+++ b/code/modules/assembly/timer.dm
@@ -53,10 +53,10 @@
time = 10
/obj/item/device/assembly/timer/update_icon()
- overlays.Cut()
+ cut_overlays()
attached_overlays = list()
if(timing)
- overlays += "timer_timing"
+ add_overlay("timer_timing")
attached_overlays += "timer_timing"
if(holder)
holder.update_icon()
diff --git a/code/modules/blob2/blobs/core.dm b/code/modules/blob2/blobs/core.dm
index b3633b406eb..cd4a68a3088 100644
--- a/code/modules/blob2/blobs/core.dm
+++ b/code/modules/blob2/blobs/core.dm
@@ -119,14 +119,14 @@ var/list/blob_cores = list()
return ..()
/obj/structure/blob/core/update_icon()
- overlays.Cut()
+ cut_overlays()
color = null
var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob")
if(overmind)
blob_overlay.color = overmind.blob_type.color
name = "[overmind.blob_type.name] [base_name]"
- overlays += blob_overlay
- overlays += mutable_appearance('icons/mob/blob.dmi', "blob_core_overlay")
+ add_overlay(blob_overlay)
+ add_overlay("blob_core_overlay")
/obj/structure/blob/core/process()
set waitfor = FALSE
diff --git a/code/modules/blob2/blobs/node.dm b/code/modules/blob2/blobs/node.dm
index 5f54b6b80a1..072769b73aa 100644
--- a/code/modules/blob2/blobs/node.dm
+++ b/code/modules/blob2/blobs/node.dm
@@ -21,14 +21,14 @@ var/list/blob_nodes = list()
return ..()
/obj/structure/blob/node/update_icon()
- overlays.Cut()
+ cut_overlays()
color = null
var/mutable_appearance/blob_overlay = mutable_appearance('icons/mob/blob.dmi', "blob")
if(overmind)
name = "[overmind.blob_type.name] [base_name]"
blob_overlay.color = overmind.blob_type.color
- overlays += blob_overlay
- overlays += mutable_appearance('icons/mob/blob.dmi', "blob_node_overlay")
+ add_overlay(blob_overlay)
+ add_overlay("blob_node_overlay")
/obj/structure/blob/node/process()
set waitfor = FALSE
diff --git a/code/modules/blob2/mobs/spore.dm b/code/modules/blob2/mobs/spore.dm
index 5d8808c57fd..732db9a4da4 100644
--- a/code/modules/blob2/mobs/spore.dm
+++ b/code/modules/blob2/mobs/spore.dm
@@ -61,14 +61,14 @@
set_light(0)
if(is_infesting)
- overlays.Cut()
+ cut_overlays()
icon = infested.icon
- overlays = infested.overlays
+ add_overlay(infested.overlays)
var/mutable_appearance/blob_head_overlay = mutable_appearance('icons/mob/blob.dmi', "blob_head")
if(overmind)
blob_head_overlay.color = overmind.blob_type.complementary_color
color = initial(color)//looks better.
- overlays += blob_head_overlay
+ add_overlay(blob_head_overlay)
/mob/living/simple_mob/hostile/blob/spore/Life()
if(can_infest && !is_infesting && isturf(src.loc))
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index d0cb86230b4..8c54e2ff551 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -1,1096 +1,1096 @@
-/obj/item/clothing
- name = "clothing"
- siemens_coefficient = 0.9
- drop_sound = 'sound/items/drop/clothing.ogg'
- pickup_sound = 'sound/items/pickup/clothing.ogg'
- var/list/species_restricted = null //Only these species can wear this kit.
- var/gunshot_residue //Used by forensics.
-
- var/list/accessories
- var/list/valid_accessory_slots
- var/list/restricted_accessory_slots
- var/list/starting_accessories
-
- var/flash_protection = FLASH_PROTECTION_NONE
- var/tint = TINT_NONE
- var/list/enables_planes //Enables these planes in the wearing mob's plane_holder
- var/list/plane_slots //But only if it's equipped into this specific slot
-
- /*
- Sprites used when the clothing item is refit. This is done by setting icon_override.
- For best results, if this is set then sprite_sheets should be null and vice versa, but that is by no means necessary.
- Ideally, sprite_sheets_refit should be used for "hard" clothing items that can't change shape very well to fit the wearer (e.g. helmets, hardsuits),
- while sprite_sheets should be used for "flexible" clothing items that do not need to be refitted (e.g. aliens wearing jumpsuits).
- */
- var/list/sprite_sheets_refit = null
- var/ear_protection = 0
- var/blood_sprite_state
-
- var/index //null by default, if set, will change which dmi it uses
-
- var/update_icon_define = null // Only needed if you've got multiple files for the same type of clothing
-
- var/polychromic = FALSE //VOREStation edit
-
-//Updates the icons of the mob wearing the clothing item, if any.
-/obj/item/clothing/proc/update_clothing_icon()
- return
-
-// Aurora forensics port.
-/obj/item/clothing/clean_blood()
- . = ..()
- gunshot_residue = null
-
-
-/obj/item/clothing/New()
- ..()
- if(starting_accessories)
- for(var/T in starting_accessories)
- var/obj/item/clothing/accessory/tie = new T(src)
- src.attach_accessory(null, tie)
- set_clothing_index()
-
- //VOREStation edit start
- if(polychromic)
- verbs |= /obj/item/clothing/proc/change_color
- //VOREStation edit start
-
-/obj/item/clothing/update_icon()
- overlays.Cut() //This removes all the overlays on the sprite and then goes down a checklist adding them as required.
- if(blood_DNA)
- add_blood()
- . = ..()
-
-/obj/item/clothing/equipped(var/mob/user,var/slot)
- ..()
- if(enables_planes)
- user.recalculate_vis()
-
-/obj/item/clothing/dropped(var/mob/user)
- ..()
- if(enables_planes)
- user.recalculate_vis()
-
-//BS12: Species-restricted clothing check.
-/obj/item/clothing/mob_can_equip(M as mob, slot, disable_warning = FALSE)
-
- //if we can't equip the item anyway, don't bother with species_restricted (cuts down on spam)
- if (!..())
- return 0
-
- if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human))
- var/exclusive = null
- var/wearable = null
- var/mob/living/carbon/human/H = M
-
- if("exclude" in species_restricted)
- exclusive = 1
-
- if(H.species)
- if(exclusive)
- if(!(H.species.get_bodytype(H) in species_restricted))
- wearable = 1
- else
- if(H.species.get_bodytype(H) in species_restricted)
- wearable = 1
-
- if(!wearable && !(slot in list(slot_l_store, slot_r_store, slot_s_store)))
- to_chat(H, "Your species cannot wear [src].")
- return 0
- return 1
-
-/obj/item/clothing/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
- . = ..()
- if((. == 0) && LAZYLEN(accessories))
- for(var/obj/item/I in accessories)
- var/check = I.handle_shield(user, damage, damage_source, attacker, def_zone, attack_text)
-
- if(check != 0) // Projectiles sometimes use negatives IIRC, 0 is only returned if something is not blocked.
- . = check
- break
-
-// For now, these two temp procs only return TRUE or FALSE if they can provide resistance to a given temperature.
-/obj/item/clothing/proc/handle_low_temperature(var/tempcheck = T20C)
- . = FALSE
- if(LAZYLEN(accessories))
- for(var/obj/item/clothing/C in accessories)
- if(C.handle_low_temperature(tempcheck))
- . = TRUE
-
- if(min_cold_protection_temperature && min_cold_protection_temperature <= tempcheck)
- . = TRUE
-
-/obj/item/clothing/proc/handle_high_temperature(var/tempcheck = T20C)
- . = FALSE
- if(LAZYLEN(accessories))
- for(var/obj/item/clothing/C in accessories)
- if(C.handle_high_temperature(tempcheck))
- . = TRUE
-
- if(max_heat_protection_temperature && max_heat_protection_temperature >= tempcheck)
- . = TRUE
-
-// Returns the relative flag-vars for covered protection.
-/obj/item/clothing/proc/get_cold_protection_flags()
- . = cold_protection
-
- if(LAZYLEN(accessories))
- for(var/obj/item/clothing/C in accessories)
- . |= C.get_cold_protection_flags()
-
-/obj/item/clothing/proc/get_heat_protection_flags()
- . = heat_protection
-
- if(LAZYLEN(accessories))
- for(var/obj/item/clothing/C in accessories)
- . |= C.get_heat_protection_flags()
-
-/obj/item/clothing/proc/refit_for_species(var/target_species)
- if(!species_restricted)
- return //this item doesn't use the species_restricted system
-
- //Set species_restricted list
- switch(target_species)
- //VOREStation Edit Start
- if(SPECIES_HUMAN, SPECIES_SKRELL) //humanoid bodytypes
- species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
- if(SPECIES_UNATHI)
- species_restricted = list(SPECIES_UNATHI, SPECIES_XENOHYBRID)
- if(SPECIES_VULPKANIN)
- species_restricted = list(SPECIES_VULPKANIN, SPECIES_ZORREN_HIGH, SPECIES_FENNEC)
- if(SPECIES_SERGAL)
- species_restricted = list(SPECIES_SERGAL, SPECIES_NEVREAN)
- //VOREStation Edit End
- else
- species_restricted = list(target_species)
-
- //Set icon
- if (sprite_sheets_refit && (target_species in sprite_sheets_refit))
- sprite_sheets[target_species] = sprite_sheets_refit[target_species]
-
- if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
- icon = sprite_sheets_obj[target_species]
- else
- icon = initial(icon)
-
-//VOREStation edit start
-/obj/item/clothing/proc/change_color()
- set name = "Change Color"
- set category = "Object"
- set desc = "Change the color of the clothing."
- set src in usr
-
- if(usr.stat || usr.restrained() || usr.incapacitated())
- return
-
- var/new_color = input(usr, "Pick a new color", "Color", color) as color|null
-
- if(new_color && (new_color != color))
- color = new_color
- update_icon()
- update_clothing_icon()
-//VOREStation edit end
-
-/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
- if(!species_restricted)
- return //this item doesn't use the species_restricted system
-
- //Set species_restricted list
- switch(target_species)
- //VOREStation Edit Start
- if(SPECIES_HUMAN)
- species_restricted = list(SPECIES_HUMAN, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
- if(SPECIES_SKRELL)
- species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
- if(SPECIES_UNATHI)
- species_restricted = list(SPECIES_UNATHI, SPECIES_XENOHYBRID)
- if(SPECIES_VULPKANIN)
- species_restricted = list(SPECIES_VULPKANIN, SPECIES_ZORREN_HIGH, SPECIES_FENNEC)
- if(SPECIES_SERGAL)
- species_restricted = list(SPECIES_SERGAL, SPECIES_NEVREAN)
- //VOREStation Edit End
- else
- species_restricted = list(target_species)
-
- //Set icon
- if (sprite_sheets_refit && (target_species in sprite_sheets_refit))
- sprite_sheets[target_species] = sprite_sheets_refit[target_species]
-
- if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
- icon = sprite_sheets_obj[target_species]
- else
- icon = initial(icon)
-
-///////////////////////////////////////////////////////////////////////
-// Ears: headsets, earmuffs and tiny objects
-/obj/item/clothing/ears
- name = "ears"
- w_class = ITEMSIZE_TINY
- throwforce = 2
- slot_flags = SLOT_EARS
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/ears.dmi')
-
-/obj/item/clothing/ears/attack_hand(mob/user as mob)
- if (!user) return
-
- if (src.loc != user || !istype(user,/mob/living/carbon/human))
- ..()
- return
-
- var/mob/living/carbon/human/H = user
- if(H.l_ear != src && H.r_ear != src)
- ..()
- return
-
- if(!canremove)
- return
-
- var/obj/item/clothing/ears/O
- if(slot_flags & SLOT_TWOEARS )
- O = (H.l_ear == src ? H.r_ear : H.l_ear)
- user.u_equip(O)
- if(!istype(src,/obj/item/clothing/ears/offear))
- qdel(O)
- O = src
- else
- O = src
-
- user.unEquip(src)
-
- if (O)
- user.put_in_hands(O)
- O.add_fingerprint(user)
-
- if(istype(src,/obj/item/clothing/ears/offear))
- qdel(src)
-
-/obj/item/clothing/ears/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_ears()
-
-/obj/item/clothing/ears/MouseDrop(var/obj/over_object)
- if(ishuman(usr))
- var/mob/living/carbon/human/H = usr
- // If this covers both ears, we want to return the result of unequipping the primary object, and kill the off-ear one
- if(slot_flags & SLOT_TWOEARS)
- var/obj/item/clothing/ears/O = (H.l_ear == src ? H.r_ear : H.l_ear)
- if(istype(src, /obj/item/clothing/ears/offear))
- . = O.MouseDrop(over_object)
- H.drop_from_inventory(src)
- qdel(src)
- else
- . = ..()
- H.drop_from_inventory(O)
- qdel(O)
- else
- . = ..()
-
-
-/obj/item/clothing/ears/offear
- name = "Other ear"
- w_class = ITEMSIZE_HUGE
- icon = 'icons/mob/screen1_Midnight.dmi'
- icon_state = "block"
- slot_flags = SLOT_EARS | SLOT_TWOEARS
-
-/obj/item/clothing/ears/offear/New(var/obj/O)
- name = O.name
- desc = O.desc
- icon = O.icon
- icon_state = O.icon_state
- set_dir(O.dir)
-
-////////////////////////////////////////////////////////////////////////////////////////
-//Gloves
-/obj/item/clothing/gloves
- name = "gloves"
- item_icons = list(
- slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi',
- slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi',
- )
- gender = PLURAL //Carn: for grammarically correct text-parsing
- w_class = ITEMSIZE_SMALL
- icon = 'icons/obj/clothing/gloves.dmi'
- siemens_coefficient = 0.9
- blood_sprite_state = "bloodyhands"
- var/wired = 0
- var/obj/item/weapon/cell/cell = 0
- var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through
- var/obj/item/clothing/gloves/ring = null //Covered ring
- var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping
- var/glove_level = 2 //What "layer" the glove is on
- var/overgloves = 0 //Used by gauntlets and arm_guards
- var/punch_force = 0 //How much damage do these gloves add to a punch?
- var/punch_damtype = BRUTE //What type of damage does this make fists be?
- body_parts_covered = HANDS
- slot_flags = SLOT_GLOVES
- attack_verb = list("challenged")
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/gloves.dmi',
- SPECIES_VOX = 'icons/mob/species/vox/gloves.dmi'
- )
- drop_sound = 'sound/items/drop/gloves.ogg'
- pickup_sound = 'sound/items/pickup/gloves.ogg'
-
-/obj/item/clothing/proc/set_clothing_index()
- return
-
-/obj/item/clothing/gloves/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_gloves()
-
-/obj/item/clothing/gloves/emp_act(severity)
- if(cell)
- cell.emp_act(severity)
- if(ring)
- ring.emp_act(severity)
- ..()
-
-// Called just before an attack_hand(), in mob/UnarmedAttack()
-/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
- return 0 // return 1 to cancel attack_hand()
-
-/*/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
- if(W.is_wirecutter() || istype(W, /obj/item/weapon/scalpel))
- if (clipped)
- to_chat(user, "The [src] have already been clipped!")
- update_icon()
- return
-
- playsound(src, W.usesound, 50, 1)
- user.visible_message("[user] cuts the fingertips off of the [src].","You cut the fingertips off of the [src].")
-
- clipped = 1
- name = "modified [name]"
- desc = "[desc]
They have had the fingertips cut off of them."
- if("exclude" in species_restricted)
- species_restricted -= SPECIES_UNATHI
- species_restricted -= SPECIES_TAJ
- return
-*/
-
-/obj/item/clothing/gloves/clean_blood()
- . = ..()
- transfer_blood = 0
- update_icon()
-
-/obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = FALSE)
- var/mob/living/carbon/human/H = user
-
- if(slot && slot == slot_gloves)
- var/obj/item/clothing/gloves/G = H.gloves
- if(istype(G))
- ring = H.gloves
- if(ring.glove_level >= src.glove_level)
- to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.")
- ring = null
- return 0
- else
- H.drop_from_inventory(ring) //Remove the ring (or other under-glove item in the hand slot?) so you can put on the gloves.
- ring.forceMove(src)
- to_chat(user, "You slip \the [src] on over \the [src.ring].")
- if(!(flags & THICKMATERIAL))
- punch_force += ring.punch_force
- else
- ring = null
-
- if(!..())
- if(ring) //Put the ring back on if the check fails.
- if(H.equip_to_slot_if_possible(ring, slot_gloves))
- src.ring = null
- punch_force = initial(punch_force)
- return 0
-
- wearer = H //TODO clean this when magboots are cleaned
- return 1
-
-/obj/item/clothing/gloves/dropped()
- ..()
-
- if(!wearer)
- return
-
- var/mob/living/carbon/human/H = wearer
- if(ring && istype(H))
- if(!H.equip_to_slot_if_possible(ring, slot_gloves))
- ring.forceMove(get_turf(src))
- src.ring = null
- punch_force = initial(punch_force)
- wearer = null
-
-/obj/item/clothing/gloves
- var/datum/unarmed_attack/special_attack = null //do the gloves have a special unarmed attack?
- var/special_attack_type = null
-
-/obj/item/clothing/gloves/New()
- ..()
- if(special_attack_type && ispath(special_attack_type))
- special_attack = new special_attack_type
-
-
-
-/////////////////////////////////////////////////////////////////////
-//Rings
-
-/obj/item/clothing/gloves/ring
- name = "ring"
- w_class = ITEMSIZE_TINY
- icon = 'icons/obj/clothing/rings.dmi'
- gender = NEUTER
- species_restricted = list("exclude", SPECIES_DIONA)
- siemens_coefficient = 1
- glove_level = 1
- fingerprint_chance = 100
- punch_force = 2
- body_parts_covered = 0
- drop_sound = 'sound/items/drop/ring.ogg'
- pickup_sound = 'sound/items/pickup/ring.ogg'
-
-///////////////////////////////////////////////////////////////////////
-//Head
-/obj/item/clothing/head
- name = "head"
- icon = 'icons/obj/clothing/hats.dmi'
- item_icons = list(
- slot_l_hand_str = 'icons/mob/items/lefthand_hats.dmi',
- slot_r_hand_str = 'icons/mob/items/righthand_hats.dmi',
- )
- body_parts_covered = HEAD
- slot_flags = SLOT_HEAD
- w_class = ITEMSIZE_SMALL
- blood_sprite_state = "helmetblood"
-
- var/light_overlay = "helmet_light"
- var/light_applied
- var/brightness_on
- var/on = 0
- var/image/helmet_light
-
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/head.dmi',
- SPECIES_VOX = 'icons/mob/species/vox/head.dmi'
- )
- drop_sound = 'sound/items/drop/hat.ogg'
- pickup_sound = 'sound/items/pickup/hat.ogg'
-
-/obj/item/clothing/head/attack_self(mob/user)
- if(brightness_on)
- if(!isturf(user.loc))
- to_chat(user, "You cannot turn the light on while in this [user.loc]")
- return
- on = !on
- to_chat(user, "You [on ? "enable" : "disable"] the helmet light.")
- update_flashlight(user)
- else
- return ..(user)
-
-/obj/item/clothing/head/proc/update_flashlight(var/mob/user = null)
- if(on && !light_applied)
- set_light(brightness_on)
- light_applied = 1
- else if(!on && light_applied)
- set_light(0)
- light_applied = 0
- update_icon(user)
- user.update_action_buttons()
-
-/obj/item/clothing/head/attack_ai(var/mob/user)
- if(!mob_wear_hat(user))
- return ..()
-
-/obj/item/clothing/head/attack_generic(var/mob/user)
- if(!mob_wear_hat(user))
- return ..()
-
-/obj/item/clothing/head/proc/mob_wear_hat(var/mob/user)
- if(!Adjacent(user))
- return 0
- var/success
- if(istype(user, /mob/living/silicon/robot/drone))
- var/mob/living/silicon/robot/drone/D = user
- if(D.hat)
- success = 2
- else
- D.wear_hat(src)
- success = 1
- else if(istype(user, /mob/living/carbon/alien/diona))
- var/mob/living/carbon/alien/diona/D = user
- if(D.hat)
- success = 2
- else
- D.wear_hat(src)
- success = 1
-
- if(!success)
- return 0
- else if(success == 2)
- to_chat(user, "You are already wearing a hat.")
- else if(success == 1)
- to_chat(user, "You crawl under \the [src].")
- return 1
-
-/obj/item/clothing/head/update_icon(var/mob/user)
- var/mob/living/carbon/human/H
- if(ishuman(user))
- H = user
-
- if(on)
- // Generate object icon.
- if(!light_overlay_cache["[light_overlay]_icon"])
- light_overlay_cache["[light_overlay]_icon"] = image(icon = 'icons/obj/light_overlays.dmi', icon_state = "[light_overlay]")
- helmet_light = light_overlay_cache["[light_overlay]_icon"]
- add_overlay(helmet_light)
-
- // Generate and cache the on-mob icon, which is used in update_inv_head().
- var/body_type = (H && H.species.get_bodytype(H))
- var/cache_key = "[light_overlay][body_type && sprite_sheets[body_type] ? "_[body_type]" : ""]"
- if(!light_overlay_cache[cache_key])
- var/use_icon = LAZYACCESS(sprite_sheets,body_type) || 'icons/mob/light_overlays.dmi'
- light_overlay_cache[cache_key] = image(icon = use_icon, icon_state = "[light_overlay]")
-
- else if(helmet_light)
- cut_overlay(helmet_light)
- helmet_light = null
-
- user.update_inv_head() //Will redraw the helmet with the light on the mob
-
-/obj/item/clothing/head/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_head()
-
-///////////////////////////////////////////////////////////////////////
-//Mask
-/obj/item/clothing/mask
- name = "mask"
- icon = 'icons/obj/clothing/masks.dmi'
- item_icons = list(
- slot_l_hand_str = 'icons/mob/items/lefthand_masks.dmi',
- slot_r_hand_str = 'icons/mob/items/righthand_masks.dmi',
- )
- body_parts_covered = HEAD
- slot_flags = SLOT_MASK
- body_parts_covered = FACE|EYES
- blood_sprite_state = "maskblood"
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/masks.dmi',
- SPECIES_VOX = 'icons/mob/species/vox/masks.dmi',
- SPECIES_TAJ = 'icons/mob/species/tajaran/mask.dmi',
- SPECIES_UNATHI = 'icons/mob/species/unathi/mask.dmi'
- )
-
- var/voicechange = 0
- var/list/say_messages
- var/list/say_verbs
-
- drop_sound = "generic_drop"
- pickup_sound = "generic_pickup"
-
-/obj/item/clothing/mask/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_wear_mask()
-
-/obj/item/clothing/mask/proc/filter_air(datum/gas_mixture/air)
- return
-
-///////////////////////////////////////////////////////////////////////
-//Shoes
-/obj/item/clothing/shoes
- name = "shoes"
- icon = 'icons/obj/clothing/shoes.dmi'
- item_icons = list(
- slot_l_hand_str = 'icons/mob/items/lefthand_shoes.dmi',
- slot_r_hand_str = 'icons/mob/items/righthand_shoes.dmi',
- )
- desc = "Comfortable-looking shoes."
- gender = PLURAL //Carn: for grammarically correct text-parsing
- siemens_coefficient = 0.9
- body_parts_covered = FEET
- slot_flags = SLOT_FEET
- blood_sprite_state = "shoeblood"
-
- var/can_hold_knife = 0
- var/obj/item/holding
-
- var/shoes_under_pants = 0
-
- var/water_speed = 0 //Speed boost/decrease in water, lower/negative values mean more speed
- var/snow_speed = 0 //Speed boost/decrease on snow, lower/negative values mean more speed
- var/rock_climbing = FALSE // If true, allows climbing cliffs with clickdrag.
-
- var/step_volume_mod = 1 //How quiet or loud footsteps in this shoe are
-
- permeability_coefficient = 0.50
- slowdown = SHOES_SLOWDOWN
- force = 2
- var/overshoes = 0
- species_restricted = list("exclude",SPECIES_TESHARI, SPECIES_VOX)
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/shoes.dmi',
- SPECIES_VOX = 'icons/mob/species/vox/shoes.dmi'
- )
- drop_sound = 'sound/items/drop/shoes.ogg'
- pickup_sound = 'sound/items/pickup/shoes.ogg'
-
-/obj/item/clothing/shoes/proc/draw_knife()
- set name = "Draw Boot Knife"
- set desc = "Pull out your boot knife."
- set category = "IC"
- set src in usr
-
- if(usr.stat || usr.restrained() || usr.incapacitated())
- return
-
- holding.forceMove(get_turf(usr))
-
- if(usr.put_in_hands(holding))
- usr.visible_message("\The [usr] pulls a knife out of their boot!")
- playsound(src, 'sound/weapons/holster/sheathout.ogg', 25)
- holding = null
- overlays -= image(icon, "[icon_state]_knife")
- else
- to_chat(usr, "Your need an empty, unbroken hand to do that.")
- holding.forceMove(src)
-
- if(!holding)
- verbs -= /obj/item/clothing/shoes/proc/draw_knife
-
- update_icon()
- return
-
-/obj/item/clothing/shoes/attack_hand(var/mob/living/M)
- if(can_hold_knife == 1 && holding && src.loc == M)
- draw_knife()
- return
- ..()
-
-/obj/item/clothing/shoes/attackby(var/obj/item/I, var/mob/user)
- if((can_hold_knife == 1) && (istype(I, /obj/item/weapon/material/shard) || \
- istype(I, /obj/item/weapon/material/butterfly) || \
- istype(I, /obj/item/weapon/material/kitchen/utensil) || \
- istype(I, /obj/item/weapon/material/knife/tacknife)))
- if(holding)
- to_chat(user, "\The [src] is already holding \a [holding].")
- return
- user.unEquip(I)
- I.forceMove(src)
- holding = I
- user.visible_message("\The [user] shoves \the [I] into \the [src].")
- verbs |= /obj/item/clothing/shoes/proc/draw_knife
- update_icon()
- else
- return ..()
-
-/obj/item/clothing/shoes/verb/toggle_layer()
- set name = "Switch Shoe Layer"
- set category = "Object"
-
- if(shoes_under_pants == -1)
- to_chat(usr, "\The [src] cannot be worn above your suit!")
- return
- shoes_under_pants = !shoes_under_pants
- update_icon()
-
-/obj/item/clothing/shoes/update_icon()
- . = ..()
- if(holding)
- overlays += image(icon, "[icon_state]_knife")
- if(contaminated)
- overlays += contamination_overlay
- if(gurgled) //VOREStation Edit Start
- decontaminate()
- gurgle_contaminate() //VOREStation Edit End
- if(ismob(usr))
- var/mob/M = usr
- M.update_inv_shoes()
-
-/obj/item/clothing/shoes/clean_blood()
- update_icon()
- return ..()
-
-/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running)
- if(prob(1) && !recent_squish) //VOREStation edit begin
- recent_squish = 1
- spawn(100)
- recent_squish = 0
- for(var/mob/living/M in contents)
- var/emote = pick(inside_emotes)
- to_chat(M,emote) //VOREStation edit end
- return
-
-/obj/item/clothing/shoes/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_shoes()
-
-
-///////////////////////////////////////////////////////////////////////
-//Suit
-/obj/item/clothing/suit
- icon = 'icons/obj/clothing/suits.dmi'
- item_icons = list(
- slot_l_hand_str = 'icons/mob/items/lefthand_suits.dmi',
- slot_r_hand_str = 'icons/mob/items/righthand_suits.dmi',
- )
- name = "suit"
- var/fire_resist = T0C+100
- body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
- allowed = list(/obj/item/weapon/tank/emergency/oxygen)
- armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- slot_flags = SLOT_OCLOTHING
- var/blood_overlay_type = "suit"
- blood_sprite_state = "suitblood" //Defaults to the suit's blood overlay, so that some blood renders instead of no blood.
-
- var/taurized = FALSE
- siemens_coefficient = 0.9
- w_class = ITEMSIZE_NORMAL
- preserve_item = 1
- equip_sound = 'sound/items/jumpsuit_equip.ogg'
-
-
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/suit.dmi',
- SPECIES_VOX = 'icons/mob/species/vox/suit.dmi'
- )
-
- valid_accessory_slots = (ACCESSORY_SLOT_OVER | ACCESSORY_SLOT_ARMBAND)
- restricted_accessory_slots = (ACCESSORY_SLOT_ARMBAND)
-
-/obj/item/clothing/suit/set_clothing_index()
- ..()
-
- if(index && !icon_override)
- icon = new /icon("icons/obj/clothing/suits_[index].dmi")
- item_icons = list(
- slot_l_hand_str = new /icon("icons/mob/items/lefthand_suits_[index].dmi"),
- slot_r_hand_str = new /icon("icons/mob/items/righthand_suits_[index].dmi"),
- )
-
- return 1
-
- return 0
-
-/obj/item/clothing/suit/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_wear_suit()
-
- set_clothing_index()
-
-/obj/item/clothing/suit/equipped(var/mob/user, var/slot)
- if(ishuman(user))
- var/mob/living/carbon/human/H = user
- if((taurized && !isTaurTail(H.tail_style)) || (!taurized && isTaurTail(H.tail_style)))
- taurize(user)
-
- return ..()
-
-/obj/item/clothing/suit/proc/taurize(var/mob/living/carbon/human/Taur)
- if(isTaurTail(Taur.tail_style))
- var/datum/sprite_accessory/tail/taur/taurtail = Taur.tail_style
- if(taurtail.suit_sprites && (get_worn_icon_state(slot_wear_suit_str) in cached_icon_states(taurtail.suit_sprites)))
- icon_override = taurtail.suit_sprites
- taurized = TRUE
-
- if(!taurized)
- icon_override = initial(icon_override)
- taurized = FALSE
-
-// Taur suits need to be shifted so its centered on their taur half.
-/obj/item/clothing/suit/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0,var/icon/clip_mask)
- var/image/standing = ..()
- if(taurized) //Special snowflake var on suits
- standing.pixel_x = -16
- standing.layer = BODY_LAYER + 15 // 15 is above tail layer, so will not be covered by taurbody.
- return standing
-
-/obj/item/clothing/suit/apply_accessories(var/image/standing)
- if(LAZYLEN(accessories) && taurized)
- for(var/obj/item/clothing/accessory/A in accessories)
- var/image/I = new(A.get_mob_overlay())
- I.pixel_x = 16 //Opposite of the pixel_x on the suit (-16) from taurization to cancel it out and puts the accessory in the correct place on the body.
- standing.add_overlay(I)
- else
- return ..()
-
-
-///////////////////////////////////////////////////////////////////////
-//Under clothing
-/obj/item/clothing/under
- icon = 'icons/obj/clothing/uniforms.dmi'
- item_icons = list(
- slot_l_hand_str = 'icons/mob/items/lefthand_uniforms.dmi',
- slot_r_hand_str = 'icons/mob/items/righthand_uniforms.dmi',
- )
- name = "under"
- body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
- permeability_coefficient = 0.90
- slot_flags = SLOT_ICLOTHING
- armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- equip_sound = 'sound/items/jumpsuit_equip.ogg'
- w_class = ITEMSIZE_NORMAL
- show_messages = 1
- blood_sprite_state = "uniformblood"
-
- var/has_sensor = 1 //For the crew computer 2 = unable to change mode
- var/sensor_mode = 0
- /*
- 1 = Report living/dead
- 2 = Report detailed damages
- 3 = Report location
- */
- var/displays_id = 1
- var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
- var/rolled_sleeves = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
- sprite_sheets = list(
- SPECIES_TESHARI = 'icons/mob/species/teshari/uniform.dmi',
- SPECIES_VOX = 'icons/mob/species/vox/uniform.dmi'
- )
-
- //convenience var for defining the icon state for the overlay used when the clothing is worn.
- //Also used by rolling/unrolling.
- var/worn_state = null
- valid_accessory_slots = (\
- ACCESSORY_SLOT_UTILITY\
- |ACCESSORY_SLOT_WEAPON\
- |ACCESSORY_SLOT_ARMBAND\
- |ACCESSORY_SLOT_DECOR\
- |ACCESSORY_SLOT_MEDAL\
- |ACCESSORY_SLOT_INSIGNIA\
- |ACCESSORY_SLOT_TIE\
- |ACCESSORY_SLOT_RANK\
- |ACCESSORY_SLOT_DEPT\
- |ACCESSORY_SLOT_OVER)
- restricted_accessory_slots = (\
- ACCESSORY_SLOT_UTILITY\
- |ACCESSORY_SLOT_WEAPON\
- |ACCESSORY_SLOT_ARMBAND\
- |ACCESSORY_SLOT_TIE\
- |ACCESSORY_SLOT_RANK\
- |ACCESSORY_SLOT_DEPT\
- |ACCESSORY_SLOT_OVER)
-
- var/icon/rolled_down_icon = 'icons/mob/uniform_rolled_down.dmi'
- var/icon/rolled_down_sleeves_icon = 'icons/mob/uniform_sleeves_rolled.dmi'
-
-/obj/item/clothing/under/attack_hand(var/mob/user)
- if(LAZYLEN(accessories))
- ..()
- if ((ishuman(usr) || issmall(usr)) && src.loc == user)
- return
- ..()
-
-/obj/item/clothing/under/New()
- ..()
- if(worn_state)
- if(!item_state_slots)
- item_state_slots = list()
- item_state_slots[slot_w_uniform_str] = worn_state
- else
- worn_state = icon_state
-
- //autodetect rollability
- if(rolled_down < 0)
- if(("[worn_state]_d_s" in cached_icon_states(icon)) || ("[worn_state]_s" in cached_icon_states(rolled_down_icon)) || ("[worn_state]_d_s" in cached_icon_states(icon_override)))
- rolled_down = 0
-
- if(rolled_down == -1)
- verbs -= /obj/item/clothing/under/verb/rollsuit
- if(rolled_sleeves == -1)
- verbs -= /obj/item/clothing/under/verb/rollsleeves
-
-/obj/item/clothing/under/set_clothing_index()
- ..()
-
- if(index && !icon_override)
- icon = new /icon("icons/obj/clothing/uniforms_[index].dmi")
-
- item_icons = list(
- slot_l_hand_str = new /icon("icons/mob/items/lefthand_uniforms_[index].dmi"),
- slot_r_hand_str = new /icon("icons/mob/items/righthand_uniforms_[index].dmi"),
- )
-
- rolled_down_icon = new /icon("icons/mob/uniform_rolled_down_[index].dmi")
- rolled_down_sleeves_icon = new /icon("icons/mob/uniform_sleeves_rolled_[index].dmi")
- return 1
-
- return 0
-
-/obj/item/clothing/under/proc/update_rolldown_status()
- var/mob/living/carbon/human/H
- if(istype(src.loc, /mob/living/carbon/human))
- H = src.loc
-
- var/icon/under_icon
- if(icon_override)
- under_icon = icon_override
- else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)])
- under_icon = sprite_sheets[H.species.get_bodytype(H)]
- else if(item_icons && item_icons[slot_w_uniform_str])
- under_icon = item_icons[slot_w_uniform_str]
- else if ("[worn_state]_s" in cached_icon_states(rolled_down_icon))
- under_icon = rolled_down_icon
-
- // The _s is because the icon update procs append it.
- if((under_icon == rolled_down_icon && ("[worn_state]_s" in cached_icon_states(under_icon))) || ("[worn_state]_d_s" in cached_icon_states(under_icon)))
- if(rolled_down != 1)
- rolled_down = 0
- else
- rolled_down = -1
- if(H) update_clothing_icon()
-
-/obj/item/clothing/under/proc/update_rollsleeves_status()
- var/mob/living/carbon/human/H
- if(istype(src.loc, /mob/living/carbon/human))
- H = src.loc
-
- var/icon/under_icon
- if(icon_override)
- under_icon = icon_override
- else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)])
- under_icon = sprite_sheets[H.species.get_bodytype(H)]
- else if(item_icons && item_icons[slot_w_uniform_str])
- under_icon = item_icons[slot_w_uniform_str]
- else if ("[worn_state]_s" in cached_icon_states(rolled_down_sleeves_icon))
- under_icon = rolled_down_sleeves_icon
- else if(index)
- under_icon = new /icon("[INV_W_UNIFORM_DEF_ICON]_[index].dmi")
-
- // The _s is because the icon update procs append it.
- if((under_icon == rolled_down_sleeves_icon && ("[worn_state]_s" in cached_icon_states(under_icon))) || ("[worn_state]_r_s" in cached_icon_states(under_icon)))
- if(rolled_sleeves != 1)
- rolled_sleeves = 0
- else
- rolled_sleeves = -1
- if(H) update_clothing_icon()
-
-/obj/item/clothing/under/update_clothing_icon()
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_w_uniform()
-
- set_clothing_index()
-
-
-/obj/item/clothing/under/examine(mob/user)
- . = ..()
- switch(src.sensor_mode)
- if(0)
- . += "Its sensors appear to be disabled."
- if(1)
- . += "Its binary life sensors appear to be enabled."
- if(2)
- . += "Its vital tracker appears to be enabled."
- if(3)
- . += "Its vital tracker and tracking beacon appear to be enabled."
-
-/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
- var/mob/M = usr
- if (istype(M, /mob/observer)) return
- if (usr.stat || usr.restrained()) return
- if(has_sensor >= 2)
- to_chat(usr, "The controls are locked.")
- return 0
- if(has_sensor <= 0)
- to_chat(usr, "This suit does not have any sensors.")
- return 0
-
- var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon")
- var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
- if(get_dist(usr, src) > 1)
- to_chat(usr, "You have moved too far away.")
- return
- sensor_mode = modes.Find(switchMode) - 1
-
- if (src.loc == usr)
- switch(sensor_mode)
- if(0)
- usr.visible_message("[usr] adjusts their sensors.", "You disable your suit's remote sensing equipment.")
- if(1)
- usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report whether you are live or dead.")
- if(2)
- usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns.")
- if(3)
- usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns as well as your coordinate position.")
-
- else if (istype(src.loc, /mob))
- usr.visible_message("[usr] adjusts [src.loc]'s sensors.", "You adjust [src.loc]'s sensors.")
-
-/obj/item/clothing/under/verb/toggle()
- set name = "Toggle Suit Sensors"
- set category = "Object"
- set src in usr
- set_sensors(usr)
-
-/obj/item/clothing/under/verb/rollsuit()
- set name = "Roll Down Jumpsuit"
- set category = "Object"
- set src in usr
- if(!istype(usr, /mob/living)) return
- if(usr.stat) return
-
- update_rolldown_status()
- if(rolled_down == -1)
- to_chat(usr, "You cannot roll down [src]!")
- return
- if((rolled_sleeves == 1) && !(rolled_down))
- rolled_sleeves = 0
-
- rolled_down = !rolled_down
- if(rolled_down)
- body_parts_covered = initial(body_parts_covered)
- body_parts_covered &= ~(UPPER_TORSO|ARMS)
- if("[worn_state]_s" in cached_icon_states(rolled_down_icon))
- icon_override = rolled_down_icon
- item_state_slots[slot_w_uniform_str] = "[worn_state]"
- else
- item_state_slots[slot_w_uniform_str] = "[worn_state]_d"
-
- to_chat(usr, "You roll down your [src].")
- else
- body_parts_covered = initial(body_parts_covered)
- if(icon_override == rolled_down_icon)
- icon_override = initial(icon_override)
- item_state_slots[slot_w_uniform_str] = "[worn_state]"
- to_chat(usr, "You roll up your [src].")
- update_clothing_icon()
-
-/obj/item/clothing/under/verb/rollsleeves()
- set name = "Roll Up Sleeves"
- set category = "Object"
- set src in usr
- if(!istype(usr, /mob/living)) return
- if(usr.stat) return
-
- update_rollsleeves_status()
- if(rolled_sleeves == -1)
- to_chat(usr, "You cannot roll up your [src]'s sleeves!")
- return
- if(rolled_down == 1)
- to_chat(usr, "You must roll up your [src] first!")
- return
-
- rolled_sleeves = !rolled_sleeves
- if(rolled_sleeves)
- body_parts_covered &= ~(ARMS)
- if("[worn_state]_s" in cached_icon_states(rolled_down_sleeves_icon))
- icon_override = rolled_down_sleeves_icon
- item_state_slots[slot_w_uniform_str] = "[worn_state]"
- else
- item_state_slots[slot_w_uniform_str] = "[worn_state]_r"
- to_chat(usr, "You roll up your [src]'s sleeves.")
- else
- body_parts_covered = initial(body_parts_covered)
- if(icon_override == rolled_down_sleeves_icon)
- icon_override = initial(icon_override)
- item_state_slots[slot_w_uniform_str] = "[worn_state]"
- to_chat(usr, "You roll down your [src]'s sleeves.")
- update_clothing_icon()
-
-/obj/item/clothing/under/rank/New()
- sensor_mode = pick(0,1,2,3)
- ..()
+/obj/item/clothing
+ name = "clothing"
+ siemens_coefficient = 0.9
+ drop_sound = 'sound/items/drop/clothing.ogg'
+ pickup_sound = 'sound/items/pickup/clothing.ogg'
+ var/list/species_restricted = null //Only these species can wear this kit.
+ var/gunshot_residue //Used by forensics.
+
+ var/list/accessories
+ var/list/valid_accessory_slots
+ var/list/restricted_accessory_slots
+ var/list/starting_accessories
+
+ var/flash_protection = FLASH_PROTECTION_NONE
+ var/tint = TINT_NONE
+ var/list/enables_planes //Enables these planes in the wearing mob's plane_holder
+ var/list/plane_slots //But only if it's equipped into this specific slot
+
+ /*
+ Sprites used when the clothing item is refit. This is done by setting icon_override.
+ For best results, if this is set then sprite_sheets should be null and vice versa, but that is by no means necessary.
+ Ideally, sprite_sheets_refit should be used for "hard" clothing items that can't change shape very well to fit the wearer (e.g. helmets, hardsuits),
+ while sprite_sheets should be used for "flexible" clothing items that do not need to be refitted (e.g. aliens wearing jumpsuits).
+ */
+ var/list/sprite_sheets_refit = null
+ var/ear_protection = 0
+ var/blood_sprite_state
+
+ var/index //null by default, if set, will change which dmi it uses
+
+ var/update_icon_define = null // Only needed if you've got multiple files for the same type of clothing
+
+ var/polychromic = FALSE //VOREStation edit
+
+//Updates the icons of the mob wearing the clothing item, if any.
+/obj/item/clothing/proc/update_clothing_icon()
+ return
+
+// Aurora forensics port.
+/obj/item/clothing/clean_blood()
+ . = ..()
+ gunshot_residue = null
+
+
+/obj/item/clothing/New()
+ ..()
+ if(starting_accessories)
+ for(var/T in starting_accessories)
+ var/obj/item/clothing/accessory/tie = new T(src)
+ src.attach_accessory(null, tie)
+ set_clothing_index()
+
+ //VOREStation edit start
+ if(polychromic)
+ verbs |= /obj/item/clothing/proc/change_color
+ //VOREStation edit start
+
+/obj/item/clothing/update_icon()
+ cut_overlays() //This removes all the overlays on the sprite and then goes down a checklist adding them as required.
+ if(blood_DNA)
+ add_blood()
+ . = ..()
+
+/obj/item/clothing/equipped(var/mob/user,var/slot)
+ ..()
+ if(enables_planes)
+ user.recalculate_vis()
+
+/obj/item/clothing/dropped(var/mob/user)
+ ..()
+ if(enables_planes)
+ user.recalculate_vis()
+
+//BS12: Species-restricted clothing check.
+/obj/item/clothing/mob_can_equip(M as mob, slot, disable_warning = FALSE)
+
+ //if we can't equip the item anyway, don't bother with species_restricted (cuts down on spam)
+ if (!..())
+ return 0
+
+ if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human))
+ var/exclusive = null
+ var/wearable = null
+ var/mob/living/carbon/human/H = M
+
+ if("exclude" in species_restricted)
+ exclusive = 1
+
+ if(H.species)
+ if(exclusive)
+ if(!(H.species.get_bodytype(H) in species_restricted))
+ wearable = 1
+ else
+ if(H.species.get_bodytype(H) in species_restricted)
+ wearable = 1
+
+ if(!wearable && !(slot in list(slot_l_store, slot_r_store, slot_s_store)))
+ to_chat(H, "Your species cannot wear [src].")
+ return 0
+ return 1
+
+/obj/item/clothing/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
+ . = ..()
+ if((. == 0) && LAZYLEN(accessories))
+ for(var/obj/item/I in accessories)
+ var/check = I.handle_shield(user, damage, damage_source, attacker, def_zone, attack_text)
+
+ if(check != 0) // Projectiles sometimes use negatives IIRC, 0 is only returned if something is not blocked.
+ . = check
+ break
+
+// For now, these two temp procs only return TRUE or FALSE if they can provide resistance to a given temperature.
+/obj/item/clothing/proc/handle_low_temperature(var/tempcheck = T20C)
+ . = FALSE
+ if(LAZYLEN(accessories))
+ for(var/obj/item/clothing/C in accessories)
+ if(C.handle_low_temperature(tempcheck))
+ . = TRUE
+
+ if(min_cold_protection_temperature && min_cold_protection_temperature <= tempcheck)
+ . = TRUE
+
+/obj/item/clothing/proc/handle_high_temperature(var/tempcheck = T20C)
+ . = FALSE
+ if(LAZYLEN(accessories))
+ for(var/obj/item/clothing/C in accessories)
+ if(C.handle_high_temperature(tempcheck))
+ . = TRUE
+
+ if(max_heat_protection_temperature && max_heat_protection_temperature >= tempcheck)
+ . = TRUE
+
+// Returns the relative flag-vars for covered protection.
+/obj/item/clothing/proc/get_cold_protection_flags()
+ . = cold_protection
+
+ if(LAZYLEN(accessories))
+ for(var/obj/item/clothing/C in accessories)
+ . |= C.get_cold_protection_flags()
+
+/obj/item/clothing/proc/get_heat_protection_flags()
+ . = heat_protection
+
+ if(LAZYLEN(accessories))
+ for(var/obj/item/clothing/C in accessories)
+ . |= C.get_heat_protection_flags()
+
+/obj/item/clothing/proc/refit_for_species(var/target_species)
+ if(!species_restricted)
+ return //this item doesn't use the species_restricted system
+
+ //Set species_restricted list
+ switch(target_species)
+ //VOREStation Edit Start
+ if(SPECIES_HUMAN, SPECIES_SKRELL) //humanoid bodytypes
+ species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
+ if(SPECIES_UNATHI)
+ species_restricted = list(SPECIES_UNATHI, SPECIES_XENOHYBRID)
+ if(SPECIES_VULPKANIN)
+ species_restricted = list(SPECIES_VULPKANIN, SPECIES_ZORREN_HIGH, SPECIES_FENNEC)
+ if(SPECIES_SERGAL)
+ species_restricted = list(SPECIES_SERGAL, SPECIES_NEVREAN)
+ //VOREStation Edit End
+ else
+ species_restricted = list(target_species)
+
+ //Set icon
+ if (sprite_sheets_refit && (target_species in sprite_sheets_refit))
+ sprite_sheets[target_species] = sprite_sheets_refit[target_species]
+
+ if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
+ icon = sprite_sheets_obj[target_species]
+ else
+ icon = initial(icon)
+
+//VOREStation edit start
+/obj/item/clothing/proc/change_color()
+ set name = "Change Color"
+ set category = "Object"
+ set desc = "Change the color of the clothing."
+ set src in usr
+
+ if(usr.stat || usr.restrained() || usr.incapacitated())
+ return
+
+ var/new_color = input(usr, "Pick a new color", "Color", color) as color|null
+
+ if(new_color && (new_color != color))
+ color = new_color
+ update_icon()
+ update_clothing_icon()
+//VOREStation edit end
+
+/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
+ if(!species_restricted)
+ return //this item doesn't use the species_restricted system
+
+ //Set species_restricted list
+ switch(target_species)
+ //VOREStation Edit Start
+ if(SPECIES_HUMAN)
+ species_restricted = list(SPECIES_HUMAN, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
+ if(SPECIES_SKRELL)
+ species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_RAPALA, SPECIES_VASILISSAN, SPECIES_ALRAUNE, SPECIES_PROMETHEAN, SPECIES_XENOCHIMERA)
+ if(SPECIES_UNATHI)
+ species_restricted = list(SPECIES_UNATHI, SPECIES_XENOHYBRID)
+ if(SPECIES_VULPKANIN)
+ species_restricted = list(SPECIES_VULPKANIN, SPECIES_ZORREN_HIGH, SPECIES_FENNEC)
+ if(SPECIES_SERGAL)
+ species_restricted = list(SPECIES_SERGAL, SPECIES_NEVREAN)
+ //VOREStation Edit End
+ else
+ species_restricted = list(target_species)
+
+ //Set icon
+ if (sprite_sheets_refit && (target_species in sprite_sheets_refit))
+ sprite_sheets[target_species] = sprite_sheets_refit[target_species]
+
+ if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
+ icon = sprite_sheets_obj[target_species]
+ else
+ icon = initial(icon)
+
+///////////////////////////////////////////////////////////////////////
+// Ears: headsets, earmuffs and tiny objects
+/obj/item/clothing/ears
+ name = "ears"
+ w_class = ITEMSIZE_TINY
+ throwforce = 2
+ slot_flags = SLOT_EARS
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/ears.dmi')
+
+/obj/item/clothing/ears/attack_hand(mob/user as mob)
+ if (!user) return
+
+ if (src.loc != user || !istype(user,/mob/living/carbon/human))
+ ..()
+ return
+
+ var/mob/living/carbon/human/H = user
+ if(H.l_ear != src && H.r_ear != src)
+ ..()
+ return
+
+ if(!canremove)
+ return
+
+ var/obj/item/clothing/ears/O
+ if(slot_flags & SLOT_TWOEARS )
+ O = (H.l_ear == src ? H.r_ear : H.l_ear)
+ user.u_equip(O)
+ if(!istype(src,/obj/item/clothing/ears/offear))
+ qdel(O)
+ O = src
+ else
+ O = src
+
+ user.unEquip(src)
+
+ if (O)
+ user.put_in_hands(O)
+ O.add_fingerprint(user)
+
+ if(istype(src,/obj/item/clothing/ears/offear))
+ qdel(src)
+
+/obj/item/clothing/ears/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_ears()
+
+/obj/item/clothing/ears/MouseDrop(var/obj/over_object)
+ if(ishuman(usr))
+ var/mob/living/carbon/human/H = usr
+ // If this covers both ears, we want to return the result of unequipping the primary object, and kill the off-ear one
+ if(slot_flags & SLOT_TWOEARS)
+ var/obj/item/clothing/ears/O = (H.l_ear == src ? H.r_ear : H.l_ear)
+ if(istype(src, /obj/item/clothing/ears/offear))
+ . = O.MouseDrop(over_object)
+ H.drop_from_inventory(src)
+ qdel(src)
+ else
+ . = ..()
+ H.drop_from_inventory(O)
+ qdel(O)
+ else
+ . = ..()
+
+
+/obj/item/clothing/ears/offear
+ name = "Other ear"
+ w_class = ITEMSIZE_HUGE
+ icon = 'icons/mob/screen1_Midnight.dmi'
+ icon_state = "block"
+ slot_flags = SLOT_EARS | SLOT_TWOEARS
+
+/obj/item/clothing/ears/offear/New(var/obj/O)
+ name = O.name
+ desc = O.desc
+ icon = O.icon
+ icon_state = O.icon_state
+ set_dir(O.dir)
+
+////////////////////////////////////////////////////////////////////////////////////////
+//Gloves
+/obj/item/clothing/gloves
+ name = "gloves"
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi',
+ )
+ gender = PLURAL //Carn: for grammarically correct text-parsing
+ w_class = ITEMSIZE_SMALL
+ icon = 'icons/obj/clothing/gloves.dmi'
+ siemens_coefficient = 0.9
+ blood_sprite_state = "bloodyhands"
+ var/wired = 0
+ var/obj/item/weapon/cell/cell = 0
+ var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through
+ var/obj/item/clothing/gloves/ring = null //Covered ring
+ var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping
+ var/glove_level = 2 //What "layer" the glove is on
+ var/overgloves = 0 //Used by gauntlets and arm_guards
+ var/punch_force = 0 //How much damage do these gloves add to a punch?
+ var/punch_damtype = BRUTE //What type of damage does this make fists be?
+ body_parts_covered = HANDS
+ slot_flags = SLOT_GLOVES
+ attack_verb = list("challenged")
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/gloves.dmi',
+ SPECIES_VOX = 'icons/mob/species/vox/gloves.dmi'
+ )
+ drop_sound = 'sound/items/drop/gloves.ogg'
+ pickup_sound = 'sound/items/pickup/gloves.ogg'
+
+/obj/item/clothing/proc/set_clothing_index()
+ return
+
+/obj/item/clothing/gloves/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_gloves()
+
+/obj/item/clothing/gloves/emp_act(severity)
+ if(cell)
+ cell.emp_act(severity)
+ if(ring)
+ ring.emp_act(severity)
+ ..()
+
+// Called just before an attack_hand(), in mob/UnarmedAttack()
+/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
+ return 0 // return 1 to cancel attack_hand()
+
+/*/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
+ if(W.is_wirecutter() || istype(W, /obj/item/weapon/scalpel))
+ if (clipped)
+ to_chat(user, "The [src] have already been clipped!")
+ update_icon()
+ return
+
+ playsound(src, W.usesound, 50, 1)
+ user.visible_message("[user] cuts the fingertips off of the [src].","You cut the fingertips off of the [src].")
+
+ clipped = 1
+ name = "modified [name]"
+ desc = "[desc]
They have had the fingertips cut off of them."
+ if("exclude" in species_restricted)
+ species_restricted -= SPECIES_UNATHI
+ species_restricted -= SPECIES_TAJ
+ return
+*/
+
+/obj/item/clothing/gloves/clean_blood()
+ . = ..()
+ transfer_blood = 0
+ update_icon()
+
+/obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = FALSE)
+ var/mob/living/carbon/human/H = user
+
+ if(slot && slot == slot_gloves)
+ var/obj/item/clothing/gloves/G = H.gloves
+ if(istype(G))
+ ring = H.gloves
+ if(ring.glove_level >= src.glove_level)
+ to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.")
+ ring = null
+ return 0
+ else
+ H.drop_from_inventory(ring) //Remove the ring (or other under-glove item in the hand slot?) so you can put on the gloves.
+ ring.forceMove(src)
+ to_chat(user, "You slip \the [src] on over \the [src.ring].")
+ if(!(flags & THICKMATERIAL))
+ punch_force += ring.punch_force
+ else
+ ring = null
+
+ if(!..())
+ if(ring) //Put the ring back on if the check fails.
+ if(H.equip_to_slot_if_possible(ring, slot_gloves))
+ src.ring = null
+ punch_force = initial(punch_force)
+ return 0
+
+ wearer = H //TODO clean this when magboots are cleaned
+ return 1
+
+/obj/item/clothing/gloves/dropped()
+ ..()
+
+ if(!wearer)
+ return
+
+ var/mob/living/carbon/human/H = wearer
+ if(ring && istype(H))
+ if(!H.equip_to_slot_if_possible(ring, slot_gloves))
+ ring.forceMove(get_turf(src))
+ src.ring = null
+ punch_force = initial(punch_force)
+ wearer = null
+
+/obj/item/clothing/gloves
+ var/datum/unarmed_attack/special_attack = null //do the gloves have a special unarmed attack?
+ var/special_attack_type = null
+
+/obj/item/clothing/gloves/New()
+ ..()
+ if(special_attack_type && ispath(special_attack_type))
+ special_attack = new special_attack_type
+
+
+
+/////////////////////////////////////////////////////////////////////
+//Rings
+
+/obj/item/clothing/gloves/ring
+ name = "ring"
+ w_class = ITEMSIZE_TINY
+ icon = 'icons/obj/clothing/rings.dmi'
+ gender = NEUTER
+ species_restricted = list("exclude", SPECIES_DIONA)
+ siemens_coefficient = 1
+ glove_level = 1
+ fingerprint_chance = 100
+ punch_force = 2
+ body_parts_covered = 0
+ drop_sound = 'sound/items/drop/ring.ogg'
+ pickup_sound = 'sound/items/pickup/ring.ogg'
+
+///////////////////////////////////////////////////////////////////////
+//Head
+/obj/item/clothing/head
+ name = "head"
+ icon = 'icons/obj/clothing/hats.dmi'
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_hats.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_hats.dmi',
+ )
+ body_parts_covered = HEAD
+ slot_flags = SLOT_HEAD
+ w_class = ITEMSIZE_SMALL
+ blood_sprite_state = "helmetblood"
+
+ var/light_overlay = "helmet_light"
+ var/light_applied
+ var/brightness_on
+ var/on = 0
+ var/image/helmet_light
+
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/head.dmi',
+ SPECIES_VOX = 'icons/mob/species/vox/head.dmi'
+ )
+ drop_sound = 'sound/items/drop/hat.ogg'
+ pickup_sound = 'sound/items/pickup/hat.ogg'
+
+/obj/item/clothing/head/attack_self(mob/user)
+ if(brightness_on)
+ if(!isturf(user.loc))
+ to_chat(user, "You cannot turn the light on while in this [user.loc]")
+ return
+ on = !on
+ to_chat(user, "You [on ? "enable" : "disable"] the helmet light.")
+ update_flashlight(user)
+ else
+ return ..(user)
+
+/obj/item/clothing/head/proc/update_flashlight(var/mob/user = null)
+ if(on && !light_applied)
+ set_light(brightness_on)
+ light_applied = 1
+ else if(!on && light_applied)
+ set_light(0)
+ light_applied = 0
+ update_icon(user)
+ user.update_action_buttons()
+
+/obj/item/clothing/head/attack_ai(var/mob/user)
+ if(!mob_wear_hat(user))
+ return ..()
+
+/obj/item/clothing/head/attack_generic(var/mob/user)
+ if(!mob_wear_hat(user))
+ return ..()
+
+/obj/item/clothing/head/proc/mob_wear_hat(var/mob/user)
+ if(!Adjacent(user))
+ return 0
+ var/success
+ if(istype(user, /mob/living/silicon/robot/drone))
+ var/mob/living/silicon/robot/drone/D = user
+ if(D.hat)
+ success = 2
+ else
+ D.wear_hat(src)
+ success = 1
+ else if(istype(user, /mob/living/carbon/alien/diona))
+ var/mob/living/carbon/alien/diona/D = user
+ if(D.hat)
+ success = 2
+ else
+ D.wear_hat(src)
+ success = 1
+
+ if(!success)
+ return 0
+ else if(success == 2)
+ to_chat(user, "You are already wearing a hat.")
+ else if(success == 1)
+ to_chat(user, "You crawl under \the [src].")
+ return 1
+
+/obj/item/clothing/head/update_icon(var/mob/user)
+ var/mob/living/carbon/human/H
+ if(ishuman(user))
+ H = user
+
+ if(on)
+ // Generate object icon.
+ if(!light_overlay_cache["[light_overlay]_icon"])
+ light_overlay_cache["[light_overlay]_icon"] = image(icon = 'icons/obj/light_overlays.dmi', icon_state = "[light_overlay]")
+ helmet_light = light_overlay_cache["[light_overlay]_icon"]
+ add_overlay(helmet_light)
+
+ // Generate and cache the on-mob icon, which is used in update_inv_head().
+ var/body_type = (H && H.species.get_bodytype(H))
+ var/cache_key = "[light_overlay][body_type && sprite_sheets[body_type] ? "_[body_type]" : ""]"
+ if(!light_overlay_cache[cache_key])
+ var/use_icon = LAZYACCESS(sprite_sheets,body_type) || 'icons/mob/light_overlays.dmi'
+ light_overlay_cache[cache_key] = image(icon = use_icon, icon_state = "[light_overlay]")
+
+ else if(helmet_light)
+ cut_overlay(helmet_light)
+ helmet_light = null
+
+ user.update_inv_head() //Will redraw the helmet with the light on the mob
+
+/obj/item/clothing/head/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_head()
+
+///////////////////////////////////////////////////////////////////////
+//Mask
+/obj/item/clothing/mask
+ name = "mask"
+ icon = 'icons/obj/clothing/masks.dmi'
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_masks.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_masks.dmi',
+ )
+ body_parts_covered = HEAD
+ slot_flags = SLOT_MASK
+ body_parts_covered = FACE|EYES
+ blood_sprite_state = "maskblood"
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/masks.dmi',
+ SPECIES_VOX = 'icons/mob/species/vox/masks.dmi',
+ SPECIES_TAJ = 'icons/mob/species/tajaran/mask.dmi',
+ SPECIES_UNATHI = 'icons/mob/species/unathi/mask.dmi'
+ )
+
+ var/voicechange = 0
+ var/list/say_messages
+ var/list/say_verbs
+
+ drop_sound = "generic_drop"
+ pickup_sound = "generic_pickup"
+
+/obj/item/clothing/mask/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_wear_mask()
+
+/obj/item/clothing/mask/proc/filter_air(datum/gas_mixture/air)
+ return
+
+///////////////////////////////////////////////////////////////////////
+//Shoes
+/obj/item/clothing/shoes
+ name = "shoes"
+ icon = 'icons/obj/clothing/shoes.dmi'
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_shoes.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_shoes.dmi',
+ )
+ desc = "Comfortable-looking shoes."
+ gender = PLURAL //Carn: for grammarically correct text-parsing
+ siemens_coefficient = 0.9
+ body_parts_covered = FEET
+ slot_flags = SLOT_FEET
+ blood_sprite_state = "shoeblood"
+
+ var/can_hold_knife = 0
+ var/obj/item/holding
+
+ var/shoes_under_pants = 0
+
+ var/water_speed = 0 //Speed boost/decrease in water, lower/negative values mean more speed
+ var/snow_speed = 0 //Speed boost/decrease on snow, lower/negative values mean more speed
+ var/rock_climbing = FALSE // If true, allows climbing cliffs with clickdrag.
+
+ var/step_volume_mod = 1 //How quiet or loud footsteps in this shoe are
+
+ permeability_coefficient = 0.50
+ slowdown = SHOES_SLOWDOWN
+ force = 2
+ var/overshoes = 0
+ species_restricted = list("exclude",SPECIES_TESHARI, SPECIES_VOX)
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/shoes.dmi',
+ SPECIES_VOX = 'icons/mob/species/vox/shoes.dmi'
+ )
+ drop_sound = 'sound/items/drop/shoes.ogg'
+ pickup_sound = 'sound/items/pickup/shoes.ogg'
+
+/obj/item/clothing/shoes/proc/draw_knife()
+ set name = "Draw Boot Knife"
+ set desc = "Pull out your boot knife."
+ set category = "IC"
+ set src in usr
+
+ if(usr.stat || usr.restrained() || usr.incapacitated())
+ return
+
+ holding.forceMove(get_turf(usr))
+
+ if(usr.put_in_hands(holding))
+ usr.visible_message("\The [usr] pulls a knife out of their boot!")
+ playsound(src, 'sound/weapons/holster/sheathout.ogg', 25)
+ holding = null
+ cut_overlay("[icon_state]_knife")
+ else
+ to_chat(usr, "Your need an empty, unbroken hand to do that.")
+ holding.forceMove(src)
+
+ if(!holding)
+ verbs -= /obj/item/clothing/shoes/proc/draw_knife
+
+ update_icon()
+ return
+
+/obj/item/clothing/shoes/attack_hand(var/mob/living/M)
+ if(can_hold_knife == 1 && holding && src.loc == M)
+ draw_knife()
+ return
+ ..()
+
+/obj/item/clothing/shoes/attackby(var/obj/item/I, var/mob/user)
+ if((can_hold_knife == 1) && (istype(I, /obj/item/weapon/material/shard) || \
+ istype(I, /obj/item/weapon/material/butterfly) || \
+ istype(I, /obj/item/weapon/material/kitchen/utensil) || \
+ istype(I, /obj/item/weapon/material/knife/tacknife)))
+ if(holding)
+ to_chat(user, "\The [src] is already holding \a [holding].")
+ return
+ user.unEquip(I)
+ I.forceMove(src)
+ holding = I
+ user.visible_message("\The [user] shoves \the [I] into \the [src].")
+ verbs |= /obj/item/clothing/shoes/proc/draw_knife
+ update_icon()
+ else
+ return ..()
+
+/obj/item/clothing/shoes/verb/toggle_layer()
+ set name = "Switch Shoe Layer"
+ set category = "Object"
+
+ if(shoes_under_pants == -1)
+ to_chat(usr, "\The [src] cannot be worn above your suit!")
+ return
+ shoes_under_pants = !shoes_under_pants
+ update_icon()
+
+/obj/item/clothing/shoes/update_icon()
+ . = ..()
+ if(holding)
+ add_overlay("[icon_state]_knife")
+ if(contaminated)
+ add_overlay(contamination_overlay)
+ if(gurgled) //VOREStation Edit Start
+ decontaminate()
+ gurgle_contaminate() //VOREStation Edit End
+ if(ismob(usr))
+ var/mob/M = usr
+ M.update_inv_shoes()
+
+/obj/item/clothing/shoes/clean_blood()
+ update_icon()
+ return ..()
+
+/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running)
+ if(prob(1) && !recent_squish) //VOREStation edit begin
+ recent_squish = 1
+ spawn(100)
+ recent_squish = 0
+ for(var/mob/living/M in contents)
+ var/emote = pick(inside_emotes)
+ to_chat(M,emote) //VOREStation edit end
+ return
+
+/obj/item/clothing/shoes/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_shoes()
+
+
+///////////////////////////////////////////////////////////////////////
+//Suit
+/obj/item/clothing/suit
+ icon = 'icons/obj/clothing/suits.dmi'
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_suits.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_suits.dmi',
+ )
+ name = "suit"
+ var/fire_resist = T0C+100
+ body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
+ allowed = list(/obj/item/weapon/tank/emergency/oxygen)
+ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ slot_flags = SLOT_OCLOTHING
+ var/blood_overlay_type = "suit"
+ blood_sprite_state = "suitblood" //Defaults to the suit's blood overlay, so that some blood renders instead of no blood.
+
+ var/taurized = FALSE
+ siemens_coefficient = 0.9
+ w_class = ITEMSIZE_NORMAL
+ preserve_item = 1
+ equip_sound = 'sound/items/jumpsuit_equip.ogg'
+
+
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/suit.dmi',
+ SPECIES_VOX = 'icons/mob/species/vox/suit.dmi'
+ )
+
+ valid_accessory_slots = (ACCESSORY_SLOT_OVER | ACCESSORY_SLOT_ARMBAND)
+ restricted_accessory_slots = (ACCESSORY_SLOT_ARMBAND)
+
+/obj/item/clothing/suit/set_clothing_index()
+ ..()
+
+ if(index && !icon_override)
+ icon = new /icon("icons/obj/clothing/suits_[index].dmi")
+ item_icons = list(
+ slot_l_hand_str = new /icon("icons/mob/items/lefthand_suits_[index].dmi"),
+ slot_r_hand_str = new /icon("icons/mob/items/righthand_suits_[index].dmi"),
+ )
+
+ return 1
+
+ return 0
+
+/obj/item/clothing/suit/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_wear_suit()
+
+ set_clothing_index()
+
+/obj/item/clothing/suit/equipped(var/mob/user, var/slot)
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ if((taurized && !isTaurTail(H.tail_style)) || (!taurized && isTaurTail(H.tail_style)))
+ taurize(user)
+
+ return ..()
+
+/obj/item/clothing/suit/proc/taurize(var/mob/living/carbon/human/Taur)
+ if(isTaurTail(Taur.tail_style))
+ var/datum/sprite_accessory/tail/taur/taurtail = Taur.tail_style
+ if(taurtail.suit_sprites && (get_worn_icon_state(slot_wear_suit_str) in cached_icon_states(taurtail.suit_sprites)))
+ icon_override = taurtail.suit_sprites
+ taurized = TRUE
+
+ if(!taurized)
+ icon_override = initial(icon_override)
+ taurized = FALSE
+
+// Taur suits need to be shifted so its centered on their taur half.
+/obj/item/clothing/suit/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0,var/icon/clip_mask)
+ var/image/standing = ..()
+ if(taurized) //Special snowflake var on suits
+ standing.pixel_x = -16
+ standing.layer = BODY_LAYER + 15 // 15 is above tail layer, so will not be covered by taurbody.
+ return standing
+
+/obj/item/clothing/suit/apply_accessories(var/image/standing)
+ if(LAZYLEN(accessories) && taurized)
+ for(var/obj/item/clothing/accessory/A in accessories)
+ var/image/I = new(A.get_mob_overlay())
+ I.pixel_x = 16 //Opposite of the pixel_x on the suit (-16) from taurization to cancel it out and puts the accessory in the correct place on the body.
+ standing.add_overlay(I)
+ else
+ return ..()
+
+
+///////////////////////////////////////////////////////////////////////
+//Under clothing
+/obj/item/clothing/under
+ icon = 'icons/obj/clothing/uniforms.dmi'
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_uniforms.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_uniforms.dmi',
+ )
+ name = "under"
+ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
+ permeability_coefficient = 0.90
+ slot_flags = SLOT_ICLOTHING
+ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+ equip_sound = 'sound/items/jumpsuit_equip.ogg'
+ w_class = ITEMSIZE_NORMAL
+ show_messages = 1
+ blood_sprite_state = "uniformblood"
+
+ var/has_sensor = 1 //For the crew computer 2 = unable to change mode
+ var/sensor_mode = 0
+ /*
+ 1 = Report living/dead
+ 2 = Report detailed damages
+ 3 = Report location
+ */
+ var/displays_id = 1
+ var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
+ var/rolled_sleeves = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
+ sprite_sheets = list(
+ SPECIES_TESHARI = 'icons/mob/species/teshari/uniform.dmi',
+ SPECIES_VOX = 'icons/mob/species/vox/uniform.dmi'
+ )
+
+ //convenience var for defining the icon state for the overlay used when the clothing is worn.
+ //Also used by rolling/unrolling.
+ var/worn_state = null
+ valid_accessory_slots = (\
+ ACCESSORY_SLOT_UTILITY\
+ |ACCESSORY_SLOT_WEAPON\
+ |ACCESSORY_SLOT_ARMBAND\
+ |ACCESSORY_SLOT_DECOR\
+ |ACCESSORY_SLOT_MEDAL\
+ |ACCESSORY_SLOT_INSIGNIA\
+ |ACCESSORY_SLOT_TIE\
+ |ACCESSORY_SLOT_RANK\
+ |ACCESSORY_SLOT_DEPT\
+ |ACCESSORY_SLOT_OVER)
+ restricted_accessory_slots = (\
+ ACCESSORY_SLOT_UTILITY\
+ |ACCESSORY_SLOT_WEAPON\
+ |ACCESSORY_SLOT_ARMBAND\
+ |ACCESSORY_SLOT_TIE\
+ |ACCESSORY_SLOT_RANK\
+ |ACCESSORY_SLOT_DEPT\
+ |ACCESSORY_SLOT_OVER)
+
+ var/icon/rolled_down_icon = 'icons/mob/uniform_rolled_down.dmi'
+ var/icon/rolled_down_sleeves_icon = 'icons/mob/uniform_sleeves_rolled.dmi'
+
+/obj/item/clothing/under/attack_hand(var/mob/user)
+ if(LAZYLEN(accessories))
+ ..()
+ if ((ishuman(usr) || issmall(usr)) && src.loc == user)
+ return
+ ..()
+
+/obj/item/clothing/under/New()
+ ..()
+ if(worn_state)
+ if(!item_state_slots)
+ item_state_slots = list()
+ item_state_slots[slot_w_uniform_str] = worn_state
+ else
+ worn_state = icon_state
+
+ //autodetect rollability
+ if(rolled_down < 0)
+ if(("[worn_state]_d_s" in cached_icon_states(icon)) || ("[worn_state]_s" in cached_icon_states(rolled_down_icon)) || ("[worn_state]_d_s" in cached_icon_states(icon_override)))
+ rolled_down = 0
+
+ if(rolled_down == -1)
+ verbs -= /obj/item/clothing/under/verb/rollsuit
+ if(rolled_sleeves == -1)
+ verbs -= /obj/item/clothing/under/verb/rollsleeves
+
+/obj/item/clothing/under/set_clothing_index()
+ ..()
+
+ if(index && !icon_override)
+ icon = new /icon("icons/obj/clothing/uniforms_[index].dmi")
+
+ item_icons = list(
+ slot_l_hand_str = new /icon("icons/mob/items/lefthand_uniforms_[index].dmi"),
+ slot_r_hand_str = new /icon("icons/mob/items/righthand_uniforms_[index].dmi"),
+ )
+
+ rolled_down_icon = new /icon("icons/mob/uniform_rolled_down_[index].dmi")
+ rolled_down_sleeves_icon = new /icon("icons/mob/uniform_sleeves_rolled_[index].dmi")
+ return 1
+
+ return 0
+
+/obj/item/clothing/under/proc/update_rolldown_status()
+ var/mob/living/carbon/human/H
+ if(istype(src.loc, /mob/living/carbon/human))
+ H = src.loc
+
+ var/icon/under_icon
+ if(icon_override)
+ under_icon = icon_override
+ else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)])
+ under_icon = sprite_sheets[H.species.get_bodytype(H)]
+ else if(item_icons && item_icons[slot_w_uniform_str])
+ under_icon = item_icons[slot_w_uniform_str]
+ else if ("[worn_state]_s" in cached_icon_states(rolled_down_icon))
+ under_icon = rolled_down_icon
+
+ // The _s is because the icon update procs append it.
+ if((under_icon == rolled_down_icon && ("[worn_state]_s" in cached_icon_states(under_icon))) || ("[worn_state]_d_s" in cached_icon_states(under_icon)))
+ if(rolled_down != 1)
+ rolled_down = 0
+ else
+ rolled_down = -1
+ if(H) update_clothing_icon()
+
+/obj/item/clothing/under/proc/update_rollsleeves_status()
+ var/mob/living/carbon/human/H
+ if(istype(src.loc, /mob/living/carbon/human))
+ H = src.loc
+
+ var/icon/under_icon
+ if(icon_override)
+ under_icon = icon_override
+ else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)])
+ under_icon = sprite_sheets[H.species.get_bodytype(H)]
+ else if(item_icons && item_icons[slot_w_uniform_str])
+ under_icon = item_icons[slot_w_uniform_str]
+ else if ("[worn_state]_s" in cached_icon_states(rolled_down_sleeves_icon))
+ under_icon = rolled_down_sleeves_icon
+ else if(index)
+ under_icon = new /icon("[INV_W_UNIFORM_DEF_ICON]_[index].dmi")
+
+ // The _s is because the icon update procs append it.
+ if((under_icon == rolled_down_sleeves_icon && ("[worn_state]_s" in cached_icon_states(under_icon))) || ("[worn_state]_r_s" in cached_icon_states(under_icon)))
+ if(rolled_sleeves != 1)
+ rolled_sleeves = 0
+ else
+ rolled_sleeves = -1
+ if(H) update_clothing_icon()
+
+/obj/item/clothing/under/update_clothing_icon()
+ if (ismob(src.loc))
+ var/mob/M = src.loc
+ M.update_inv_w_uniform()
+
+ set_clothing_index()
+
+
+/obj/item/clothing/under/examine(mob/user)
+ . = ..()
+ switch(src.sensor_mode)
+ if(0)
+ . += "Its sensors appear to be disabled."
+ if(1)
+ . += "Its binary life sensors appear to be enabled."
+ if(2)
+ . += "Its vital tracker appears to be enabled."
+ if(3)
+ . += "Its vital tracker and tracking beacon appear to be enabled."
+
+/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
+ var/mob/M = usr
+ if (istype(M, /mob/observer)) return
+ if (usr.stat || usr.restrained()) return
+ if(has_sensor >= 2)
+ to_chat(usr, "The controls are locked.")
+ return 0
+ if(has_sensor <= 0)
+ to_chat(usr, "This suit does not have any sensors.")
+ return 0
+
+ var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon")
+ var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
+ if(get_dist(usr, src) > 1)
+ to_chat(usr, "You have moved too far away.")
+ return
+ sensor_mode = modes.Find(switchMode) - 1
+
+ if (src.loc == usr)
+ switch(sensor_mode)
+ if(0)
+ usr.visible_message("[usr] adjusts their sensors.", "You disable your suit's remote sensing equipment.")
+ if(1)
+ usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report whether you are live or dead.")
+ if(2)
+ usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns.")
+ if(3)
+ usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns as well as your coordinate position.")
+
+ else if (istype(src.loc, /mob))
+ usr.visible_message("[usr] adjusts [src.loc]'s sensors.", "You adjust [src.loc]'s sensors.")
+
+/obj/item/clothing/under/verb/toggle()
+ set name = "Toggle Suit Sensors"
+ set category = "Object"
+ set src in usr
+ set_sensors(usr)
+
+/obj/item/clothing/under/verb/rollsuit()
+ set name = "Roll Down Jumpsuit"
+ set category = "Object"
+ set src in usr
+ if(!istype(usr, /mob/living)) return
+ if(usr.stat) return
+
+ update_rolldown_status()
+ if(rolled_down == -1)
+ to_chat(usr, "You cannot roll down [src]!")
+ return
+ if((rolled_sleeves == 1) && !(rolled_down))
+ rolled_sleeves = 0
+
+ rolled_down = !rolled_down
+ if(rolled_down)
+ body_parts_covered = initial(body_parts_covered)
+ body_parts_covered &= ~(UPPER_TORSO|ARMS)
+ if("[worn_state]_s" in cached_icon_states(rolled_down_icon))
+ icon_override = rolled_down_icon
+ item_state_slots[slot_w_uniform_str] = "[worn_state]"
+ else
+ item_state_slots[slot_w_uniform_str] = "[worn_state]_d"
+
+ to_chat(usr, "You roll down your [src].")
+ else
+ body_parts_covered = initial(body_parts_covered)
+ if(icon_override == rolled_down_icon)
+ icon_override = initial(icon_override)
+ item_state_slots[slot_w_uniform_str] = "[worn_state]"
+ to_chat(usr, "You roll up your [src].")
+ update_clothing_icon()
+
+/obj/item/clothing/under/verb/rollsleeves()
+ set name = "Roll Up Sleeves"
+ set category = "Object"
+ set src in usr
+ if(!istype(usr, /mob/living)) return
+ if(usr.stat) return
+
+ update_rollsleeves_status()
+ if(rolled_sleeves == -1)
+ to_chat(usr, "You cannot roll up your [src]'s sleeves!")
+ return
+ if(rolled_down == 1)
+ to_chat(usr, "You must roll up your [src] first!")
+ return
+
+ rolled_sleeves = !rolled_sleeves
+ if(rolled_sleeves)
+ body_parts_covered &= ~(ARMS)
+ if("[worn_state]_s" in cached_icon_states(rolled_down_sleeves_icon))
+ icon_override = rolled_down_sleeves_icon
+ item_state_slots[slot_w_uniform_str] = "[worn_state]"
+ else
+ item_state_slots[slot_w_uniform_str] = "[worn_state]_r"
+ to_chat(usr, "You roll up your [src]'s sleeves.")
+ else
+ body_parts_covered = initial(body_parts_covered)
+ if(icon_override == rolled_down_sleeves_icon)
+ icon_override = initial(icon_override)
+ item_state_slots[slot_w_uniform_str] = "[worn_state]"
+ to_chat(usr, "You roll down your [src]'s sleeves.")
+ update_clothing_icon()
+
+/obj/item/clothing/under/rank/New()
+ sensor_mode = pick(0,1,2,3)
+ ..()
diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm
index 75f5e4af3cf..6ac7ef9a3a5 100644
--- a/code/modules/clothing/spacesuits/rig/rig.dm
+++ b/code/modules/clothing/spacesuits/rig/rig.dm
@@ -585,8 +585,7 @@
/obj/item/weapon/rig/update_icon(var/update_mob_icon)
- //TODO: Maybe consider a cache for this (use mob_icon as blank canvas, use suit icon overlay).
- overlays.Cut()
+ cut_overlays()
if(!mob_icon || update_mob_icon)
var/species_icon = 'icons/mob/rig_back.dmi'
// Since setting mob_icon will override the species checks in
@@ -598,7 +597,7 @@
if(installed_modules.len)
for(var/obj/item/rig_module/module in installed_modules)
if(module.suit_overlay)
- chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH)
+ chest.add_overlay(image('icons/mob/rig_modules.dmi', icon_state = "[module.suit_overlay]", dir = SOUTH))
if(wearer)
wearer.update_inv_shoes()
diff --git a/code/modules/compass/compass_holder.dm b/code/modules/compass/compass_holder.dm
index 1a2148d5c42..44f981e8edf 100644
--- a/code/modules/compass/compass_holder.dm
+++ b/code/modules/compass/compass_holder.dm
@@ -75,7 +75,7 @@
var/set_overlays = (compass_static_labels | compass_waypoint_markers)
if(show_heading)
set_overlays |= compass_heading_marker
- overlays = set_overlays
+ overlays = set_overlays // ???
/obj/compass_holder/proc/clear_waypoint(var/id)
LAZYREMOVE(compass_waypoints, id)
diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm
index b87639cce64..9af65789fee 100644
--- a/code/modules/detectivework/microscope/dnascanner.dm
+++ b/code/modules/detectivework/microscope/dnascanner.dm
@@ -111,7 +111,8 @@
var/obj/item/weapon/paper/P = new(src)
P.name = "[src] report #[++report_num]: [bloodsamp.name]"
P.stamped = list(/obj/item/weapon/stamp)
- P.overlays = list("paper_stamped")
+ P.cut_overlays()
+ P.add_overlay("paper_stamped")
//dna data itself
var/data = "No scan information available."
if(bloodsamp.dna != null)
diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm
index 3a651d86695..846528a8f9f 100644
--- a/code/modules/detectivework/tools/evidencebag.dm
+++ b/code/modules/detectivework/tools/evidencebag.dm
@@ -62,8 +62,8 @@
var/image/img = image("icon"=I, "layer"=FLOAT_LAYER) //take a snapshot. (necessary to stop the underlays appearing under our inventory-HUD slots ~Carn
I.pixel_x = xx //and then return it
I.pixel_y = yy
- overlays += img
- overlays += "evidence" //should look nicer for transparent stuff. not really that important, but hey.
+ add_overlay(img)
+ add_overlay("evidence") //should look nicer for transparent stuff. not really that important, but hey.
desc = "An evidence bag containing [I]."
I.loc = src
@@ -77,7 +77,7 @@
var/obj/item/I = contents[1]
user.visible_message("[user] takes [I] out of [src]", "You take [I] out of [src].",\
"You hear someone rustle around in a plastic bag, and remove something.")
- overlays.Cut() //remove the overlays
+ cut_overlays() //remove the overlays
user.put_in_hands(I)
stored_item = null
diff --git a/code/modules/detectivework/tools/uvlight.dm b/code/modules/detectivework/tools/uvlight.dm
index 6d14b48087a..c59b3cb578f 100644
--- a/code/modules/detectivework/tools/uvlight.dm
+++ b/code/modules/detectivework/tools/uvlight.dm
@@ -42,7 +42,7 @@
stored_alpha.Cut()
if(reset_objects.len)
for(var/obj/item/I in reset_objects)
- I.overlays -= I.blood_overlay
+ I.cut_overlay(I.blood_overlay)
if(I.fluorescent == 2) I.fluorescent = 1
reset_objects.Cut()
@@ -66,5 +66,5 @@
if(istype(A, /obj/item))
var/obj/item/O = A
if(O.was_bloodied && !(O.blood_overlay in O.overlays))
- O.overlays |= O.blood_overlay
+ O.add_overlay(O.blood_overlay)
reset_objects |= O
\ No newline at end of file
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index d6224638c38..128dd0e4496 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -379,7 +379,7 @@ log transactions
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
- R.overlays += stampoverlay
+ R.add_overlay(stampoverlay)
R.stamps += "
This paper has been stamped by the Automatic Teller Machine."
if(prob(50))
@@ -421,7 +421,7 @@ log transactions
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
- R.overlays += stampoverlay
+ R.add_overlay(stampoverlay)
R.stamps += "
This paper has been stamped by the Automatic Teller Machine."
if(prob(50))
diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm
index 4c1890e78a1..a1cd0d5f300 100644
--- a/code/modules/economy/Accounts.dm
+++ b/code/modules/economy/Accounts.dm
@@ -69,7 +69,7 @@
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
- R.overlays += stampoverlay
+ R.add_overlay(stampoverlay)
R.stamps += "
This paper has been stamped by the Accounts Database."
//add the account
diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm
index f526dcf7cec..ecf9ff4688a 100644
--- a/code/modules/economy/EFTPOS.dm
+++ b/code/modules/economy/EFTPOS.dm
@@ -44,7 +44,7 @@
R.offset_y += 0
R.ico += "paper_stamp-cent"
R.stamped += /obj/item/weapon/stamp
- R.overlays += stampoverlay
+ R.add_overlay(stampoverlay)
R.stamps += "
This paper has been stamped by the EFTPOS device."
/obj/item/device/eftpos/Destroy()
@@ -64,7 +64,7 @@
if(!R.stamped)
R.stamped = new
R.stamped += /obj/item/weapon/stamp
- R.overlays += stampoverlay
+ R.add_overlay(stampoverlay)
R.stamps += "
This paper has been stamped by the EFTPOS device."
var/obj/item/smallDelivery/D = new(R.loc)
R.loc = D
diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm
index f13684642c6..d84132ca864 100644
--- a/code/modules/economy/cash.dm
+++ b/code/modules/economy/cash.dm
@@ -36,7 +36,7 @@
qdel(src)
/obj/item/weapon/spacecash/update_icon()
- overlays.Cut()
+ cut_overlays()
name = "[worth] [initial_name]\s"
if(worth in list(1000,500,200,100,50,20,10,1))
icon_state = "spacecash[worth]"
@@ -53,14 +53,14 @@
M.Translate(rand(-6, 6), rand(-4, 8))
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
banknote.transform = M
- src.overlays += banknote
+ add_overlay(banknote)
if(num == 0) // Less than one thaler, let's just make it look like 1 for ease
var/image/banknote = image('icons/obj/items.dmi', "spacecash1")
var/matrix/M = matrix()
M.Translate(rand(-6, 6), rand(-4, 8))
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
banknote.transform = M
- src.overlays += banknote
+ add_overlay(banknote)
src.desc = "They are worth [worth] [initial_name]s."
/obj/item/weapon/spacecash/proc/adjust_worth(var/adjust_worth = 0, var/update = 1)
diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm
index 8184229c8b6..29ccd38ebb9 100644
--- a/code/modules/economy/cash_register.dm
+++ b/code/modules/economy/cash_register.dm
@@ -50,7 +50,7 @@
if(cash_stored)
spawn_money(cash_stored, loc, user)
cash_stored = 0
- overlays -= "register_cash"
+ cut_overlay("register_cash")
else
open_cash_box()
else
@@ -181,7 +181,7 @@
if(cash_open)
to_chat(user, "You neatly sort the cash into the box.")
cash_stored += SC.worth
- overlays |= "register_cash"
+ add_overlay("register_cash")
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.drop_from_inventory(SC)
@@ -468,15 +468,15 @@
if(cash_open)
cash_open = 0
- overlays -= "register_approve"
- overlays -= "register_open"
- overlays -= "register_cash"
+ cut_overlay("register_approve")
+ cut_overlay("register_open")
+ cut_overlay("register_cash")
else if(!cash_locked)
cash_open = 1
- overlays += "register_approve"
- overlays += "register_open"
+ add_overlay("register_approve")
+ add_overlay("register_open")
if(cash_stored)
- overlays += "register_cash"
+ add_overlay("register_cash")
else
to_chat(usr, "The cash box is locked.")
diff --git a/code/modules/economy/coins.dm b/code/modules/economy/coins.dm
index dd30cc24b66..8f95a424b74 100644
--- a/code/modules/economy/coins.dm
+++ b/code/modules/economy/coins.dm
@@ -65,7 +65,7 @@
to_chat(user, "There already is a string attached to this coin.")
return
if (CC.use(1))
- overlays += image('icons/obj/items.dmi',"coin_string_overlay")
+ add_overlay("coin_string_overlay")
string_attached = 1
to_chat(user, "You attach a string to the coin.")
else
@@ -79,7 +79,7 @@
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 1
CC.update_icon()
- overlays = list()
+ cut_overlays()
string_attached = null
to_chat(user, "You detach the string from the coin.")
else ..()
diff --git a/code/modules/fishing/fishing_net.dm b/code/modules/fishing/fishing_net.dm
index ab1e35ea6a3..39c5e92eef3 100644
--- a/code/modules/fishing/fishing_net.dm
+++ b/code/modules/fishing/fishing_net.dm
@@ -78,7 +78,7 @@
/obj/item/weapon/material/fishing_net/update_icon() // Also updates name and desc
underlays.Cut()
- overlays.Cut()
+ cut_overlays()
..()
diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm
index ea4571442f6..ae089d26a2c 100644
--- a/code/modules/fishing/fishing_rod.dm
+++ b/code/modules/fishing/fishing_rod.dm
@@ -78,10 +78,10 @@
return ..()
/obj/item/weapon/material/fishing_rod/update_icon()
- overlays.Cut()
+ cut_overlays()
..()
if(strung)
- overlays += image(icon, "[icon_state]_string")
+ add_overlay("[icon_state]_string")
/obj/item/weapon/material/fishing_rod/proc/update_bait()
if(istype(Bait, bait_type))
diff --git a/code/modules/food/food/drinks/drinkingglass.dm b/code/modules/food/food/drinks/drinkingglass.dm
index 7324dc8ad82..85e8de07058 100644
--- a/code/modules/food/food/drinks/drinkingglass.dm
+++ b/code/modules/food/food/drinks/drinkingglass.dm
@@ -118,7 +118,7 @@
matter = list("glass" = 175)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change()
- overlays.Cut()
+ cut_overlays()
if(reagents.total_volume)
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1")
@@ -129,7 +129,7 @@
if(8 to INFINITY) filling.icon_state = "[icon_state]12"
filling.color += reagents.get_color()
- overlays += filling
+ add_overlay(filling)
name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future.
else
name = "shot glass"
@@ -146,7 +146,7 @@
icon_state = pick("fitness-cup_black", "fitness-cup_red", "fitness-cup_black")
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/on_reagent_change()
- overlays.Cut()
+ cut_overlays()
if(reagents.total_volume)
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "fitness-cup10")
@@ -164,7 +164,7 @@
if(90 to INFINITY) filling.icon_state = "fitness-cup100"
filling.color += reagents.get_color()
- overlays += filling
+ add_overlay(filling)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake
name = "protein shake"
diff --git a/code/modules/food/food/sandwich.dm b/code/modules/food/food/sandwich.dm
index 6929586c05e..738e3f4a461 100644
--- a/code/modules/food/food/sandwich.dm
+++ b/code/modules/food/food/sandwich.dm
@@ -46,7 +46,7 @@
var/fullname = "" //We need to build this from the contents of the var.
var/i = 0
- overlays.Cut()
+ cut_overlays()
for(var/obj/item/weapon/reagent_containers/food/snacks/O in ingredients)
@@ -62,12 +62,12 @@
I.color = O.filling_color
I.pixel_x = pick(list(-1,0,1))
I.pixel_y = (i*2)+1
- overlays += I
+ add_overlay(I)
var/image/T = new(src.icon, "sandwich_top")
T.pixel_x = pick(list(-1,0,1))
T.pixel_y = (ingredients.len * 2)+1
- overlays += T
+ add_overlay(T)
name = lowertext("[fullname] sandwich")
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich"
diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm
index c0968f3381e..6c7d9186f25 100644
--- a/code/modules/food/food/snacks.dm
+++ b/code/modules/food/food/snacks.dm
@@ -189,11 +189,11 @@
)
src.bitecount++
- U.overlays.Cut()
+ U.cut_overlays()
U.loaded = "[src]"
var/image/I = new(U.icon, "loadedfood")
I.color = src.filling_color
- U.overlays += I
+ U.add_overlay(I)
reagents.trans_to_obj(U, min(reagents.total_volume,5))
@@ -3166,7 +3166,7 @@
/obj/item/pizzabox/update_icon()
- overlays = list()
+ cut_overlays()
// Set appropriate description
if( open && pizza )
@@ -3194,7 +3194,7 @@
if( pizza )
var/image/pizzaimg = image(icon = pizza.icon, icon_state = pizza.icon_state) //VOREStation Edit: Icons for bad pizza
pizzaimg.pixel_y = -3
- overlays += pizzaimg
+ add_overlay(pizzaimg)
return
else
@@ -3211,7 +3211,7 @@
if( doimgtag )
var/image/tagimg = image("food.dmi", icon_state = "pizzabox_tag")
tagimg.pixel_y = boxes.len * 3
- overlays += tagimg
+ add_overlay(tagimg)
icon_state = "pizzabox[boxes.len+1]"
@@ -4238,7 +4238,7 @@
J.alpha = 200
J.blend_mode = BLEND_OVERLAY
J.tag = "coating"
- overlays += J
+ add_overlay(J)
if (user)
user.visible_message(span("notice", "[user] dips \the [src] into \the [coating.name]"), span("notice", "You dip \the [src] into \the [coating.name]"))
@@ -4269,7 +4269,7 @@
var/image/J = image(I)
J.alpha = 200
J.tag = "coating"
- overlays += J
+ add_overlay(J)
if (do_coating_prefix == 1)
diff --git a/code/modules/food/glass/bottle.dm b/code/modules/food/glass/bottle.dm
index f372a2facf5..a3c511df484 100644
--- a/code/modules/food/glass/bottle.dm
+++ b/code/modules/food/glass/bottle.dm
@@ -35,7 +35,7 @@
icon_state = "bottle-[rand(1,4)]"
/obj/item/weapon/reagent_containers/glass/bottle/update_icon()
- overlays.Cut()
+ cut_overlays()
if(reagents.total_volume && (icon_state == "bottle-1" || icon_state == "bottle-2" || icon_state == "bottle-3" || icon_state == "bottle-4"))
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
@@ -51,11 +51,11 @@
if(91 to INFINITY) filling.icon_state = "[icon_state]-100"
filling.color = reagents.get_color()
- overlays += filling
+ add_overlay(filling)
if (!is_open_container())
var/image/lid = image(icon, src, "lid_bottle")
- overlays += lid
+ add_overlay(lid)
/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline
name = "inaprovaline bottle"
diff --git a/code/modules/food/kitchen/cooking_machines/cereal.dm b/code/modules/food/kitchen/cooking_machines/cereal.dm
index ae2516da4aa..b80746add44 100644
--- a/code/modules/food/kitchen/cooking_machines/cereal.dm
+++ b/code/modules/food/kitchen/cooking_machines/cereal.dm
@@ -36,10 +36,10 @@
var/image/food_image = image(CI.object.icon, CI.object.icon_state)
food_image.color = CI.object.color
- food_image.overlays += CI.object.overlays
+ food_image.add_overlay(CI.object.overlays)
food_image.transform *= 0.7
- product.overlays += food_image
+ product.add_overlay(food_image)
*/
/obj/machinery/appliance/mixer/cereal/update_icon()
@@ -83,4 +83,4 @@
result.color = result.filling_color
for (var/i in images)
- result.overlays += images[i]
+ result.add_overlay(images[i])
diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm
index 6402a432ae9..cb52a0ca7b6 100644
--- a/code/modules/food/kitchen/gibber.dm
+++ b/code/modules/food/kitchen/gibber.dm
@@ -58,20 +58,20 @@
/obj/machinery/gibber/New()
..()
- src.overlays += image('icons/obj/kitchen.dmi', "grjam")
+ add_overlay("grjam")
/obj/machinery/gibber/update_icon()
- overlays.Cut()
+ cut_overlays()
if (dirty)
- src.overlays += image('icons/obj/kitchen.dmi', "grbloody")
+ add_overlay("grbloody")
if(stat & (NOPOWER|BROKEN))
return
if (!occupant)
- src.overlays += image('icons/obj/kitchen.dmi', "grjam")
+ add_overlay("grjam")
else if (operating)
- src.overlays += image('icons/obj/kitchen.dmi', "gruse")
+ add_overlay("gruse")
else
- src.overlays += image('icons/obj/kitchen.dmi', "gridle")
+ add_overlay("gridle")
/obj/machinery/gibber/relaymove(mob/user as mob)
src.go_out()
diff --git a/code/modules/food/kitchen/icecream.dm b/code/modules/food/kitchen/icecream.dm
index 2b53b657ce1..02335c8a9e5 100644
--- a/code/modules/food/kitchen/icecream.dm
+++ b/code/modules/food/kitchen/icecream.dm
@@ -183,7 +183,7 @@
/obj/item/weapon/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour_name)
name = "[flavour_name] icecream"
- src.overlays += "icecream_[flavour_name]"
+ add_overlay("icecream_[flavour_name]")
desc = "Delicious [cone_type] cone with a dollop of [flavour_name] ice cream."
ice_creamed = 1
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index 0b58b5110fb..0165c9315fb 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -410,7 +410,7 @@
name = "a playing card"
desc = "A playing card."
- overlays.Cut()
+ cut_overlays()
if(cards.len == 1)
@@ -418,7 +418,7 @@
var/image/I = new(src.icon, (concealed ? "[P.back_icon]" : "[P.card_icon]") )
I.pixel_x += (-5+rand(10))
I.pixel_y += (-5+rand(10))
- overlays += I
+ add_overlay(I)
return
var/offset = FLOOR(20/cards.len, 1)
@@ -450,7 +450,7 @@
else
I.pixel_x = -7+(offset*i)
I.transform = M
- overlays += I
+ add_overlay(I)
i++
/obj/item/weapon/hand/dropped(mob/user as mob)
diff --git a/code/modules/holomap/holomap_datum.dm b/code/modules/holomap/holomap_datum.dm
index af4cc6f2744..f6d4f61bba5 100644
--- a/code/modules/holomap/holomap_datum.dm
+++ b/code/modules/holomap/holomap_datum.dm
@@ -20,15 +20,15 @@
legend.pixel_x = HOLOMAP_LEGEND_X(T.z)
legend.pixel_y = HOLOMAP_LEGEND_Y(T.z)
- station_map.overlays |= cursor
- station_map.overlays |= legend
+ station_map.add_overlay(cursor)
+ station_map.add_overlay(legend)
/datum/station_holomap/proc/initialize_holomap_bogus()
station_map = image('icons/480x480.dmi', "stationmap")
legend = image('icons/effects/64x64.dmi', "notfound")
legend.pixel_x = 7 * WORLD_ICON_SIZE
legend.pixel_y = 7 * WORLD_ICON_SIZE
- station_map.overlays |= legend
+ station_map.add_overlay(legend)
// TODO - Strategic Holomap support
// /datum/station_holomap/strategic/initialize_holomap(var/turf/T, var/isAI=null, var/mob/user=null)
@@ -37,4 +37,4 @@
// legend = image('icons/effects/64x64.dmi', "strategic")
// legend.pixel_x = 3*WORLD_ICON_SIZE
// legend.pixel_y = 3*WORLD_ICON_SIZE
-// station_map.overlays |= legend
+// station_map.add_overlay(legend)
diff --git a/code/modules/holomap/mapper.dm b/code/modules/holomap/mapper.dm
index a140b80dc2f..430a4176ba4 100644
--- a/code/modules/holomap/mapper.dm
+++ b/code/modules/holomap/mapper.dm
@@ -265,7 +265,7 @@
markerImage.appearance_flags = RESET_COLOR|PIXEL_SCALE
markerImage.pixel_x = holomarker.x+holomarker.offset_x
markerImage.pixel_y = holomarker.y+holomarker.offset_y
- map_app.overlays += markerImage
+ map_app.add_overlay(markerImage)
var/obj/screen/mapper/map/tmp = new()
tmp.appearance = map_app
diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm
index dc15dabb465..9d56943856d 100644
--- a/code/modules/holomap/station_holomap.dm
+++ b/code/modules/holomap/station_holomap.dm
@@ -169,7 +169,7 @@
if(!holomap_datum)
return //Not yet.
- overlays.Cut()
+ cut_overlays()
if(stat & BROKEN)
icon_state = "station_mapb"
else if((stat & NOPOWER) || !anchored)
@@ -180,8 +180,8 @@
if(bogus)
holomap_datum.initialize_holomap_bogus()
else
- small_station_map.icon = SSholomaps.extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[original_zLevel]"]
- overlays |= small_station_map
+ small_station_map = image(SSholomaps.extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[original_zLevel]"], dir = src.dir)
+ add_overlay(small_station_map)
holomap_datum.initialize_holomap(get_turf(src))
// Put the little "map" overlay down where it looks nice
@@ -189,12 +189,12 @@
floor_markings.dir = src.dir
floor_markings.pixel_x = -src.pixel_x
floor_markings.pixel_y = -src.pixel_y
- overlays += floor_markings
+ add_overlay(floor_markings)
if(panel_open)
- overlays += "station_map-panel"
+ add_overlay("station_map-panel")
else
- overlays -= "station_map-panel"
+ cut_overlay("station_map-panel")
/obj/machinery/station_map/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.add_fingerprint(user)
diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm
index dcef997e365..f514ff8b6a8 100644
--- a/code/modules/hydroponics/beekeeping/beehive.dm
+++ b/code/modules/hydroponics/beekeeping/beehive.dm
@@ -13,22 +13,22 @@
var/maxFrames = 5
/obj/machinery/beehive/update_icon()
- overlays.Cut()
+ cut_overlays()
icon_state = "beehive"
if(closed)
- overlays += "lid"
+ add_overlay("lid")
if(frames)
- overlays += "empty[frames]"
+ add_overlay("empty[frames]")
if(honeycombs >= 100)
- overlays += "full[round(honeycombs / 100)]"
+ add_overlay("full[round(honeycombs / 100)]")
if(!smoked)
switch(bee_count)
if(1 to 40)
- overlays += "bees1"
+ add_overlay("bees1")
if(41 to 80)
- overlays += "bees2"
+ add_overlay("bees2")
if(81 to 100)
- overlays += "bees3"
+ add_overlay("bees3")
/obj/machinery/beehive/examine(var/mob/user)
. = ..()
@@ -217,7 +217,7 @@
/obj/item/honey_frame/filled/New()
..()
- overlays += "honeycomb"
+ add_overlay("honeycomb")
/obj/item/beehive_assembly
name = "beehive assembly"
@@ -269,18 +269,18 @@ var/global/list/datum/stack_recipe/wax_recipes = list( \
/obj/item/bee_pack/New()
..()
- overlays += "beepack-full"
+ add_overlay("beepack-full")
/obj/item/bee_pack/proc/empty()
full = 0
name = "empty bee pack"
desc = "A stasis pack for moving bees. It's empty."
- overlays.Cut()
- overlays += "beepack-empty"
+ cut_overlays()
+ add_overlay("beepack-empty")
/obj/item/bee_pack/proc/fill()
full = initial(full)
name = initial(name)
desc = initial(desc)
- overlays.Cut()
- overlays += "beepack-full"
\ No newline at end of file
+ cut_overlays()
+ add_overlay("beepack-full")
\ No newline at end of file
diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm
index 96b4385a08c..8e262bb69f9 100644
--- a/code/modules/hydroponics/grown.dm
+++ b/code/modules/hydroponics/grown.dm
@@ -125,7 +125,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/update_icon()
if(!seed || !SSplants || !SSplants.plant_icon_cache)
return
- overlays.Cut()
+ cut_overlays()
var/image/plant_icon
var/icon_key = "fruit-[seed.get_trait(TRAIT_PRODUCT_ICON)]-[seed.get_trait(TRAIT_PRODUCT_COLOUR)]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"
if(SSplants.plant_icon_cache[icon_key])
@@ -134,13 +134,13 @@
plant_icon = image('icons/obj/hydroponics_products.dmi',"blank")
var/image/fruit_base = image('icons/obj/hydroponics_products.dmi',"[seed.get_trait(TRAIT_PRODUCT_ICON)]-product")
fruit_base.color = "[seed.get_trait(TRAIT_PRODUCT_COLOUR)]"
- plant_icon.overlays |= fruit_base
+ plant_icon.add_overlay(fruit_base)
if("[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf" in cached_icon_states('icons/obj/hydroponics_products.dmi'))
var/image/fruit_leaves = image('icons/obj/hydroponics_products.dmi',"[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf")
fruit_leaves.color = "[seed.get_trait(TRAIT_PLANT_COLOUR)]"
- plant_icon.overlays |= fruit_leaves
+ add_overlay(fruit_leaves)
SSplants.plant_icon_cache[icon_key] = plant_icon
- overlays |= plant_icon
+ add_overlay(plant_icon)
/obj/item/weapon/reagent_containers/food/snacks/grown/Crossed(var/mob/living/M)
if(M.is_incorporeal())
@@ -363,9 +363,9 @@ var/list/fruit_icon_cache = list()
var/image/I = image(icon,"fruit_rind")
I.color = rind_colour
fruit_icon_cache["rind-[rind_colour]"] = I
- overlays |= fruit_icon_cache["rind-[rind_colour]"]
+ add_overlay(fruit_icon_cache["rind-[rind_colour]"])
if(!fruit_icon_cache["slice-[rind_colour]"])
var/image/I = image(icon,"fruit_slice")
I.color = flesh_colour
fruit_icon_cache["slice-[rind_colour]"] = I
- overlays |= fruit_icon_cache["slice-[rind_colour]"]
+ add_overlay(fruit_icon_cache["slice-[rind_colour]"])
diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm
index cb5bb5c68f6..08eea609bfb 100644
--- a/code/modules/hydroponics/seed_packets.dm
+++ b/code/modules/hydroponics/seed_packets.dm
@@ -28,7 +28,7 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds)
if(!seed) return
// Update icon.
- overlays.Cut()
+ cut_overlays()
var/is_seeds = ((seed.seed_noun in list("seeds","pits","nodes")) ? 1 : 0)
var/image/seed_mask
var/seed_base_key = "base-[is_seeds ? seed.get_trait(TRAIT_PLANT_COLOUR) : "spores"]"
@@ -49,8 +49,8 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds)
seed_overlay.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
plant_seed_sprites[seed_overlay_key] = seed_overlay
- overlays |= seed_mask
- overlays |= seed_overlay
+ add_overlay(seed_mask)
+ add_overlay(seed_overlay)
if(is_seeds)
src.name = "packet of [seed.seed_name] [seed.seed_noun]"
diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm
index 392accde8fe..8034e3d9ff1 100644
--- a/code/modules/hydroponics/seed_storage.dm
+++ b/code/modules/hydroponics/seed_storage.dm
@@ -405,9 +405,9 @@
panel_open = !panel_open
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
playsound(src, O.usesound, 50, 1)
- overlays.Cut()
+ cut_overlays()
if(panel_open)
- overlays += image(icon, "[initial(icon_state)]-panel")
+ add_overlay("[initial(icon_state)]-panel")
else if((O.is_wirecutter() || istype(O, /obj/item/device/multitool)) && panel_open)
wires.Interact(user)
diff --git a/code/modules/materials/sheets/organic/tanning/tanning_rack.dm b/code/modules/materials/sheets/organic/tanning/tanning_rack.dm
index 96d70d90967..885b65dd8fe 100644
--- a/code/modules/materials/sheets/organic/tanning/tanning_rack.dm
+++ b/code/modules/materials/sheets/organic/tanning/tanning_rack.dm
@@ -27,14 +27,12 @@
. += "\The [drying] is [drying.get_dryness_text()]."
/obj/structure/tanning_rack/update_icon()
- overlays.Cut()
+ cut_overlays()
if(drying)
- var/image/I
if(drying.wetness)
- I = image(icon, "leather_wet")
+ add_overlay("leather_wet")
else
- I = image(icon, "leather_dry")
- add_overlay(I)
+ add_overlay("leather_dry")
/obj/structure/tanning_rack/attackby(var/atom/A, var/mob/user)
if(istype(A, /obj/item/stack/wetleather))
diff --git a/code/modules/mining/mine_outcrops.dm b/code/modules/mining/mine_outcrops.dm
index 5ce5c5bc942..989b172e1e0 100644
--- a/code/modules/mining/mine_outcrops.dm
+++ b/code/modules/mining/mine_outcrops.dm
@@ -14,7 +14,7 @@
/obj/structure/outcrop/Initialize()
. = ..()
if(prob(1))
- overlays += image(icon, "[initial(icon_state)]-egg")
+ add_overlay("[initial(icon_state)]-egg")
/obj/structure/outcrop/diamond
name = "shiny outcrop"
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index c4484d40072..f574f8cee5e 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -905,7 +905,7 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
if(choice)
icon = 'icons/mob/ghost.dmi'
- overlays.Cut()
+ cut_overlays()
if(icon_state && icon)
previous_state = icon_state
@@ -936,9 +936,9 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
if(PP.pai == null)
count++
PP.icon = 'icons/obj/pda_vr.dmi' // VOREStation Edit
- PP.overlays += "pai-ghostalert"
+ PP.add_overlay("pai-ghostalert")
spawn(54)
- PP.overlays.Cut()
+ PP.cut_overlays()
to_chat(usr,"Flashing the displays of [count] unoccupied PAIs.")
else
to_chat(usr,"You have 'Be pAI' disabled in your character prefs, so we can't help you.")
diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm
index 22e57ff15ed..44ce0dc0f16 100644
--- a/code/modules/mob/holder.dm
+++ b/code/modules/mob/holder.dm
@@ -87,14 +87,14 @@ var/list/holder_mob_icon_cache = list()
/obj/item/weapon/holder/proc/sync(var/mob/living/M)
dir = 2
- overlays.Cut()
+ overlays.Cut() // Not using SSoverlays for this due to performance
icon = M.icon
icon_state = M.icon_state
item_state = M.item_state
color = M.color
name = M.name
desc = M.desc
- overlays |= M.overlays
+ overlays |= M.overlays // Not using SSoverlays for this due to performance
var/mob/living/carbon/human/H = loc
if(istype(H))
if(H.l_hand == src)
diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm
index 6592c37e0c2..42f3bff06ce 100644
--- a/code/modules/mob/living/bot/medbot.dm
+++ b/code/modules/mob/living/bot/medbot.dm
@@ -187,9 +187,9 @@
update_icons()
/mob/living/bot/medbot/update_icons()
- overlays.Cut()
+ cut_overlays()
if(skin)
- overlays += image('icons/obj/aibots.dmi', "medskin_[skin]")
+ add_overlay("medskin_[skin]")
if(busy)
icon_state = "medibots"
else
@@ -530,7 +530,7 @@
/obj/item/weapon/firstaid_arm_assembly/Initialize()
. = ..()
if(skin)
- overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]")
+ add_overlay("kit_skin_[src.skin]")
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -550,7 +550,7 @@
build_step++
to_chat(user, "You add the health sensor to [src].")
name = "First aid/robot arm/health analyzer assembly"
- overlays += image('icons/obj/aibots.dmi', "na_scanner")
+ add_overlay("na_scanner")
if(1)
if(isprox(W))
diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm
index 04878bf7272..d36dda3cd24 100644
--- a/code/modules/mob/living/bot/mulebot.dm
+++ b/code/modules/mob/living/bot/mulebot.dm
@@ -303,7 +303,7 @@
C.pixel_y += 9
if(C.layer < layer)
C.layer = layer + 0.1
- overlays += C
+ add_overlay(C)
busy = 0
@@ -312,7 +312,7 @@
return
busy = 1
- overlays.Cut()
+ cut_overlays()
load.forceMove(loc)
load.pixel_y -= 9
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index 9e2ce96412e..9855d0efd4c 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -367,7 +367,7 @@
var/obj/item/weapon/secbot_assembly/Sa = new /obj/item/weapon/secbot_assembly(Tsec)
Sa.build_step = 1
- Sa.overlays += image('icons/obj/aibots.dmi', "hs_hole")
+ Sa.add_overlay("hs_hole")
Sa.created_name = name
new /obj/item/device/assembly/prox_sensor(Tsec)
new used_weapon(Tsec)
@@ -439,14 +439,14 @@
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
build_step = 1
- overlays += image('icons/obj/aibots.dmi', "hs_hole")
+ add_overlay("hs_hole")
to_chat(user, "You weld a hole in \the [src].")
else if(isprox(W) && (build_step == 1))
user.drop_item()
build_step = 2
to_chat(user, "You add \the [W] to [src].")
- overlays += image('icons/obj/aibots.dmi', "hs_eye")
+ add_overlay("hs_eye")
name = "helmet/signaler/prox sensor assembly"
qdel(W)
@@ -455,7 +455,7 @@
build_step = 3
to_chat(user, "You add \the [W] to [src].")
name = "helmet/signaler/prox sensor/robot arm assembly"
- overlays += image('icons/obj/aibots.dmi', "hs_arm")
+ add_overlay("hs_arm")
qdel(W)
else if(istype(W, /obj/item/weapon/melee/baton) && build_step == 3)
diff --git a/code/modules/mob/living/carbon/alien/diona/update_icons.dm b/code/modules/mob/living/carbon/alien/diona/update_icons.dm
index 1d694cf6247..9fc10ab4a87 100644
--- a/code/modules/mob/living/carbon/alien/diona/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/diona/update_icons.dm
@@ -7,6 +7,6 @@
else
icon_state = "[initial(icon_state)]"
- overlays.Cut()
+ cut_overlays()
if(hat)
- overlays |= get_hat_icon(hat, 0, -8)
\ No newline at end of file
+ add_overlay(get_hat_icon(hat, 0, -8))
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/update_icons.dm b/code/modules/mob/living/carbon/alien/update_icons.dm
index 7bb90a4d9e2..a91445cc44a 100644
--- a/code/modules/mob/living/carbon/alien/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/update_icons.dm
@@ -1,5 +1,5 @@
/mob/living/carbon/alien/regenerate_icons()
- overlays = list()
+ cut_overlays()
update_icons()
/mob/living/carbon/alien/update_icons()
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 4d2f350cc66..5cfaf0ec208 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1252,7 +1252,7 @@
else if(no_damage)
health_images += image('icons/mob/screen1_health.dmi',"fullhealth")
- healths_ma.overlays += health_images
+ healths_ma.add_overlay(health_images)
healths.appearance = healths_ma
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm
index 59ba73446d5..88efb6d3551 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm
@@ -90,9 +90,9 @@
return
if(affected_mob.lying)
- affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
+ affected_mob.add_overlay("burst_lie")
else
- affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
+ affected_mob.add_overlay("burst_stand")
spawn(6)
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
new_xeno.key = picked
diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm
index c6fd56cb6e8..6f83805372c 100644
--- a/code/modules/mob/living/silicon/ai/multicam.dm
+++ b/code/modules/mob/living/silicon/ai/multicam.dm
@@ -70,7 +70,7 @@
M.Scale(x_scale, y_scale)
M.Translate(x_off, y_off)
dir.transform = M
- overlays += dir
+ add_overlay(dir)
/obj/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
if(!aiEye) // Exploit fix
@@ -102,7 +102,7 @@
qdel(src)
return
highlighted = TRUE
- overlays.Cut()
+ cut_overlays()
add_background()
add_buttons()
@@ -113,7 +113,7 @@
qdel(src)
return
highlighted = FALSE
- overlays.Cut()
+ cut_overlays()
add_background()
add_buttons()
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index b578f18c230..802da6788f9 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -143,13 +143,13 @@ var/list/mob_hat_cache = list()
/mob/living/silicon/robot/drone/updateicon()
- overlays.Cut()
+ cut_overlays()
if(stat == 0)
- overlays += "eyes-[icon_state]"
+ add_overlay("eyes-[icon_state]")
else
- overlays -= "eyes"
+ cut_overlay("eyes")
if(hat) // Let the drones wear hats.
- overlays |= get_hat_icon(hat, hat_x_offset, hat_y_offset)
+ add_overlay(get_hat_icon(hat, hat_x_offset, hat_y_offset))
/mob/living/silicon/robot/drone/choose_icon()
return
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index a34d2f65e71..83bf0a8b1ea 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -359,9 +359,9 @@
return canmove
/mob/living/silicon/robot/update_fire()
- overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state())
+ cut_overlay(image(icon = 'icons/mob/OnFire.dmi', icon_state = get_fire_icon_state()))
if(on_fire)
- overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state())
+ add_overlay(image(icon = 'icons/mob/OnFire.dmi', icon_state = get_fire_icon_state()))
/mob/living/silicon/robot/fire_act()
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm
index e8077db22f3..cbf2caf765a 100644
--- a/code/modules/mob/living/silicon/robot/robot_items.dm
+++ b/code/modules/mob/living/silicon/robot/robot_items.dm
@@ -211,7 +211,7 @@
I.loc = src
carrying.Add(I)
- overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
+ add_overlay(image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer))
addedSomething = 1
if ( addedSomething )
user.visible_message("[user] loads some items onto their service tray.")
diff --git a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
index 23e4aa81ea7..684dd9feee8 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
@@ -14,7 +14,7 @@
mmi = new /obj/item/device/mmi/digital/robot(src) // Explicitly a drone.
module = new /obj/item/weapon/robot_module/robot/gravekeeper(src)
- overlays.Cut()
+ cut_overlays()
init_id()
updatename("Gravekeeper")
diff --git a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm
index 0460226f3f5..a485d9cc8a4 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm
@@ -13,7 +13,7 @@
mmi = new /obj/item/device/mmi/digital/robot(src) // Explicitly a drone.
module = new /obj/item/weapon/robot_module/robot/lost(src)
- overlays.Cut()
+ cut_overlays()
init_id()
updatename("Lost")
diff --git a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm
index 00e75248c71..630e0e7cd5e 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm
@@ -12,7 +12,7 @@
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
mmi = new /obj/item/device/mmi/digital/robot(src) // Explicitly a drone.
- overlays.Cut()
+ cut_overlays()
init_id()
updatename("Syndicate")
diff --git a/code/modules/mob/living/silicon/robot/syndicate.dm b/code/modules/mob/living/silicon/robot/syndicate.dm
index c52755e6965..18d2b9ce80d 100644
--- a/code/modules/mob/living/silicon/robot/syndicate.dm
+++ b/code/modules/mob/living/silicon/robot/syndicate.dm
@@ -18,7 +18,7 @@
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
- overlays.Cut()
+ cut_overlays()
init_id()
new /obj/item/weapon/robot_module/robot/syndicate(src)
diff --git a/code/modules/mob/living/simple_mob/simple_hud.dm b/code/modules/mob/living/simple_mob/simple_hud.dm
index 5f0c2b3746b..513ac1d4e0e 100644
--- a/code/modules/mob/living/simple_mob/simple_hud.dm
+++ b/code/modules/mob/living/simple_mob/simple_hud.dm
@@ -166,8 +166,8 @@
zone_sel.icon = ui_style
zone_sel.color = ui_color
zone_sel.alpha = ui_alpha
- zone_sel.overlays.Cut()
- zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
+ zone_sel.cut_overlays()
+ zone_sel.add_overlay(image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]"))
hud_elements |= zone_sel
//Hand things
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm
index fe23b86bf77..a4fb4f40785 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/fish.dm
@@ -180,7 +180,7 @@
update_icon()
/mob/living/simple_mob/animal/passive/fish/icebass/update_icon()
- overlays.Cut()
+ cut_overlays()
..()
if(!dorsal_image)
@@ -253,7 +253,7 @@
update_icon()
/mob/living/simple_mob/animal/passive/fish/rockfish/update_icon()
- overlays.Cut()
+ cut_overlays()
..()
if(!head_image)
head_image = image(icon, "[icon_state]_mask")
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/dog.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/dog.dm
index 3825146832e..63c66aad70d 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/dog.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/dog.dm
@@ -41,7 +41,7 @@
..()
/mob/living/simple_mob/animal/passive/dog/regenerate_icons()
- overlays = list()
+ cut_overlays()
if(inventory_head)
var/head_icon_state = inventory_head.icon_state
@@ -50,7 +50,7 @@
var/icon/head_icon = image('icons/mob/corgi_head.dmi',head_icon_state)
if(head_icon)
- overlays += head_icon
+ add_overlay(head_icon)
if(inventory_back)
var/back_icon_state = inventory_back.icon_state
@@ -59,7 +59,7 @@
var/icon/back_icon = image('icons/mob/corgi_back.dmi',back_icon_state)
if(back_icon)
- overlays += back_icon
+ add_overlay(back_icon)
return
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm
index 19573d78f11..8c0e653ee9c 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm
@@ -140,7 +140,7 @@
..()
/mob/living/simple_mob/animal/sif/sakimm/update_icon()
- overlays.Cut()
+ cut_overlays()
..()
if(hat)
var/hat_state = hat.item_state ? hat.item_state : hat.icon_state
diff --git a/code/modules/mob/living/simple_mob/subtypes/blob/spore.dm b/code/modules/mob/living/simple_mob/subtypes/blob/spore.dm
index 879db190d86..fa48f57ecf2 100644
--- a/code/modules/mob/living/simple_mob/subtypes/blob/spore.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/blob/spore.dm
@@ -87,12 +87,10 @@
if(is_infesting)
icon = infested.icon
copy_overlays(infested)
- // overlays = infested.overlays
var/mutable_appearance/blob_head_overlay = mutable_appearance('icons/mob/blob.dmi', "blob_head")
if(overmind)
blob_head_overlay.color = overmind.blob_type.complementary_color
color = initial(color)//looks better.
- // overlays += blob_head_overlay
add_overlay(blob_head_overlay, TRUE)
/mob/living/simple_mob/blob/spore/handle_special()
diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm
index ac9e3d20ff5..0a0f36d5163 100644
--- a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm
@@ -150,9 +150,9 @@
/mob/living/simple_mob/construct/proc/add_glow()
var/image/eye_glow = image(icon,"glow-[icon_state]")
eye_glow.plane = PLANE_LIGHTING_ABOVE
- overlays += eye_glow
+ add_overlay(eye_glow)
set_light(2, -2, l_color = "#FFFFFF")
/mob/living/simple_mob/construct/proc/remove_glow()
- overlays.Cut()
+ cut_overlays()
*/
\ No newline at end of file
diff --git a/code/modules/modular_computers/computers/subtypes/dev_laptop.dm b/code/modules/modular_computers/computers/subtypes/dev_laptop.dm
index 156d67525b5..a09b432af88 100644
--- a/code/modules/modular_computers/computers/subtypes/dev_laptop.dm
+++ b/code/modules/modular_computers/computers/subtypes/dev_laptop.dm
@@ -41,7 +41,7 @@
if(anchored)
..()
else
- overlays.Cut()
+ cut_overlays()
set_light(0) // No glow from closed laptops
icon_state = icon_state_closed
diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm
index 77885e7ce5a..15c000cdc5c 100644
--- a/code/modules/multiz/turf.dm
+++ b/code/modules/multiz/turf.dm
@@ -127,7 +127,7 @@
temp2.icon_state = null
temp2.plane = src.plane
temp2.color = O.color
- temp2.overlays += O.overlays
+ temp2.overlays = get_overlays(O, TRUE)
// TODO Is pixelx/y needed?
o_img += temp2
add_overlay(o_img)
diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm
index e43ab219395..3b6efa34d0a 100644
--- a/code/modules/multiz/zshadow.dm
+++ b/code/modules/multiz/zshadow.dm
@@ -117,10 +117,10 @@
if(!typing_indicator)
init_typing_indicator("typing")
if(state && !typing)
- overlays += typing_indicator
+ add_overlay(typing_indicator)
typing = 1
else if(!state && typing)
- overlays -= typing_indicator
+ cut_overlay(typing_indicator)
typing = 0
if(shadow)
shadow.set_typing_indicator(state)
diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm
index f1214708f10..f0d1c826ec3 100644
--- a/code/modules/organs/blood.dm
+++ b/code/modules/organs/blood.dm
@@ -361,7 +361,7 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
var/obj/effect/decal/cleanable/blood/drip/drop = B
if(istype(drop) && drips && drips.len && !large)
- drop.overlays |= drips
+ drop.add_overlay(drips)
drop.drips |= drips
// If there's no data to copy, call it quits here.
diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm
index 43b4e35788f..7216540734a 100644
--- a/code/modules/organs/organ_icon.dm
+++ b/code/modules/organs/organ_icon.dm
@@ -9,7 +9,7 @@ var/global/list/limb_icon_cache = list()
for(var/obj/item/organ/external/organ in contents)
if(organ.children && organ.children.len)
for(var/obj/item/organ/external/child in organ.children)
- overlays += child.mob_icon
+ add_overlay(child.mob_icon)
add_overlay(organ.mob_icon)
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
diff --git a/code/modules/overmap/overmap_planet.dm b/code/modules/overmap/overmap_planet.dm
index 28a8bf10d13..dcb8fc1af39 100644
--- a/code/modules/overmap/overmap_planet.dm
+++ b/code/modules/overmap/overmap_planet.dm
@@ -22,29 +22,29 @@
/obj/effect/overmap/visitable/planet/get_skybox_representation()
var/image/skybox_image = image('icons/skybox/planet.dmi', "")
- skybox_image.overlays += get_base_image()
+ skybox_image.add_overlay(get_base_image())
// for(var/datum/exoplanet_theme/theme in themes)
-// skybox_image.overlays += theme.get_planet_image_extra()
+// skybox_image.add_overlay(theme.get_planet_image_extra())
if(mountain_color)
var/image/mountains = image('icons/skybox/planet.dmi', "mountains")
mountains.color = mountain_color
mountains.appearance_flags = PIXEL_SCALE
- skybox_image.overlays += mountains
+ skybox_image.add_overlay(mountains)
if(water_color)
var/image/water = image('icons/skybox/planet.dmi', "water")
water.color = water_color
water.appearance_flags = PIXEL_SCALE
// water.transform = water.transform.Turn(rand(0,360))
- skybox_image.overlays += water
+ skybox_image.add_overlay(water)
if(icecaps)
var/image/ice = image('icons/skybox/planet.dmi', icecaps)
ice.color = ice_color
ice.appearance_flags = PIXEL_SCALE
- skybox_image.overlays += ice
+ skybox_image.add_overlay(ice)
if(atmosphere && atmosphere.return_pressure() > SOUND_MINIMUM_PRESSURE)
@@ -55,20 +55,20 @@
var/image/clouds = image('icons/skybox/planet.dmi', "weak_clouds")
if(water_color)
- clouds.overlays += image('icons/skybox/planet.dmi', "clouds")
+ clouds.add_overlay(image('icons/skybox/planet.dmi', "clouds"))
clouds.color = atmo_color
- skybox_image.overlays += clouds
+ skybox_image.add_overlay(clouds)
var/image/atmo = image('icons/skybox/planet.dmi', "atmoring")
skybox_image.underlays += atmo
var/image/shadow = image('icons/skybox/planet.dmi', "shadow")
shadow.blend_mode = BLEND_MULTIPLY
- skybox_image.overlays += shadow
+ skybox_image.add_overlay(shadow)
var/image/light = image('icons/skybox/planet.dmi', "lightrim")
- skybox_image.overlays += light
+ skybox_image.add_overlay(light)
if(has_rings)
var/image/rings = image('icons/skybox/planet_rings.dmi')
@@ -79,7 +79,7 @@
rings.color = ring_color
rings.pixel_x = -128
rings.pixel_y = -128
- skybox_image.overlays += rings
+ skybox_image.add_overlay(rings)
skybox_image.pixel_x = rand(0,64) + skybox_offset_x
skybox_image.pixel_y = rand(128,256) + skybox_offset_y
diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm
index 64f02d21887..5aeb72639b0 100644
--- a/code/modules/paperwork/clipboard.dm
+++ b/code/modules/paperwork/clipboard.dm
@@ -34,13 +34,13 @@
return
/obj/item/weapon/clipboard/update_icon()
- overlays.Cut()
+ cut_overlays()
if(toppaper)
- overlays += toppaper.icon_state
- overlays += toppaper.overlays
+ add_overlay(toppaper.icon_state)
+ add_overlay(toppaper.overlays)
if(haspen)
- overlays += "clipboard_pen"
- overlays += "clipboard_over"
+ add_overlay("clipboard_pen")
+ add_overlay("clipboard_over")
return
/obj/item/weapon/clipboard/attackby(obj/item/weapon/W as obj, mob/user as mob)
diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm
index 49a9cb0b916..2275ef1bd4a 100644
--- a/code/modules/paperwork/folders.dm
+++ b/code/modules/paperwork/folders.dm
@@ -57,9 +57,9 @@
icon_state = "folder_hos"
/obj/item/weapon/folder/update_icon()
- overlays.Cut()
+ cut_overlays()
if(contents.len)
- overlays += "folder_paper"
+ add_overlay("folder_paper")
return
/obj/item/weapon/folder/attackby(obj/item/weapon/W as obj, mob/user as mob)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 1ef601fde55..59f2825b72c 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -301,7 +301,7 @@
stamps = null
free_space = MAX_PAPER_MESSAGE_LEN
stamped = list()
- overlays.Cut()
+ cut_overlays()
updateinfolinks()
update_icon()
@@ -608,7 +608,7 @@
if(!stamped)
stamped = new
stamped += P.type
- overlays += stampoverlay
+ add_overlay(stampoverlay)
playsound(src, 'sound/bureaucracy/stamp.ogg', 50, 1)
to_chat(user, "You stamp the paper with your rubber stamp.")
diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm
index 5c5eb14a571..24aeae6c716 100644
--- a/code/modules/paperwork/paper_bundle.dm
+++ b/code/modules/paperwork/paper_bundle.dm
@@ -217,7 +217,7 @@
/obj/item/weapon/paper_bundle/update_icon()
var/obj/item/weapon/paper/P = pages[1]
icon_state = P.icon_state
- overlays = P.overlays
+ copy_overlays(P)
underlays = 0
var/i = 0
var/photo
@@ -235,12 +235,12 @@
var/obj/item/weapon/photo/Ph = O
img = Ph.tiny
photo = 1
- overlays += img
+ add_overlay(img)
if(i>1)
desc = "[i] papers clipped to each other."
else
desc = "A single sheet of paper."
if(photo)
desc += "\nThere is a photo attached to it."
- overlays += image('icons/obj/bureaucracy.dmi', "clip")
+ add_overlay(image('icons/obj/bureaucracy.dmi', "clip"))
return
\ No newline at end of file
diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm
index 3b4833a5332..65c3bff6bf7 100644
--- a/code/modules/paperwork/paperplane.dm
+++ b/code/modules/paperwork/paperplane.dm
@@ -35,7 +35,7 @@
return ..()
/obj/item/weapon/paperplane/update_icon()
- overlays.Cut()
+ cut_overlays()
var/list/stamped = internalPaper.stamped
if(!stamped)
stamped = new
@@ -43,7 +43,7 @@
for(var/S in stamped)
var/obj/item/weapon/stamp/ = S
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi', "paperplane_[initial(stamp.icon_state)]")
- overlays += stampoverlay
+ add_overlay(stampoverlay)
/obj/item/weapon/paperplane/attack_self(mob/user)
to_chat(user, "You unfold [src].")
diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm
index f5fae97d83b..223608f0aa7 100644
--- a/code/modules/paperwork/papershredder.dm
+++ b/code/modules/paperwork/papershredder.dm
@@ -126,15 +126,15 @@
update_icon()
/obj/machinery/papershredder/update_icon()
- overlays.Cut()
+ cut_overlays()
if(operable())
icon_state = "shredder-on"
else
icon_state = "shredder-off"
// Fullness overlay
- overlays += "shredder-[max(0,min(5,FLOOR(paperamount/max_paper*5, 1)))]"
+ add_overlay("shredder-[max(0,min(5,FLOOR(paperamount/max_paper*5, 1)))]")
if (panel_open)
- overlays += "panel_open"
+ add_overlay("panel_open")
//
// Shredded Paper Item
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index 441b0bcbb60..0ac1a96e198 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -220,7 +220,7 @@
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-dots")
img.pixel_x = copy.offset_x[j]
img.pixel_y = copy.offset_y[j]
- c.overlays += img
+ c.add_overlay(img)
c.updateinfolinks()
if(need_toner)
toner--
diff --git a/code/modules/pda/app.dm b/code/modules/pda/app.dm
index 99c98220193..93245c2a850 100644
--- a/code/modules/pda/app.dm
+++ b/code/modules/pda/app.dm
@@ -41,14 +41,14 @@
pda.play_ringtone()
if(blink && !(src in pda.notifying_programs))
- pda.overlays += image(icon, "pda-r")
+ pda.add_overlay("pda-r")
pda.notifying_programs |= src
/datum/data/pda/proc/unnotify()
if(src in pda.notifying_programs)
pda.notifying_programs -= src
if(!pda.notifying_programs.len)
- pda.overlays -= image(icon, "pda-r")
+ pda.cut_overlay("pda-r")
// An app has a button on the home screen and its own UI
/datum/data/pda/app
diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm
index 298e8efd135..2755e09d3f7 100644
--- a/code/modules/pda/pda.dm
+++ b/code/modules/pda/pda.dm
@@ -300,7 +300,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(can_use(usr))
start_program(find_program(/datum/data/pda/app/main_menu))
notifying_programs.Cut()
- overlays -= image(icon, "pda-r")
+ cut_overlay("pda-r")
to_chat(usr, "You press the reset button on \the [src].")
else
to_chat(usr, "You cannot do this while restrained.")
diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm
index 760c0979eda..87304164359 100644
--- a/code/modules/persistence/noticeboard.dm
+++ b/code/modules/persistence/noticeboard.dm
@@ -178,33 +178,33 @@
P.name = "Memo RE: proper analysis procedure"
P.info = "
We keep test dummies in pens here for a reason, so standard procedure should be to activate newfound alien artifacts and place the two in close proximity. Promising items I might even approve monkey testing on."
P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
+ P.add_overlay("paper_stamped_rd")
contents += P
P = new()
P.name = "Memo RE: materials gathering"
P.info = "Corasang,
the hands-on approach to gathering our samples may very well be slow at times, but it's safer than allowing the blundering miners to roll willy-nilly over our dig sites in their mechs, destroying everything in the process. And don't forget the escavation tools on your way out there!
- R.W"
P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
+ P.add_overlay("paper_stamped_rd")
contents += P
P = new()
P.name = "Memo RE: ethical quandaries"
P.info = "Darion-
I don't care what his rank is, our business is that of science and knowledge - questions of moral application do not come into this. Sure, so there are those who would employ the energy-wave particles my modified device has managed to abscond for their own personal gain, but I can hardly see the practical benefits of some of these artifacts our benefactors left behind. Ward--"
P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
+ P.add_overlay("paper_stamped_rd")
contents += P
P = new()
P.name = "READ ME! Before you people destroy any more samples"
P.info = "how many times do i have to tell you people, these xeno-arch samples are del-i-cate, and should be handled so! careful application of a focussed, concentrated heat or some corrosive liquids should clear away the extraneous carbon matter, while application of an energy beam will most decidedly destroy it entirely - like someone did to the chemical dispenser! W, the one who signs your paychecks"
P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
+ P.add_overlay("paper_stamped_rd")
contents += P
P = new()
P.name = "Reminder regarding the anomalous material suits"
P.info = "Do you people think the anomaly suits are cheap to come by? I'm about a hair trigger away from instituting a log book for the damn things. Only wear them if you're going out for a dig, and for god's sake don't go tramping around in them unless you're field testing something, R"
P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
+ P.add_overlay("paper_stamped_rd")
contents += P
\ No newline at end of file
diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm
index cefc549d2a6..96cfb548ac0 100644
--- a/code/modules/planet/sif.dm
+++ b/code/modules/planet/sif.dm
@@ -1,8 +1,5 @@
var/datum/planet/sif/planet_sif = null
-/datum/planet/sif
- name = "Sif"
-
/datum/planet/sif
name = "Sif"
desc = "Sif is a terrestrial planet in the Vir system. It is somewhat earth-like, in that it has oceans, a \
diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm
index 2b7b881b091..5c39d8e1504 100644
--- a/code/modules/power/antimatter/shielding.dm
+++ b/code/modules/power/antimatter/shielding.dm
@@ -108,14 +108,14 @@ proc/cardinalrange(var/center)
/obj/machinery/am_shielding/update_icon()
- overlays.Cut()
+ cut_overlays()
for(var/direction in alldirs)
var/machine = locate(/obj/machinery, get_step(loc, direction))
if((istype(machine, /obj/machinery/am_shielding) && machine:control_unit == control_unit)||(istype(machine, /obj/machinery/power/am_control_unit) && machine == control_unit))
- overlays += "shield_[direction]"
+ add_overlay("shield_[direction]")
if(core_check())
- overlays += "core"
+ add_overlay("core")
if(!processing) setup_core()
else if(processing) shutdown_core()
diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm
index dc1dbe7e584..ae42d8c7278 100644
--- a/code/modules/power/batteryrack.dm
+++ b/code/modules/power/batteryrack.dm
@@ -62,22 +62,22 @@
return ..()
/obj/machinery/power/smes/batteryrack/update_icon()
- overlays.Cut()
+ cut_overlays()
icon_update = 0
var/cellcount = 0
var/charge_level = between(0, round(Percentage() / 12), 7)
- overlays += "charge[charge_level]"
+ add_overlay("charge[charge_level]")
for(var/obj/item/weapon/cell/C in internal_cells)
cellcount++
- overlays += "cell[cellcount]"
+ add_overlay("cell[cellcount]")
if(C.fully_charged())
- overlays += "cell[cellcount]f"
+ add_overlay("cell[cellcount]f")
else if(!C.charge)
- overlays += "cell[cellcount]e"
+ add_overlay("cell[cellcount]e")
// Recalculate maxcharge and similar variables.
/obj/machinery/power/smes/batteryrack/proc/update_maxcharge()
diff --git a/code/modules/power/cells/power_cells.dm b/code/modules/power/cells/power_cells.dm
index 052813ade76..9183616ac50 100644
--- a/code/modules/power/cells/power_cells.dm
+++ b/code/modules/power/cells/power_cells.dm
@@ -112,7 +112,8 @@
var/used = FALSE
/obj/item/device/fbp_backup_cell/Initialize()
- overlays += image(icon,"[icon_state]1")
+ . = ..()
+ add_overlay("[icon_state]1")
/obj/item/device/fbp_backup_cell/attack(mob/living/M as mob, mob/user as mob)
if(!used && ishuman(M))
@@ -134,7 +135,7 @@
return
used = TRUE
desc += " This one has already been used."
- overlays.Cut()
+ cut_overlays()
target.adjust_nutrition(amount)
user.custom_emote(message = "connects \the [src] to [user == target ? "their" : "[target]'s"] charging port, expending it.")
diff --git a/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm b/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm
index 9a74cbddc1f..7993e5e8438 100644
--- a/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm
+++ b/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm
@@ -38,7 +38,7 @@
icon_state = "blank"
var/image/I = image(icon, "fuel_assembly")
I.color = fuel_colour
- overlays += list(I, image(icon, "fuel_assembly_bracket"))
+ add_overlay(list(I, image(icon, "fuel_assembly_bracket")))
rod_quantities[fuel_type] = initial_amount
/obj/item/weapon/fuel_assembly/process()
diff --git a/code/modules/power/generator_type2.dm b/code/modules/power/generator_type2.dm
index a52675b7063..32f213f95fe 100644
--- a/code/modules/power/generator_type2.dm
+++ b/code/modules/power/generator_type2.dm
@@ -24,12 +24,12 @@
/obj/machinery/power/generator_type2/proc/updateicon()
if(stat & (NOPOWER|BROKEN))
- overlays.Cut()
+ cut_overlays()
else
- overlays.Cut()
+ cut_overlays()
if(lastgenlev != 0)
- overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
+ add_overlay("teg-op[lastgenlev]")
#define GENRATE 800 // generator output coefficient from Q
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index b296b8916c8..c036cf03686 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -138,13 +138,13 @@ var/global/list/rad_collectors = list()
/obj/machinery/power/rad_collector/proc/update_icons()
- overlays.Cut()
+ cut_overlays()
if(P)
- overlays += image('icons/obj/singularity.dmi', "ptank")
+ add_overlay("ptank")
if(stat & (NOPOWER|BROKEN))
return
if(active)
- overlays += image('icons/obj/singularity.dmi', "on")
+ add_overlay("on")
/obj/machinery/power/rad_collector/proc/toggle_power()
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index 6112da7b00d..f6c7407b4e1 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -38,19 +38,19 @@ field_generator power level display
/obj/machinery/field_generator/update_icon()
- overlays.Cut()
+ cut_overlays()
if(!active)
if(warming_up)
- overlays += "+a[warming_up]"
+ add_overlay("+a[warming_up]")
if(fields.len)
- overlays += "+on"
+ add_overlay("+on")
// Power level indicator
// Scale % power to % num_power_levels and truncate value
var/level = round(num_power_levels * power / field_generator_max_power)
// Clamp between 0 and num_power_levels for out of range power values
level = between(0, level, num_power_levels)
if(level)
- overlays += "+p[level]"
+ add_overlay("+p[level]")
return
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index bdcc0ce66f2..61fae18c42e 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -465,15 +465,15 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
move_self = 0
switch (current_size)
if(STAGE_ONE)
- overlays += image('icons/obj/singularity.dmi',"chain_s1")
+ add_overlay(image('icons/obj/singularity.dmi',"chain_s1"))
if(STAGE_TWO)
- overlays += image('icons/effects/96x96.dmi',"chain_s3")
+ add_overlay(image('icons/effects/96x96.dmi',"chain_s3"))
if(STAGE_THREE)
- overlays += image('icons/effects/160x160.dmi',"chain_s5")
+ add_overlay(image('icons/effects/160x160.dmi',"chain_s5"))
if(STAGE_FOUR)
- overlays += image('icons/effects/224x224.dmi',"chain_s7")
+ add_overlay(image('icons/effects/224x224.dmi',"chain_s7"))
if(STAGE_FIVE)
- overlays += image('icons/effects/288x288.dmi',"chain_s9")
+ add_overlay(image('icons/effects/288x288.dmi',"chain_s9"))
/obj/singularity/proc/on_release()
chained = 0
diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm
index 45b44d64f89..326e9ecd239 100644
--- a/code/modules/power/smes_construction.dm
+++ b/code/modules/power/smes_construction.dm
@@ -286,8 +286,8 @@
// Description: Allows us to use special icon overlay for critical SMESs
/obj/machinery/power/smes/buildable/update_icon()
if (failing)
- overlays.Cut()
- overlays += image('icons/obj/power.dmi', "smes-crit")
+ cut_overlays()
+ add_overlay("smes-crit")
else
..()
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index ec059bc5f4c..52ed6731961 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -88,11 +88,11 @@ GLOBAL_LIST_EMPTY(solars_list)
/obj/machinery/power/solar/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
if(stat & BROKEN)
- overlays += image('icons/obj/power.dmi', icon_state = "solar_panel-b", layer = FLY_LAYER)
+ add_overlay("solar_panel-b")
else
- overlays += image('icons/obj/power.dmi', icon_state = "solar_panel", layer = FLY_LAYER)
+ add_overlay("solar_panel")
src.set_dir(angle2dir(adir))
return
@@ -367,16 +367,16 @@ GLOBAL_LIST_EMPTY(solars_list)
/obj/machinery/power/solar_control/update_icon()
if(stat & BROKEN)
icon_state = "broken"
- overlays.Cut()
+ cut_overlays()
return
if(stat & NOPOWER)
icon_state = "c_unpowered"
- overlays.Cut()
+ cut_overlays()
return
icon_state = "solar"
- overlays.Cut()
+ cut_overlays()
if(cdir > -1)
- overlays += image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir))
+ add_overlay(image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir)))
return
/obj/machinery/power/solar_control/attack_hand(mob/user)
diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm
index e93ee62c71c..4766864ec15 100644
--- a/code/modules/power/turbine.dm
+++ b/code/modules/power/turbine.dm
@@ -150,7 +150,7 @@
return
if(!starter)
return
- overlays.Cut()
+ cut_overlays()
rpm = 0.9* rpm + 0.1 * rpmtarget
var/datum/gas_mixture/environment = inturf.return_air()
@@ -172,13 +172,13 @@
rpmtarget = 0
if(rpm>50000)
- overlays += image('icons/obj/pipes.dmi', "comp-o4", FLY_LAYER)
+ add_overlay(image('icons/obj/pipes.dmi', "comp-o4", FLY_LAYER))
else if(rpm>10000)
- overlays += image('icons/obj/pipes.dmi', "comp-o3", FLY_LAYER)
+ add_overlay(image('icons/obj/pipes.dmi', "comp-o3", FLY_LAYER))
else if(rpm>2000)
- overlays += image('icons/obj/pipes.dmi', "comp-o2", FLY_LAYER)
+ add_overlay(image('icons/obj/pipes.dmi', "comp-o2", FLY_LAYER))
else if(rpm>500)
- overlays += image('icons/obj/pipes.dmi', "comp-o1", FLY_LAYER)
+ add_overlay(image('icons/obj/pipes.dmi', "comp-o1", FLY_LAYER))
//TODO: DEFERRED
@@ -248,7 +248,7 @@
return
if(!compressor.starter)
return
- overlays.Cut()
+ cut_overlays()
// This is the power generation function. If anything is needed it's good to plot it in EXCEL before modifying
// the TURBGENQ and TURBGENG values
@@ -271,7 +271,7 @@
// If it works, put an overlay that it works!
if(lastgen > 100)
- overlays += image('icons/obj/pipes.dmi', "turb-o", FLY_LAYER)
+ add_overlay(image('icons/obj/pipes.dmi', "turb-o", FLY_LAYER))
updateDialog()
diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm
index 6444ac85a2c..d194793b9ee 100644
--- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm
+++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm
@@ -193,7 +193,7 @@
var/icon/test = getFlatIcon(W)
test.Shift(NORTH,1)
test.Shift(EAST,6)
- overlays += test
+ add_overlay(test)
return ..()
@@ -389,12 +389,9 @@
/obj/structure/reagent_dispensers/water_cooler/update_icon()
icon_state = "water_cooler"
- overlays.Cut()
- var/image/I
+ cut_overlays()
if(bottle)
- I = image(icon, "water_cooler_bottle")
- overlays += I
- return
+ add_overlay("water_cooler_bottle")
/obj/structure/reagent_dispensers/beerkeg
name = "beer keg"
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index 9e7eb5a5758..906b8411b7d 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -180,7 +180,7 @@
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/update_icon()
- overlays.Cut()
+ cut_overlays()
if(reagents.total_volume)
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
@@ -196,11 +196,10 @@
if(91 to INFINITY) filling.icon_state = "[icon_state]100"
filling.color = reagents.get_color()
- overlays += filling
+ add_overlay(filling)
if (!is_open_container())
- var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
- overlays += lid
+ add_overlay("lid_[initial(icon_state)]")
/obj/item/weapon/reagent_containers/glass/beaker/large
name = "large beaker"
@@ -307,10 +306,9 @@
return ..()
/obj/item/weapon/reagent_containers/glass/bucket/update_icon()
- overlays.Cut()
+ cut_overlays()
if (!is_open_container())
- var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
- overlays += lid
+ add_overlay("lid_[initial(icon_state)]")
obj/item/weapon/reagent_containers/glass/bucket/wood
desc = "An old wooden bucket."
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index 1098c5e713d..24c39dce43a 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -232,7 +232,7 @@
/obj/item/weapon/reagent_containers/spray/chemsprayer/hosed/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
if(!hose_overlay)
hose_overlay = new icon(icon, "[icon_state]+hose")
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index fe50843852a..f05edfd7e1f 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -232,7 +232,7 @@
return
/* VOREStation Edit - See syringes_vr.dm
/obj/item/weapon/reagent_containers/syringe/update_icon()
- overlays.Cut()
+ cut_overlays()
if(mode == SYRINGE_BROKEN)
icon_state = "broken"
@@ -246,7 +246,7 @@
injoverlay = "draw"
if (SYRINGE_INJECT)
injoverlay = "inject"
- overlays += injoverlay
+ add_overlay(injoverlay)
icon_state = "[rounded_vol]"
item_state = "syringe_[rounded_vol]"
@@ -256,7 +256,7 @@
filling.icon_state = "syringe[rounded_vol]"
filling.color = reagents.get_color()
- overlays += filling
+ add_overlay(filling)
*/
/obj/item/weapon/reagent_containers/syringe/proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob)
if(istype(target, /mob/living/carbon/human))
diff --git a/code/modules/reagents/reagents/other.dm b/code/modules/reagents/reagents/other.dm
index 9e83c720bc2..0159a9832b6 100644
--- a/code/modules/reagents/reagents/other.dm
+++ b/code/modules/reagents/reagents/other.dm
@@ -402,7 +402,7 @@
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
W.thermite = 1
- W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910")
+ W.add_overlay(image('icons/effects/effects.dmi',icon_state = "#673910")) // What??
remove_self(5)
return
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index 2372be085a1..7127ed9ff50 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -385,7 +385,7 @@
// update the icon & overlays to reflect mode & status
/obj/machinery/disposal/proc/update()
- overlays.Cut()
+ cut_overlays()
if(stat & BROKEN)
icon_state = "disposal-broken"
mode = 0
@@ -394,7 +394,7 @@
// flush handle
if(flush)
- overlays += image(src.icon, "[initial(icon_state)]-handle")
+ add_overlay("[initial(icon_state)]-handle")
// only handle is shown if no power
if(stat & NOPOWER || mode == -1)
@@ -402,13 +402,13 @@
// check for items in disposal - occupied light
if(contents.len > 0)
- overlays += image(src.icon, "[initial(icon_state)]-full")
+ add_overlay("[initial(icon_state)]-full")
// charging and ready light
if(mode == 1)
- overlays += image(src.icon, "[initial(icon_state)]-charge")
+ add_overlay("[initial(icon_state)]-charge")
else if(mode == 2)
- overlays += image(src.icon, "[initial(icon_state)]-ready")
+ add_overlay("[initial(icon_state)]-ready")
// timed process
// charge the gas reservoir and perform flush if ready
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index 08d68d89560..2bfab50bbb2 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -73,7 +73,7 @@
return
/obj/structure/bigDelivery/update_icon()
- overlays = new()
+ cut_overlays()
if(nameset || examtext)
var/image/I = new/image('icons/obj/storage.dmi',"delivery_label")
if(icon_state == "deliverycloset")
@@ -86,7 +86,7 @@
label_x = rand(-8, 6)
I.pixel_x = label_x
I.pixel_y = -3
- overlays += I
+ add_overlay(I)
if(src.sortTag)
var/image/I = new/image('icons/obj/storage.dmi',"delivery_tag")
if(icon_state == "deliverycloset")
@@ -99,7 +99,7 @@
tag_x = rand(-8, 6)
I.pixel_x = tag_x
I.pixel_y = -3
- overlays += I
+ add_overlay(I)
/obj/structure/bigDelivery/examine(mob/user)
. = ..()
@@ -185,12 +185,12 @@
return
/obj/item/smallDelivery/update_icon()
- overlays = new()
+ cut_overlays()
if((nameset || examtext) && icon_state != "deliverycrate1")
var/image/I = new/image('icons/obj/storage.dmi',"delivery_label")
if(icon_state == "deliverycrate5")
I.pixel_y = -1
- overlays += I
+ add_overlay(I)
if(src.sortTag)
var/image/I = new/image('icons/obj/storage.dmi',"delivery_tag")
switch(icon_state)
@@ -207,7 +207,7 @@
I.pixel_y = 3
if("deliverycrate5")
I.pixel_y = -3
- overlays += I
+ add_overlay(I)
/obj/item/smallDelivery/examine(mob/user)
. = ..()
diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm
index d419829babb..3e3207fdb9a 100644
--- a/code/modules/research/circuitprinter.dm
+++ b/code/modules/research/circuitprinter.dm
@@ -152,9 +152,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
if(materials[S.material.name] + amnt <= max_res_amount)
if(S && S.get_amount() >= 1)
var/count = 0
- overlays += "fab-load-metal"
+ add_overlay("fab-load-metal")
spawn(10)
- overlays -= "fab-load-metal"
+ cut_overlay("fab-load-metal")
while(materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1)
materials[S.material.name] += amnt
S.use(1)
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
index 97a8274391e..35e804c30e4 100644
--- a/code/modules/research/protolathe.dm
+++ b/code/modules/research/protolathe.dm
@@ -106,7 +106,7 @@
/obj/machinery/r_n_d/protolathe/update_icon()
- overlays.Cut()
+ cut_overlays()
icon_state = initial(icon_state)
@@ -175,9 +175,9 @@
var/stacktype = S.type
var/t = getMaterialName(stacktype)
- overlays += "protolathe_[t]"
+ add_overlay("protolathe_[t]")
spawn(10)
- overlays -= "protolathe_[t]"
+ cut_overlay("protolathe_[t]")
updateUsrDialog()
return
diff --git a/code/modules/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm
index 8f2eba8426a..2b1f3728f56 100644
--- a/code/modules/rogueminer_vr/zonemaster.dm
+++ b/code/modules/rogueminer_vr/zonemaster.dm
@@ -395,7 +395,7 @@
for(var/atom/I in myarea.contents)
if(I.type == /turf/space)
- I.overlays.Cut()
+ I.cut_overlays()
continue
else if(!I.simulated)
continue
@@ -407,7 +407,7 @@
//A deletion so nice that I give it twice
for(var/atom/I in myarea.contents)
if(I.type == /turf/space)
- I.overlays.Cut()
+ I.cut_overlays()
continue
else if(!I.simulated)
continue
diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm
index 87d07cceaf4..7176baf23ba 100644
--- a/code/modules/shieldgen/energy_field.dm
+++ b/code/modules/shieldgen/energy_field.dm
@@ -114,7 +114,7 @@
update_nearby_tiles()
/obj/effect/energy_field/update_icon(var/update_neightbors = 0)
- overlays.Cut()
+ cut_overlays()
var/list/adjacent_shields_dir = list()
for(var/direction in cardinal)
var/turf/T = get_step(src, direction)
@@ -134,7 +134,7 @@
// Edge overlays
for(var/found_dir in adjacent_shields_dir)
- overlays += image(src.icon, src, icon_state = "shield_edge", dir = found_dir)
+ add_overlay(image(src.icon, src, icon_state = "shield_edge", dir = found_dir))
// Small visual effect, makes the shield tiles brighten up by becoming more opaque for a moment, and spreads to nearby shields.
diff --git a/code/modules/shieldgen/energy_shield.dm b/code/modules/shieldgen/energy_shield.dm
index 61707682524..6c11eb62e22 100644
--- a/code/modules/shieldgen/energy_shield.dm
+++ b/code/modules/shieldgen/energy_shield.dm
@@ -29,7 +29,7 @@
if(disabled_for || diffused_for)
icon_state = "shield_broken"
- overlays.Cut() //NOT ssoverlays
+ overlays.Cut() // Snowflake handling, avoiding SSoverlays
else
icon_state = enabled_icon_state
flags |= OVERLAY_QUEUED //Trick SSoverlays
diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm
index 32aca8f0905..952e7af45a4 100644
--- a/code/modules/tables/tables.dm
+++ b/code/modules/tables/tables.dm
@@ -353,31 +353,31 @@ var/list/table_icon_cache = list()
/obj/structure/table/update_icon()
if(flipped != 1)
icon_state = "blank"
- overlays.Cut()
+ cut_overlays()
// Base frame shape. Mostly done for glass/diamond tables, where this is visible.
for(var/i = 1 to 4)
var/image/I = get_table_image(icon, connections[i], 1<<(i-1))
- overlays += I
+ add_overlay(I)
// Standard table image
if(material)
for(var/i = 1 to 4)
var/image/I = get_table_image(icon, "[material.icon_base]_[connections[i]]", 1<<(i-1), material.icon_colour, 255 * material.opacity)
- overlays += I
+ add_overlay(I)
// Reinforcements
if(reinforced)
for(var/i = 1 to 4)
var/image/I = get_table_image(icon, "[reinforced.icon_reinf]_[connections[i]]", 1<<(i-1), reinforced.icon_colour, 255 * reinforced.opacity)
- overlays += I
+ add_overlay(I)
if(carpeted)
for(var/i = 1 to 4)
var/image/I = get_table_image(icon, "carpet_[connections[i]]", 1<<(i-1))
- overlays += I
+ add_overlay(I)
else
- overlays.Cut()
+ cut_overlays()
var/type = 0
var/tabledirs = 0
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
@@ -398,7 +398,7 @@ var/list/table_icon_cache = list()
var/image/I = image(icon, "[material.icon_base]_flip[type]")
I.color = material.icon_colour
I.alpha = 255 * material.opacity
- overlays += I
+ add_overlay(I)
name = "[material.display_name] table"
else
name = "table frame"
@@ -407,10 +407,10 @@ var/list/table_icon_cache = list()
var/image/I = image(icon, "[reinforced.icon_reinf]_flip[type]")
I.color = reinforced.icon_colour
I.alpha = 255 * reinforced.opacity
- overlays += I
+ add_overlay(I)
if(carpeted)
- overlays += "carpet_flip[type]"
+ add_overlay("carpet_flip[type]")
#define CORNER_NONE 0
diff --git a/code/modules/telesci/gps_advanced.dm b/code/modules/telesci/gps_advanced.dm
index 59711deceda..92f2e7a4cff 100644
--- a/code/modules/telesci/gps_advanced.dm
+++ b/code/modules/telesci/gps_advanced.dm
@@ -18,7 +18,7 @@
..()
GPS_list.Add(src)
name = "global positioning system ([gpstag])"
- overlays += "working"
+ add_overlay("working")
/obj/item/device/gps/advanced/Destroy()
GPS_list.Remove(src)
@@ -26,12 +26,12 @@
/obj/item/device/gps/advanced/emp_act(severity)
emped = 1
- overlays -= "working"
- overlays += "emp"
+ cut_overlay("working")
+ add_overlay("emp")
spawn(300)
emped = 0
- overlays -= "emp"
- overlays += "working"
+ cut_overlay("emp")
+ add_overlay("working")
/obj/item/device/gps/advanced/attack_self(mob/user as mob)
diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm
index fe059b9e071..ebfde69976f 100644
--- a/code/modules/vehicles/bike.dm
+++ b/code/modules/vehicles/bike.dm
@@ -181,21 +181,21 @@
..()
/obj/vehicle/bike/update_icon()
- overlays.Cut()
+ cut_overlays()
if(custom_icon)
if(on)
var/image/bodypaint = image('icons/obj/custom_items_vehicle.dmi', "[bike_icon]_on_a", src.layer)
bodypaint.color = paint_color
- overlays += bodypaint
+ add_overlay(bodypaint)
var/image/overmob = image('icons/obj/custom_items_vehicle.dmi', "[bike_icon]_on_overlay", MOB_LAYER + 1)
var/image/overmob_color = image('icons/obj/custom_items_vehicle.dmi', "[bike_icon]_on_overlay_a", MOB_LAYER + 1)
overmob.plane = MOB_PLANE
overmob_color.plane = MOB_PLANE
overmob_color.color = paint_color
- overlays += overmob
- overlays += overmob_color
+ add_overlay(overmob)
+ add_overlay(overmob_color)
if(open)
icon_state = "[bike_icon]_on-open"
else
@@ -203,15 +203,15 @@
else
var/image/bodypaint = image('icons/obj/custom_items_vehicle.dmi', "[bike_icon]_off_a", src.layer)
bodypaint.color = paint_color
- overlays += bodypaint
+ add_overlay(bodypaint)
var/image/overmob = image('icons/obj/custom_items_vehicle.dmi', "[bike_icon]_off_overlay", MOB_LAYER + 1)
var/image/overmob_color = image('icons/obj/custom_items_vehicle.dmi', "[bike_icon]_off_overlay_a", MOB_LAYER + 1)
overmob.plane = MOB_PLANE
overmob_color.plane = MOB_PLANE
overmob_color.color = paint_color
- overlays += overmob
- overlays += overmob_color
+ add_overlay(overmob)
+ add_overlay(overmob_color)
if(open)
icon_state = "[bike_icon]_off-open"
else
@@ -222,15 +222,15 @@
if(on)
var/image/bodypaint = image('icons/obj/bike.dmi', "[bike_icon]_on_a", src.layer)
bodypaint.color = paint_color
- overlays += bodypaint
+ add_overlay(bodypaint)
var/image/overmob = image('icons/obj/bike.dmi', "[bike_icon]_on_overlay", MOB_LAYER + 1)
var/image/overmob_color = image('icons/obj/bike.dmi', "[bike_icon]_on_overlay_a", MOB_LAYER + 1)
overmob.plane = MOB_PLANE
overmob_color.plane = MOB_PLANE
overmob_color.color = paint_color
- overlays += overmob
- overlays += overmob_color
+ add_overlay(overmob)
+ add_overlay(overmob_color)
if(open)
icon_state = "[bike_icon]_on-open"
else
@@ -238,15 +238,15 @@
else
var/image/bodypaint = image('icons/obj/bike.dmi', "[bike_icon]_off_a", src.layer)
bodypaint.color = paint_color
- overlays += bodypaint
+ add_overlay(bodypaint)
var/image/overmob = image('icons/obj/bike.dmi', "[bike_icon]_off_overlay", MOB_LAYER + 1)
var/image/overmob_color = image('icons/obj/bike.dmi', "[bike_icon]_off_overlay_a", MOB_LAYER + 1)
overmob.plane = MOB_PLANE
overmob_color.plane = MOB_PLANE
overmob_color.color = paint_color
- overlays += overmob
- overlays += overmob_color
+ add_overlay(overmob)
+ add_overlay(overmob_color)
if(open)
icon_state = "[bike_icon]_off-open"
else
diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm
index a118b1c2583..37da72f5361 100644
--- a/code/modules/vehicles/cargo_train.dm
+++ b/code/modules/vehicles/cargo_train.dm
@@ -47,7 +47,7 @@
cell = new /obj/item/weapon/cell/high(src)
key = new key_type(src)
var/image/I = new(icon = 'icons/obj/vehicles_vr.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs //VOREStation edit
- overlays += I
+ add_overlay(I)
turn_off() //so engine verbs are correctly set
/obj/vehicle/train/engine/Move(var/turf/destination)
@@ -320,7 +320,7 @@
C.pixel_y += load_offset_y
C.layer = layer
- overlays += C
+ add_overlay(C)
//we can set these back now since we have already cloned the icon into the overlay
C.pixel_x = initial(C.pixel_x)
@@ -333,7 +333,7 @@
load = dummy_load.actual_load
dummy_load.actual_load = null
qdel(dummy_load)
- overlays.Cut()
+ cut_overlays()
..()
//-------------------------------------------
@@ -392,11 +392,11 @@
// VOREStation Edit Start - Overlay stuff for the chair-like effect
/obj/vehicle/train/engine/update_icon()
..()
- overlays = null
+ cut_overlays()
var/image/O = image(icon = 'icons/obj/vehicles_vr.dmi', icon_state = "cargo_engine_overlay", dir = src.dir)
O.layer = FLY_LAYER
O.plane = MOB_PLANE
- overlays += O
+ add_overlay(O)
/obj/vehicle/train/engine/set_dir()
..()
diff --git a/code/modules/vehicles/quad.dm b/code/modules/vehicles/quad.dm
index 3524895ba27..2e83164b91d 100644
--- a/code/modules/vehicles/quad.dm
+++ b/code/modules/vehicles/quad.dm
@@ -83,11 +83,11 @@
/obj/vehicle/train/engine/quadbike/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
if(custom_frame)
var/image/Bodypaint = new(icon = 'icons/obj/custom_items_vehicle.dmi', icon_state = "[frame_state]_a", layer = src.layer)
Bodypaint.color = paint_color
- overlays += Bodypaint
+ add_overlay(Bodypaint)
var/image/Overmob = new(icon = 'icons/obj/custom_items_vehicle.dmi', icon_state = "[frame_state]_overlay", layer = src.layer + 0.2) //over mobs
var/image/Overmob_color = new(icon = 'icons/obj/custom_items_vehicle.dmi', icon_state = "[frame_state]_overlay_a", layer = src.layer + 0.2) //over the over mobs, gives the color.
@@ -95,13 +95,13 @@
Overmob_color.plane = MOB_PLANE
Overmob_color.color = paint_color
- overlays += Overmob
- overlays += Overmob_color
+ add_overlay(Overmob)
+ add_overlay(Overmob_color)
return
var/image/Bodypaint = new(icon = 'icons/obj/vehicles_64x64.dmi', icon_state = "[frame_state]_a", layer = src.layer)
Bodypaint.color = paint_color
- overlays += Bodypaint
+ add_overlay(Bodypaint)
var/image/Overmob = new(icon = 'icons/obj/vehicles_64x64.dmi', icon_state = "[frame_state]_overlay", layer = src.layer + 0.2) //over mobs
var/image/Overmob_color = new(icon = 'icons/obj/vehicles_64x64.dmi', icon_state = "[frame_state]_overlay_a", layer = src.layer + 0.2) //over the over mobs, gives the color.
@@ -109,8 +109,8 @@
Overmob_color.plane = MOB_PLANE
Overmob_color.color = paint_color
- overlays += Overmob
- overlays += Overmob_color
+ add_overlay(Overmob)
+ add_overlay(Overmob_color)
/obj/vehicle/train/engine/quadbike/Bump(atom/Obstacle)
if(!istype(Obstacle, /atom/movable))
@@ -242,11 +242,11 @@
/obj/vehicle/train/trolley/trailer/update_icon()
..()
- overlays.Cut()
+ cut_overlays()
var/image/Bodypaint = new(icon = 'icons/obj/vehicles_64x64.dmi', icon_state = "[initial(icon_state)]_a", layer = src.layer)
Bodypaint.color = paint_color
- overlays += Bodypaint
+ add_overlay(Bodypaint)
/obj/vehicle/train/trolley/trailer/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/multitool) && open)
diff --git a/code/modules/virus2/biohazard destroyer.dm b/code/modules/virus2/biohazard destroyer.dm
index 2e9136f1e2b..7d05c2f6079 100644
--- a/code/modules/virus2/biohazard destroyer.dm
+++ b/code/modules/virus2/biohazard destroyer.dm
@@ -11,7 +11,7 @@
if(I.type in typesof(path))
user.drop_item()
qdel(I)
- overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle")
+ add_overlay("dispover-handle")
return
user.drop_item()
I.loc = src.loc
diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm
index 8c2a99a570b..3cdea12960e 100644
--- a/code/modules/xenoarcheaology/sampling.dm
+++ b/code/modules/xenoarcheaology/sampling.dm
@@ -143,8 +143,8 @@
//update the sample bag
filled_bag.icon_state = "evidence"
var/image/I = image("icon"=R, "layer"=FLOAT_LAYER)
- filled_bag.overlays += I
- filled_bag.overlays += "evidence"
+ add_overlay(I)
+ add_overlay("evidence")
filled_bag.w_class = ITEMSIZE_TINY
to_chat(user, "You take a core sample of the [item_to_sample].")
diff --git a/code/modules/xenoarcheaology/tools/artifact_analyser.dm b/code/modules/xenoarcheaology/tools/artifact_analyser.dm
index ef09ce0f6db..090bef1c289 100644
--- a/code/modules/xenoarcheaology/tools/artifact_analyser.dm
+++ b/code/modules/xenoarcheaology/tools/artifact_analyser.dm
@@ -109,7 +109,7 @@
P.info += "
"
P.info += "[bicon(scanned_object)] [results]"
P.stamped = list(/obj/item/weapon/stamp)
- P.overlays = list("paper_stamped")
+ P.add_overlay("paper_stamped")
if(scanned_object && istype(scanned_object, /obj/machinery/artifact))
var/obj/machinery/artifact/A = scanned_object
diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm
index f905d656065..26645416d4c 100644
--- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm
+++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm
@@ -303,7 +303,7 @@
var/obj/item/weapon/paper/P = new(src)
P.name = "[src] report #[++report_num]: [scanned_item.name]"
P.stamped = list(/obj/item/weapon/stamp)
- P.overlays = list("paper_stamped")
+ P.add_overlay("paper_stamped")
//work out data
var/data = " - Mundane object: [scanned_item.desc ? scanned_item.desc : "No information on record."]
"
diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm
index 53a864e7dba..cd39d0e1815 100644
--- a/code/modules/xenoarcheaology/tools/suspension_generator.dm
+++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm
@@ -29,7 +29,7 @@
for(var/obj/item/I in T)
if(!suspension_field.contents.len)
suspension_field.icon_state = "energynet"
- suspension_field.overlays += "shield2"
+ suspension_field.add_overlay("shield2")
I.forceMove(suspension_field)
else
deactivate()
@@ -150,7 +150,7 @@
if(collected)
suspension_field.icon_state = "energynet"
- suspension_field.overlays += "shield2"
+ suspension_field.add_overlay("shield2")
visible_message("[bicon(suspension_field)] [suspension_field] gently absconds [collected > 1 ? "something" : "several things"].")
else
if(istype(T,/turf/simulated/mineral) || istype(T,/turf/simulated/wall))
diff --git a/code/modules/xenobio2/mob/slime/slime life.dm b/code/modules/xenobio2/mob/slime/slime life.dm
index ca5075f7059..cc784a63d11 100644
--- a/code/modules/xenobio2/mob/slime/slime life.dm
+++ b/code/modules/xenobio2/mob/slime/slime life.dm
@@ -36,7 +36,7 @@ Slime specific life events go here.
I.icon_state = "aslime-sad"
else
I.icon_state = "aslime-angry"
- overlays += I
+ add_overlay(I)
emote_on = 1
spawn(30)
GenerateAdultIcon()
@@ -46,7 +46,7 @@ Slime specific life events go here.
if(is_child)
icon_state = "slime baby dead"
else
- overlays.Cut()
+ cut_overlays()
icon_state = "slime adult dead"
color = traitdat.traits[TRAIT_XENO_COLOR]
diff --git a/code/modules/xenobio2/mob/slime/slime procs.dm b/code/modules/xenobio2/mob/slime/slime procs.dm
index bd74562d9f2..ac03f788c3d 100644
--- a/code/modules/xenobio2/mob/slime/slime procs.dm
+++ b/code/modules/xenobio2/mob/slime/slime procs.dm
@@ -61,7 +61,7 @@ Slime specific procs go here.
GenerateAdult()
/mob/living/simple_mob/xeno/slime/proc/GenerateChild()
- overlays.Cut()
+ cut_overlays()
name = "[nameVar] baby slime"
real_name = "[nameVar] baby slime"
desc = "A shifting blob of [nameVar] goo."
@@ -75,7 +75,7 @@ Slime specific procs go here.
return 1
/mob/living/simple_mob/xeno/slime/proc/GenerateAdult()
- overlays.Cut()
+ cut_overlays()
name = "[nameVar] slime"
real_name = "[nameVar] slime"
desc = "A shifting mass of [nameVar] goo."
@@ -85,12 +85,12 @@ Slime specific procs go here.
GenerateAdultIcon()
/mob/living/simple_mob/xeno/slime/proc/GenerateAdultIcon() //Hack and slash adventure game to make slimes have no color on light effects later
- overlays.Cut()
+ cut_overlays()
var/image/Img = new(src.icon)
Img.icon_state = "slime adult"
Img.color = traitdat.traits[TRAIT_XENO_COLOR]
Img.layer = src.layer
- overlays += Img
+ add_overlay(Img)
switch(overlay)
if(SHINYOVERLAY)
@@ -99,7 +99,7 @@ Slime specific procs go here.
I.icon_state = "slime shiny"
I.layer = src.layer + 0.1
I.color = "#FFFFFF"
- overlays += I
+ add_overlay(I)
if(LIGHTOVERLAY)
var/image/I = new(src.icon)
I.icon = src.icon
@@ -107,7 +107,7 @@ Slime specific procs go here.
I.icon_state = "slime light"
I.layer = src.layer + 0.1
I.color = "#FFFFFF"
- overlays += I
+ add_overlay(I)
/mob/living/simple_mob/xeno/slime/handle_reagents()
if(!stasis)