tModLoader v0.11.8.9
A mod to make and play Terraria mods
|
Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loader classes. More...
Static Public Member Functions | |
static int | BuffType< T > () |
Get the id (type) of a ModBuff by class. Assumes one instance per class. More... | |
static int | DustType< T > () |
Get the id (type) of a ModDust by class. Assumes one instance per class. More... | |
static bool | FileExists (string name) |
Returns whether or not a file with the specified name exists. More... | |
static EquipTexture | GetEquipTexture (EquipType type, int slot) |
Gets the equipment texture for the specified equipment type and ID. More... | |
static byte[] | GetFileBytes (string name) |
Gets the byte representation of the file with the specified name. The name is in the format of "ModFolder/OtherFolders/FileNameWithExtension". Throws an ArgumentException if the file does not exist. More... | |
static T | GetInstance< T > () |
static int | GetModBackgroundSlot (string texture) |
Returns the slot/ID of the background texture with the given name. More... | |
static int | GetModBossHeadSlot (string texture) |
Gets the index of the boss head texture corresponding to the given texture path. More... | |
static ModBuff | GetModBuff (int type) |
Gets the ModBuff instance with the given type. If no ModBuff with the given type exists, returns null. More... | |
static ModDust | GetModDust (int type) |
Gets the ModDust instance with the given type. Returns null if no ModDust with the given type exists. More... | |
static int | GetModHeadSlot (string texture) |
Gets the index of the head texture corresponding to the given texture path. More... | |
static ModItem | GetModItem (int type) |
Gets the ModItem instance corresponding to the specified type. Returns null if no modded item has the given type. More... | |
static ModMountData | GetModMountData (int type) |
Gets the ModMountData instance corresponding to the given type. Returns null if no ModMountData has the given type. More... | |
static ModNPC | GetModNPC (int type) |
Gets the ModNPC instance corresponding to the specified type. More... | |
static ModProjectile | GetModProjectile (int type) |
Gets the ModProjectile instance corresponding to the specified type. More... | |
static ModSurfaceBgStyle | GetModSurfaceBgStyle (int style) |
Returns the ModSurfaceBgStyle object with the given ID. More... | |
static ModTile | GetModTile (int type) |
Gets the ModTile instance with the given type. If no ModTile with the given type exists, returns null. More... | |
static ModUgBgStyle | GetModUgBgStyle (int style) |
Returns the ModUgBgStyle object with the given ID. More... | |
static ModWall | GetModWall (int type) |
Gets the ModWall instance with the given type. If no ModWall with the given type exists, returns null. More... | |
static ModWaterfallStyle | GetModWaterfallStyle (int style) |
Returns the ModWaterfallStyle with the given ID. More... | |
static ModWaterStyle | GetModWaterStyle (int style) |
Returns the ModWaterStyle with the given ID. More... | |
static Music | GetMusic (string name) |
Gets the music with the specified name. The name is in the same format as for texture names. Throws an ArgumentException if the music does not exist. Note: SoundMP3 is in the Terraria.ModLoader namespace. More... | |
static SoundEffect | GetSound (string name) |
Gets the sound with the specified name. The name is in the same format as for texture names. Throws an ArgumentException if the sound does not exist. Note: SoundEffect is in the Microsoft.Xna.Framework.Audio namespace. More... | |
static Texture2D | GetTexture (string name) |
Gets the texture with the specified name. The name is in the format of "ModFolder/OtherFolders/FileNameWithoutExtension". Throws an ArgumentException if the texture does not exist. If a vanilla texture is desired, the format "Terraria/FileNameWithoutExtension" will reference an image from the "terraria/Content/Images" folder. Note: Texture2D is in the Microsoft.Xna.Framework.Graphics namespace. More... | |
static int | ItemType< T > () |
Get the id (type) of a ModItem by class. Assumes one instance per class. More... | |
static int | MountType< T > () |
Get the id (type) of a ModMountData by class. Assumes one instance per class. More... | |
static bool | MusicExists (string name) |
Returns whether or not a sound with the specified name exists. More... | |
static int | NPCType< T > () |
Get the id (type) of a ModNPC by class. Assumes one instance per class. More... | |
static Stream | OpenRead (string assetName, bool newFileStream=false) |
static byte | PrefixType< T > () |
Get the id (type) of a ModPrefix by class. Assumes one instance per class. More... | |
static int | ProjectileType< T > () |
Get the id (type) of a ModProjectile by class. Assumes one instance per class. More... | |
static void | RefreshModLanguage (GameCulture culture) |
static bool | SoundExists (string name) |
Returns whether or not a sound with the specified name exists. More... | |
static void | SplitName (string name, out string domain, out string subName) |
static bool | TextureExists (string name) |
Returns whether or not a texture with the specified name exists. More... | |
static int | TileEntityType< T > () |
Get the id (type) of a ModTileEntity by class. Assumes one instance per class. More... | |
static int | TileType< T > () |
Get the id (type) of a ModTile by class. Assumes one instance per class. More... | |
static int | WallType< T > () |
Get the id (type) of a ModWall by class. Assumes one instance per class. More... | |
Static Private Member Functions | |
static void | CacheVanillaState () |
static void | DisposeMusic () |
static void | LoadModContent (CancellationToken token, Action< Mod > loadAction) |
static void | ResizeArrays (bool unloading=false) |
static LocalizedText | SetLocalizedText (Dictionary< string, LocalizedText > dict, LocalizedText value) |
static void | SetupRecipes (CancellationToken token) |
Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loader classes.
Definition at line 26 of file ModContent.cs.
|
static |
Get the id (type) of a ModBuff by class. Assumes one instance per class.
T | : | ModBuff | |
T | : | GetInstance<T>() | |
T | : | Type |
|
staticprivate |
Definition at line 392 of file ModContent.cs.
|
staticprivate |
Definition at line 581 of file ModContent.cs.
|
static |
Get the id (type) of a ModDust by class. Assumes one instance per class.
T | : | ModDust | |
T | : | GetInstance<T>() | |
T | : | Type |
|
static |
Returns whether or not a file with the specified name exists.
Definition at line 57 of file ModContent.cs.
References Terraria.ModLoader.Mod.FileExists(), Terraria.ModLoader.ModLoader.GetMod(), and Terraria.ModLoader.ModContent.SplitName().
|
static |
Gets the equipment texture for the specified equipment type and ID.
type | |
slot |
|
static |
Gets the byte representation of the file with the specified name. The name is in the format of "ModFolder/OtherFolders/FileNameWithExtension". Throws an ArgumentException if the file does not exist.
MissingResourceException | Missing mod: " + name |
Definition at line 43 of file ModContent.cs.
References Terraria.ModLoader.Mod.GetFileBytes(), Terraria.ModLoader.ModLoader.GetMod(), and Terraria.ModLoader.ModContent.SplitName().
|
static |
T | : | class | |
T | : | ContentInstance<T> | |
T | : | Instance |
|
static |
Returns the slot/ID of the background texture with the given name.
|
static |
Gets the index of the boss head texture corresponding to the given texture path.
texture |
|
static |
|
static |
|
static |
Gets the index of the head texture corresponding to the given texture path.
texture | Relative texture path |
|
static |
Gets the ModItem instance corresponding to the specified type. Returns null if no modded item has the given type.
|
static |
Gets the ModMountData instance corresponding to the given type. Returns null if no ModMountData has the given type.
type | The type of the mount. |
|
static |
|
static |
Gets the ModProjectile instance corresponding to the specified type.
type | The type of the projectile |
|
static |
Returns the ModSurfaceBgStyle object with the given ID.
|
static |
|
static |
Returns the ModUgBgStyle object with the given ID.
|
static |
|
static |
Returns the ModWaterfallStyle with the given ID.
|
static |
Returns the ModWaterStyle with the given ID.
|
static |
Gets the music with the specified name. The name is in the same format as for texture names. Throws an ArgumentException if the music does not exist. Note: SoundMP3 is in the Terraria.ModLoader namespace.
MissingResourceException | Missing mod: " + name |
Definition at line 179 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.GetMod(), Terraria.ModLoader.Mod.GetMusic(), and Terraria.ModLoader.ModContent.SplitName().
|
static |
Gets the sound with the specified name. The name is in the same format as for texture names. Throws an ArgumentException if the sound does not exist. Note: SoundEffect is in the Microsoft.Xna.Framework.Audio namespace.
MissingResourceException | Missing mod: " + name |
Definition at line 147 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.GetMod(), Terraria.ModLoader.Mod.GetSound(), and Terraria.ModLoader.ModContent.SplitName().
Referenced by Terraria.ModLoader.Mod.AddSound().
|
static |
Gets the texture with the specified name. The name is in the format of "ModFolder/OtherFolders/FileNameWithoutExtension". Throws an ArgumentException if the texture does not exist. If a vanilla texture is desired, the format "Terraria/FileNameWithoutExtension" will reference an image from the "terraria/Content/Images" folder. Note: Texture2D is in the Microsoft.Xna.Framework.Graphics namespace.
MissingResourceException | Missing mod: " + name |
Definition at line 72 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.GetMod(), and Terraria.ModLoader.ModContent.SplitName().
Referenced by Terraria.ModLoader.Mod.AddBackgroundTexture(), Terraria.ModLoader.Mod.AddBossHeadTexture(), Terraria.ModLoader.Mod.AddDust(), Terraria.ModLoader.Mod.AddEquipTexture(), Terraria.ModLoader.Mod.AddMount(), Terraria.ModLoader.Mod.AddNPCHeadTexture(), Terraria.ModLoader.ModItem.AutoStaticDefaults(), Terraria.ModLoader.ModNPC.AutoStaticDefaults(), Terraria.ModLoader.ModProjectile.AutoStaticDefaults(), Terraria.ModLoader.BackgroundTextureLoader.GetBackgroundSlot(), and Terraria.ModLoader.NPCHeadLoader.GetBossHeadSlot().
|
static |
Get the id (type) of a ModItem by class. Assumes one instance per class.
T | : | ModItem | |
T | : | GetInstance<T>() | |
T | : | item.type |
|
staticprivate |
Definition at line 397 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.Mods.
|
static |
Get the id (type) of a ModMountData by class. Assumes one instance per class.
T | : | ModMountData | |
T | : | GetInstance<T>() | |
T | : | Type |
|
static |
Returns whether or not a sound with the specified name exists.
Definition at line 191 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.GetMod(), Terraria.ModLoader.Mod.MusicExists(), and Terraria.ModLoader.ModContent.SplitName().
|
static |
Get the id (type) of a ModNPC by class. Assumes one instance per class.
T | : | ModNPC | |
T | : | GetInstance<T>() | |
T | : | npc.type |
|
static |
Definition at line 629 of file ModContent.cs.
References Terraria.ModLoader.Mod.GetFileStream(), Terraria.ModLoader.ModLoader.GetMod(), and Terraria.ModLoader.ModContent.SplitName().
Referenced by Terraria.ModLoader.Audio.MusicStreaming.EnsureLoaded().
|
static |
Get the id (type) of a ModPrefix by class. Assumes one instance per class.
T | : | ModPrefix | |
T | : | GetInstance<T>() | |
T | : | Type |
|
static |
Get the id (type) of a ModProjectile by class. Assumes one instance per class.
T | : | ModProjectile | |
T | : | GetInstance<T>() | |
T | : | projectile.type |
|
static |
Definition at line 527 of file ModContent.cs.
References Terraria.ModLoader.ModBuff.Description, Terraria.ModLoader.ModBuff.DisplayName, Terraria.ModLoader.ModItem.DisplayName, Terraria.ModLoader.ModNPC.DisplayName, Terraria.ModLoader.ModPrefix.DisplayName, Terraria.ModLoader.ModProjectile.DisplayName, Terraria.ModLoader.ModTranslation.GetTranslation(), Terraria.ModLoader.ModItem.item, Terraria.ModLoader.ModTranslation.Key, Terraria.ModLoader.ModLoader.Mods, Terraria.ModLoader.ModNPC.npc, Terraria.ModLoader.ModProjectile.projectile, Terraria.ModLoader.ModContent.SetLocalizedText(), Terraria.ModLoader.ModItem.Tooltip, Terraria.ModLoader.ModBuff.Type, and Terraria.ModLoader.ModPrefix.Type.
|
staticprivate |
Definition at line 499 of file ModContent.cs.
|
staticprivate |
Definition at line 344 of file ModContent.cs.
Referenced by Terraria.ModLoader.ModContent.RefreshModLanguage().
|
staticprivate |
Definition at line 418 of file ModContent.cs.
|
static |
Returns whether or not a sound with the specified name exists.
Definition at line 164 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.GetMod(), Terraria.ModLoader.Mod.SoundExists(), and Terraria.ModLoader.ModContent.SplitName().
|
static |
Definition at line 30 of file ModContent.cs.
Referenced by Terraria.ModLoader.ModContent.FileExists(), Terraria.ModLoader.ModContent.GetFileBytes(), Terraria.ModLoader.ModContent.GetMusic(), Terraria.ModLoader.ModContent.GetSound(), Terraria.ModLoader.ModContent.GetTexture(), Terraria.ModLoader.ModContent.MusicExists(), Terraria.ModLoader.ModContent.OpenRead(), Terraria.ModLoader.ModContent.SoundExists(), and Terraria.ModLoader.ModContent.TextureExists().
|
static |
Returns whether or not a texture with the specified name exists.
Definition at line 91 of file ModContent.cs.
References Terraria.ModLoader.ModLoader.GetMod(), Terraria.ModLoader.ModContent.SplitName(), and Terraria.ModLoader.Mod.TextureExists().
Referenced by Terraria.ModLoader.Mod.AddEquipTexture(), Terraria.ModLoader.Mod.AddMount(), and Terraria.ModLoader.ModItem.AutoStaticDefaults().
|
static |
Get the id (type) of a ModTileEntity by class. Assumes one instance per class.
T | : | ModTileEntity | |
T | : | GetInstance<T>() | |
T | : | Type |
|
static |
Get the id (type) of a ModTile by class. Assumes one instance per class.
T | : | ModTile | |
T | : | GetInstance<T>() | |
T | : | Type |
|
static |
Get the id (type) of a ModWall by class. Assumes one instance per class.
T | : | ModWall | |
T | : | GetInstance<T>() | |
T | : | Type |