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

◆ PlatformProperSides()

static int Terraria.WorldGen.PlatformProperSides ( int x,
int y,
bool acceptNonOpposing = false )
inlinestatic

Definition at line 74631 of file WorldGen.cs.

74632 {
74633 Tile tile = Main.tile[x, y];
74634 if (!tile.active() || !TileID.Sets.Platforms[tile.type])
74635 {
74636 return 0;
74637 }
74638 int num = tile.slope();
74639 int num2 = -1;
74640 if (num == 1)
74641 {
74642 num2 = 2;
74643 }
74644 if (num == 2)
74645 {
74646 num2 = 1;
74647 }
74648 int num3 = 0;
74649 int num4 = 1;
74650 int num5 = 0;
74651 if (num == 1)
74652 {
74653 num5 = 1;
74654 }
74655 if (num == 2)
74656 {
74657 num5 = -1;
74658 }
74660 {
74661 if (Main.tile[x + num4, y + num5].active() && TileID.Sets.Platforms[Main.tile[x + num4, y + num5].type] && Main.tile[x + num4, y + num5].slope() != num2)
74662 {
74663 num3++;
74664 }
74665 }
74666 else if (Main.tile[x + num4, y + num5].active() && TileID.Sets.Platforms[Main.tile[x + num4, y + num5].type] && Main.tile[x + num4, y + num5].slope() == num)
74667 {
74668 num3++;
74669 }
74670 num4 *= -1;
74671 num5 *= -1;
74673 {
74674 if (Main.tile[x + num4, y + num5].active() && TileID.Sets.Platforms[Main.tile[x + num4, y + num5].type] && Main.tile[x + num4, y + num5].slope() != num2)
74675 {
74676 num3++;
74677 }
74678 }
74679 else if (Main.tile[x + num4, y + num5].active() && TileID.Sets.Platforms[Main.tile[x + num4, y + num5].type] && Main.tile[x + num4, y + num5].slope() == num)
74680 {
74681 num3++;
74682 }
74683 return num3;
74684 }
static bool[] Platforms
Definition TileID.cs:219

References Terraria.Tile.active(), Terraria.ID.TileID.Sets.Platforms, Terraria.Tile.slope(), Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.Player.PlaceThing_Tiles_PlaceIt_SpinSmartPlatform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: