mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 20:57:23 +01:00
Removes the datum pool, as it is not performant.
* Creating new objects is cheap, in fact comparable to the cost of getting it out of the pool, so it doesn't help there. * Placing items in the pool is far more expensive than letting them garbage collect due to the resetting of vars and such.
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), destroyed ? 1 : 2))
|
||||
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
|
||||
qdel(src)
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
else if(!(W.flags & CONDUCT) || !shock(user, 70))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
@@ -170,11 +170,11 @@
|
||||
density = 0
|
||||
destroyed = 1
|
||||
update_icon()
|
||||
PoolOrNew(/obj/item/stack/rods, get_turf(src))
|
||||
new /obj/item/stack/rods(get_turf(src))
|
||||
|
||||
else
|
||||
if(health <= -6)
|
||||
PoolOrNew(/obj/item/stack/rods, get_turf(src))
|
||||
new /obj/item/stack/rods(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if(WT.welding == 1)
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>Slicing lattice joints ...</span>"
|
||||
PoolOrNew(/obj/item/stack/rods, src.loc)
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
qdel(src)
|
||||
|
||||
return
|
||||
|
||||
@@ -182,13 +182,13 @@
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
ismist = 1
|
||||
mymist = PoolOrNew(/obj/effect/mist,loc)
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
ismist = 1
|
||||
mymist = PoolOrNew(/obj/effect/mist,loc)
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else if(ismist)
|
||||
ismist = 1
|
||||
mymist = PoolOrNew(/obj/effect/mist,loc)
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
spawn(250)
|
||||
if(src && !on)
|
||||
qdel(mymist)
|
||||
|
||||
@@ -92,11 +92,11 @@
|
||||
index = 0
|
||||
while(index < 2)
|
||||
new shardtype(loc) //todo pooling?
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
index++
|
||||
else
|
||||
new shardtype(loc) //todo pooling?
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/obj/effect/wingrille_spawn/proc/activate()
|
||||
if(activated) return
|
||||
if (!locate(/obj/structure/grille) in get_turf(src))
|
||||
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
|
||||
var/obj/structure/grille/G = new /obj/structure/grille(src.loc)
|
||||
handle_grille_spawn(G)
|
||||
var/list/neighbours = list()
|
||||
for (var/dir in cardinal)
|
||||
@@ -49,7 +49,7 @@
|
||||
found_connection = 1
|
||||
qdel(W)
|
||||
if(!found_connection)
|
||||
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
|
||||
var/obj/structure/window/new_win = new win_path(src.loc)
|
||||
new_win.set_dir(dir)
|
||||
handle_window_spawn(new_win)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user