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

◆ ShouldUseLava()

bool Terraria.GameContent.Biomes.GraniteBiome.ShouldUseLava ( Point tileOrigin)
inlineprivate

Definition at line 192 of file GraniteBiome.cs.

193 {
194 int length = _sourceMagmaMap.GetLength(0);
195 int length2 = _sourceMagmaMap.GetLength(1);
196 int num = length / 2;
197 int num2 = length2 / 2;
198 if (tileOrigin.Y + num2 <= GenVars.lavaLine - 30)
199 {
200 return false;
201 }
202 for (int i = -50; i < 50; i++)
203 {
204 for (int j = -50; j < 50; j++)
205 {
206 if (GenBase._tiles[tileOrigin.X + num + i, tileOrigin.Y + num2 + j].active())
207 {
208 ushort type = GenBase._tiles[tileOrigin.X + num + i, tileOrigin.Y + num2 + j].type;
209 if (type == 147 || (uint)(type - 161) <= 2u || type == 200)
210 {
211 return false;
212 }
213 }
214 }
215 }
216 return true;
217 }

References Terraria.GameContent.Biomes.GraniteBiome._sourceMagmaMap, Terraria.WorldBuilding.GenBase._tiles, Terraria.WorldBuilding.GenVars.lavaLine, System.length, System.length2, and System.type.

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