DictionaryBuilder
Hierarchy
- DictionaryBuilder
Index
Constructors
constructor
Constructs a new DictionaryBuilder instance
Returns DictionaryBuilder
Properties
_children
_condition
_entries
_targetIndex
Methods
asset
Adds a dictionary entry which identifies an asset - usually the asset being changed, but the tag can be customized.
Parameters
asset: Asset
The asset in question
optionaltag: string = "AssetName"
The tag to replace
optionalcraftName: string = ""
The name of the crafted item if applicable
Returns DictionaryBuilder
build
Constructs a dictionary array from the data passed to this instance.
Returns ChatMessageDictionaryEntry[]
- The constructed dictionary
destinationCharacter
Adds a DestinationCharacter dictionary entry
Parameters
character: Character
The character which should be referenced by the DestinationCharacter entry
Returns DictionaryBuilder
destinationCharacterName
Adds a DestinationCharacterName dictionary entry
Parameters
character: Character
The character which should be referenced by the DestinationCharacterName entry
Returns DictionaryBuilder
focusGroup
Adds a dictionary entry which identifies the focused group - the group that was acted upon to generate the message, if applicable.
Parameters
groupName: AssetGroupItemName
The name of the focus group
Returns DictionaryBuilder
group
Adds a dictionary entry which identifies a given group.
Parameters
tag: string
The tag to use as the substitution
groupName: AssetGroupName
The name of the group
Returns DictionaryBuilder
if
Creates and enters a child ConditionalDictionaryBuilder, whose entries are only added if the provided condition is truthy.
Parameters
condition: boolean
The condition to check
Returns ConditionalDictionaryBuilder
- The child ConditionalDictionaryBuilder instance
markAutomatic
Marks the message as being automatically generated. Usually used by automated vibe changes. Those will get filtered out depending on the reciever's chat settings.
Returns DictionaryBuilder
performActivity
Adds an activity entry to the dictionary.
Parameters
name: ActivityName
The activity performed
group: AssetGroup
The group the activity is being performed on
optionalitem: Item = null
The item used to perform the activity
optionalcount: number = 1
The number of times the activity is done
Returns DictionaryBuilder
shockIntensity
Adds a shock intensity entry.
Parameters
intensity: number
The intensity of the shock applied
Returns DictionaryBuilder
sourceCharacter
Adds a SourceCharacter dictionary entry
Parameters
character: Character
The character which should be referenced by the SourceCharacter entry
Returns DictionaryBuilder
suctionLevel
Add a suction intensity entry
Parameters
intensity: number
The intensity of the suction applied
Returns DictionaryBuilder
targetCharacter
Adds a TargetCharacter dictionary entry
Parameters
character: Character
The character which should be referenced by the TargetCharacter entry
optionalindex: number
The target character index if there is more than one target character
Returns DictionaryBuilder
targetCharacterName
Adds a TargetCharacterName dictionary entry
Parameters
character: Character
The character which should be referenced by the TargetCharacterName entry
Returns DictionaryBuilder
text
Adds a text dictionary entry. This is a straightforward dictionary entry where the provided tag will be directly replaced by the given text.
Parameters
tag: string
The tag to replace
text: string
The text to replace the tag with
Returns DictionaryBuilder
textLookup
Adds a text lookup dictionary entry. A text lookup will be performed on the provided lookup text, and the resulting value will be used to replace the associated tag.
Parameters
tag: string
The tag to replace
lookupText: string
The text to look up and replace the tag with
Returns DictionaryBuilder
Build class for chat message dictionaries