diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index c5e00a71642..f0da816ef2b 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -19,11 +19,19 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( /turf/open/chasm, /turf/open/lava, /turf/open/water, - /turf/open/openspace + /turf/open/openspace, + /turf/open/space/openspace ))) #define isgroundlessturf(A) (is_type_in_typecache(A, GLOB.turfs_without_ground)) +GLOBAL_LIST_INIT(turfs_openspace, typecacheof(list( + /turf/open/openspace, + /turf/open/space/openspace + ))) + +#define isopenspaceturf(A) (is_type_in_typecache(A, GLOB.turfs_openspace)) + #define isopenturf(A) (istype(A, /turf/open)) #define isindestructiblefloor(A) (istype(A, /turf/open/indestructible)) @@ -78,8 +86,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define ismonkey(A) (is_species(A, /datum/species/monkey)) #define isandroid(A) (is_species(A, /datum/species/android)) -//more carbon mobs - +//More carbon mobs #define isalien(A) (istype(A, /mob/living/carbon/alien)) #define islarva(A) (istype(A, /mob/living/carbon/alien/larva)) @@ -148,7 +155,6 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) - //Misc mobs #define isobserver(A) (istype(A, /mob/dead/observer)) @@ -242,7 +248,6 @@ GLOBAL_LIST_INIT(book_types, typecacheof(list( /obj/item/spellbook, /obj/item/storage/book))) - // Jobs #define is_job(job_type) (istype(job_type, /datum/job)) #define is_assistant_job(job_type) (istype(job_type, /datum/job/assistant)) diff --git a/code/datums/elements/movement_turf_changer.dm b/code/datums/elements/movement_turf_changer.dm index 25dff387b52..744c1f68132 100644 --- a/code/datums/elements/movement_turf_changer.dm +++ b/code/datums/elements/movement_turf_changer.dm @@ -26,7 +26,7 @@ SIGNAL_HANDLER var/turf/destination = target.loc - if(!isturf(destination) || istype(destination, turf_type)) + if(!isturf(destination) || istype(destination, turf_type) || isopenspaceturf(destination)) return destination.PlaceOnTop(turf_type)