EffectsTreeEditor ​
Inherits: VBoxContainer
Reusable tree-based editor for managing collections of effects. Supports ability on_use_effects, passive_effects, composite child_effects, charge tier effects, and combo step effects.
Properties ​
AbilityDefinition | parent_ability | |
CompositeEffect | parent_composite_effect | |
Array[int] | effects_array | [] |
bool | read_only | false |
bool | show_root_label | true |
String | root_label_text | "Effects" |
bool | allow_reordering | true |
bool | show_effect_details | true |
Variables ​
bool | is_loading | false |
Effect | selected_effect | null |
int | selected_effect_index | -1 |
ArrayMode | current_array_mode | ArrayMode.NONE |
ResourceManager | resource_manager | |
DialogManager | dialog_manager |
Methods ​
void | setup_managers( p_resource_manager: ResourceManager, p_dialog_manager: DialogManager ) |
void | load_ability_on_use_effects( ability: ActiveAbilityDefinition ) |
void | load_ability_passive_effects( ability: PassiveAbilityDefinition ) |
void | load_ability_effects( ability: AbilityDefinition ) |
void | load_composite_effects( composite_effect: CompositeEffect ) |
void | load_tier_effects( charge_ability: PowerUpActiveAbilityDefinition, tier_index: int ) |
void | load_combo_effects( combo_ability: ComboActiveAbilityDefinition, step_index: int ) |
void | set_effects_array( new_effects_array: Array[int], ability: AbilityDefinition = null, composite: CompositeEffect = null ) |
Array[int] | get_effects_array() |
ArrayMode | get_array_mode() |
bool | has_effects() |
int | get_effects_count() |
void | apply_theme_manager() |
Signals ​
effects_changed() ​
effect_selected( effect: Effect ) ​
effect_double_clicked( effect: Effect ) ​
effect_add_requested( effect_id: int ) ​
effect_remove_requested( index: int ) ​
effect_move_requested( from_index: int, to_index: int ) ​
Enumerations ​
enum ArrayMode ​
Tracks which array on the parent resource this editor is currently bound to. This lets signal handlers in the ability editor know which array to mutate.
- NONE =
0 - ABILITY_ON_USE =
1- ActiveAbilityDefinition.on_use_effects - ABILITY_PASSIVE =
2- PassiveAbilityDefinition.passive_effects - COMPOSITE =
3- CompositeEffect.child_effects - TIER =
4- PowerUpActiveAbilityDefinition.tier_effects[n] - COMBO_STEP =
5- ComboActiveAbilityDefinition.combo_effects[n]
Constants ​
intTREE_ICON_SIZE =24constMENU_ADD_EFFECT =100constMENU_REMOVE_EFFECT =101constMENU_EDIT_EFFECT =102constMENU_MOVE_UP =104constMENU_MOVE_DOWN =105
Property descriptions ​
AbilityDefinition parent_ability ​
No description yet.
CompositeEffect parent_composite_effect ​
No description yet.
Array[int] effects_array = [] ​
No description yet.
bool read_only = false ​
No description yet.
bool show_root_label = true ​
No description yet.
String root_label_text = "Effects" ​
No description yet.
bool allow_reordering = true ​
No description yet.
bool show_effect_details = true ​
No description yet.
Variable descriptions ​
bool is_loading = false ​
No description yet.
Effect selected_effect = null ​
No description yet.
int selected_effect_index = -1 ​
No description yet.
ArrayMode current_array_mode = ArrayMode.NONE ​
No description yet.
ResourceManager resource_manager ​
No description yet.
DialogManager dialog_manager ​
No description yet.
Method descriptions ​
void setup_managers( p_resource_manager: ResourceManager, p_dialog_manager: DialogManager ) ​
No description yet.
void load_ability_on_use_effects( ability: ActiveAbilityDefinition ) ​
Load the on_use_effects array from an ActiveAbilityDefinition. Use this for the "On Use Effects" section of the ability editor.
void load_ability_passive_effects( ability: PassiveAbilityDefinition ) ​
Load the passive_effects array from a PassiveAbilityDefinition (or subclass). Use this for the "Passive Effects" section of the ability editor.
void load_ability_effects( ability: AbilityDefinition ) ​
Legacy entry point: loads ability.effects (now maps to on_use for active, passive for passive). Kept for backwards compatibility — prefer the explicit methods above.
void load_composite_effects( composite_effect: CompositeEffect ) ​
Load child effects from a CompositeEffect.
void load_tier_effects( charge_ability: PowerUpActiveAbilityDefinition, tier_index: int ) ​
Load effects for a specific charge tier.
void load_combo_effects( combo_ability: ComboActiveAbilityDefinition, step_index: int ) ​
Load effects for a specific combo step.
void set_effects_array( new_effects_array: Array[int], ability: AbilityDefinition = null, composite: CompositeEffect = null ) ​
Set a custom effects array directly (generic fallback).
Array[int] get_effects_array() ​
Get the current effects array.
ArrayMode get_array_mode() ​
Get the current array mode so signal handlers know which array was modified.
bool has_effects() ​
No description yet.
int get_effects_count() ​
No description yet.
void apply_theme_manager() ​
No description yet.