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
@@ -48,7 +48,7 @@
/obj/item/weapon/flamethrower/update_icon()
overlays = null
overlays.Cut()
if(igniter)
overlays += "+igniter[status]"
if(ptank)
+2 -2
View File
@@ -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