mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Too remove potential excessive garbage collection per tick. We will be reusing lists for overlays instead of deleting and creating them.
the .Cut() proc on a list will empty a list by default. This also will set the len to 0. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5465 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -368,7 +368,7 @@ mob
|
||||
network.marker = rand(1,4)
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/P in world)
|
||||
P.overlays = null
|
||||
P.overlays.Cut()
|
||||
|
||||
var/datum/pipe_network/master = P.return_network()
|
||||
if(master)
|
||||
@@ -378,7 +378,7 @@ mob
|
||||
P.overlays += icon('icons/Testing/atmos_testing.dmi',"marker0")
|
||||
|
||||
for(var/obj/machinery/atmospherics/valve/V in world)
|
||||
V.overlays = null
|
||||
V.overlays.Cut()
|
||||
|
||||
if(V.network_node1)
|
||||
V.overlays += icon('icons/Testing/atmos_testing.dmi',"marker[V.network_node1.marker]")
|
||||
@@ -396,7 +396,7 @@ turf/simulated
|
||||
verb
|
||||
mark_direction()
|
||||
set src in world
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
for(var/direction in list(NORTH,SOUTH,EAST,WEST))
|
||||
if(group_border&direction)
|
||||
overlays += icon('icons/Testing/turf_analysis.dmi',"red_arrow",direction)
|
||||
|
||||
@@ -124,7 +124,7 @@ turf
|
||||
super_conduct()
|
||||
|
||||
update_visuals(datum/gas_mixture/model)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
C.monkeyizing = 1
|
||||
C.canmove = 0
|
||||
C.icon = null
|
||||
C.overlays = null
|
||||
C.overlays.Cut()
|
||||
C.invisibility = 101
|
||||
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
|
||||
@@ -290,7 +290,7 @@
|
||||
C.monkeyizing = 1
|
||||
C.canmove = 0
|
||||
C.icon = null
|
||||
C.overlays = null
|
||||
C.overlays.Cut()
|
||||
C.invisibility = 101
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
|
||||
animation.icon_state = "blank"
|
||||
|
||||
@@ -540,7 +540,7 @@ ________________________________________________________________________________
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
P.overlays = null
|
||||
P.overlays.Cut()
|
||||
P.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
|
||||
if("Inject")
|
||||
|
||||
@@ -510,7 +510,7 @@
|
||||
return
|
||||
|
||||
mode = 1
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
load.loc = src.loc
|
||||
load.pixel_y -= 9
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
|
||||
if(chargelevel != newlevel)
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "ccharger-o[newlevel]"
|
||||
|
||||
chargelevel = newlevel
|
||||
else
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
examine()
|
||||
set src in oview(5)
|
||||
..()
|
||||
|
||||
@@ -249,7 +249,7 @@ That prevents a few funky behaviors.
|
||||
A.loc = T.loc//To replace the terminal.
|
||||
C.icon_state = "aicard"
|
||||
C.name = "inteliCard"
|
||||
C.overlays = null
|
||||
C.overlays.Cut()
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
|
||||
@@ -276,7 +276,7 @@ That prevents a few funky behaviors.
|
||||
else for(var/mob/living/silicon/ai/A in C)
|
||||
C.icon_state = "aicard"
|
||||
C.name = "inteliCard"
|
||||
C.overlays = null
|
||||
C.overlays.Cut()
|
||||
A.loc = T
|
||||
T.occupant = A
|
||||
A.control_disabled = 1
|
||||
@@ -372,7 +372,7 @@ That prevents a few funky behaviors.
|
||||
A_T.loc = T//Throw them into suit.
|
||||
C.icon_state = "aicard"
|
||||
C.name = "inteliCard"
|
||||
C.overlays = null
|
||||
C.overlays.Cut()
|
||||
T.AI = A_T
|
||||
A_T.cancel_camera()
|
||||
A_T << "You have been uploaded to a mobile storage device."
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
..()
|
||||
// Broken / Unpowered
|
||||
if((stat & BROKEN) || (stat & NOPOWER))
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
// Working / Powered
|
||||
else
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
var/mob/living/carbon/human/H = customrecepient.loc
|
||||
H << "\icon[customrecepient] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
|
||||
customrecepient.overlays = null
|
||||
customrecepient.overlays.Cut()
|
||||
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
//Sender is faking as someone who exists
|
||||
else
|
||||
@@ -466,7 +466,7 @@
|
||||
var/mob/living/carbon/human/H = customrecepient.loc
|
||||
H << "\icon[customrecepient] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)"
|
||||
log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
|
||||
customrecepient.overlays = null
|
||||
customrecepient.overlays.Cut()
|
||||
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
//Finally..
|
||||
ResetMessage()
|
||||
|
||||
@@ -641,7 +641,7 @@ About the new airlock wires panel:
|
||||
source.thermal_conductivity = initial(source.thermal_conductivity)
|
||||
|
||||
/obj/machinery/door/airlock/update_icon()
|
||||
if(overlays) overlays = null
|
||||
if(overlays) overlays.Cut()
|
||||
if(density)
|
||||
if(locked && lights)
|
||||
icon_state = "door_locked"
|
||||
@@ -661,14 +661,14 @@ About the new airlock wires panel:
|
||||
/obj/machinery/door/airlock/animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
if(overlays) overlays = null
|
||||
if(overlays) overlays.Cut()
|
||||
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
|
||||
else
|
||||
flick("door_opening", src)
|
||||
if("closing")
|
||||
if(overlays) overlays = null
|
||||
if(overlays) overlays.Cut()
|
||||
if(p_open)
|
||||
flick("o_door_closing", src)
|
||||
else
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
// Adds an icon in case the screen is broken/off, stolen from status_display.dm
|
||||
proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
|
||||
|
||||
@@ -227,10 +227,10 @@
|
||||
// Stolen from status_display
|
||||
proc/update_display(var/line1, var/line2)
|
||||
if(line2 == null) // single line display
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -13)
|
||||
else // dual line display
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -9)
|
||||
overlays += texticon(line2, 23, -17)
|
||||
// return an icon of a time text string (tn)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(density)
|
||||
icon_state = "door_closed"
|
||||
if(blocked)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
if (!src.anchored)
|
||||
user.show_message(text("\red [src] can now be moved."))
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
|
||||
else if (src.anchored)
|
||||
user.show_message(text("\red [src] is now secured."))
|
||||
|
||||
@@ -151,7 +151,7 @@ obj/machinery/hydroponics/process()
|
||||
|
||||
obj/machinery/hydroponics/proc/updateicon()
|
||||
//Refreshes the icon and sets the luminosity
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(planted)
|
||||
if(dead)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead")
|
||||
@@ -1017,7 +1017,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
use_power = 0
|
||||
|
||||
updateicon() // Same as normal but with the overlays removed - Cheridan.
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(planted)
|
||||
if(dead)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead")
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
src.overlays += image('icons/obj/kitchen.dmi', "grjam")
|
||||
|
||||
/obj/machinery/gibber/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if (dirty)
|
||||
src.overlays += image('icons/obj/kitchen.dmi', "grbloody")
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -114,11 +114,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if(!ispowered || isbroken)
|
||||
icon_state = "newscaster_off"
|
||||
if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite.
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
src.overlays += image(src.icon, "crack3")
|
||||
return
|
||||
|
||||
src.overlays = null //reset overlays
|
||||
src.overlays.Cut() //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"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
icon_state = "sheater[on]"
|
||||
if(open)
|
||||
overlays += "sheater-open"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
process()
|
||||
if(stat & NOPOWER)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
update()
|
||||
@@ -68,7 +68,7 @@
|
||||
return
|
||||
|
||||
if(mode==0)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
if(mode==3) // alert picture, no change
|
||||
@@ -89,7 +89,7 @@
|
||||
update_display(displayloc, displaytime)
|
||||
return
|
||||
else
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
if(mode==4) // supply shuttle timer
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
|
||||
proc/update_display(var/line1, var/line2)
|
||||
@@ -172,11 +172,11 @@
|
||||
lastdisplayline2 = line2
|
||||
|
||||
if(line2 == null) // single line display
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -13)
|
||||
else // dual line display
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -9)
|
||||
overlays += texticon(line2, 23, -17)
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
|
||||
process()
|
||||
if(stat & NOPOWER)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
update()
|
||||
@@ -287,7 +287,7 @@
|
||||
proc/update()
|
||||
|
||||
if(mode==0) //Blank
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
if(mode==1) // AI emoticon
|
||||
@@ -328,5 +328,5 @@
|
||||
|
||||
proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
src.panel_open = !src.panel_open
|
||||
user << "You [src.panel_open ? "open" : "close"] the maintenance panel."
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
if(src.panel_open)
|
||||
src.overlays += image(src.icon, "[initial(icon_state)]-panel")
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
user << "You cut the tag off the bodybag"
|
||||
src.name = "body bag"
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -682,7 +682,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2||mode == 21)//To clear message overlays.
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
@@ -781,7 +781,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
P.overlays = null
|
||||
P.overlays.Cut()
|
||||
P.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
else
|
||||
U << "<span class='notice'>ERROR: Server isn't responding.</span>"
|
||||
|
||||
@@ -110,12 +110,12 @@
|
||||
|
||||
/obj/item/device/paicard/proc/removePersonality()
|
||||
src.pai = null
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
src.overlays += "pai-off"
|
||||
|
||||
/obj/item/device/paicard/proc/setEmotion(var/emotion)
|
||||
if(pai)
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
switch(emotion)
|
||||
if(1) src.overlays += "pai-happy"
|
||||
if(2) src.overlays += "pai-cat"
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
toggle = 1
|
||||
|
||||
/obj/item/device/transfer_valve/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
underlays = null
|
||||
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
src.updateicon()
|
||||
|
||||
/obj/item/robot_parts/robot_suit/proc/updateicon()
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
if(src.l_arm)
|
||||
src.overlays += "l_arm+o"
|
||||
if(src.r_arm)
|
||||
|
||||
@@ -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 = null
|
||||
overlays.Cut()
|
||||
usr << "You slice off [src]'s uneven chunks of aluminum and scorch marks."
|
||||
return
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(focus && focus.icon && focus.icon_state)
|
||||
overlays += icon(focus.icon,focus.icon_state)
|
||||
return
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/flamethrower/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(igniter)
|
||||
overlays += "+igniter[status]"
|
||||
if(ptank)
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
// Drop all the things. All of them.
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = M.loc
|
||||
carrying.Remove(I)
|
||||
@@ -391,7 +391,7 @@
|
||||
foundtable = 1
|
||||
break
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = loc
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
emagged = 1
|
||||
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
|
||||
sleep(6)
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
overlays += image('icons/obj/storage.dmi', icon_locking)
|
||||
locked = 0
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
@@ -225,7 +225,7 @@
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
overlays += image('icons/obj/storage.dmi', icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
@@ -233,7 +233,7 @@
|
||||
else
|
||||
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
|
||||
@@ -211,10 +211,10 @@
|
||||
/obj/structure/closet/crate/secure/New()
|
||||
..()
|
||||
if(locked)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += redlight
|
||||
else
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += greenlight
|
||||
|
||||
/obj/structure/closet/crate/rcd/New()
|
||||
@@ -287,7 +287,7 @@
|
||||
if (allowed(user))
|
||||
user << "<span class='notice'>You unlock [src].</span>"
|
||||
src.locked = 0
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += greenlight
|
||||
return
|
||||
else
|
||||
@@ -300,11 +300,11 @@
|
||||
if(istype(W, /obj/item/weapon/card) && src.allowed(user) && !locked && !opened && !broken)
|
||||
user << "<span class='notice'>You lock \the [src].</span>"
|
||||
src.locked = 1
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += redlight
|
||||
return
|
||||
else if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && locked &&!broken)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += emag
|
||||
overlays += sparks
|
||||
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
|
||||
@@ -357,10 +357,10 @@
|
||||
if(!broken && !opened && prob(50/severity))
|
||||
if(!locked)
|
||||
src.locked = 1
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += redlight
|
||||
else
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += emag
|
||||
overlays += sparks
|
||||
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/rotate()
|
||||
..()
|
||||
overlays = null
|
||||
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
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
/obj/structure/dispenser/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
switch(oxygentanks)
|
||||
if(1 to 3) overlays += "oxygen-[oxygentanks]"
|
||||
if(4 to INFINITY) overlays += "oxygen-4"
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust the shower with the [I].</span>")
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
overlays = null //once it's been on for a while, in addition to handling the water overlay.
|
||||
overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
|
||||
if(mymist)
|
||||
del(mymist)
|
||||
|
||||
|
||||
@@ -2077,7 +2077,7 @@
|
||||
if(F.z == 1)
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
F.overlays = null
|
||||
F.overlays.Cut()
|
||||
F.lava = 0
|
||||
F.update_icon()
|
||||
floorIsLava = 0
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(a_left)
|
||||
overlays += "[a_left.icon_state]_left"
|
||||
for(var/O in a_left.attached_overlays)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
overlays += "prox_timing"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
overlays += "timer_timing"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/obj/item/clothing/gloves/update_icon()
|
||||
..()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(wired)
|
||||
overlays += "gloves_wire"
|
||||
if(cell)
|
||||
|
||||
@@ -68,7 +68,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 = null //remove the overlays
|
||||
overlays.Cut() //remove the overlays
|
||||
user.put_in_hands(I)
|
||||
w_class = 1
|
||||
icon_state = "evidenceobj"
|
||||
|
||||
@@ -408,7 +408,7 @@ commented out in r5061, I left it because of the shroom thingies
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/proc/updateMineralOverlays()
|
||||
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
|
||||
if(istype(get_step(src, NORTH), /turf/simulated/mineral))
|
||||
src.overlays += image('icons/turf/walls.dmi', "rock_side_n")
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
/mob/living/carbon/alien/humanoid/queen/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
if(resting) icon_state = "queen_sleep"
|
||||
else icon_state = "queen_l"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/mob/living/carbon/alien/humanoid/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
if(resting) icon_state = "alien[caste]_sleep"
|
||||
else icon_state = "alien[caste]_l"
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -131,7 +131,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if(lying) //can't be cloaked when lying. (for now)
|
||||
icon = lying_icon
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/mob/living/carbon/monkey/update_icons()
|
||||
update_hud()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
icon_state = "monkey0"
|
||||
for(var/image/I in overlays_lying)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -761,26 +761,26 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/updateicon()
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat == 0)
|
||||
overlays += "eyes"
|
||||
if(icon_state == "robot")
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "eyes-standard"
|
||||
if(icon_state == "toiletbot")
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "eyes-toiletbot"
|
||||
if(icon_state == "bloodhound")
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "eyes-bloodhound"
|
||||
if(icon_state =="landmate")
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "eyes-landmate"
|
||||
if(icon_state =="mopgearrex")
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "eyes-mopgearrex"
|
||||
if(icon_state =="Miner")
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += "eyes-Miner"
|
||||
else
|
||||
overlays -= "eyes"
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
else
|
||||
return
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
overlays += image('icons/mob/zone_sel.dmi', "[selecting]")
|
||||
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/clipboard/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(toppaper)
|
||||
overlays += toppaper.icon_state
|
||||
overlays += toppaper.overlays
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
icon_state = "folder_white"
|
||||
|
||||
/obj/item/weapon/folder/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(contents.len)
|
||||
overlays += "folder_paper"
|
||||
return
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
info = null
|
||||
stamps = null
|
||||
stamped = list()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
updateinfolinks()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ proc/cardinalrange(var/center)
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
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))
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
// also add overlays for indicator lights
|
||||
/obj/machinery/power/apc/update_icon()
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(opened)
|
||||
var/basestate = "apc[ cell ? "2" : "1" ]" // if opened, show cell if it's inserted
|
||||
if (opened==1)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
updateicon()
|
||||
|
||||
/obj/item/weapon/cell/proc/updateicon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if(charge < 0.01)
|
||||
return
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
/obj/machinery/power/generator/proc/updateicon()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
else
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if(lastgenlev != 0)
|
||||
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
/obj/machinery/power/generator_type2/proc/updateicon()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
else
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if(lastgenlev != 0)
|
||||
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
|
||||
|
||||
@@ -129,7 +129,7 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/update_icons()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(P)
|
||||
overlays += image('icons/obj/singularity.dmi', "ptank")
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -34,7 +34,7 @@ field_generator power level display
|
||||
|
||||
|
||||
/obj/machinery/field_generator/update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(!active)
|
||||
if(warming_up)
|
||||
overlays += "+a[warming_up]"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
|
||||
/obj/machinery/power/smes/proc/updateicon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN) return
|
||||
|
||||
overlays += image('icons/obj/power.dmi', "smes-op[online]")
|
||||
|
||||
@@ -101,7 +101,7 @@ var/list/solars_list = list()
|
||||
|
||||
/obj/machinery/power/solar/update_icon()
|
||||
..()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN)
|
||||
overlays += image('icons/obj/power.dmi', icon_state = "solar_panel-b", layer = FLY_LAYER)
|
||||
else
|
||||
@@ -306,14 +306,14 @@ var/list/solars_list = list()
|
||||
/obj/machinery/power/solar_control/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "c_unpowered"
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
return
|
||||
icon_state = "solar"
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(cdir > 0)
|
||||
overlays += image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir))
|
||||
return
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
/obj/machinery/compressor/process()
|
||||
if(!starter)
|
||||
return
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(!turbine)
|
||||
@@ -113,7 +113,7 @@
|
||||
/obj/machinery/power/turbine/process()
|
||||
if(!compressor.starter)
|
||||
return
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(!compressor)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
update_charge()
|
||||
update_reactor()
|
||||
update_mode()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.overlays = null
|
||||
M.overlays.Cut()
|
||||
M.invisibility = 101
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
|
||||
@@ -844,7 +844,7 @@ datum
|
||||
if(volume >= 5)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
T:thermite = 1
|
||||
T.overlays = null
|
||||
T.overlays.Cut()
|
||||
T.overlays = image('icons/effects/effects.dmi',icon_state = "thermite")
|
||||
return
|
||||
|
||||
@@ -1034,7 +1034,7 @@ datum
|
||||
O.clean_blood()
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
if(volume >= 1)
|
||||
T.overlays = null
|
||||
T.overlays.Cut()
|
||||
T.clean_blood()
|
||||
for(var/obj/effect/decal/cleanable/C in src)
|
||||
del(C)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
update_icon()
|
||||
var/rounded_vol = round(reagents.total_volume,5)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(ismob(loc))
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
|
||||
// update the icon & overlays to reflect mode & status
|
||||
proc/update()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "disposal-broken"
|
||||
mode = 0
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(!O)
|
||||
O = new /obj/effect/mark(T)
|
||||
else
|
||||
O.overlays = null
|
||||
O.overlays.Cut()
|
||||
|
||||
var/obj/move/OM = locate(/obj/move/, T)
|
||||
|
||||
@@ -137,7 +137,7 @@ Doing this because FindTurfs() isn't even used
|
||||
if(!O)
|
||||
O = new /obj/effect/mark(T)
|
||||
else
|
||||
O.overlays = null
|
||||
O.overlays.Cut()
|
||||
|
||||
|
||||
var/temp = round(T.temp-T0C, 0.1)
|
||||
@@ -168,7 +168,7 @@ Doing this because FindTurfs() isn't even used
|
||||
if(!O)
|
||||
O = new /obj/effect/mark(T)
|
||||
else
|
||||
O.overlays = null
|
||||
O.overlays.Cut()
|
||||
|
||||
if(istype(M, /obj/machinery/pipes))
|
||||
var/obj/machinery/pipes/P = M
|
||||
@@ -199,7 +199,7 @@ Doing this because FindTurfs() isn't even used
|
||||
if(!O)
|
||||
O = new /obj/effect/mark(T)
|
||||
else
|
||||
O.overlays = null
|
||||
O.overlays.Cut()
|
||||
|
||||
var/marked = 0
|
||||
for(var/obj/M in T)
|
||||
@@ -242,7 +242,7 @@ Doing this because FindTurfs() isn't even used
|
||||
if(!O)
|
||||
O = new /obj/effect/mark(T)
|
||||
else
|
||||
O.overlays = null
|
||||
O.overlays.Cut()
|
||||
|
||||
|
||||
var/obj/machinery/power/solar/S
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/filter_control/proc/updateicon()
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "filter_control-nopower"
|
||||
return
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
|
||||
/mob/living/silicon/hivebot/proc/updateicon()
|
||||
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
|
||||
if(src.stat == 0)
|
||||
src.overlays += "eyes"
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
@@ -223,7 +223,7 @@ for (var/client/C)
|
||||
if(!load)
|
||||
return
|
||||
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
|
||||
load.loc = src.loc
|
||||
load.pixel_y -= 9
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
if(2)
|
||||
//Messenger. Uses Radio. Is a messenger.
|
||||
//TO-DO: ~file sharing~
|
||||
src.master.overlays = null //Remove existing alerts
|
||||
src.master.overlays.Cut() //Remove existing alerts
|
||||
dat += "<h4>SpaceMessenger V4.0.5</h4>"
|
||||
|
||||
if (!src.message_mode)
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
for (var/mob/O in hearers(3, src.loc))
|
||||
O.show_message(text("\icon[src] *[alert_message]*"))
|
||||
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
src.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
return
|
||||
|
||||
|
||||
+1
-1
@@ -348,7 +348,7 @@ var/linenums = 0
|
||||
src.icon_state = is
|
||||
|
||||
if(node1 && node2)
|
||||
overlays = null
|
||||
overlays.Cut()
|
||||
else if(!node1 && !node2)
|
||||
overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1])
|
||||
overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2])
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
updateicon()
|
||||
|
||||
/obj/machinery/pipefilter/proc/updateicon()
|
||||
src.overlays = null
|
||||
src.overlays.Cut()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "filter-off"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user