Skip to content

Commit

Permalink
Fixes a bug with pronoun swapping inside of names (tgstation#60266)
Browse files Browse the repository at this point in the history
fixes tgstation#60253

the above issue showcased a really weird issue with "manual_emote()" which took an emote and then changed the pronoun mid-use, which on its own is ok, but some mobs include names with their emote, hence changing "pronouns" in the middle of peoples names

this method of using manual_emote() is dumb because theres already a proc for changing pronouns in a string, as well as dedicated procs for inserting the correct pronoun for the given mob DIRECTLY in the emote string itself

so what I did was remove the part of the code in manual_emote() that swapped pronouns, it wasnt needed, and instead went to every single emote string that used it and used the [p_they()] procs to get the correct pronouns.

while i was at it, i also touched up descriptions and other miscallaneous emotes and mob communication to get rid of "It's". mobs are by default plural, they arent objects, instead replaced with "they're" etc... a mobs and mob subtypes gender WAS respected

also gave the male gender to two very specific clown mobs which are clearly coded male. gave the void_corgi a neuter gender, since its description makes it a reference to the "void stares back" phrase, which makes it genderless as the void is not a noun.

EDIT: oh, and i did fix an issue with the replace_pronouns() proc, which uses "msg" as its var, but one if statement was "message".
  • Loading branch information
AlinaStarkova authored Jul 19, 2021
1 parent d0f53e1 commit 7946b13
Show file tree
Hide file tree
Showing 16 changed files with 67 additions and 71 deletions.
18 changes: 9 additions & 9 deletions code/datums/dog_fashion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@
emote_see = list("coughs up a furball", "stretches")
emote_hear = list("purrs")
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
desc = "They're a cute little kitty-cat! ... wait ... what the hell?"

/datum/dog_fashion/head/rabbit
name = "Hoppy"
emote_see = list("twitches its nose", "hops around a bit")
desc = "This is Hoppy. It's a corgi-...urmm... bunny rabbit."
emote_see = list("twitches their nose", "hops around a bit")
desc = "This is Hoppy. They're a corgi-...urmm... bunny rabbit."

/datum/dog_fashion/head/beret
name = "Yann"
desc = "Mon dieu! C'est un chien!"
speak = list("le woof!", "le bark!", "JAPPE!!")
emote_see = list("cowers in fear.", "surrenders.", "plays dead.","looks as though there is a wall in front of him.")
emote_see = list("cowers in fear.", "surrenders.", "plays dead.","looks as though there is a wall in front of them.")


/datum/dog_fashion/head/detective
Expand All @@ -90,7 +90,7 @@
/datum/dog_fashion/head/pirate
name = "Pirate-title Pirate-name"
desc = "Yaarghh!! Thar' be a scurvy dog!"
emote_see = list("hunts for treasure.","stares coldly...","gnashes his tiny corgi teeth!")
emote_see = list("hunts for treasure.","stares coldly...","gnashes their tiny corgi teeth!")
emote_hear = list("growls ferociously!", "snarls.")
speak = list("Arrrrgh!!","Grrrrrr!")

Expand Down Expand Up @@ -137,8 +137,8 @@
/datum/dog_fashion/head/santa
name = "Santa's Corgi Helper"
emote_hear = list("barks Christmas songs.", "yaps merrily!")
emote_see = list("looks for presents.", "checks his list.")
desc = "He's very fond of milk and cookies."
emote_see = list("looks for presents.", "checks their list.")
desc = "They're very fond of milk and cookies."

/datum/dog_fashion/head/cargo_tech
name = "Corgi Tech REAL_NAME"
Expand All @@ -147,7 +147,7 @@
/datum/dog_fashion/head/reindeer
name = "REAL_NAME the red-nosed Corgi"
emote_hear = list("lights the way!", "illuminates.", "yaps!")
desc = "He has a very shiny nose."
desc = "They have a very shiny nose."

/datum/dog_fashion/head/sombrero
name = "Segnor REAL_NAME"
Expand All @@ -159,7 +159,7 @@

/datum/dog_fashion/head/hop
name = "Lieutenant REAL_NAME"
desc = "Can actually be trusted to not run off on his own."
desc = "Can actually be trusted to not run off on their own."

/datum/dog_fashion/head/deathsquad
name = "Trooper REAL_NAME"
Expand Down
9 changes: 1 addition & 8 deletions code/datums/emotes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
if(findtext(msg, "them"))
msg = replacetext(msg, "them", user.p_them())
if(findtext(msg, "they"))
msg = replacetext(message, "they", user.p_they())
msg = replacetext(msg, "they", user.p_they())
if(findtext(msg, "%s"))
msg = replacetext(msg, "%s", user.p_s())
return msg
Expand Down Expand Up @@ -270,13 +270,6 @@
*/
/mob/proc/manual_emote(text) //Just override the song and dance
. = TRUE
if(findtext(text, "their"))
text = replacetext(text, "their", p_their())
if(findtext(text, "them"))
text = replacetext(text, "them", p_them())
if(findtext(text, "%s"))
text = replacetext(text, "%s", p_s())

if(stat != CONSCIOUS)
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@
if(1)
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
if(2)
H.manual_emote(pick("oofs silently.", "looks like their bones hurt.", "grimaces, as though their bones hurt."))
H.manual_emote(pick("oofs silently.", "looks like [H.p_their()] bones hurt.", "grimaces, as though [H.p_their()] bones hurt."))
if(3)
to_chat(H, span_warning("Your bones hurt!"))
if(chem.overdosed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
if(1)
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
if(2)
H.manual_emote(pick("oofs silently.", "looks like their bones hurt.", "grimaces, as though their bones hurt."))
H.manual_emote(pick("oofs silently.", "looks like [H.p_their()] bones hurt.", "grimaces, as though [H.p_their()] bones hurt."))
if(3)
to_chat(H, span_warning("Your bones hurt!"))
if(chem.overdosed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if(1)
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
if(2)
H.manual_emote(pick("oofs silently.", "looks like their bones hurt.", "grimaces, as though their bones hurt."))
H.manual_emote(pick("oofs silently.", "looks like [H.p_their()] bones hurt.", "grimaces, as though [H.p_their()] bones hurt."))
if(3)
to_chat(H, span_warning("Your bones hurt!"))
if(chem.overdosed)
Expand Down
18 changes: 9 additions & 9 deletions code/modules/mob/living/simple_animal/friendly/cat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
speak = list("Meow!", "Esp!", "Purr!", "HSSSSS")
speak_emote = list("purrs", "meows")
emote_hear = list("meows.", "mews.")
emote_see = list("shakes its head.", "shivers.")
emote_see = list("shakes their head.", "shivers.")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
Expand Down Expand Up @@ -55,7 +55,7 @@

/mob/living/simple_animal/pet/cat/space
name = "space cat"
desc = "It's a cat... in space!"
desc = "They're a cat... in space!"
icon_state = "spacecat"
icon_living = "spacecat"
icon_dead = "spacecat_dead"
Expand All @@ -66,7 +66,7 @@

/mob/living/simple_animal/pet/cat/breadcat
name = "bread cat"
desc = "It's a cat... with a bread!"
desc = "They're a cat... with a bread!"
icon_state = "breadcat"
icon_living = "breadcat"
icon_dead = "breadcat_dead"
Expand Down Expand Up @@ -204,10 +204,10 @@
/mob/living/simple_animal/pet/cat/Life(delta_time = SSMOBS_DT, times_fired)
if(!stat && !buckled && !client)
if(DT_PROB(0.5, delta_time))
manual_emote(pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
manual_emote(pick("stretches out for a belly rub.", "wags [p_their()] tail.", "lies down."))
set_resting(TRUE)
else if(DT_PROB(0.5, delta_time))
manual_emote(pick("sits down.", "crouches on its hind legs.", "looks alert."))
manual_emote(pick("sits down.", "crouches on [p_their()] hind legs.", "looks alert."))
set_resting(TRUE)
icon_state = "[icon_living]_sit"
collar_type = "[initial(collar_type)]_sit"
Expand All @@ -216,7 +216,7 @@
manual_emote(pick("gets up and meows.", "walks around.", "stops resting."))
set_resting(FALSE)
else
manual_emote(pick("grooms its fur.", "twitches its whiskers.", "shakes out its coat."))
manual_emote(pick("grooms [p_their()] fur.", "twitches [p_their()] whiskers.", "shakes out [p_their()] coat."))

//MICE!
if((src.loc) && isturf(src.loc))
Expand All @@ -236,7 +236,7 @@
break
for(var/obj/item/toy/cattoy/T in view(1,src))
if (T.cooldown < (world.time - 400))
manual_emote("bats \the [T] around with its paw!")
manual_emote("bats \the [T] around with \his paw!")
T.cooldown = world.time

..()
Expand Down Expand Up @@ -270,7 +270,7 @@

/mob/living/simple_animal/pet/cat/cak //I told you I'd do it, Remie
name = "Keeki"
desc = "It's a cat made out of cake."
desc = "She is a cat made out of cake."
icon_state = "cak"
icon_living = "cak"
icon_dead = "cak_dead"
Expand All @@ -283,7 +283,7 @@
response_harm_continuous = "takes a bite out of"
response_harm_simple = "take a bite out of"
attacked_sound = 'sound/items/eatfood.ogg'
deathmessage = "loses its false life and collapses!"
deathmessage = "loses her false life and collapses!"
deathsound = "bodyfall"
held_state = "cak"

Expand Down
23 changes: 12 additions & 11 deletions code/modules/mob/living/simple_animal/friendly/dog.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks!", "woofs!", "yaps.","pants.")
emote_see = list("shakes its head.", "chases its tail.","shivers.")
emote_see = list("shakes their head.", "chases their tail.","shivers.")
faction = list("neutral")
see_in_dark = 5
speak_chance = 1
Expand All @@ -37,7 +37,7 @@
/mob/living/simple_animal/pet/dog/corgi
name = "\improper corgi"
real_name = "corgi"
desc = "It's a corgi."
desc = "They're a corgi."
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
Expand Down Expand Up @@ -84,7 +84,7 @@
/mob/living/simple_animal/pet/dog/pug
name = "\improper pug"
real_name = "pug"
desc = "It's a pug."
desc = "They're a pug."
icon = 'icons/mob/pets.dmi'
icon_state = "pug"
icon_living = "pug"
Expand All @@ -104,7 +104,7 @@
/mob/living/simple_animal/pet/dog/bullterrier
name = "\improper bull terrier"
real_name = "bull terrier"
desc = "It's a bull terrier."
desc = "They're a bull terrier."
icon = 'icons/mob/pets.dmi'
icon_state = "bullterrier"
icon_living = "bullterrier"
Expand All @@ -116,7 +116,7 @@

/mob/living/simple_animal/pet/dog/corgi/exoticcorgi
name = "Exotic Corgi"
desc = "As cute as it is colorful!"
desc = "As cute as they are colorful!"
icon = 'icons/mob/pets.dmi'
icon_state = "corgigrey"
icon_living = "corgigrey"
Expand Down Expand Up @@ -324,10 +324,10 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
/mob/living/simple_animal/pet/dog/corgi/attackby(obj/item/O, mob/user, params)
if (istype(O, /obj/item/razor))
if (shaved)
to_chat(user, span_warning("You can't shave this corgi, it's already been shaved!"))
to_chat(user, span_warning("You can't shave this corgi, [p_they()] has already been shaved!"))
return
if (nofur)
to_chat(user, span_warning("You can't shave this corgi, it doesn't have a fur coat!"))
to_chat(user, span_warning("You can't shave this corgi, [p_they()] [p_do()]n't have a fur coat!"))
return
user.visible_message(span_notice("[user] starts to shave [src] using \the [O]."), span_notice("You start to shave [src] using \the [O]..."))
if(do_after(user, 50, target = src))
Expand Down Expand Up @@ -399,7 +399,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks!", "woofs!", "yaps.","pants.")
emote_see = list("shakes its head.", "chases its tail.","shivers.")
emote_see = list("shakes [p_their()] head.", "chases [p_their()] tail.","shivers.")
desc = initial(desc)
set_light(0)

Expand All @@ -416,7 +416,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
name = "Ian"
real_name = "Ian" //Intended to hold the name without altering it.
gender = MALE
desc = "It's the HoP's beloved corgi."
desc = "He's the HoP's beloved corgi."
response_help_continuous = "pets"
response_help_simple = "pet"
response_disarm_continuous = "bops"
Expand Down Expand Up @@ -589,7 +589,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
/mob/living/simple_animal/pet/dog/corgi/puppy
name = "\improper corgi puppy"
real_name = "corgi"
desc = "It's a corgi puppy!"
desc = "They're a corgi puppy!"
icon_state = "puppy"
icon_living = "puppy"
icon_dead = "puppy_dead"
Expand All @@ -610,13 +610,14 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
name = "Ian"
real_name = "Ian"
gender = MALE
desc = "It's the HoP's beloved corgi puppy."
desc = "He's the HoP's beloved corgi puppy."


/mob/living/simple_animal/pet/dog/corgi/puppy/void //Tribute to the corgis born in nullspace
name = "\improper void puppy"
real_name = "voidy"
desc = "A corgi puppy that has been infused with deep space energy. It's staring back..."
gender = NEUTER
icon_state = "void_puppy"
icon_living = "void_puppy"
icon_dead = "void_puppy_dead"
Expand Down
12 changes: 6 additions & 6 deletions code/modules/mob/living/simple_animal/friendly/farm_animals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
speak = list("EHEHEHEHEH","eh?")
speak_emote = list("brays")
emote_hear = list("brays.")
emote_see = list("shakes its head.", "stamps a foot.", "glares around.")
emote_see = list("shakes their head.", "stamps a foot.", "glares around.")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
Expand Down Expand Up @@ -110,7 +110,7 @@
speak = list("moo?","moo","MOOOOOO")
speak_emote = list("moos","moos hauntingly")
emote_hear = list("brays.")
emote_see = list("shakes its head.")
emote_see = list("shakes her head.")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
Expand Down Expand Up @@ -230,7 +230,7 @@
speak = list("Cherp.","Cherp?","Chirrup.","Cheep!")
speak_emote = list("cheeps")
emote_hear = list("cheeps.")
emote_see = list("pecks at the ground.","flaps its tiny wings.")
emote_see = list("pecks at the ground.","flaps her tiny wings.")
density = FALSE
speak_chance = 2
turns_per_move = 2
Expand Down Expand Up @@ -289,7 +289,7 @@
speak = list("Cluck!","BWAAAAARK BWAK BWAK BWAK!","Bwaak bwak.")
speak_emote = list("clucks","croons")
emote_hear = list("clucks.")
emote_see = list("pecks at the ground.","flaps its wings viciously.")
emote_see = list("pecks at the ground.","flaps her wings viciously.")
density = FALSE
speak_chance = 2
turns_per_move = 3
Expand Down Expand Up @@ -321,7 +321,7 @@
AddComponent(/datum/component/egg_layer,\
/obj/item/food/egg,\
list(/obj/item/food/grown/wheat),\
feed_messages = list("[p_they()] clucks happily."),\
feed_messages = list("She clucks happily."),\
lay_messages = EGG_LAYING_MESSAGES,\
eggs_left = 0,\
eggs_added_from_eating = rand(1, 4),\
Expand Down Expand Up @@ -365,7 +365,7 @@
speak = list("Weeeeeeee?","Weeee","WEOOOOOOOOOO")
speak_emote = list("grunts","grunts lowly")
emote_hear = list("brays.")
emote_see = list("shakes its head.")
emote_see = list("shakes her head.")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/simple_animal/friendly/fox.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//Foxxy
/mob/living/simple_animal/pet/fox
name = "fox"
desc = "It's a fox."
desc = "They're a fox."
icon = 'icons/mob/pets.dmi'
icon_state = "fox"
icon_living = "fox"
icon_dead = "fox_dead"
speak = list("Ack-Ack","Ack-Ack-Ack-Ackawoooo","Geckers","Awoo","Tchoff")
speak_emote = list("geckers", "barks")
emote_hear = list("howls.","barks.")
emote_see = list("shakes its head.", "shivers.")
emote_see = list("shakes their head.", "shivers.")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
Expand Down
Loading

0 comments on commit 7946b13

Please sign in to comment.