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

◆ isValidTileAnchor()

bool Terraria.ObjectData.TileObjectData.isValidTileAnchor ( int type)
inline

Definition at line 1811 of file TileObjectData.cs.

1812 {
1813 int[] array;
1814 int[] array2;
1815 if (_anchorTiles == null)
1816 {
1817 array = null;
1818 array2 = null;
1819 }
1820 else
1821 {
1824 }
1825 if (array2 != null)
1826 {
1827 for (int i = 0; i < array2.Length; i++)
1828 {
1829 if (type == array2[i])
1830 {
1831 return false;
1832 }
1833 }
1834 }
1835 if (array == null)
1836 {
1837 return true;
1838 }
1839 for (int j = 0; j < array.Length; j++)
1840 {
1841 if (type == array[j])
1842 {
1843 return true;
1844 }
1845 }
1846 return false;
1847 }

References Terraria.ObjectData.TileObjectData._anchorTiles, System.array, Terraria.Modules.AnchorTypesModule.tileInvalid, Terraria.Modules.AnchorTypesModule.tileValid, and System.type.

Referenced by Terraria.TileObject.CanPlace().