9 {
10 Ref<int> @ref = new Ref<int>(0);
11 Ref<int> ref2 = new Ref<int>(0);
13 if (@ref.Value < ref2.Value - 5)
14 {
15 return false;
16 }
20 {
21 return false;
22 }
24 for (
int i = origin.
X - num;
i <= origin.X + num;
i++)
25 {
26 for (
int j = origin.
Y - num; j <= origin.Y + num; j++)
27 {
28 if (Main.tile[i, j].active())
29 {
30 int type2 = Main.tile[
i, j].type;
31 if (type2 == 53 || type2 == 396 || type2 == 397 || type2 == 404)
32 {
34 }
35 if (type2 == 161 || type2 == 147)
36 {
38 }
39 if (type2 == 60)
40 {
42 }
43 if (type2 == 367)
44 {
46 }
47 if (type2 == 368)
48 {
50 }
51 }
52 }
53 }
55 WorldUtils.
Gen(origin,
new Shapes.
Slime(num),
Actions.
Chain(
new Modifiers.
Blotches(num2, num2, num2, 1, 1.0).
Output(data),
new Modifiers.
Offset(0, -2),
new Modifiers.
OnlyTiles(53),
new Actions.
SetTile(397, setSelfFrames: true), new
Modifiers.OnlyWalls(default(ushort)), new
Actions.PlaceWall(
type)));
58 {
59 return false;
60 }
61 int num3 = result.Y - 1;
64 {
66 int num5 = (flag ? 4 : (-(num >> 1)));
67 for (int k = 0; k < num4; k++)
68 {
70 for (int l = 0; l < num6; l++)
71 {
72 WorldGen.PlaceTile(origin.
X + num5 - k, num3 - l, 332, mute: true);
73 }
74 }
75 }
76 int num7 = (num - 3) * ((!flag) ? 1 : (-1));
78 {
79 WorldGen.PlaceTile(origin.
X + num7, num3, 186);
80 }
82 {
83 WorldGen.PlaceTile(origin.
X, num3, 215, mute: true);
85 {
92 }
93 }
95 return true;
96 }
static GenAction Chain(params GenAction[] actions)
static UnifiedRandom _random
static GenSearch Chain(GenSearch search, params GenCondition[] conditions)
void AddProtectedStructure(Rectangle area, int padding=0)
bool CanPlace(Rectangle area, int padding=0)
static bool Find(Point origin, GenSearch search, out Point result)
static bool Gen(Point origin, GenShape shape, GenAction action)