Interface ITMPCommand
- Namespace
- TMPEffects.TMPCommands
Base interface for all TMPEffects commands.
public interface ITMPCommand : ITMPParameterValidator
- Inherited Members
Properties
ExecuteInstantly
Whether the command is executed the moment the TMPWriter begins writing.
Otherwise, it is executed when the TMPWriter shows the character at the corresponding index.
bool ExecuteInstantly { get; }
Property Value
ExecuteOnSkip
Whether the command should be executed by the TMPWriter if its text position is skipped over.
bool ExecuteOnSkip { get; }
Property Value
ExecuteRepeatable
Whether the command may be executed multiple times if, for example, the TMPWriter is reset to an earlier text position after the command has been executed.
An example for a command that should not be repeatable is one that triggers a quest, or adds an item to the player's inventory.
bool ExecuteRepeatable { get; }
Property Value
TagType
The type of command this is.
TagType TagType { get; }
Property Value
Remarks
Index: This type of command is executed when the TMPWriter shows the character at the corresponding index. It does not need to be closed.
Example: This is <!delay=0.01> my text
Block: This type of command is executed when the TMPWriter shows the character at the first corresponding index. It needs to be closed, and will operate on the enclosed text.
Example: This <!show>is my</!show> text
Either: Both applications are valid.
Methods
ExecuteCommand(ICommandContext)
Execute the command.
void ExecuteCommand(ICommandContext context)
Parameters
context
ICommandContext
GetNewCustomData()
Get a new custom data object for this command.
object GetNewCustomData()
Returns
- object
The custom data object for this command.
SetParameters(object, IDictionary<string, string>, ITMPKeywordDatabase)
Set the parameters for the command.
void SetParameters(object customData, IDictionary<string, string> parameters, ITMPKeywordDatabase keywordDatabase)
Parameters
customData
objectThe custom data for this command.
parameters
IDictionary<string, string>Parameters as key-value-pairs.
keywordDatabase
ITMPKeywordDatabaseThe keyword database used for parsing the parameter values.