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
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -218,7 +218,7 @@
else
return
overlays = null
overlays.Cut()
overlays += image('icons/mob/zone_sel.dmi', "[selecting]")
return