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

◆ CleanupTiles()

void Terraria.GameContent.Biomes.GraniteBiome.CleanupTiles ( Point tileOrigin,
Rectangle magmaMapArea )
inlineprivate

Definition at line 266 of file GraniteBiome.cs.

267 {
268 ushort wall = 180;
269 if (WorldGen.drunkWorldGen)
270 {
271 wall = 178;
272 }
274 for (int i = magmaMapArea.Left; i < magmaMapArea.Right; i++)
275 {
276 for (int j = magmaMapArea.Top; j < magmaMapArea.Bottom; j++)
277 {
278 if (!_sourceMagmaMap[i, j].IsActive)
279 {
280 continue;
281 }
282 int num = 0;
283 int num2 = i + tileOrigin.X;
284 int num3 = j + tileOrigin.Y;
285 if (!WorldGen.SolidTile(num2, num3))
286 {
287 continue;
288 }
289 for (int k = -1; k <= 1; k++)
290 {
291 for (int l = -1; l <= 1; l++)
292 {
293 if (WorldGen.SolidTile(num2 + k, num3 + l))
294 {
295 num++;
296 }
297 }
298 }
299 if (num < 3)
300 {
301 list.Add(new Point16(num2, num3));
302 }
303 }
304 }
305 foreach (Point16 item in list)
306 {
307 int x = item.X;
308 int y = item.Y;
310 GenBase._tiles[x, y].wall = wall;
311 }
312 list.Clear();
313 }
static void ClearTile(int x, int y, bool frameNeighbors=false)
Definition WorldUtils.cs:37

References Terraria.GameContent.Biomes.GraniteBiome._sourceMagmaMap, Terraria.WorldBuilding.GenBase._tiles, Terraria.WorldBuilding.WorldUtils.ClearTile(), Terraria.WorldGen.drunkWorldGen, System.item, System.list, and Terraria.WorldGen.SolidTile().

Referenced by Terraria.GameContent.Biomes.GraniteBiome.Place().