Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
WoodHouseBuilder.cs
Go to the documentation of this file.
4
6
8{
11 {
12 base.TileType = 30;
13 base.WallType = 27;
14 base.BeamType = 124;
16 {
18 {
19 if (WorldGen.genRand.Next(7) == 0)
20 {
21 base.TileType = 160;
22 base.WallType = 44;
23 }
24 }
25 else if (WorldGen.genRand.Next(2) == 0)
26 {
27 base.TileType = 160;
28 base.WallType = 44;
29 }
30 }
31 base.PlatformStyle = 0;
32 base.DoorStyle = 0;
33 base.TableStyle = 0;
34 base.WorkbenchStyle = 0;
35 base.PianoStyle = 0;
36 base.BookcaseStyle = 0;
37 base.ChairStyle = 0;
38 base.ChestStyle = 1;
39 }
40
41 protected override void AgeRoom(Rectangle room)
42 {
43 for (int i = 0; i < room.Width * room.Height / 16; i++)
44 {
45 int x = WorldGen.genRand.Next(1, room.Width - 1) + room.X;
46 int y = WorldGen.genRand.Next(1, room.Height - 1) + room.Y;
47 WorldUtils.Gen(new Point(x, y), new Shapes.Rectangle(2, 2), Actions.Chain(new Modifiers.Dither(), new Modifiers.Blotches(2, 2), new Modifiers.IsEmpty(), new Actions.SetTile(51, setSelfFrames: true)));
48 }
50 WorldUtils.Gen(new Point(room.X, room.Y), new Shapes.Rectangle(room.Width, room.Height), Actions.Chain(new Modifiers.Dither(0.95), new Modifiers.OnlyTiles(30, 321, 158), new Actions.ClearTile(frameNeighbors: true)));
51 }
52
53 public override void Place(HouseBuilderContext context, StructureMap structures)
54 {
55 base.Place(context, structures);
57 }
58
60 {
61 if (!Main.tenthAnniversaryWorld || (base.TileType == 160 && WorldGen.genRand.Next(2) == 0))
62 {
63 return;
64 }
65 foreach (Rectangle room in base.Rooms)
66 {
68 }
69 }
70}
override void Place(HouseBuilderContext context, StructureMap structures)
static double worldSurface
Definition Main.cs:1272
static bool getGoodWorld
Definition Main.cs:341
static bool tenthAnniversaryWorld
Definition Main.cs:343
static GenAction Chain(params GenAction[] actions)
Definition Actions.cs:470
static bool Gen(Point origin, GenShape shape, GenAction action)
Definition WorldUtils.cs:17
static UnifiedRandom genRand
Definition WorldGen.cs:1215