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:
rockdtben@gmail.com
2013-01-04 15:11:06 +00:00
parent 51613ccbb6
commit 169c96db1b
82 changed files with 131 additions and 131 deletions
+2 -2
View File
@@ -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>"
+2 -2
View File
@@ -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)