Convert a bunch of legacy overlay calls to SSoverlays (#4015)

Bunch of overlay conversions I found in an old stash I had forgotten about.
This commit is contained in:
Lohikar
2018-01-07 00:34:47 +02:00
committed by Erki
parent db53ff3630
commit 6f85f08718
57 changed files with 191 additions and 206 deletions
+3 -13
View File
@@ -6,10 +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)
return
/obj/structure/bed/chair/e_chair/Initialize()
. = ..()
add_overlay(image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1))
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswrench(W))
@@ -20,8 +19,6 @@
part.master = null
part = null
qdel(src)
return
return
/obj/structure/bed/chair/e_chair/verb/toggle()
set name = "Toggle Electric Chair"
@@ -36,13 +33,6 @@
shock()
icon_state = "echair1"
usr << "<span class='notice'>You switch [on ? "on" : "off"] [src].</span>"
return
/obj/structure/bed/chair/e_chair/rotate()
..()
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
return
/obj/structure/bed/chair/e_chair/proc/shock()
if(!on)
+2 -2
View File
@@ -179,12 +179,12 @@
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_overlays() //once it's been on for a while, in addition to handling the water overlay.
if(mymist)
qdel(mymist)
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)
+5 -8
View File
@@ -76,13 +76,12 @@
updateSilicate()
/obj/structure/window/proc/updateSilicate()
if (overlays)
overlays.Cut()
cut_overlays()
var/image/img = image(src.icon, src.icon_state)
var/image/img = image(icon, icon_state)
img.color = "#ffffff"
img.alpha = silicate * 255 / 100
overlays += img
add_overlay(img)
/obj/structure/window/proc/shatter(var/display_message = 1)
playsound(src, "shatter", 70, 1)
@@ -388,7 +387,7 @@
/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()
cut_overlays()
if(!is_fulltile())
icon_state = "[basestate]"
return
@@ -403,9 +402,7 @@
icon_state = ""
for(var/i = 1 to 4)
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
overlays += I
return
add_overlay(I)
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > maximal_heat)