This contains the source code documentation of the class subsystem_Glossary
.
subsystem_Glossary
Inherits: DialogicSubsystem
Subsystem that handles glossaries.
Properties
Name | Type | Default |
---|---|---|
glossaries | Array | [] |
enabled | bool | true |
color_overrides | Dictionary | {} |
Methods
Returns | Method |
---|---|
void | clear_game_state ( _clear_flag : int = 0 ) |
String | parse_glossary ( text : String ) |
void | add_glossary ( path : String ) |
DialogicGlossary | find_glossary ( entry_key : String ) |
Dictionary | get_entry ( entry_key : String ) |
String | translate ( tr_base : String, property : StringName, fallback_entry : Dictionary ) |
Constants
const SETTING_DEFAULT_COLOR = "dialogic/glossary/default_color"
No description available.
Property Descriptions
List of glossary resources that are used.
If false, no parsing will be done.
Any key in this dictionary will overwrite the color for any item with that name.
Method Descriptions
func clear_game_state ( _clear_flag
: int = 0
) ⇒ void
No description available.
func parse_glossary ( text
: String ) ⇒ String
No description available.
func add_glossary ( path
: String ) ⇒ void
No description available.
func find_glossary ( entry_key
: String ) ⇒ DialogicGlossary
Iterates over all glossaries and returns the first one that matches the entry_key
. Runtime complexity: O(n), where n is the number of glossaries.
func get_entry ( entry_key
: String ) ⇒ Dictionary
Returns the first match for a given entry key. If translation is available and enabled, it will be translated
func translate ( tr_base
: String, property
: StringName, fallback_entry
: Dictionary ) ⇒ String
Tries to translate the property with the given