(7163b300e) Added: Way for capitalizing / lowercasing replaced variables depending on the position in the sentence & some implementations
This commit is contained in:
@@ -16,10 +16,9 @@ namespace Barotrauma
|
||||
|
||||
public void Greet(GameServer server, string codeWords, string codeResponse)
|
||||
{
|
||||
string greetingMessage = TextManager.Get("TraitorStartMessage").Replace("[targetname]", TargetCharacter.Name);
|
||||
string moreAgentsMessage = TextManager.Get("TraitorMoreAgentsMessage")
|
||||
.Replace("[codewords]", codeWords)
|
||||
.Replace("[coderesponse]", codeResponse);
|
||||
string greetingMessage = TextManager.GetWithVariable("TraitorStartMessage", "[targetname]", TargetCharacter.Name);
|
||||
string moreAgentsMessage = TextManager.GetWithVariables("TraitorMoreAgentsMessage",
|
||||
new string[2] { "[codewords]", "[coderesponse]" }, new string[2] { codeWords, codeResponse });
|
||||
|
||||
var greetingChatMsg = ChatMessage.Create(null, greetingMessage, ChatMessageType.Server, null);
|
||||
var moreAgentsChatMsg = ChatMessage.Create(null, moreAgentsMessage, ChatMessageType.Server, null);
|
||||
@@ -38,7 +37,7 @@ namespace Barotrauma
|
||||
{
|
||||
var ownerMsg = ChatMessage.Create(
|
||||
null,//TextManager.Get("NewTraitor"),
|
||||
TextManager.Get("TraitorStartMessageServer").Replace("[targetname]", TargetCharacter.Name).Replace("[traitorname]", Character.Name),
|
||||
TextManager.GetWithVariables("TraitorStartMessageServer", new string[2] { "[targetname]", "[traitorname]" }, new string[2] { TargetCharacter.Name, Character.Name }),
|
||||
ChatMessageType.MessageBox,
|
||||
null
|
||||
);
|
||||
@@ -168,9 +167,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
endMessage += (TextManager.ReplaceGenderPronouns(TextManager.Get(messageTag), traitorCharacter.Info.Gender) + "\n")
|
||||
.Replace("[traitorname]", traitorCharacter.Name)
|
||||
.Replace("[targetname]", targetCharacter.Name);
|
||||
endMessage += (TextManager.ReplaceGenderPronouns(TextManager.GetWithVariables(messageTag, new string[2] { "[traitorname]", "[targetname]" },
|
||||
new string[2] { traitorCharacter.Name, targetCharacter.Name }), traitorCharacter.Info.Gender) + "\n");
|
||||
}
|
||||
|
||||
return endMessage;
|
||||
|
||||
Reference in New Issue
Block a user