Skip to content

Commit

Permalink
Formatting (tgstation#771)
Browse files Browse the repository at this point in the history
* Removes some unnecessary species mentions from kapuparts (tgstation#66112)



tgstation#65523 made some changes to bodypart names that messed with the grammar of a few messages around the codebase by inserting the species of a bodypart where it's really not needed. For example:

For most general combat/health cases, we don't need to worry about the species of a bodypart. So, this changes combat and wound messages back to simply displaying the relevant bodypart zone being attacked/affected. See below:

dreamseeker_2022-04-10_02-05-55.png

Let me know if I missed any!
Why It's Good For The Game

Better grammar
Changelog

cl Ryll/Shaps
spellcheck: Wound and combat messages will no longer mention the species of an attacked bodypart when not appropriate
/cl

* Continues removing unnecessary species names of bodyparts in visible messages (tgstation#67254)

* removes some more unnecessary species mentions from bodypart messages

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
  • Loading branch information
Kapu1178 and Ryll-Ryll authored Jun 20, 2022
1 parent 351433a commit ba0c5ed
Show file tree
Hide file tree
Showing 19 changed files with 151 additions and 134 deletions.
43 changes: 24 additions & 19 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -810,26 +810,31 @@ GLOBAL_LIST_EMPTY(species_list)
if(mob.ckey == key)
return mob

///Return a string for the specified body zone
///Return a string for the specified body zone. Should be used for parsing non-instantiated bodyparts, otherwise use [/obj/item/bodypart/var/plaintext_zone]
/proc/parse_zone(zone)
if(zone == BODY_ZONE_PRECISE_R_HAND)
return "right hand"
else if (zone == BODY_ZONE_PRECISE_L_HAND)
return "left hand"
else if (zone == BODY_ZONE_L_ARM)
return "left arm"
else if (zone == BODY_ZONE_R_ARM)
return "right arm"
else if (zone == BODY_ZONE_L_LEG)
return "left leg"
else if (zone == BODY_ZONE_R_LEG)
return "right leg"
else if (zone == BODY_ZONE_PRECISE_L_FOOT)
return "left foot"
else if (zone == BODY_ZONE_PRECISE_R_FOOT)
return "right foot"
else
return zone
switch(zone)
if(BODY_ZONE_CHEST)
return "chest"
if(BODY_ZONE_HEAD)
return "head"
if(BODY_ZONE_PRECISE_R_HAND)
return "right hand"
if(BODY_ZONE_PRECISE_L_HAND)
return "left hand"
if(BODY_ZONE_L_ARM)
return "left arm"
if(BODY_ZONE_R_ARM)
return "right arm"
if(BODY_ZONE_L_LEG)
return "left leg"
if(BODY_ZONE_R_LEG)
return "right leg"
if(BODY_ZONE_PRECISE_L_FOOT)
return "left foot"
if(BODY_ZONE_PRECISE_R_FOOT)
return "right foot"
else
return zone

///Returns the direction that the initiator and the target are facing
/proc/check_target_facings(mob/living/initiator, mob/living/target)
Expand Down
32 changes: 16 additions & 16 deletions code/datums/components/embedded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
limb._embed_object(weapon) // on the inside... on the inside...
weapon.forceMove(victim)
RegisterSignal(weapon, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), .proc/weaponDeleted)
victim.visible_message(span_danger("[weapon] [harmful ? "embeds" : "sticks"] itself [harmful ? "in" : "to"] [victim]'s [limb.name]!"), span_userdanger("[weapon] [harmful ? "embeds" : "sticks"] itself [harmful ? "in" : "to"] your [limb.name]!"))
victim.visible_message(span_danger("[weapon] [harmful ? "embeds" : "sticks"] itself [harmful ? "in" : "to"] [victim]'s [limb.plaintext_zone]!"), span_userdanger("[weapon] [harmful ? "embeds" : "sticks"] itself [harmful ? "in" : "to"] your [limb.plaintext_zone]!"))

var/damage = weapon.throwforce
if(harmful)
Expand All @@ -98,7 +98,7 @@
SEND_SIGNAL(victim, COMSIG_ADD_MOOD_EVENT, "embedded", /datum/mood_event/embedded)

if(damage > 0)
var/armor = victim.run_armor_check(limb.body_zone, MELEE, "Your armor has protected your [limb.name].", "Your armor has softened a hit to your [limb.name].",I.armour_penetration, weak_against_armour = I.weak_against_armour)
var/armor = victim.run_armor_check(limb.body_zone, MELEE, "Your armor has protected your [limb.plaintext_zone].", "Your armor has softened a hit to your [limb.plaintext_zone].",I.armour_penetration, weak_against_armour = I.weak_against_armour)
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, blocked=armor, wound_bonus = I.wound_bonus, bare_wound_bonus = I.bare_wound_bonus, sharpness = I.get_sharpness())

/datum/component/embedded/Destroy()
Expand Down Expand Up @@ -142,7 +142,7 @@

if(harmful && prob(pain_chance_current))
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
to_chat(victim, span_userdanger("[weapon] embedded in your [limb.name] hurts!"))
to_chat(victim, span_userdanger("[weapon] embedded in your [limb.plaintext_zone]] hurts!"))

var/fall_chance_current = DT_PROB_RATE(fall_chance / 100, delta_time) * 100
if(victim.body_position == LYING_DOWN)
Expand All @@ -168,7 +168,7 @@
if(harmful && prob(chance))
var/damage = weapon.w_class * jostle_pain_mult
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
to_chat(victim, span_userdanger("[weapon] embedded in your [limb.name] jostles and stings!"))
to_chat(victim, span_userdanger("[weapon] embedded in your [limb.plaintext_zone] jostles and stings!"))


/// Called when then item randomly falls out of a carbon. This handles the damage and descriptors, then calls safe_remove()
Expand All @@ -179,7 +179,7 @@
var/damage = weapon.w_class * remove_pain_mult
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)

victim.visible_message(span_danger("[weapon] falls [harmful ? "out" : "off"] of [victim.name]'s [limb.name]!"), span_userdanger("[weapon] falls [harmful ? "out" : "off"] of your [limb.name]!"))
victim.visible_message(span_danger("[weapon] falls [harmful ? "out" : "off"] of [victim.name]'s [limb.plaintext_zone]!"), span_userdanger("[weapon] falls [harmful ? "out" : "off"] of your [limb.plaintext_zone]!"))
safeRemove()


Expand All @@ -195,7 +195,7 @@

/// everything async that ripOut used to do
/datum/component/embedded/proc/complete_rip_out(mob/living/carbon/victim, obj/item/I, obj/item/bodypart/limb, time_taken)
victim.visible_message(span_warning("[victim] attempts to remove [weapon] from [victim.p_their()] [limb.name]."),span_notice("You attempt to remove [weapon] from your [limb.name]... (It will take [DisplayTimeText(time_taken)].)"))
victim.visible_message(span_warning("[victim] attempts to remove [weapon] from [victim.p_their()] [limb.plaintext_zone]."),span_notice("You attempt to remove [weapon] from your [limb.plaintext_zone]... (It will take [DisplayTimeText(time_taken)].)"))
if(!do_after(victim, time_taken, target = victim))
return
if(!weapon || !limb || weapon.loc != victim || !(weapon in limb.embedded_objects))
Expand All @@ -206,7 +206,7 @@
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, sharpness=SHARP_EDGED) //It hurts to rip it out, get surgery you dingus. unlike the others, this CAN wound + increase slash bloodflow
victim.emote("scream")

victim.visible_message(span_notice("[victim] successfully rips [weapon] [harmful ? "out" : "off"] of [victim.p_their()] [limb.name]!"), span_notice("You successfully remove [weapon] from your [limb.name]."))
victim.visible_message(span_notice("[victim] successfully rips [weapon] [harmful ? "out" : "off"] of [victim.p_their()] [limb.plaintext_zone]!"), span_notice("You successfully remove [weapon] from your [limb.plaintext_zone]."))
safeRemove(victim)

/// This proc handles the final step and actual removal of an embedded/stuck item from a carbon, whether or not it was actually removed safely.
Expand Down Expand Up @@ -235,7 +235,7 @@
limb._unembed_object(weapon)

if(victim)
to_chat(victim, span_userdanger("\The [weapon] that was embedded in your [limb.name] disappears!"))
to_chat(victim, span_userdanger("\The [weapon] that was embedded in your [limb.plaintext_zone] disappears!"))

qdel(src)

Expand Down Expand Up @@ -264,22 +264,22 @@
var/self_pluck = (user == victim)

if(self_pluck)
user.visible_message(span_danger("[user] begins plucking [weapon] from [user.p_their()] [limb.name]"), span_notice("You start plucking [weapon] from your [limb.name]..."),\
user.visible_message(span_danger("[user] begins plucking [weapon] from [user.p_their()] [limb.plaintext_zone]"), span_notice("You start plucking [weapon] from your [limb.plaintext_zone]..."),\
vision_distance=COMBAT_MESSAGE_RANGE, ignored_mobs=victim)
else
user.visible_message(span_danger("[user] begins plucking [weapon] from [victim]'s [limb.name]"),span_notice("You start plucking [weapon] from [victim]'s [limb.name]..."), \
user.visible_message(span_danger("[user] begins plucking [weapon] from [victim]'s [limb.plaintext_zone]"),span_notice("You start plucking [weapon] from [victim]'s [limb.plaintext_zone]..."), \
vision_distance=COMBAT_MESSAGE_RANGE, ignored_mobs=victim)
to_chat(victim, span_userdanger("[user] begins plucking [weapon] from your [limb.name]..."))
to_chat(victim, span_userdanger("[user] begins plucking [weapon] from your [limb.plaintext_zone]..."))

var/pluck_time = 2.5 SECONDS * weapon.w_class * (self_pluck ? 2 : 1)
if(!do_after(user, pluck_time, victim))
if(self_pluck)
to_chat(user, span_danger("You fail to pluck [weapon] from your [limb.name]."))
to_chat(user, span_danger("You fail to pluck [weapon] from your [limb.plaintext_zone]."))
else
to_chat(user, span_danger("You fail to pluck [weapon] from [victim]'s [limb.name]."))
to_chat(victim, span_danger("[user] fails to pluck [weapon] from your [limb.name]."))
to_chat(user, span_danger("You fail to pluck [weapon] from [victim]'s [limb.plaintext_zone]."))
to_chat(victim, span_danger("[user] fails to pluck [weapon] from your [limb.plaintext_zone]."))
return

to_chat(user, span_notice("You successfully pluck [weapon] from [victim]'s [limb.name]."))
to_chat(victim, span_notice("[user] plucks [weapon] from your [limb.name]."))
to_chat(user, span_notice("You successfully pluck [weapon] from [victim]'s [limb.plaintext_zone]."))
to_chat(victim, span_notice("[user] plucks [weapon] from your [limb.plaintext_zone]."))
safeRemove(user)
12 changes: 8 additions & 4 deletions code/datums/components/pellet_cloud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,16 @@
wound_info_by_part -= hit_part
hit_part.painless_wound_roll(wound_type, damage_dealt, w_bonus, bw_bonus, initial(P.sharpness))

var/limb_hit_text = ""
if(hit_part)
limb_hit_text = " in the [hit_part.plaintext_zone]"

if(num_hits > 1)
target.visible_message(span_danger("[target] is hit by [num_hits] [proj_name][plural_s(proj_name)][hit_part ? " in the [hit_part.name]" : ""][damage ? "" : ", without leaving a mark"]!"), null, null, COMBAT_MESSAGE_RANGE, target)
to_chat(target, span_userdanger("You're hit by [num_hits] [proj_name]s[hit_part ? " in the [hit_part.name]" : ""]!"))
target.visible_message(span_danger("[target] is hit by [num_hits] [proj_name][plural_s(proj_name)][limb_hit_text][damage ? "" : ", without leaving a mark"]!"), null, null, COMBAT_MESSAGE_RANGE, target)
to_chat(target, span_userdanger("You're hit by [num_hits] [proj_name]s[limb_hit_text]!"))
else
target.visible_message(span_danger("[target] is hit by a [proj_name][hit_part ? " in the [hit_part.name]" : ""][damage ? "" : ", without leaving a mark"]!"), null, null, COMBAT_MESSAGE_RANGE, target)
to_chat(target, span_userdanger("You're hit by a [proj_name][hit_part ? " in the [hit_part.name]" : ""]!"))
target.visible_message(span_danger("[target] is hit by a [proj_name][limb_hit_text][damage ? "" : ", without leaving a mark"]!"), null, null, COMBAT_MESSAGE_RANGE, target)
to_chat(target, span_userdanger("You're hit by a [proj_name][limb_hit_text]!"))

for(var/M in purple_hearts)
var/mob/living/martyr = M
Expand Down
6 changes: 3 additions & 3 deletions code/datums/wounds/_wounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@
return

if(!silent && !demoted)
var/msg = span_danger("[victim]'s [limb.name] [occur_text]!")
var/msg = span_danger("[victim]'s [limb.plaintext_zone] [occur_text]!")
var/vis_dist = COMBAT_MESSAGE_RANGE

if(severity != WOUND_SEVERITY_MODERATE)
msg = "<b>[msg]</b>"
vis_dist = DEFAULT_MESSAGE_RANGE

victim.visible_message(msg, span_userdanger("Your [limb.name] [occur_text]!"), vision_distance = vis_dist)
victim.visible_message(msg, span_userdanger("Your [limb.plaintext_zone] [occur_text]!"), vision_distance = vis_dist)
if(sound_effect)
playsound(L.owner, sound_effect, 70 + 20 * severity, TRUE)

Expand Down Expand Up @@ -405,7 +405,7 @@
* * mob/user: The user examining the wound's owner, if that matters
*/
/datum/wound/proc/get_examine_description(mob/user)
. = "[victim.p_their(TRUE)] [limb.name] [examine_desc]"
. = "[victim.p_their(TRUE)] [limb.plaintext_zone] [examine_desc]"
. = severity <= WOUND_SEVERITY_MODERATE ? "[.]." : "<B>[.]!</B>"

/datum/wound/proc/get_scanner_description(mob/user)
Expand Down
Loading

0 comments on commit ba0c5ed

Please sign in to comment.