mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-27 15:30:58 -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;
|
lastPlayerToInfect = pKiller.name;
|
||||||
pKiller.infectThisRound++;
|
pKiller.infectThisRound++;
|
||||||
int cazzar = random.Next(0, infectMessages.Length);
|
Player.GlobalMessage(String.Format(
|
||||||
if (infectMessages2[cazzar] == "")
|
messages[random.Next(messages.Length)],
|
||||||
{
|
Colors.red + pKiller.DisplayName + Colors.yellow,
|
||||||
Player.GlobalMessage(Colors.red + pKiller.name + Colors.yellow + infectMessages[cazzar] + Colors.red + pAlive.name);
|
Colors.red + pAlive.DisplayName + Colors.yellow));
|
||||||
}
|
|
||||||
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]);
|
|
||||||
}
|
|
||||||
pAlive.color = Colors.red;
|
pAlive.color = Colors.red;
|
||||||
pKiller.playersInfected = pKiller.playersInfected++;
|
pKiller.playersInfected = pKiller.playersInfected++;
|
||||||
Player.GlobalDespawn(pAlive, false);
|
Player.GlobalDespawn(pAlive, false);
|
||||||
@ -250,7 +242,7 @@ namespace MCGalaxy {
|
|||||||
if (winners.level.name == currentLevelName)
|
if (winners.level.name == currentLevelName)
|
||||||
{
|
{
|
||||||
winners.color = winners.group.color;
|
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)
|
if (winners.level.name == currentLevelName)
|
||||||
{
|
{
|
||||||
winners.color = winners.group.color;
|
winners.color = winners.group.color;
|
||||||
playersString += winners.group.color + winners.name + Colors.white + ", ";
|
playersString += winners.group.color + winners.DisplayName + Colors.white + ", ";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,11 @@ namespace MCGalaxy {
|
|||||||
public string currentLevelName = "";
|
public string currentLevelName = "";
|
||||||
public static List<Player> alive = new List<Player>();
|
public static List<Player> alive = new List<Player>();
|
||||||
public static List<Player> infectd = 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 " };
|
static string[] messages = new string[] { "{0} WIKIWOO'D {1}", "{0} stuck their teeth into {1}",
|
||||||
string[] infectMessages2 = new string[] { "", "", "'s brain", "", " meet their maker", "", "", " see the dark side", "", " open source", "", "", " got nommed on", "'s living brain" };
|
"{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 bool noRespawn = true, noLevelSaving = true, noPillaring = true;
|
||||||
internal string ZombieName = "";
|
internal string ZombieName = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user