From 840161bc6771a2683a4658a060e42224191e3f00 Mon Sep 17 00:00:00 2001 From: DGamerL <108773801+DGamerL@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:07:21 +0200 Subject: [PATCH] Makes meteors not take damage from railings (#22909) * One simple istype killing many Farragi * Qwerty Suggestion --- code/__DEFINES/is_helpers.dm | 8 ++++++++ code/game/objects/effects/meteors.dm | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 76c2c01fd13..21ed7400cef 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -121,3 +121,11 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list( // Modsuits #define ismodcontrol(A) istype(A, /obj/item/mod/control) + +// Meteors +GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list( + /turf/simulated/floor/plating/asteroid, + /turf/space +))) + +#define ispassmeteorturf(A) (is_type_in_typecache(A, GLOB.turfs_pass_meteor)) diff --git a/code/game/objects/effects/meteors.dm b/code/game/objects/effects/meteors.dm index 8f1e37496ea..2bfa9f094e8 100644 --- a/code/game/objects/effects/meteors.dm +++ b/code/game/objects/effects/meteors.dm @@ -111,7 +111,7 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops var/turf/T = get_turf(loc) ram_turf(T) - if(prob(10) && !isspaceturf(T))//randomly takes a 'hit' from ramming + if(prob(10) && !ispassmeteorturf(T))//randomly takes a 'hit' from ramming get_hit() /obj/effect/meteor/Destroy() @@ -133,7 +133,8 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops if(A) ram_turf(get_turf(A)) playsound(loc, meteorsound, 40, TRUE) - get_hit() + if(!istype(A, /obj/structure/railing)) + get_hit() /obj/effect/meteor/proc/ram_turf(turf/T) //first bust whatever is in the turf