Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReplaceTile_DoActualReplacement_Single()

static void Terraria.WorldGen.ReplaceTile_DoActualReplacement_Single ( ushort targetType,
int targetStyle,
int topLeftX,
int topLeftY,
Tile t )
inlinestaticprivate

Definition at line 53275 of file WorldGen.cs.

53276 {
53278 int type = t.type;
53279 t.type = targetType;
53280 if (TileID.Sets.Platforms[t.type])
53281 {
53282 t.frameY = (short)(targetStyle * 18);
53283 }
53284 if (t.type == 4)
53285 {
53286 t.frameY = (short)(targetStyle * 22);
53287 }
53288 t.ClearBlockPaintAndCoating();
53289 bool flag = !CanPoundTile(topLeftX, topLeftY);
53290 if (TileID.Sets.Platforms[type] && TileID.Sets.Platforms[t.type])
53291 {
53292 flag = false;
53293 }
53294 if (flag)
53295 {
53296 t.slope(0);
53297 t.halfBrick(halfBrick: false);
53298 }
53299 if (Main.tenthAnniversaryWorld && !Main.remixWorld && (targetType == 53 || targetType == 396 || targetType == 397))
53300 {
53301 t.color(7);
53302 }
53304 }
static bool[] Platforms
Definition TileID.cs:163
static bool CanPoundTile(int x, int y)
static void ReplaceTile_EliminateNaturalExtras(int x, int y)
static void SquareTileFrame(int i, int j, bool resetFrame=true)

References Terraria.Tile.ClearBlockPaintAndCoating(), Terraria.Tile.color(), Terraria.Tile.halfBrick(), Terraria.ID.TileID.Sets.Platforms, Terraria.Main.remixWorld, Terraria.Tile.slope(), Terraria.Main.tenthAnniversaryWorld, System.type, and Terraria.Tile.type.