Add a few variables to the AI announcment message

Variables added:
 - $species : Species name of the individual.
 - $age : Character age
 - $gender : Character gender, limited to female/male, sorry tumblr
This commit is contained in:
Tigercat2000
2015-09-29 10:15:41 -07:00
parent 18a340085c
commit b09c4f7b85
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -838,7 +838,7 @@ var/list/ai_verbs_default = list(
set desc = "Change the message that's transmitted when a new crew member arrives on station."
set category = "AI Commands"
var/newmsg = input("What would you like the arrival message to be? Use $name to substitute the crew member's name, and use $rank to substitute the crew member's rank.", "Change Arrival Message", arrivalmsg) as text
var/newmsg = input("What would you like the arrival message to be? List of options: $name, $rank, $species, $gender, $age", "Change Arrival Message", arrivalmsg) as text
if(newmsg != arrivalmsg)
arrivalmsg = newmsg
usr << "The arrival message has been successfully changed."
+5 -2
View File
@@ -342,6 +342,9 @@
var/arrivalmessage = announcer.arrivalmsg
arrivalmessage = replacetext(arrivalmessage,"$name",character.real_name)
arrivalmessage = replacetext(arrivalmessage,"$rank",rank ? "[rank]" : "visitor")
arrivalmessage = replacetext(arrivalmessage,"$species",character.species.name)
arrivalmessage = replacetext(arrivalmessage,"$age",num2text(character.age))
arrivalmessage = replacetext(arrivalmessage,"$gender",character.gender == FEMALE ? "Female" : "Male")
announcer.say(";[arrivalmessage]")
else
if(character.mind)
@@ -469,11 +472,11 @@
if(client.prefs.disabilities & DISABILITY_FLAG_BLIND)
new_character.dna.SetSEState(BLINDBLOCK,1,1)
new_character.sdisabilities |= BLIND
if(client.prefs.disabilities & DISABILITY_FLAG_MUTE)
new_character.dna.SetSEState(MUTEBLOCK,1,1)
new_character.sdisabilities |= MUTE
chosen_species.handle_dna(new_character)
domutcheck(new_character)