Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ThinIceBiome.cs
Go to the documentation of this file.
4
6
7public class ThinIceBiome : MicroBiome
8{
9 public override bool Place(Point origin, StructureMap structures)
10 {
12 WorldUtils.Gen(new Point(origin.X - 25, origin.Y - 25), new Shapes.Rectangle(50, 50), new Actions.TileScanner(0, 59, 147, 1, 225).Output(dictionary));
13 int num = dictionary[0] + dictionary[1];
14 int num2 = dictionary[59];
15 int num3 = dictionary[147];
16 if (dictionary[225] > 0)
17 {
18 return false;
19 }
20 if (num3 <= num2 || num3 <= num)
21 {
22 return false;
23 }
24 int num4 = 0;
25 for (int num5 = GenBase._random.Next(10, 15); num5 > 5; num5--)
26 {
27 int num6 = GenBase._random.Next(-5, 5);
28 WorldUtils.Gen(new Point(origin.X + num6, origin.Y + num4), new Shapes.Circle(num5), Actions.Chain(new Modifiers.Blotches(4), new Modifiers.OnlyTiles(147, 161, 224, 0, 1), new Actions.SetTile(162, setSelfFrames: true)));
29 WorldUtils.Gen(new Point(origin.X + num6, origin.Y + num4), new Shapes.Circle(num5), Actions.Chain(new Modifiers.Blotches(4), new Modifiers.HasLiquid(), new Modifiers.SkipTiles(21, 467, 226, 237), new Actions.SetTile(162, setSelfFrames: true), new Actions.SetLiquid(0, 0)));
30 num4 += num5 - 2;
31 }
32 structures.AddStructure(new Rectangle(origin.X - 25, origin.Y - 25, 50, 50), 8);
33 return true;
34 }
35}
override bool Place(Point origin, StructureMap structures)
TileScanner Output(Dictionary< ushort, int > resultsOutput)
Definition Actions.cs:86
static GenAction Chain(params GenAction[] actions)
Definition Actions.cs:470
static UnifiedRandom _random
Definition GenBase.cs:9
void AddStructure(Rectangle area, int padding=0)
static bool Gen(Point origin, GenShape shape, GenAction action)
Definition WorldUtils.cs:17