mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user