TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.ModLoader.ModTypeLookup< T > Class Template Reference

Enables content instances to register with M:Terraria.ModLoader.ModTypeLookup`1.Register(`0) towards retrieval via M:Terraria.ModLoader.ModContent.Find``1(System.String) and similar methods. More...

+ Collaboration diagram for Terraria.ModLoader.ModTypeLookup< T >:

Static Public Member Functions

static void Register (T instance)
 Registers the instance towards lookup via M:Terraria.ModLoader.ModContent.Find``1(System.String) and similar methods.
Should only be called once per instance. Registers legacy names specified via T:Terraria.ModLoader.LegacyNameAttribute on the instance's type automatically.
 
static void RegisterLegacyNames (T instance, params string[] legacyNames)
 Registers the instance towards lookup via M:Terraria.ModLoader.ModContent.Find``1(System.String) and similar methods using any number of specified legacyNames .
Also see

See also
T:Terraria.ModLoader.LegacyNameAttribute

which may be more convenient.

 

Static Package Functions

static T Get (string fullName)
 
static T Get (string modName, string contentName)
 
static bool TryGetValue (string fullName, out T value)
 
static bool TryGetValue (string modName, string contentName, out T value)
 

Static Private Member Functions

static ModTypeLookup ()
 
static void RegisterWithName (T instance, string name, string fullName)
 

Static Private Attributes

static readonly Dictionary< string, T > dict
 
static readonly Dictionary< string, Dictionary< string, T > > tieredDict
 

Detailed Description

Enables content instances to register with M:Terraria.ModLoader.ModTypeLookup`1.Register(`0) towards retrieval via M:Terraria.ModLoader.ModContent.Find``1(System.String) and similar methods.

Type Constraints
T :IModType 

Definition at line 12 of file ModTypeLookup.cs.


The documentation for this class was generated from the following file: