Made some better text procs for when a gender is ambiguous. Added a proc that will return the proper form of reference to the mob it is called on (mob.get_visible_gender()) which returns a list with the proper forms of reference in it. (In the form of a hashtable.) Also added the proc "get_gender_form("form")" Where it takes the given form and returns the proper one. E.g. on a non disguised man, it will take "it" and return "him".

This commit is contained in:
SkyMarshal
2012-05-31 17:40:24 -07:00
parent 88a60f95a2
commit beb63529f9
10 changed files with 93 additions and 78 deletions

View File

@@ -167,7 +167,6 @@
#define FILE_DIR "code/WorkInProgress/Apples"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/BirdMan"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jumper"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara"

View File

@@ -417,6 +417,8 @@
log_admin("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.")
message_admins("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.")
log_attack("<font color='red'>[G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.</font>")
var/list/proper_forms = H.get_visible_gender()
var/t_his = proper_forms["its"]
if(prob(25))
add_blood(G.affecting)
affecting.take_damage(rand(10,15), 0)
@@ -425,20 +427,20 @@
affecting.take_damage(rand(0,5), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n\black [prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n\black [prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
dented++
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [t_his] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [t_his] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [t_his] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [t_his] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)

View File

@@ -133,6 +133,10 @@ MASS SPECTROMETER
add_fingerprint(user)
var/list/proper_forms = user.get_visible_gender()
var/t_his = proper_forms["its"]
//Special case for blood splaters.
if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune))
if(!isnull(A.blood_DNA))
@@ -142,7 +146,7 @@ MASS SPECTROMETER
//General
if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA)
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "his": "her"] humming[prob(70) ? " gently." : "."]" ,\
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [t_his] humming[prob(70) ? " gently." : "."]" ,\
"\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\
"You hear a faint hum of electrical equipment.")
return 0
@@ -170,12 +174,12 @@ MASS SPECTROMETER
for(var/blood in A.blood_DNA)
user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]"
if(prob(5))
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "his": "her"] humming[prob(70) ? " gently." : "."]" ,\
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [t_his] humming[prob(70) ? " gently." : "."]" ,\
"You finish scanning \the [A].",\
"You hear a faint hum of electrical equipment.")
return 0
else
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "his": "her"] humming[prob(70) ? " gently." : "."]\n[user.gender == MALE ? "He": "She"] seems to perk up slightly at the readout." ,\
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [t_his] humming[prob(70) ? " gently." : "."]\n[proper_forms["It"]] seems to perk up slightly at the readout." ,\
"The results of the scan pique your interest.",\
"You hear a faint hum of electrical equipment, and someone making a thoughtful noise.")
return 0

View File

@@ -26,9 +26,9 @@
return
if (user && imp)
if (M != user)
user.visible_message("\red [user] tries to implant [M] with \the [src]!","\red You try to implant [M] with \the [src]!")
user.visible_message("\red \The [user] tries to implant \the [M] with \the [src]!","\red You try to implant \the [M] with \the [src]!")
else
user.visible_message("\red [user] tries to implant [user.gender == MALE? "himself":"herself"] with \the [src]!","\red You try to implant yourself with \the [src]!")
user.visible_message("\red \The [user] tries to implant [user.get_gender_form("itself")] with \the [src]!","\red You try to implant yourself with \the [src]!")
if(!do_mob(user, M,60))
return
if(hasorgans(M))
@@ -39,9 +39,9 @@
target.implant += imp
imp.loc = target
if (M != user)
user.visible_message("\red [user] implants [M]'s [target.display_name] with \the [src]!","\red You implant [M]'s [target.display_name] with \the [src]!")
user.visible_message("\red \The [user] implants \the [M]'s [target.display_name] with \the [src]!","\red You implant \the [M]'s [target.display_name] with \the [src]!")
else
user.visible_message("\red [user] implants [user.gender == MALE? "his own ":"her own "][target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!")
user.visible_message("\red \The [user] implants [user.get_gender_form("its")] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src] ([imp]) by [user] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src] ([imp]) to implant [M] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")

View File

@@ -8,16 +8,11 @@ MEDICAL
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!"
return
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
user << "\red \The [src] cannot be applied to \the [M]!"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
@@ -26,6 +21,11 @@ MEDICAL
user << "\red You don't have the dexterity to do this!"
return 1
var/list/proper_forms = user.get_visible_gender()
var/user_his = proper_forms["its"]
proper_forms = M.get_visible_gender()
var/target_his = proper_forms["its"]
var/stoppedblood = 0
if(hasorgans(M))
var/datum/organ/external/affecting = M:get_organ("chest")
@@ -37,7 +37,7 @@ MEDICAL
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = M:get_organ("head")
if(affecting.destroyed && !affecting.gauzed)
user.visible_message("\red [user] does [user.gender == MALE? "his" : "her"] best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You do your best to stop the bleeding from [M]'s stump.", "\red You hear something like gauze being ripped.")
user.visible_message("\red \The [user] does [user_his] best to stem \the [M]'s bleeding from [target_his] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.")
affecting.gauzed = 1
use(1)
return
@@ -68,9 +68,9 @@ MEDICAL
if (user && stoppedblood)
if (M != user)
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user_his] own cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else if(user)
user << "\red Nothing to patch up!"
return
@@ -126,16 +126,11 @@ MEDICAL
/obj/item/stack/medical/advanced/attack(mob/living/carbon/M as mob, mob/user as mob)
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!"
return
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
user << "\red \The [src] cannot be applied to \the [M]!"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
@@ -144,6 +139,11 @@ MEDICAL
user << "\red You don't have the dexterity to do this!"
return 1
var/list/proper_forms = user.get_visible_gender()
var/user_his = proper_forms["its"]
proper_forms = M.get_visible_gender()
var/target_his = proper_forms["its"]
var/stoppedblood = 0
if(hasorgans(M))
var/datum/organ/external/affecting = M:get_organ("chest")
@@ -155,7 +155,7 @@ MEDICAL
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = M:get_organ("head")
if(affecting.destroyed && !affecting.gauzed)
M.visible_message("\red You do your best to stop the bleeding from [M]'s stump.", "\red [user] does their best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
M.visible_message("\red \The [user] does their best to stem \the [M]'s bleeding from [target_his] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.")
affecting.gauzed = 1
use(1)
return
@@ -177,9 +177,9 @@ MEDICAL
if (user && stoppedblood)
if (M != user)
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user_his] own cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else if(user)
user << "\red Nothing to patch up!"
return

View File

@@ -20,6 +20,11 @@ TABLE AND RACK OBJECT INTERATIONS
else
return
/obj/structure/table/examine()
set src in oview()
..()
if(dented)
usr << "It looks to have [dented] [prob(30) ? "face shaped " : ""] dents in it."
/obj/structure/table/blob_act()
if(prob(75))
@@ -149,28 +154,30 @@ TABLE AND RACK OBJECT INTERATIONS
var/mob/living/carbon/human/H = G.affecting
var/datum/organ/external/affecting = H.get_organ("head")
var/list/proper_forms = H.get_visible_gender()
var/t_his = proper_forms["its"]
if(prob(25))
add_blood(G.affecting)
affecting.take_damage(rand(10,15), 0)
H.Weaken(2)
if(prob(20)) // One chance in 20 to DENT THE TABLE
affecting.take_damage(rand(0,5), 0) //Extra damage
affecting.take_damage(rand(5,10), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
dented++
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [t_his] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [t_his] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [t_his] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [t_his] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)

View File

@@ -204,10 +204,10 @@
if(src == M && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
src.visible_message( \
text("\blue [src] examines [].",src.gender==MALE?"himself":"herself"), \
"\blue You check yourself for injuries." \
)
var/list/proper_forms = get_visible_gender()
visible_message("\blue [src] examines [proper_forms["its"]]self.", \
"\blue You check yourself for injuries.", \
"You hear a rustle, as someone checks about their person.")
for(var/datum/organ/external/org in damaged)
var/status = ""
@@ -222,9 +222,11 @@
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "bleeding"
status = "blugeoned"
if(brutedamage > 40)
status = "mangled"
if(org.bleeding && brutedamage)
status += ",[burndamage ? "" : " and"] bleeding[burndamage ? "," : ""]"
if(brutedamage > 0 && burndamage > 0)
status += " and "
if(burndamage > 40)
@@ -242,11 +244,6 @@
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1)
src.show_message(text("\blue You finish checking yourself."),1)
else
var/t_him = "it"
if (src.gender == MALE)
t_him = "him"
else if (src.gender == FEMALE)
t_him = "her"
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
@@ -258,10 +255,11 @@
AdjustStunned(-3)
AdjustWeakened(-3)
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
var/list/proper_forms = get_visible_gender()
M.visible_message( \
"\blue [M] shakes [src] trying to wake [t_him] up!", \
"\blue You shake [src] trying to wake [t_him] up!", \
)
"\blue \The [M] shakes \the [src] trying to wake [proper_forms["it"]] up!", \
"\blue You shake \the [src] trying to wake [proper_forms["it"]] up!", \
"You hear someone get shaken.")
/mob/living/carbon/proc/eyecheck()
return 0

View File

@@ -27,32 +27,16 @@
skipears = src.head.flags_inv & HIDEEARS
// crappy hacks because you can't do \his[src] etc. I'm sorry this proc is so unreadable, blame the text macros :<
var/t_He = "It" //capitalised for use at the start of each line.
var/t_his = "its"
var/t_him = "it"
var/t_has = "has"
var/t_is = "is"
var/list/proper_forms = get_visible_gender()
var/t_He = proper_forms["It"] //capitalised for use at the start of each line.
var/t_his = proper_forms["its"]
var/t_him = proper_forms["it"]
var/t_has = proper_forms["has"]
var/t_is = proper_forms["is"]
var/msg = "<span class='info'>*---------*\nThis is "
if( skipjumpsuit && (wear_mask || skipmask) ) //big suits/masks make it hard to tell their gender
t_He = "They"
t_his = "their"
t_him = "them"
t_has = "have"
t_is = "are"
else
if(src.icon)
msg += "\icon[src.icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
switch(src.gender)
if(MALE)
t_He = "He"
t_his = "his"
t_him = "him"
if(FEMALE)
t_He = "She"
t_his = "her"
t_him = "her"
if(icon)
msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
msg += "<EM>\a [src]</EM>[examine_text ? ", [examine_text]":""]!\n"

View File

@@ -2744,3 +2744,14 @@ It can still be worn/put on as normal.
reset_view(0)
remoteobserve = null
src.tkdisable = 0
/mob/living/carbon/human/get_visible_gender()
var/skip_gender = (wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
if( !skip_gender ) //big suits/masks make it hard to tell their gender
switch(gender)
if(MALE)
return list("It" = "He", "its" = "his", "it" = "he", "has" = "has", "is" = "is", "itself" = "himself")
if(FEMALE)
return list("It" = "She", "its" = "her", "it" = "she", "has" = "has", "is" = "is", "itself" = "herself")
return list("It" = "They", "its" = "their", "it" = "them", "has" = "have", "is" = "are", "itself" = "themselves")

View File

@@ -1160,3 +1160,13 @@ note dizziness decrements automatically in the mob's Life() proc.
// Call this proc whenever something about the clothing of a mob changes. Normally, you
// don't need to call this by hand, as the equip procs will do it for you.
..()
/mob/proc/get_visible_gender()
//Returns the proper words to use based on the mob's visible gender. Used in text creation.
return list("It" = "It", "its" = "its", "it" = "it", "has" = "has", "is" = "is", "itself" = "itself")
/mob/proc/get_gender_form(var/form)
if(!istext(form))
return
var/list/proper_forms = get_visible_gender()
return proper_forms[form]