added /eclipse command
This commit is contained in:
parent
6a0306596d
commit
f08c1449c9
2 changed files with 13 additions and 0 deletions
7
TShockAPI/Commands.cs
Executable file → Normal file
7
TShockAPI/Commands.cs
Executable file → Normal file
|
|
@ -185,6 +185,7 @@ namespace TShockAPI
|
||||||
add(Permissions.causeevents, Star, "star");
|
add(Permissions.causeevents, Star, "star");
|
||||||
add(Permissions.causeevents, Fullmoon, "fullmoon");
|
add(Permissions.causeevents, Fullmoon, "fullmoon");
|
||||||
add(Permissions.causeevents, Bloodmoon, "bloodmoon");
|
add(Permissions.causeevents, Bloodmoon, "bloodmoon");
|
||||||
|
add(Permissions.causeevents, Eclipse, "eclipse");
|
||||||
add(Permissions.causeevents, Invade, "invade");
|
add(Permissions.causeevents, Invade, "invade");
|
||||||
add(Permissions.causeevents, Rain, "rain");
|
add(Permissions.causeevents, Rain, "rain");
|
||||||
add(Permissions.spawnboss, Eater, "eater");
|
add(Permissions.spawnboss, Eater, "eater");
|
||||||
|
|
@ -1353,6 +1354,12 @@ namespace TShockAPI
|
||||||
TShock.Utils.Broadcast(string.Format("{0} turned on the blood moon.", args.Player.Name), Color.Green);
|
TShock.Utils.Broadcast(string.Format("{0} turned on the blood moon.", args.Player.Name), Color.Green);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void Eclipse(CommandArgs args)
|
||||||
|
{
|
||||||
|
TSPlayer.Server.SetEclipse(true);
|
||||||
|
TShock.Utils.Broadcast(string.Format("{0} has forced an Eclipse!", args.Player.Name), Color.Green);
|
||||||
|
}
|
||||||
|
|
||||||
private static void Invade(CommandArgs args)
|
private static void Invade(CommandArgs args)
|
||||||
{
|
{
|
||||||
if (Main.invasionSize <= 0)
|
if (Main.invasionSize <= 0)
|
||||||
|
|
|
||||||
|
|
@ -907,6 +907,12 @@ namespace TShockAPI
|
||||||
Main.bloodMoon = bloodMoon;
|
Main.bloodMoon = bloodMoon;
|
||||||
SetTime(false, 0);
|
SetTime(false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetEclipse(bool Eclipse)
|
||||||
|
{
|
||||||
|
Main.eclipse = Eclipse;
|
||||||
|
SetTime(true, 150);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetTime(bool dayTime, double time)
|
public void SetTime(bool dayTime, double time)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue