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

◆ PlotTileArea()

static bool Terraria.Utils.PlotTileArea ( int x,
int y,
TileActionAttempt plot )
inlinestatic

Definition at line 1765 of file Utils.cs.

1766 {
1767 if (!WorldGen.InWorld(x, y))
1768 {
1769 return false;
1770 }
1774 list2.Add(new Point(x, y));
1775 while (list2.Count > 0)
1776 {
1777 list.Clear();
1779 list2.Clear();
1780 while (list.Count > 0)
1781 {
1782 Point item = list[0];
1783 if (!WorldGen.InWorld(item.X, item.Y, 1))
1784 {
1785 list.Remove(item);
1786 continue;
1787 }
1788 hashSet.Add(item);
1789 list.Remove(item);
1790 if (plot(item.X, item.Y))
1791 {
1792 Point item2 = new Point(item.X - 1, item.Y);
1793 if (!hashSet.Contains(item2))
1794 {
1795 list2.Add(item2);
1796 }
1797 item2 = new Point(item.X + 1, item.Y);
1798 if (!hashSet.Contains(item2))
1799 {
1800 list2.Add(item2);
1801 }
1802 item2 = new Point(item.X, item.Y - 1);
1803 if (!hashSet.Contains(item2))
1804 {
1805 list2.Add(item2);
1806 }
1807 item2 = new Point(item.X, item.Y + 1);
1808 if (!hashSet.Contains(item2))
1809 {
1810 list2.Add(item2);
1811 }
1812 }
1813 }
1814 }
1815 return true;
1816 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.AddRange(), System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, Terraria.WorldGen.InWorld(), System.item, System.list, Microsoft.Xna.Framework.Graphics.Point, and System.Collections.Generic.Dictionary< TKey, TValue >.Remove().

Referenced by Terraria.Player.ItemCheck_EmitHeldItemLight(), Terraria.Projectile.Kill_DirtAndFluidProjectiles_RunDelegateMethodPushUpForHalfBricks(), and Terraria.Projectile.ProjLight().