mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Replaces qdeleted with a cleaner macro
This commit is contained in:
@@ -6,4 +6,7 @@
|
||||
#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste.
|
||||
#define QDEL_HINT_PUTINPOOL 5 //qdel will put this object in the atom pool.
|
||||
#define QDEL_HINT_FINDREFERENCE 6 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
|
||||
//if TESTING is enabled, qdel will call this object's find_references() verb.
|
||||
//if TESTING is enabled, qdel will call this object's find_references() verb.
|
||||
|
||||
// A convenient wrapper around checking for qdeletion/non-existence
|
||||
#define exists(A) (A && !qdeleted(A))
|
||||
|
||||
@@ -113,7 +113,9 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
|
||||
for(var/i in to_eat)
|
||||
var/atom/movable/AM = i
|
||||
if(isliving(AM))
|
||||
if(!exists(AM))
|
||||
continue
|
||||
else if(isliving(AM))
|
||||
if(emagged)
|
||||
crush_living(AM)
|
||||
else
|
||||
@@ -123,8 +125,7 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
items_recycled++
|
||||
else
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
if(AM)
|
||||
AM.loc = loc
|
||||
AM.forceMove(loc)
|
||||
|
||||
if(items_recycled && sound)
|
||||
playsound(loc, item_recycle_sound, 100, 0)
|
||||
|
||||
Reference in New Issue
Block a user