Removed /genore
This commit is contained in:
parent
576a1d97fe
commit
7e851f0311
1 changed files with 0 additions and 176 deletions
176
TShockAPI/Commands.cs
Executable file → Normal file
176
TShockAPI/Commands.cs
Executable file → Normal file
|
|
@ -135,7 +135,6 @@ namespace TShockAPI
|
|||
add(Permissions.maintenance, CheckUpdates, "checkupdates");
|
||||
add(Permissions.causeevents, DropMeteor, "dropmeteor");
|
||||
add(Permissions.causeevents, Star, "star");
|
||||
add(Permissions.causeevents, Ore, "genore");
|
||||
add(Permissions.causeevents, Fullmoon, "fullmoon");
|
||||
add(Permissions.causeevents, Bloodmoon, "bloodmoon");
|
||||
add(Permissions.causeevents, Invade, "invade");
|
||||
|
|
@ -1118,181 +1117,6 @@ namespace TShockAPI
|
|||
Projectile.NewProjectile(vector.X, vector.Y, speedX, speedY, 12, 0x3e8, 10f, Main.myPlayer);
|
||||
}
|
||||
|
||||
private static void Ore(CommandArgs args)
|
||||
{
|
||||
if (WorldGen.genRand == null)
|
||||
WorldGen.genRand = new Random();
|
||||
|
||||
TSPlayer ply = args.Player;
|
||||
|
||||
|
||||
|
||||
int num = WorldGen.altarCount % 3;
|
||||
int num2 = WorldGen.altarCount / 3 + 1;
|
||||
float num3 = (float)(Main.maxTilesX / 4200);
|
||||
int num4 = 1 - num;
|
||||
num3 = num3 * 310f - (float)(85 * num);
|
||||
num3 *= 0.85f;
|
||||
num3 /= (float)num2;
|
||||
|
||||
if (args.Parameters.Count < 1)
|
||||
{
|
||||
ply.SendMessage("Picking a random ore!", Color.Green); //should this be a help message instead?
|
||||
num = WorldGen.genRand.Next(6);
|
||||
}
|
||||
else if (args.Parameters[0] == "cobalt")
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
else if (args.Parameters[0] == "mythril")
|
||||
{
|
||||
num = 1;
|
||||
}
|
||||
else if (args.Parameters[0] == "copper")
|
||||
{
|
||||
num = 3;
|
||||
}
|
||||
else if (args.Parameters[0] == "iron")
|
||||
{
|
||||
num = 4;
|
||||
}
|
||||
else if (args.Parameters[0] == "silver")
|
||||
{
|
||||
num = 6;
|
||||
}
|
||||
else if (args.Parameters[0] == "gold")
|
||||
{
|
||||
num = 5;
|
||||
}
|
||||
else if (args.Parameters[0] == "demonite")
|
||||
{
|
||||
num = 7;
|
||||
}
|
||||
else if (args.Parameters[0] == "sapphire")
|
||||
{
|
||||
num = 8;
|
||||
}
|
||||
else if (args.Parameters[0] == "ruby")
|
||||
{
|
||||
num = 9;
|
||||
}
|
||||
else if (args.Parameters[0] == "emerald")
|
||||
{
|
||||
num = 10;
|
||||
}
|
||||
else if (args.Parameters[0] == "topaz")
|
||||
{
|
||||
num = 11;
|
||||
}
|
||||
else if (args.Parameters[0] == "amethyst")
|
||||
{
|
||||
num = 12;
|
||||
}
|
||||
else if (args.Parameters[0] == "diamond")
|
||||
{
|
||||
num = 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = 2;
|
||||
}
|
||||
|
||||
if (num == 0)
|
||||
{
|
||||
num = 107;
|
||||
num3 *= 1.05f;
|
||||
}
|
||||
else if (num == 1)
|
||||
{
|
||||
num = 108;
|
||||
}
|
||||
else if (num == 3)
|
||||
{
|
||||
num = 7;
|
||||
num3 *= 1.1f;
|
||||
}
|
||||
else if (num == 4)
|
||||
{
|
||||
num = 6;
|
||||
num3 *= 1.1f;
|
||||
}
|
||||
else if (num == 5)
|
||||
{
|
||||
num = 8;
|
||||
num3 *= 1.1f;
|
||||
}
|
||||
else if (num == 6)
|
||||
{
|
||||
num = 9;
|
||||
num3 *= 1.1f;
|
||||
}
|
||||
else if (num == 7)
|
||||
{
|
||||
num = 22;
|
||||
num3 *= 1;
|
||||
}
|
||||
else if (num == 8)
|
||||
{
|
||||
num = 63;
|
||||
num3 *= .80f;
|
||||
}
|
||||
else if (num == 9)
|
||||
{
|
||||
num = 64;
|
||||
num3 *=1;
|
||||
}
|
||||
else if (num == 10)
|
||||
{
|
||||
num = 65;
|
||||
num3 *= 1;
|
||||
}
|
||||
else if (num == 11)
|
||||
{
|
||||
num = 66;
|
||||
num3 *= 1;
|
||||
}
|
||||
else if (num == 12)
|
||||
{
|
||||
num = 67;
|
||||
num3 *= 1;
|
||||
}
|
||||
else if (num == 13)
|
||||
{
|
||||
num = 68;
|
||||
num3 *= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = 111;
|
||||
}
|
||||
|
||||
|
||||
if (args.Parameters.Count > 1)
|
||||
{
|
||||
float.TryParse(args.Parameters[1], out num3);
|
||||
num3 = Math.Min(num3, 1000f);
|
||||
}
|
||||
|
||||
int num5 = 0;
|
||||
while ((float)num5 < num3)
|
||||
{
|
||||
int i2 = WorldGen.genRand.Next(100, Main.maxTilesX - 100);
|
||||
double num6 = Main.worldSurface;
|
||||
if ((num == 108) || (num == 6) || (num == 7) || (num == 8) || (num == 9) ||((num > 62) && (num < 69)))
|
||||
{
|
||||
num6 = Main.rockLayer;
|
||||
}
|
||||
if ((num == 111) || (num == 22) || (num == 68))
|
||||
{
|
||||
num6 = (Main.rockLayer + Main.rockLayer + (double)Main.maxTilesY) / 3.0;
|
||||
}
|
||||
int j2 = WorldGen.genRand.Next((int)num6, Main.maxTilesY - 150);
|
||||
WorldGen.OreRunner(i2, j2, (double)WorldGen.genRand.Next(5, 9 + num4), WorldGen.genRand.Next(5, 9 + num4), num);
|
||||
num5++;
|
||||
}
|
||||
ply.SendMessage(String.Format("Spawned {0} tiles of {1}", Math.Floor(num3), num), Color.Green );
|
||||
}
|
||||
|
||||
private static void Fullmoon(CommandArgs args)
|
||||
{
|
||||
TSPlayer.Server.SetFullMoon(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue