Definition at line 24830 of file WorldGen.cs.
24831 {
24835 if (Main.tile[i,
j] ==
null)
24836 {
24837 Main.tile[i,
j] =
default(
Tile);
24838 }
24839 int frameX = Main.tile[i,
j].frameX;
24840 Tile tile = Main.tile[i,
j];
24842 {
24843 return false;
24844 }
24845 int num4 = tile.frameY;
24849 {
24852 }
24853 if (frameX >= 72)
24854 {
24855 num5 += 36 * (frameX / 72);
24856 num6 += 54 * (frameX / 72);
24857 }
24859 switch (frameX % 72)
24860 {
24861 case 0:
24864 break;
24865 case 18:
24868 break;
24869 case 36:
24872 break;
24873 case 54:
24876 break;
24877 }
24880 {
24882 }
24884 {
24886 {
24888 {
24889 return false;
24890 }
24891 }
24892 }
24895 {
24897 {
24899 {
24900 if (Main.tile[
l,
m] ==
null)
24901 {
24902 Main.tile[
l,
m] =
default(
Tile);
24903 }
24905 Main.tile[
l,
m].frameX = (short)(
genRand.Next(3) * 18 +
num6);
24906 }
24907 else
24908 {
24909 if (Main.tile[
l,
m] ==
null)
24910 {
24911 Main.tile[
l,
m] =
default(
Tile);
24912 }
24913 Main.tile[
l,
m].active(active:
false);
24914 }
24915 }
24916 }
24917 if (Main.netMode != 1 &&
Wiring.running)
24918 {
24922 }
24924 {
24926 {
24928 }
24929 }
24931 return true;
24932 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
static int CloseDoorID(Tile tile)
This serves as the central class from which tile-related functions are supported and carried out.
static UnifiedRandom genRand
static void TileFrame(int i, int j, bool resetFrame=false, bool noBreak=false)
References Terraria.ModLoader.TileLoader.CloseDoorID(), Terraria.Collision.EmptyTile(), Terraria.Tile.frameY, Terraria.Main.netMode, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Wiring.running, Terraria.Wiring.SkipWire(), and Terraria.Main.tile.
Referenced by Terraria.NPC.AI_007_TownEntities(), Terraria.MessageBuffer.GetData(), Terraria.Wiring.HitWireSingle(), Terraria.Player.TileInteractionsUse(), and Terraria.GameContent.DoorOpeningHelper.CommonDoorOpeningInfoProvider.TryCloseDoor().