mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 13:32:32 +00:00
Updates the atom_pool, now datum_pool, to handle any datum object.
Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
This commit is contained in:
@@ -20,11 +20,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
var/life = 15.0
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/proc/delete()
|
||||
loc = null
|
||||
/obj/effect/Destroy()
|
||||
if(reagents)
|
||||
reagents.delete()
|
||||
return
|
||||
PlaceInPool(src)
|
||||
return 1
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
//var/turf/T = src.loc
|
||||
@@ -32,7 +32,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
// T.firelevel = 0 //TODO: FIX
|
||||
if (--src.life < 1)
|
||||
//SN src = null
|
||||
delete()
|
||||
qdel(src)
|
||||
if(newloc.density)
|
||||
return 0
|
||||
.=..()
|
||||
@@ -100,7 +100,7 @@ steam.start() -- spawns the effect
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
|
||||
var/obj/effect/effect/steam/steam = PoolOrNew(/obj/effect/effect/steam, src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
@@ -110,7 +110,7 @@ steam.start() -- spawns the effect
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
spawn(20)
|
||||
steam.delete()
|
||||
qdel(steam)
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//SPARK SYSTEM (like steam system)
|
||||
@@ -133,10 +133,10 @@ steam.start() -- spawns the effect
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
spawn (100)
|
||||
delete()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/effect/sparks/Del()
|
||||
/obj/effect/effect/sparks/Destroy()
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
@@ -171,7 +171,7 @@ steam.start() -- spawns the effect
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
|
||||
var/obj/effect/effect/sparks/sparks = PoolOrNew(/obj/effect/effect/sparks, src.location)
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
@@ -183,7 +183,7 @@ steam.start() -- spawns the effect
|
||||
step(sparks,direction)
|
||||
spawn(20)
|
||||
if(sparks)
|
||||
sparks.delete()
|
||||
qdel(sparks)
|
||||
src.total_sparks--
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ steam.start() -- spawns the effect
|
||||
/obj/effect/effect/smoke/New()
|
||||
..()
|
||||
spawn (time_to_live)
|
||||
delete()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
|
||||
@@ -357,7 +357,7 @@ steam.start() -- spawns the effect
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/effect/smoke/smoke = new smoke_type(src.location)
|
||||
var/obj/effect/effect/smoke/smoke = PoolOrNew(smoke_type, src.location)
|
||||
src.total_smoke++
|
||||
var/direction = src.direction
|
||||
if(!direction)
|
||||
@@ -369,7 +369,7 @@ steam.start() -- spawns the effect
|
||||
sleep(10)
|
||||
step(smoke,direction)
|
||||
spawn(smoke.time_to_live*0.75+rand(10,30))
|
||||
if (smoke) smoke.delete()
|
||||
if (smoke) qdel(smoke)
|
||||
src.total_smoke--
|
||||
|
||||
|
||||
@@ -415,13 +415,13 @@ steam.start() -- spawns the effect
|
||||
var/turf/T = get_turf(src.holder)
|
||||
if(T != src.oldposition)
|
||||
if(istype(T, /turf/space))
|
||||
var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
|
||||
var/obj/effect/effect/ion_trails/I = PoolOrNew(/obj/effect/effect/ion_trails, src.oldposition)
|
||||
src.oldposition = T
|
||||
I.set_dir(src.holder.dir)
|
||||
flick("ion_fade", I)
|
||||
I.icon_state = "blank"
|
||||
spawn( 20 )
|
||||
I.delete()
|
||||
qdel(I)
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
@@ -461,12 +461,12 @@ steam.start() -- spawns the effect
|
||||
src.processing = 0
|
||||
spawn(0)
|
||||
if(src.number < 3)
|
||||
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
|
||||
var/obj/effect/effect/steam/I = PoolOrNew(/obj/effect/effect/steam, src.oldposition)
|
||||
src.number++
|
||||
src.oldposition = get_turf(holder)
|
||||
I.set_dir(src.holder.dir)
|
||||
spawn(10)
|
||||
I.delete()
|
||||
qdel(I)
|
||||
src.number--
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
@@ -515,13 +515,13 @@ steam.start() -- spawns the effect
|
||||
sleep(30)
|
||||
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
var/obj/structure/foamedmetal/M = PoolOrNew(/obj/structure/foamedmetal, src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
delete()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// transfer any reagents to the floor
|
||||
@@ -551,7 +551,7 @@ steam.start() -- spawns the effect
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = new(T, metal)
|
||||
F = PoolOrNew(/obj/effect/effect/foam, list(T, metal))
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(10)
|
||||
@@ -566,7 +566,7 @@ steam.start() -- spawns the effect
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
spawn(5)
|
||||
delete()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
|
||||
@@ -611,7 +611,7 @@ steam.start() -- spawns the effect
|
||||
F.amount += amount
|
||||
return
|
||||
|
||||
F = new(src.location, metal)
|
||||
F = PoolOrNew(/obj/effect/effect/foam, list(src.location, metal))
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
@@ -642,7 +642,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
@@ -656,14 +656,14 @@ steam.start() -- spawns the effect
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
blob_act()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
bullet_act()
|
||||
if(metal==1 || prob(50))
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
if ((HULK in user.mutations) || (prob(75 - metal*25)))
|
||||
@@ -672,7 +672,7 @@ steam.start() -- spawns the effect
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes through the foamed metal."
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You hit the metal foam but bounce off it."
|
||||
return
|
||||
@@ -686,8 +686,8 @@ steam.start() -- spawns the effect
|
||||
for(var/mob/O in viewers(src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
|
||||
del(I)
|
||||
del(src)
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(prob(I.force*20 - metal*25))
|
||||
@@ -695,7 +695,7 @@ steam.start() -- spawns the effect
|
||||
for(var/mob/O in oviewers(user))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes through the foamed metal."
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You hit the metal foam to no effect."
|
||||
|
||||
@@ -722,7 +722,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
start()
|
||||
if (amount <= 2)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
var/datum/effect/effect/system/spark_spread/s = PoolOrNew(/datum/effect/effect/system/spark_spread)
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user