Glossary

This contains the source code documentation of the class subsystem_Glossary.

subsystem_Glossary

Inherits: DialogicSubsystem

Subsystem that handles glossaries.

Properties


Methods

ReturnsMethod
voidclear_game_state ( _clear_flag: int = 0 )
Stringparse_glossary ( text: String )
voidadd_glossary ( path: String )
DialogicGlossaryfind_glossary ( entry_key: String )
Dictionaryget_entry ( entry_key: String )
Stringtranslate ( tr_base: String, property: StringName, fallback_entry: Dictionary )

Constants

const SETTING_DEFAULT_COLOR = "dialogic/glossary/default_color"

No description available.


Property Descriptions

var glossaries = []

List of glossary resources that are used.


var enabled = true

If false, no parsing will be done.


var color_overrides = {}

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