Files
Polaris/code/game/objects/effects/spawners/vaultspawner.dm
PsiOmega 1ae0ad6d92 Updates the atom_pool, now datum_pool, to handle any datum object.
Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
2015-04-24 09:59:05 +02:00

27 lines
717 B
Plaintext

/obj/effect/vaultspawner
var/maxX = 6
var/maxY = 6
var/minX = 2
var/minY = 2
/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null)
if(!type)
type = pick("sandstone","rock","alien")
var/lowBoundX = location.x
var/lowBoundY = location.y
var/hiBoundX = location.x + rand(lX,uX)
var/hiBoundY = location.y + rand(lY,uY)
var/z = location.z
for(var/i = lowBoundX,i<=hiBoundX,i++)
for(var/j = lowBoundY,j<=hiBoundY,j++)
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
new /turf/simulated/wall/vault(locate(i,j,z),type)
else
new /turf/simulated/floor/vault(locate(i,j,z),type)
qdel(src)