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

◆ TryGetHandler()

bool Terraria.GameContent.DoorOpeningHelper.TryGetHandler ( Point tileCoords,
out DoorAutoHandler infoProvider )
inlineprivate

Definition at line 476 of file DoorOpeningHelper.cs.

477 {
478 //IL_0003: Unknown result type (might be due to invalid IL or missing references)
479 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
480 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
481 //IL_0024: Unknown result type (might be due to invalid IL or missing references)
482 infoProvider = null;
483 if (!WorldGen.InWorld(tileCoords.X, tileCoords.Y, 3))
484 {
485 return false;
486 }
487 Tile tile = Main.tile[tileCoords.X, tileCoords.Y];
488 if (tile == null)
489 {
490 return false;
491 }
492 int type = tile.type;
494 if (modTile != null && TileID.Sets.OpenDoorID[modTile.Type] > -1)
495 {
496 type = 10;
497 }
498 return _handlerByTileType.TryGetValue(type, out infoProvider);
499 }
Dictionary< int, DoorAutoHandler > _handlerByTileType
static int[] OpenDoorID
The ID of the tile that a given closed door transforms into when it becomes OPENED....
Definition TileID.cs:515
static ModTile GetModTile(int type)
Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loa...
Definition ModContent.cs:38
This class represents a type of tile that can be added by a mod. Only one instance of this class will...
Definition ModTile.cs:19

References Terraria.GameContent.DoorOpeningHelper._handlerByTileType, Terraria.ModLoader.ModContent.GetModTile(), Terraria.WorldGen.InWorld(), Terraria.ID.TileID.Sets.OpenDoorID, Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.GameContent.DoorOpeningHelper.TryAutoOpeningDoor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: