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 ​
String | triggers_path | "res://addons/chroniclenode/data_classes/events/event_tri... |
String | conditions_path | "res://addons/chroniclenode/data_classes/conditions/" |
String | actions_path | "res://addons/chroniclenode/data_classes/events/event_act... |
Dictionary | trigger_types | {} |
Dictionary | condition_types | {} |
Dictionary | action_types | {} |
Dictionary | script_cache | {} |
Dictionary | parameter_cache | {} |
bool | auto_refresh_on_file_change | true |
bool | cache_script_instances | true |
bool | validate_scripts_on_load | true |
Methods ​
void | refresh_all_types() |
void | refresh_triggers() |
void | refresh_conditions() |
void | refresh_actions() |
Dictionary | get_types( category: TypeCategory ) |
Dictionary | get_types_by_name( category_name: String ) |
Dictionary | find_type_by_path( script_path: String ) |
Array[Dictionary] | find_types_by_name( display_name: String ) |
EventTrigger | create_trigger( type_info: Dictionary, parameters: Dictionary = {} ) |
Condition | create_condition( type_info: Dictionary, parameters: Dictionary = {} ) |
EventAction | create_action( type_info: Dictionary, parameters: Dictionary = {} ) |
Resource | create_instance_from_type( type_name: String, type_info: Dictionary, parameters: Dictionary = {} ) |
bool | update_instance( instance: Resource, type_info: Dictionary, parameters: Dictionary = {} ) |
Dictionary | extract_parameters_from_script( script_path: String ) |
Dictionary | extract_parameters_from_instance( instance: Resource ) |
String | get_function_description( script_path: String ) |
Array[Dictionary] | validate_script( script_path: String, expected_base_class: String = "" ) |
String | format_description_with_parameters( description: String, instance: Resource ) |
String | format_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)