diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 191b303f715..99644be8137 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -26,9 +26,28 @@ // Taking brute or burn to bodyparts gives a damage flash if(def_zone && (damagetype == BRUTE || damagetype == BURN)) damageoverlaytemp += . - + var/obj/effect/overlay/hitmarker/hitmarker = new() + hitmarker.animate_damage(damage, src) return . +/obj/effect/overlay/hitmarker + icon = 'icons/effects/96x160.dmi' + plane = POINT_PLANE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + alpha = 255 + var/mob/living/carbon/my_carbon_mob + proc/animate_damage(damage, my_mob) + + my_carbon_mob = my_mob + pixel_z = rand(-32,32) + pixel_w = rand(-32,64) + appearance_flags |= (KEEP_TOGETHER|RESET_COLOR|RESET_TRANSFORM) + my_carbon_mob.vis_contents |= src + maptext = MAPTEXT_SPESSFONT("[ROUND_UP(damage)]!") + animate(src, pixel_z = rand(-32,32), pixel_w = rand(-32,64), time = 1 SECONDS, easing = BOUNCE_EASING, alpha = 32) + QDEL_IN(src, 1.5 SECONDS) + + /mob/living/carbon/human/get_damage_mod(damage_type) if (!dna?.species?.damage_modifier) return ..() diff --git a/code/modules/power/apc/apc_main.dm b/code/modules/power/apc/apc_main.dm index b5245272dc6..a3899428f46 100644 --- a/code/modules/power/apc/apc_main.dm +++ b/code/modules/power/apc/apc_main.dm @@ -15,7 +15,7 @@ #define APC_CHANNEL_ALARM_TRESHOLD 75 /obj/machinery/power/apc/proc/clap_handle() - lighting = APC_CHANNEL_IS_ON(lighting) ? 0 : 2 + lighting = APC_CHANNEL_IS_ON(lighting) ? 0 : 2 // owo update() /obj/machinery/power/apc