mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #9665 from PsiOmegaDelta/150604-DatumPool
Fixes #9664.
This commit is contained in:
@@ -29,7 +29,7 @@ var/global/list/GlobalPool = list()
|
|||||||
if(!D)
|
if(!D)
|
||||||
// So the GC knows we're pooling this type.
|
// So the GC knows we're pooling this type.
|
||||||
if(!GlobalPool[get_type])
|
if(!GlobalPool[get_type])
|
||||||
GlobalPool[get_type] = list(new get_type)
|
GlobalPool[get_type] = list()
|
||||||
if(islist(second_arg))
|
if(islist(second_arg))
|
||||||
return new get_type (arglist(second_arg))
|
return new get_type (arglist(second_arg))
|
||||||
else
|
else
|
||||||
@@ -58,6 +58,9 @@ var/global/list/GlobalPool = list()
|
|||||||
#ifdef DEBUG_ATOM_POOL
|
#ifdef DEBUG_ATOM_POOL
|
||||||
world << text("DEBUG_DATUM_POOL: PlaceInPool([]) exceeds []. Discarding.", D.type, ATOM_POOL_COUNT)
|
world << text("DEBUG_DATUM_POOL: PlaceInPool([]) exceeds []. Discarding.", D.type, ATOM_POOL_COUNT)
|
||||||
#endif
|
#endif
|
||||||
|
if(garbage_collector)
|
||||||
|
garbage_collector.AddTrash(D)
|
||||||
|
else
|
||||||
del(D)
|
del(D)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,11 @@
|
|||||||
if(!target)
|
if(!target)
|
||||||
return
|
return
|
||||||
for(var/i = 1 to step_count)
|
for(var/i = 1 to step_count)
|
||||||
|
if(!loc)
|
||||||
|
return
|
||||||
step_towards(src, target)
|
step_towards(src, target)
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
|
if(T && reagents)
|
||||||
reagents.touch_turf(T)
|
reagents.touch_turf(T)
|
||||||
var/mob/M = locate() in T
|
var/mob/M = locate() in T
|
||||||
if(M)
|
if(M)
|
||||||
|
|||||||
Reference in New Issue
Block a user