Tiles are now (mostly) pooled objects (#19112)

* Tiles are now (mostly) pooled objects

Floors no longer have a builtin_tile, but instead use PoolOrNew().

Also added a do-nothing SSpool so you can inspect the global pool.

* Entries for time keeping

* MORE STATISTICS

* Stat tracking, auto filling

* Code review I

* Code review II

* Code review III
This commit is contained in:
coiax
2016-07-08 13:32:40 -04:00
committed by Joan Lung
parent 7572717ff4
commit afb7ebd790
14 changed files with 97 additions and 34 deletions
@@ -29,7 +29,7 @@
var/obj/item/stack/sheet/metal/M = O
if (M.use(1))
use(1)
var/obj/item/stack/tile/light/L = new (user.loc)
var/obj/item/L = PoolOrNew(/obj/item/stack/tile/light, user.loc)
user << "<span class='notice'>You make a light tile.</span>"
L.add_fingerprint(user)
else
@@ -18,6 +18,10 @@
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3) //randomize a little
/obj/item/stack/tile/Destroy()
..()
return QDEL_HINT_PUTINPOOL
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weapon/weldingtool))
@@ -285,7 +285,7 @@
/obj/item/weapon/storage/backpack/satchel_flat/New()
..()
new /obj/item/stack/tile/plasteel(src)
PoolOrNew(/obj/item/stack/tile/plasteel, src)
new /obj/item/weapon/crowbar(src)
/obj/item/weapon/storage/backpack/dufflebag