TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.ModLoader.ModEmoteBubble Class Referenceabstract

Represents an emote. Emotes are typically used by players or NPC. Players can use the emotes menu or chat commands to display an emote, while town NPC spawn emotes when talking to each other. More...

+ Inheritance diagram for Terraria.ModLoader.ModEmoteBubble:
+ Collaboration diagram for Terraria.ModLoader.ModEmoteBubble:

Public Member Functions

override void SetupContent ()
 If you make a new ModType, seal this override, and call M:Terraria.ModLoader.ModType.SetStaticDefaults in it.
 
void AddToCategory (int categoryId)
 Allows you to add this emote to a specific vanilla category.
This should only be called in M:Terraria.ModLoader.ModType.SetStaticDefaults
 
virtual bool IsUnlocked ()
 Allows you to determine whether or not this emote can be seen in emotes menu. Returns true by default.
Do note that this doesn't effect emote command and NPC using.
 
virtual void OnSpawn ()
 Gets called when your emote bubble spawns in world.
 
virtual bool UpdateFrame ()
 Allows you to modify the frame of this emote bubble. Return false to stop vanilla frame update code from running. Returns true by default.
 
virtual bool UpdateFrameInEmoteMenu (ref int frameCounter)
 Allows you to modify the frame of this emote bubble which displays in emotes menu. Return false to stop vanilla frame update code from running. Returns true by default.
Do note that you should NEVER use the P:Terraria.ModLoader.ModEmoteBubble.EmoteBubble field in this method because it's null.
 
virtual bool PreDraw (SpriteBatch spriteBatch, Texture2D texture, Vector2 position, Rectangle frame, Vector2 origin, SpriteEffects spriteEffects)
 Allows you to draw things behind this emote bubble, or to modify the way this emote bubble is drawn. Return false to stop the game from drawing the emote bubble (useful if you're manually drawing the emote bubble). Returns true by default.
 
virtual void PostDraw (SpriteBatch spriteBatch, Texture2D texture, Vector2 position, Rectangle frame, Vector2 origin, SpriteEffects spriteEffects)
 Allows you to draw things in front of this emote bubble. This method is called even if PreDraw returns false.
 
virtual bool PreDrawInEmoteMenu (SpriteBatch spriteBatch, EmoteButton uiEmoteButton, Vector2 position, Rectangle frame, Vector2 origin)
 Allows you to draw things behind this emote bubble that displays in emotes menu, or to modify the way this emote bubble is drawn. Return false to stop the game from drawing the emote bubble (useful if you're manually drawing the emote bubble). Returns true by default.
Do note that you should NEVER use the P:Terraria.ModLoader.ModEmoteBubble.EmoteBubble field in this method because it's null.
 
virtual void PostDrawInEmoteMenu (SpriteBatch spriteBatch, EmoteButton uiEmoteButton, Vector2 position, Rectangle frame, Vector2 origin)
 Allows you to draw things in front of this emote bubble. This method is called even if PreDraw returns false.
Do note that you should NEVER use the P:Terraria.ModLoader.ModEmoteBubble.EmoteBubble field in this method because it's null.
 
virtual ? Rectangle GetFrame ()
 Allows you to modify the frame rectangle for drawing this emote. Useful for emote bubbles that share the same texture.
 
virtual ? Rectangle GetFrameInEmoteMenu (int frame, int frameCounter)
 Allows you to modify the frame rectangle for drawing this emote in emotes menu. Useful for emote bubbles that share the same texture.
 
virtual void Load ()
 Allows you to perform one-time loading tasks. Beware that mod content has not finished loading here, things like ModContent lookup tables or ID Sets are not fully populated.
 
virtual bool IsLoadingEnabled (Mod mod)
 Allows you to stop M:Terraria.ModLoader.Mod.AddContent(Terraria.ModLoader.ILoadable) from actually adding this content. Useful for items that can be disabled by a config.
 
virtual void SetStaticDefaults ()
 Allows you to modify the properties after initial loading has completed.
 
virtual void Unload ()
 Allows you to safely unload things you added in M:Terraria.ModLoader.ModType.Load.
 
string PrettyPrintName ()
 
virtual TModType Clone (TEntity newEntity)
 Create a copy of this instanced global. Called when an entity is cloned.
 
virtual TModType NewInstance (TEntity entity)
 Create a new instance of this ModType for a specific entity.
 

Protected Member Functions

override void Register ()
 
override EmoteBubble CreateTemplateEntity ()
 
virtual void InitTemplateInstance ()
 Create dummy objects for instanced mod-types.
 
override void InitTemplateInstance ()
 Create dummy objects for instanced mod-types.
 
virtual void ValidateType ()
 Check for the correct overrides of different hook methods and fields and properties.
 

Properties

virtual string Texture [get]
 The file name of this emote's texture file in the mod loader's file space.
 
int Type [get, set]
 The internal ID of this EmoteBubble.
 
EmoteBubble EmoteBubble [get]
 This is the P:Terraria.ModLoader.ModEmoteBubble.EmoteBubble instance.
 
virtual string LocalizationCategory [get]
 The category used by this modded content for use in localization keys. Localization keys follow the pattern of "Mods.{ModName}.{Category}.{ContentName}.{DataName}". The Localization wiki pageexplains how custom T:Terraria.ModLoader.ModType classes can utilize this.
 
virtual LocalizedText Command [get]
 This is the name that will show up as the emote command.
 
Mod Mod [get, set]
 The mod this belongs to.
 
virtual string Name [get]
 The internal name of this.
 
string FullName [get]
 The internal name of this, including the mod it is from.
 
TEntity Entity [get, set]
 
virtual bool IsCloneable [get]
 Whether or not this type is cloneable. Cloning is supported if
all reference typed fields in each sub-class which doesn't override Clone are marked with [CloneByReference].
 
virtual bool CloneNewInstances [get]
 Whether to create new instances of this mod type via M:Terraria.ModLoader.ModType`2.Clone(`0) or via the default constructor Defaults to false (default constructor).
 

Private Member Functions

void ILoadable. Load (Mod mod)
 Called when loading the type.
 

Private Attributes

bool? _isCloneable
 

Detailed Description

Represents an emote. Emotes are typically used by players or NPC. Players can use the emotes menu or chat commands to display an emote, while town NPC spawn emotes when talking to each other.

Definition at line 13 of file ModEmoteBubble.cs.


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