diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index ab91e9bfc2..315450d000 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -485,25 +485,40 @@ rip_u.dismember(BURN) //nice try jedi /obj/machinery/power/supermatter_shard/attack_paw(mob/user) - return attack_hand(user) + dust_mob(user, cause = "monkey attack") + +/obj/machinery/power/supermatter_shard/attack_animal(mob/living/simple_animal/S) + var/murder + if(!S.melee_damage_upper && !S.melee_damage_lower) + murder = S.friendly + else + murder = S.attacktext + dust_mob(S, \ + "[S] unwisely [murder] [src], and [S.p_their()] body burns brilliantly before flashing into ash!", \ + "You unwisely touch [src], and your vision glows brightly as your body crumbles to dust. Oops.", \ + "simple animal attack") /obj/machinery/power/supermatter_shard/attack_robot(mob/user) if(Adjacent(user)) - return attack_hand(user) + dust_mob(user, cause = "cyborg attack") /obj/machinery/power/supermatter_shard/attack_ai(mob/user) return /obj/machinery/power/supermatter_shard/attack_hand(mob/living/user) - if(!istype(user)) - return - user.visible_message("\The [user] reaches out and touches \the [src], inducing a resonance... [user.p_their()] body starts to glow and bursts into flames before flashing into ash.",\ - "You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"",\ - "You hear an unearthly noise as a wave of heat washes over you.") - investigate_log("has been attacked (hand) by [user]", INVESTIGATE_SUPERMATTER) - playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1) + dust_mob(user, cause = "hand") - Consume(user) +/obj/machinery/power/supermatter_shard/proc/dust_mob(mob/living/nom, vis_msg, mob_msg, cause) + if(!vis_msg) + vis_msg = "[nom] reaches out and touches [src], inducing a resonance... [nom.p_their()] body starts to glow and bursts into flames before flashing into ash" + if(!mob_msg) + mob_msg = "You reach out and touch [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"" + if(!cause) + cause = "contact" + nom.visible_message(vis_msg, mob_msg, "You hear an unearthly noise as a wave of heat washes over you.") + investigate_log("has been attacked ([cause]) by [nom]", INVESTIGATE_SUPERMATTER) + playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1) + Consume(nom) /obj/machinery/power/supermatter_shard/proc/transfer_energy() for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)