Ignore Mourning Woods projectiles

Added pumpkin command to start the pumpkin wave on the correct wave.
This commit is contained in:
Zack Piispanen 2013-10-25 09:03:43 -04:00
parent 750bd3c483
commit af5eb4e80f
2 changed files with 26 additions and 1 deletions

View file

@ -354,6 +354,10 @@ namespace TShockAPI
{
HelpText = "Sets the spawn rate of NPCs."
});
add(new Command(Permissions.invade, PumpkinInvasion, "pumpkin")
{
HelpText = "Starts a Pumpkin Moon invasion at the specified wave."
});
#endregion
#region TP Commands
add(new Command(Permissions.home, Home, "home")
@ -1670,6 +1674,27 @@ namespace TShockAPI
}
}
private static void PumpkinInvasion(CommandArgs args)
{
int wave = 0;
if (args.Parameters.Count != 0)
int.TryParse(args.Parameters[0], out wave);
Main.pumpkinMoon = true;
Main.bloodMoon = false;
NPC.waveKills = 0f;
NPC.waveCount = wave;
string text = "Pumpkin Invasion started at wave;" + wave;
if (Main.netMode == 0)
{
Main.NewText(text, 175, 75, 255, false);
return;
}
if (Main.netMode == 2)
{
NetMessage.SendData(25, -1, -1, text, 255, 175f, 75f, 255f, 0);
}
}
private static void Hardmode(CommandArgs args)
{
if (Main.hardMode)

View file

@ -2397,7 +2397,7 @@ namespace TShockAPI
bool hasPermission = !TShock.CheckProjectilePermission(args.Player, index, type);
if (!TShock.Config.IgnoreProjUpdate && !hasPermission)
{
if ((type == 100) || (type > 289 && type < 298))
if ((type == 100) || (type > 289 && type < 298) || (type >= 325 && type <= 328))
{
Log.Debug("Certain projectiles have been ignored for cheat detection.");
}