diff --git a/code/__HELPERS/experimental.dm b/code/__HELPERS/experimental.dm index 8a2872acbbe..dbf370a5bd8 100644 --- a/code/__HELPERS/experimental.dm +++ b/code/__HELPERS/experimental.dm @@ -44,6 +44,7 @@ var/turf/sekrit = locate(1, 1, CENTCOMM_Z) // List reference for pools. var/list/shardPool var/list/plasmaShardPool +var/list/grillePool /* * @args @@ -70,6 +71,15 @@ var/list/plasmaShardPool if (0 == plasmaShardPool.len) plasmaShardPool = null + if (/obj/structure/grille) + if (isnull(grillePool)) + return new /obj/structure/grille() + + . = grillePool[FIRST_OBJECT] + grillePool = grillePool - . + + if (0 == grillePool.len) + grillePool = null #undef FIRST_OBJECT /* @@ -92,3 +102,10 @@ var/list/plasmaShardPool var /obj/item/weapon/shard/plasma/Plasma = A Plasma.loc = sekrit plasmaShardPool = plasmaShardPool + Plasma + if (/obj/structure/grille) + if (isnull(grillePool)) + grillePool = new /list() + + var /obj/structure/grille/Grille = A + Grille.loc = sekrit + grillePool = grillePool + Grille diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index b7119eba021..8f1dccea28a 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -59,8 +59,9 @@ usr << "\blue Assembling grille..." if (!do_after(usr, 10)) return - var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc ) + var /obj/structure/grille/Grille = getFromPool(/obj/structure/grille) + Grille.loc = loc usr << "\blue You assemble a grille" - F.add_fingerprint(usr) + Grille.add_fingerprint(usr) use(2) - return \ No newline at end of file + return diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 2ea0deb9221..bb2ccd408ac 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -129,7 +129,7 @@ if(!shock(user, 100)) playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) new /obj/item/stack/rods(loc, 2) - del(src) + returnToPool(src) else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored)) if(!shock(user, 90)) playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) @@ -210,7 +210,7 @@ else if(health <= -6) new /obj/item/stack/rods(loc) - del(src) + returnToPool(src) return return