mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user