5156 {
5157
5158
5161 {
5162 return false;
5163 }
5164 bool flag = false;
5167 {
5168 Main.tileSolid[138] = false;
5169 }
5171 {
5172 num++;
5173 if (num > Main.maxTilesY - 10)
5174 {
5175 return false;
5176 }
5177 if (num >= Main.maxTilesY - 300)
5178 {
5180 }
5181 }
5183 {
5184 Main.tileSolid[138] = true;
5185 }
5186 num--;
5188 {
5189 return false;
5190 }
5191 if (Main.tile[
x2, num].wall == 87)
5192 {
5193 return false;
5194 }
5195 if (Main.tile[
x2, num].liquid > 0 && Main.tile[
x2, num].lava())
5196 {
5197 flag = true;
5198 }
5199 if (Main.remixWorld)
5200 {
5202 {
5204 }
5205 else if (
type == -1 && (
double)num < Main.rockLayer - 30.0 &&
genRand.Next(3) != 0)
5206 {
5208 }
5209 else if (
type == -1)
5210 {
5212 }
5213 }
5215 {
5217 }
5219 {
5221 }
5222 else if (
type == -1)
5223 {
5225 }
5227 {
5228 return false;
5229 }
5230 if (flag &&
type != 3)
5231 {
5232 return false;
5233 }
5235 {
5236 return false;
5237 }
5238 if (Main.tile[
x2, num].nactive() || Main.tile[
x2 - 1, num].nactive() || Main.tile[
x2 + 1, num].nactive() || Main.tile[
x2, num - 1].nactive() || Main.tile[
x2 - 1, num - 1].nactive() || Main.tile[
x2 + 1, num - 1].nactive() || Main.tile[
x2, num - 2].nactive() || Main.tile[
x2 - 1, num - 2].nactive() || Main.tile[
x2 + 1, num - 2].nactive())
5239 {
5240 return false;
5241 }
5242 if (Main.tile[
x2, num + 1].type == 48)
5243 {
5244 return false;
5245 }
5246 if (Main.tile[
x2, num + 1].type == 232)
5247 {
5248 return false;
5249 }
5251 {
5252 for (
int i =
x2 - 3;
i <=
x2 + 3;
i++)
5253 {
5254 for (
int j = num - 3;
j <= num + 3;
j++)
5255 {
5256 if (Main.tile[i,
j].type == 147 || Main.tile[i,
j].type == 161)
5257 {
5259 }
5260 }
5261 }
5262 }
5264 {
5265 Main.tileSolid[138] = false;
5266 }
5268 {
5269 case 0:
5270 {
5275 {
5278 {
5279 return false;
5280 }
5281 }
5285 {
5287 if (
num20 > Main.maxTilesX)
5288 {
5289 return false;
5290 }
5291 }
5298 {
5300 }
5302 {
5304 }
5306 {
5308 }
5310 {
5312 }
5314 {
5316 }
5318 {
5320 }
5323 {
5327 {
5330 }
5331 }
5333 {
5336 }
5337 else
5338 {
5340 {
5342 return false;
5343 }
5346 }
5348 {
5350 return false;
5351 }
5352 if (Main.tile[
x2, num].wall > 0)
5353 {
5355 }
5356 else
5357 {
5359 }
5363 {
5365 }
5369 {
5372 {
5374 }
5376 {
5378 }
5381 {
5383 }
5385 {
5387 }
5389 }
5391 return true;
5392 }
5393 case 1:
5394 {
5396 {
5397 Main.tileSolid[138] = true;
5398 }
5403 {
5405 {
5406 return false;
5407 }
5409 {
5410 return false;
5411 }
5412 }
5413 else
5414 {
5416 {
5417 return false;
5418 }
5420 {
5421 return false;
5422 }
5424 {
5425 return false;
5426 }
5427 }
5430 {
5434 {
5436 {
5438 {
5440 }
5441 if (Main.tile[
m,
n].active())
5442 {
5443 if (Main.tile[
m,
n].type == 226)
5444 {
5446 return false;
5447 }
5448 if (Main.tile[
m,
n].type == 0 || Main.tile[
m,
n].type == 1 || Main.tile[
m,
n].type == 59)
5449 {
5451 }
5452 }
5453 }
5454 }
5456 if ((
double)
num4 < Main.worldSurface)
5457 {
5459 return false;
5460 }
5462 {
5464 }
5465 }
5467 {
5469 return false;
5470 }
5472 {
5474 {
5476 }
5477 }
5479 {
5481 {
5483 {
5485 }
5486 }
5487 }
5489 {
5491 return false;
5492 }
5497 {
5499 }
5500 else
5501 {
5503 }
5519 {
5522 {
5524 }
5526 {
5528 }
5531 {
5533 }
5535 {
5537 }
5539 }
5541 return true;
5542 }
5543 case 2:
5544 {
5550 {
5553 {
5555 return false;
5556 }
5557 }
5559 {
5561 {
5563 {
5564 return false;
5565 }
5566 }
5567 }
5577 {
5580 {
5582 }
5584 {
5586 }
5589 {
5591 }
5593 {
5595 }
5597 }
5599 break;
5600 }
5601 case 3:
5602 {
5603 if (Main.tile[
x2 + 1, num].active())
5604 {
5605 return false;
5606 }
5607 if (Main.tile[
x2, num].liquid > 0 && !Main.tile[
x2, num].lava())
5608 {
5609 return false;
5610 }
5612 {
5614 {
5615 return false;
5616 }
5618 {
5619 return false;
5620 }
5621 }
5622 for (
int k =
x2;
k <=
x2 + 1;
k++)
5623 {
5626 {
5627 return false;
5628 }
5629 }
5631 for (
int l = 0;
l < 2;
l++)
5632 {
5633 Main.tile[
x2 +
l, num].active(active:
true);
5634 Main.tile[
x2 +
l, num].type = 443;
5635 Main.tile[
x2 +
l, num].frameX = (
short)(18 *
l + 36 *
num2);
5636 Main.tile[
x2 +
l, num].frameY = 0;
5637 }
5638 return true;
5639 }
5640 }
5642 {
5643 Main.tileSolid[138] = true;
5644 }
5645 return false;
5646 }
static Vector2D shimmerPosition
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static bool noTrapsWorldGen
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static bool tenthAnniversaryWorldGen
static UnifiedRandom genRand
static bool InWorld(int x, int y, int fluff=0)
static bool IsTileNearby(int x, int y, int type, int distance)
static double Distance(Vector2D value1, Vector2D value2)