Skip to content

EventTypeManager ​

Inherits: RefCounted

Manages all event type scanning, creation, and parameter handling Updated to work with new Condition system using @export hints Uses PropertySelectorRegistry for unified property → database mappings

Variables ​

Stringtriggers_path"res://addons/chroniclenode/data_classes/events/event_tri...
Stringconditions_path"res://addons/chroniclenode/data_classes/conditions/"
Stringactions_path"res://addons/chroniclenode/data_classes/events/event_act...
Dictionarytrigger_types{}
Dictionarycondition_types{}
Dictionaryaction_types{}
Dictionaryscript_cache{}
Dictionaryparameter_cache{}
boolauto_refresh_on_file_changetrue
boolcache_script_instancestrue
boolvalidate_scripts_on_loadtrue

Methods ​

voidrefresh_all_types()
voidrefresh_triggers()
voidrefresh_conditions()
voidrefresh_actions()
Dictionaryget_types( category: TypeCategory )
Dictionaryget_types_by_name( category_name: String )
Dictionaryfind_type_by_path( script_path: String )
Array[Dictionary]find_types_by_name( display_name: String )
EventTriggercreate_trigger( type_info: Dictionary, parameters: Dictionary = {} )
Conditioncreate_condition( type_info: Dictionary, parameters: Dictionary = {} )
EventActioncreate_action( type_info: Dictionary, parameters: Dictionary = {} )
Resourcecreate_instance_from_type( type_name: String, type_info: Dictionary, parameters: Dictionary = {} )
boolupdate_instance( instance: Resource, type_info: Dictionary, parameters: Dictionary = {} )
Dictionaryextract_parameters_from_script( script_path: String )
Dictionaryextract_parameters_from_instance( instance: Resource )
Stringget_function_description( script_path: String )
Array[Dictionary]validate_script( script_path: String, expected_base_class: String = "" )
Stringformat_description_with_parameters( description: String, instance: Resource )
Stringformat_parameter_value_with_type( param_name: String, value, param_info: Dictionary )

Signals ​

types_refreshed( type_category: String, types_dict: Dictionary ) ​

type_created( type_category: String, instance: Resource, type_info: Dictionary ) ​

type_updated( type_category: String, instance: Resource, type_info: Dictionary ) ​

parameter_extracted( type_info: Dictionary, parameters: Dictionary ) ​

Enumerations ​

enum TypeCategory ​

  • TRIGGER = 0
  • CONDITION = 1
  • ACTION = 2

Variable descriptions ​

String triggers_path = "res://addons/chroniclenode/data_classes/events/event_trigge ​

No description yet.

String conditions_path = "res://addons/chroniclenode/data_classes/conditions/" ​

No description yet.

String actions_path = "res://addons/chroniclenode/data_classes/events/event_action ​

No description yet.

Dictionary trigger_types = ​

No description yet.

Dictionary condition_types = ​

No description yet.

Dictionary action_types = ​

No description yet.

Dictionary script_cache = ​

No description yet.

Dictionary parameter_cache = ​

No description yet.

bool auto_refresh_on_file_change = true ​

No description yet.

bool cache_script_instances = true ​

No description yet.

bool validate_scripts_on_load = true ​

No description yet.

Method descriptions ​

void refresh_all_types() ​

Refresh all type dictionaries

void refresh_triggers() ​

Refresh trigger types

void refresh_conditions() ​

Refresh condition types

void refresh_actions() ​

Refresh action types

Dictionary get_types( category: TypeCategory ) ​

Get all types for a specific category

Dictionary get_types_by_name( category_name: String ) ​

Get types by category name (string)

Dictionary find_type_by_path( script_path: String ) ​

Find a specific type by path

Array[Dictionary] find_types_by_name( display_name: String ) ​

Find types by display name

EventTrigger create_trigger( type_info: Dictionary, parameters: Dictionary = {} ) ​

Create a new trigger instance

Condition create_condition( type_info: Dictionary, parameters: Dictionary = {} ) ​

Create a new condition instance

EventAction create_action( type_info: Dictionary, parameters: Dictionary = {} ) ​

Create a new action instance

Resource create_instance_from_type( type_name: String, type_info: Dictionary, parameters: Dictionary = {} ) ​

Create instance by type info (generic)

bool update_instance( instance: Resource, type_info: Dictionary, parameters: Dictionary = {} ) ​

Update an existing instance with new script and parameters

Dictionary extract_parameters_from_script( script_path: String ) ​

Extract parameters from a script

Dictionary extract_parameters_from_instance( instance: Resource ) ​

Extract parameters from an existing instance

String get_function_description( script_path: String ) ​

Get function description from script (with fallbacks)

Array[Dictionary] validate_script( script_path: String, expected_base_class: String = "" ) ​

Validate a script for compatibility

String format_description_with_parameters( description: String, instance: Resource ) ​

Format description with parameter values (used by tree builders)

String format_parameter_value_with_type( param_name: String, value, param_info: Dictionary ) ​

Format parameter value with context (knows about selector types)