Add config option for anonymous boss/invasion messages

This commit is contained in:
MarioE 2014-07-10 19:21:22 -04:00
parent aa8f762f9c
commit afffa46ef2
2 changed files with 10 additions and 6 deletions

View file

@ -387,7 +387,9 @@ namespace TShockAPI
[Description("Kicks a hardcore player on death.")] [Description("Kicks a hardcore player on death.")]
public string HardcoreKickReason = "Death results in a kick"; public string HardcoreKickReason = "Death results in a kick";
[Description("Whether bosses or invasions should be anonymously spawned.")]
public bool AnonymousBossInvasions = true;
/// <summary> /// <summary>
/// Reads a configuration file from a given path /// Reads a configuration file from a given path

View file

@ -3369,13 +3369,13 @@ namespace TShockAPI
switch (Type) switch (Type)
{ {
case -5: case -5:
boss = "a snow invasion"; boss = "a frost moon";
break; break;
case -4: case -4:
boss = "a pumpkin invasion"; boss = "a pumpkin moon";
break; break;
case -3: case -3:
boss = "the pirates"; boss = "the Pirates";
break; break;
case -2: case -2:
boss = "the Snow Legion"; boss = "the Snow Legion";
@ -3387,8 +3387,10 @@ namespace TShockAPI
boss = String.Format("the {0}", npc.name); boss = String.Format("the {0}", npc.name);
break; break;
} }
if (TShock.Config.AnonymousBossInvasions)
TShock.Utils.SendLogs(string.Format("{0} summoned {1}.", args.Player.Name, boss), Color.PaleVioletRed, args.Player); TShock.Utils.SendLogs(string.Format("{0} summoned {1}!", args.Player.Name, boss), Color.PaleVioletRed, args.Player);
else
TShock.Utils.Broadcast(String.Format("{0} summoned {1}!", args.Player.Name, boss), 175, 75, 255);
return false; return false;
} }