From 11f0f3b38877109b7f2ab3d3c242f1779c94b161 Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Sun, 12 May 2024 23:24:07 -0500 Subject: [PATCH] makes flash range on explosives actually do something (#25378) * owie owchie my eyes * todo obliterated * Update code/game/objects/explosion.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/game/objects/explosion.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index f549f5f8cd3..3720150cd1d 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -1,5 +1,3 @@ -//TODO: Flash range does nothing currently - #define CREAK_DELAY 5 SECONDS //Time taken for the creak to play after explosion, if applicable. #define DEVASTATION_PROB 30 //The probability modifier for devistation, maths! #define HEAVY_IMPACT_PROB 5 //ditto @@ -74,6 +72,10 @@ var/turf/M_turf = get_turf(M) if(M_turf && M_turf.z == z0) var/dist = get_dist(M_turf, epicenter) + if(isliving(M) && dist <= flash_range) + var/mob/living/to_flash = M + var/is_very_close_to_the_explosion = flash_range > (dist * 2) + to_flash.flash_eyes(is_very_close_to_the_explosion * 2, is_very_close_to_the_explosion, is_very_close_to_the_explosion) // Gets past sunglasses var/baseshakeamount if(orig_max_distance - dist > 0) baseshakeamount = sqrt((orig_max_distance - dist) * 0.1)