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

◆ FillPotentialTargetTiles()

void Terraria.GameContent.ObjectInteractions.TileSmartInteractCandidateProvider.FillPotentialTargetTiles ( SmartInteractScanSettings settings)
inlineprivate

Definition at line 307 of file TileSmartInteractCandidateProvider.cs.

308 {
309 for (int i = settings.LX; i <= settings.HX; i++)
310 {
311 for (int j = settings.LY; j <= settings.HY; j++)
312 {
313 Tile tile = Main.tile[i, j];
314 if (tile == null || !tile.active())
315 {
316 continue;
317 }
318 switch (tile.type)
319 {
320 case 10:
321 case 11:
322 case 21:
323 case 29:
324 case 55:
325 case 79:
326 case 85:
327 case 88:
328 case 89:
329 case 97:
330 case 102:
331 case 104:
332 case 125:
333 case 132:
334 case 136:
335 case 139:
336 case 144:
337 case 207:
338 case 209:
339 case 215:
340 case 216:
341 case 287:
342 case 335:
343 case 338:
344 case 354:
345 case 377:
346 case 386:
347 case 387:
348 case 388:
349 case 389:
350 case 410:
351 case 411:
352 case 425:
353 case 441:
354 case 455:
355 case 463:
356 case 464:
357 case 467:
358 case 468:
359 case 470:
360 case 475:
361 case 480:
362 case 487:
363 case 491:
364 case 494:
365 case 509:
366 case 510:
367 case 511:
368 case 573:
369 case 597:
370 case 621:
371 case 657:
372 case 658:
373 targets.Add(new Tuple<int, int>(i, j));
374 break;
375 case 15:
376 case 497:
377 if (settings.player.IsWithinSnappngRangeToTile(i, j, 40))
378 {
379 targets.Add(new Tuple<int, int>(i, j));
380 }
381 break;
382 case 237:
383 if (settings.player.HasItem(1293))
384 {
385 targets.Add(new Tuple<int, int>(i, j));
386 }
387 break;
388 case 212:
389 if (settings.player.HasItem(949))
390 {
391 targets.Add(new Tuple<int, int>(i, j));
392 }
393 break;
394 case 356:
395 if (!Main.fastForwardTimeToDawn && (Main.netMode == 1 || Main.sundialCooldown == 0))
396 {
397 targets.Add(new Tuple<int, int>(i, j));
398 }
399 break;
400 case 663:
401 if (!Main.fastForwardTimeToDusk && (Main.netMode == 1 || Main.moondialCooldown == 0))
402 {
403 targets.Add(new Tuple<int, int>(i, j));
404 }
405 break;
406 }
407 }
408 }
409 }

References Terraria.Tile.active(), System.Collections.Generic.List< T >.Add(), Terraria.Main.fastForwardTimeToDawn, Terraria.Main.fastForwardTimeToDusk, Terraria.Player.HasItem(), Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings.HX, Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings.HY, Terraria.Player.IsWithinSnappngRangeToTile(), Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings.LX, Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings.LY, Terraria.Main.moondialCooldown, Terraria.Main.netMode, Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings.player, Terraria.Main.sundialCooldown, Terraria.GameContent.ObjectInteractions.TileSmartInteractCandidateProvider.targets, Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.GameContent.ObjectInteractions.TileSmartInteractCandidateProvider.ProvideCandidate().