Attempt to satisfy some of the requirements of growing things
This commit is contained in:
parent
9ed5f7a2f5
commit
44e4199dcb
1 changed files with 34 additions and 5 deletions
|
|
@ -2507,26 +2507,55 @@ namespace TShockAPI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var name = "Fail";
|
var name = "Fail";
|
||||||
|
var x = args.Player.TileX;
|
||||||
|
var y = args.Player.TileY;
|
||||||
switch (args.Parameters[0].ToLower())
|
switch (args.Parameters[0].ToLower())
|
||||||
{
|
{
|
||||||
case "tree":
|
case "tree":
|
||||||
WorldGen.GrowTree(args.Player.TileX, args.Player.TileY);
|
for (int i = x - 1; i < x + 2; i++)
|
||||||
|
{
|
||||||
|
Main.tile[i, y].active = true;
|
||||||
|
Main.tile[i, y].type = 2;
|
||||||
|
Main.tile[i, y].wall = 0;
|
||||||
|
}
|
||||||
|
Main.tile[x, y - 1].wall = 0;
|
||||||
|
WorldGen.GrowTree(x, y);
|
||||||
name = "Tree";
|
name = "Tree";
|
||||||
break;
|
break;
|
||||||
case "epictree":
|
case "epictree":
|
||||||
WorldGen.GrowEpicTree(args.Player.TileX, args.Player.TileY);
|
for (int i = x - 1; i < x + 2; i++)
|
||||||
|
{
|
||||||
|
Main.tile[i, y].active = true;
|
||||||
|
Main.tile[i, y].type = 2;
|
||||||
|
Main.tile[i, y].wall = 0;
|
||||||
|
}
|
||||||
|
Main.tile[x, y - 1].wall = 0;
|
||||||
|
Main.tile[x, y - 1].liquid = 0;
|
||||||
|
Main.tile[x, y - 1].active = true;
|
||||||
|
WorldGen.GrowEpicTree(x, y);
|
||||||
name = "Epic Tree";
|
name = "Epic Tree";
|
||||||
break;
|
break;
|
||||||
case "mushroom":
|
case "mushroom":
|
||||||
WorldGen.GrowShroom(args.Player.TileX, args.Player.TileY);
|
for (int i = x - 1; i < x + 2; i++)
|
||||||
|
{
|
||||||
|
Main.tile[i, y].active = true;
|
||||||
|
Main.tile[i, y].type = 70;
|
||||||
|
Main.tile[i, y].wall = 0;
|
||||||
|
}
|
||||||
|
Main.tile[x, y - 1].wall = 0;
|
||||||
|
WorldGen.GrowShroom(x, y);
|
||||||
name = "Mushroom";
|
name = "Mushroom";
|
||||||
break;
|
break;
|
||||||
case "cactus":
|
case "cactus":
|
||||||
WorldGen.GrowCactus(args.Player.TileX, args.Player.TileY);
|
Main.tile[x, y].type = 53;
|
||||||
|
WorldGen.GrowCactus(x, y);
|
||||||
name = "Cactus";
|
name = "Cactus";
|
||||||
break;
|
break;
|
||||||
case "herb":
|
case "herb":
|
||||||
WorldGen.GrowAlch(args.Player.TileX, args.Player.TileY);
|
Main.tile[x, y].active = true;
|
||||||
|
Main.tile[x, y].frameX = 36;
|
||||||
|
Main.tile[x, y].type = 83;
|
||||||
|
WorldGen.GrowAlch(x, y);
|
||||||
name = "Herb";
|
name = "Herb";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue