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

@@ -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]