From b13d7f86af43eb6786a2a3c73b87b9791dbecf39 Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Thu, 23 Jun 2016 20:50:36 -0400 Subject: [PATCH 1/2] Pools several unpooled overlay/temp objects --- code/game/gamemodes/miniantags/abduction/machinery/pad.dm | 4 ++-- code/modules/mob/living/carbon/alien/death.dm | 4 ++-- code/modules/mob/living/carbon/human/death.dm | 4 ++-- code/modules/mob/living/carbon/monkey/death.dm | 4 ++-- code/modules/mob/living/silicon/robot/death.dm | 4 ++-- .../mob/living/simple_animal/hostile/megafauna/bubblegum.dm | 2 +- .../mob/living/simple_animal/hostile/megafauna/colossus.dm | 2 +- .../mob/living/simple_animal/hostile/megafauna/dragon.dm | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm index 89dd39b3737..7e7ed155601 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm @@ -25,14 +25,14 @@ Warp(target) /obj/machinery/abductor/pad/proc/MobToLoc(place,mob/living/target) - new/obj/effect/overlay/temp/teleport_abductor(place) + PoolOrNew(/obj/effect/overlay/temp/teleport_abductor, place) sleep(80) flick("alien-pad", src) target.forceMove(place) anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir) /obj/machinery/abductor/pad/proc/PadToLoc(place) - new/obj/effect/overlay/temp/teleport_abductor(place) + PoolOrNew(/obj/effect/overlay/temp/teleport_abductor, place) sleep(80) flick("alien-pad", src) for(var/mob/living/target in src.loc) diff --git a/code/modules/mob/living/carbon/alien/death.dm b/code/modules/mob/living/carbon/alien/death.dm index f5c2e9b4a02..7583d0afaa7 100644 --- a/code/modules/mob/living/carbon/alien/death.dm +++ b/code/modules/mob/living/carbon/alien/death.dm @@ -2,10 +2,10 @@ xgibs(loc, viruses) /mob/living/carbon/alien/gib_animation() - new /obj/effect/overlay/temp/gib_animation(loc, "gibbed-a") + PoolOrNew(/obj/effect/overlay/temp/gib_animation, list(loc, "gibbed-a")) /mob/living/carbon/alien/spawn_dust() new /obj/effect/decal/remains/xeno(loc) /mob/living/carbon/alien/dust_animation() - new /obj/effect/overlay/temp/dust_animation(loc, "dust-a") + PoolOrNew(/obj/effect/overlay/temp/dust_animation, list(loc, "dust-a")) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 07e56e80a1b..d7ae6b29528 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -1,8 +1,8 @@ /mob/living/carbon/human/gib_animation() - new /obj/effect/overlay/temp/gib_animation(loc, "gibbed-h") + PoolOrNew(/obj/effect/overlay/temp/gib_animation, list(loc, "gibbed-h")) /mob/living/carbon/human/dust_animation() - new /obj/effect/overlay/temp/dust_animation(loc, "dust-h") + PoolOrNew(/obj/effect/overlay/temp/dust_animation, list(loc, "dust-h")) /mob/living/carbon/human/spawn_gibs() hgibs(loc, viruses, dna) diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 5a1f10e92df..e043a680f46 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -1,8 +1,8 @@ /mob/living/carbon/monkey/gib_animation() - new /obj/effect/overlay/temp/gib_animation(loc, "gibbed-m") + PoolOrNew(/obj/effect/overlay/temp/gib_animation, list(loc, "gibbed-m")) /mob/living/carbon/monkey/dust_animation() - new /obj/effect/overlay/temp/dust_animation(loc, "dust-m") + PoolOrNew(/obj/effect/overlay/temp/dust_animation, list(loc, "dust-m")) /mob/living/carbon/monkey/death(gibbed) if(stat == DEAD) diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 571176ae586..ca980e86bf5 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -3,7 +3,7 @@ robogibs(loc, viruses) /mob/living/silicon/robot/gib_animation() - new /obj/effect/overlay/temp/gib_animation(loc, "gibbed-r") + PoolOrNew(/obj/effect/overlay/temp/gib_animation, list(loc, "gibbed-r")) /mob/living/silicon/robot/dust() @@ -15,7 +15,7 @@ new /obj/effect/decal/remains/robot(loc) /mob/living/silicon/robot/dust_animation() - new /obj/effect/overlay/temp/dust_animation(loc, "dust-r") + PoolOrNew(/obj/effect/overlay/temp/dust_animation, list(loc, "dust-r")) /mob/living/silicon/robot/death(gibbed) if(stat == DEAD) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 12b71f3cf58..f6fa1e66c9f 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -98,7 +98,7 @@ /mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge() var/turf/T = get_step_away(target, src) charging = 1 - new/obj/effect/overlay/temp/dragon_swoop(T) + PoolOrNew(/obj/effect/overlay/temp/dragon_swoop, T) sleep(5) throw_at(T, 7, 1, src, 0) charging = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 502b2105f59..595a5d330d3 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -103,7 +103,7 @@ /mob/living/simple_animal/hostile/megafauna/colossus/bullet_act(obj/item/projectile/P) if(!stat) - var/obj/effect/overlay/temp/at_shield/AT = new(src.loc) + var/obj/effect/overlay/temp/at_shield/AT = PoolOrNew(/obj/effect/overlay/temp/at_shield, src.loc) AT.target = src var/random_x = rand(-32, 32) AT.pixel_x += random_x diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index 8f1dc21f2cc..d53f864e494 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -96,7 +96,7 @@ spawn() var/turf/T = get_turf(src) playsound(get_turf(src),'sound/magic/Fireball.ogg', 200, 1) - var/obj/effect/overlay/temp/fireball/F = new(src.loc) + var/obj/effect/overlay/temp/fireball/F = PoolOrNew(/obj/effect/overlay/temp/fireball,src.loc) animate(F, pixel_z = 0, time = 12) sleep(12) explosion(T, 0, 0, 1, 0, 0, 0, 1) @@ -127,7 +127,7 @@ visible_message("Fire rains from the sky!") for(var/turf/turf in range(12,get_turf(src))) if(prob(10)) - new /obj/effect/overlay/temp/target(turf) + PoolOrNew(/obj/effect/overlay/temp/target, turf) /mob/living/simple_animal/hostile/megafauna/dragon/proc/fire_walls() var/list/attack_dirs = list(NORTH,EAST,SOUTH,WEST) @@ -181,7 +181,7 @@ else tturf = get_turf(src) forceMove(tturf) - new/obj/effect/overlay/temp/dragon_swoop(tturf) + PoolOrNew(/obj/effect/overlay/temp/dragon_swoop, tturf) animate(src, pixel_x = 0, pixel_z = 0, time = 10) sleep(10) playsound(src.loc, 'sound/effects/meteorimpact.ogg', 200, 1) From 8259247e135ddd881c734c5e0e9bdb425ed66646 Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Thu, 23 Jun 2016 22:51:16 -0400 Subject: [PATCH 2/2] fixes medical holosign --- code/game/objects/items/devices/flashlight.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 8b42c3cf52f..dd03f04863f 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -116,7 +116,7 @@ return var/T = get_turf(target) if(locate(/mob/living) in T) - PoolOrNew(/obj/effect/medical_holosign, list(T,user)) //produce a holographic glow + PoolOrNew(/obj/effect/overlay/temp/medical_holosign, list(T,user)) //produce a holographic glow holo_cooldown = world.time + 100 return ..() @@ -127,7 +127,7 @@ icon_state = "medi_holo" duration = 30 -/obj/effect/medical_holosign/New(loc, creator) +/obj/effect/overlay/temp/medical_holosign/New(loc, creator) ..() playsound(loc, 'sound/machines/ping.ogg', 50, 0) //make some noise! if(creator)