mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 06:43:25 -04:00
Cleanup infect messages code (so they can be eventually extended to player messages), use DisplayName instead of name in end of round messages.
This commit is contained in:
parent
ab6c4288bc
commit
2cfaaa5afc
@ -190,19 +190,11 @@ namespace MCGalaxy {
|
||||
}
|
||||
lastPlayerToInfect = pKiller.name;
|
||||
pKiller.infectThisRound++;
|
||||
int cazzar = random.Next(0, infectMessages.Length);
|
||||
if (infectMessages2[cazzar] == "")
|
||||
{
|
||||
Player.GlobalMessage(Colors.red + pKiller.name + Colors.yellow + infectMessages[cazzar] + Colors.red + pAlive.name);
|
||||
}
|
||||
else if (infectMessages[cazzar] == "")
|
||||
{
|
||||
Player.GlobalMessage(Colors.red + pAlive.name + Colors.yellow + infectMessages2[cazzar]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.GlobalMessage(Colors.red + pKiller.name + Colors.yellow + infectMessages[cazzar] + Colors.red + pAlive.name + Colors.yellow + infectMessages2[cazzar]);
|
||||
}
|
||||
Player.GlobalMessage(String.Format(
|
||||
messages[random.Next(messages.Length)],
|
||||
Colors.red + pKiller.DisplayName + Colors.yellow,
|
||||
Colors.red + pAlive.DisplayName + Colors.yellow));
|
||||
|
||||
pAlive.color = Colors.red;
|
||||
pKiller.playersInfected = pKiller.playersInfected++;
|
||||
Player.GlobalDespawn(pAlive, false);
|
||||
@ -250,7 +242,7 @@ namespace MCGalaxy {
|
||||
if (winners.level.name == currentLevelName)
|
||||
{
|
||||
winners.color = winners.group.color;
|
||||
playersString += winners.group.color + winners.name + Colors.white + ", ";
|
||||
playersString += winners.group.color + winners.DisplayName + Colors.white + ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -265,7 +257,7 @@ namespace MCGalaxy {
|
||||
if (winners.level.name == currentLevelName)
|
||||
{
|
||||
winners.color = winners.group.color;
|
||||
playersString += winners.group.color + winners.name + Colors.white + ", ";
|
||||
playersString += winners.group.color + winners.DisplayName + Colors.white + ", ";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -60,9 +60,12 @@ namespace MCGalaxy {
|
||||
public string currentLevelName = "";
|
||||
public static List<Player> alive = new List<Player>();
|
||||
public static List<Player> infectd = new List<Player>();
|
||||
string[] infectMessages = new string[] { " WIKIWOO'D ", " stuck their teeth into ", " licked ", " danubed ", " made ", " tripped ", " made some zombie babies with ", " made ", " tweeted ", " made ", " infected ", " iDotted ", "", "transplanted " };
|
||||
string[] infectMessages2 = new string[] { "", "", "'s brain", "", " meet their maker", "", "", " see the dark side", "", " open source", "", "", " got nommed on", "'s living brain" };
|
||||
|
||||
static string[] messages = new string[] { "{0} WIKIWOO'D {1}", "{0} stuck their teeth into {1}",
|
||||
"{0} licked {1}'s brain ", "{0} danubed {1}", "{0} made {1} meet their maker", "{0} tripped {1}",
|
||||
"{0} made some zombie babies with {1}", "{0} made {1} see the dark side", "{0} tweeted {1}",
|
||||
"{0} made {1} open source", "{0} infected {1}", "{0} iDotted {1}", "{1} got nommed on",
|
||||
"{0} transplanted {1}'s living brain" };
|
||||
|
||||
internal bool noRespawn = true, noLevelSaving = true, noPillaring = true;
|
||||
internal string ZombieName = "";
|
||||
internal bool queLevel = false, queZombie = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user