Adds unique projectile hit messages to simplemobs (#8250)

* Adds unique hit messages to simplemobs

* decl'd hit lists

* how was that even working

* set decl ref on init
This commit is contained in:
Cerebulon
2021-10-10 19:20:18 -08:00
committed by GitHub
parent 11ed1a07ce
commit cebc5fa3a1
54 changed files with 295 additions and 34 deletions
+9 -3
View File
@@ -667,17 +667,23 @@
playsound(target_mob, "bullet_miss", 75, 1)
return FALSE
var/impacted_organ = parse_zone(def_zone)
if(istype(target_mob, /mob/living/simple_mob))
var/mob/living/simple_mob/SM = target_mob
var/decl/mob_organ_names/organ_plan = SM.organ_names
impacted_organ = pick(organ_plan.hit_zones)
//hit messages
if(silenced)
playsound(target_mob, hitsound, 5, 1, -1)
to_chat(target_mob, span("critical", "You've been hit in the [parse_zone(def_zone)] by \the [src]!"))
to_chat(target_mob, span("critical", "You've been hit in the [impacted_organ] by \the [src]!"))
else
var/volume = vol_by_damage()
playsound(target_mob, hitsound, volume, 1, -1)
// X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
target_mob.visible_message(
span("danger", "\The [target_mob] was hit in the [parse_zone(def_zone)] by \the [src]!"),
span("critical", "You've been hit in the [parse_zone(def_zone)] by \the [src]!")
span("danger", "\The [target_mob] was hit in the [impacted_organ] by \the [src]!"),
span("critical", "You've been hit in the [impacted_organ] by \the [src]!")
)
//admin logs