Skip to content

TreeBuilder ​

Inherits: MarginContainer

Inherited by: EventTreeBuilder, QuestLineTreeBuilder, QuestTreeBuilder

Base class for all tree builders with shared functionality

Variables ​

Resourcecurrent_resourcenull
EventTypeManagertype_manager
TreeItemroot

Methods ​

voidset_resource( resource: Resource )
voidrebuild_tree()
boolhas_unsaved_changes()
voidmark_saved()
voidset_managers( p_type_manager: EventTypeManager )
boolcreate_and_add_action( type_data: Dictionary, param_values: Dictionary, additional_data: Dictionary = {} )
boolcreate_and_add_condition( type_data: Dictionary, param_values: Dictionary, additional_data: Dictionary = {} )
boolupdate_instance( instance: Resource, type_data: Dictionary, param_values: Dictionary )

Signals ​

show_add_unit_dialog( type: String, data: Dictionary ) ​

show_edit_unit_dialog( type: String, unit_data: Dictionary ) ​

resource_modified() ​

Enumerations ​

enum ItemType ​

  • CATEGORY = 0
  • QUEST_STEP = 1
  • QUEST_IN_STEP = 2
  • OBJECTIVE = 3
  • TRIGGER = 4
  • CONDITION = 5
  • ACTION = 6
  • ON_START_ACTION = 7
  • ON_COMPLETE_ACTION = 8
  • ON_ABANDON_ACTION = 9
  • IF_CONDITION_SECTION = 10
  • IF_TRUE_SECTION = 11
  • IF_FALSE_SECTION = 12
  • SWITCH_CASE_SECTION = 13
  • SWITCH_DEFAULT_SECTION = 14
  • SWITCH_CASE_CONDITION_SECTION = 15
  • SWITCH_CASE_ACTIONS_SECTION = 16
  • SWITCH_DEFAULT_ACTIONS_SECTION = 17

Variable descriptions ​

Resource current_resource = null ​

No description yet.

EventTypeManager type_manager ​

No description yet.

TreeItem root ​

No description yet.

Method descriptions ​

void set_resource( resource: Resource ) ​

No description yet.

void rebuild_tree() ​

No description yet.

bool has_unsaved_changes() ​

No description yet.

void mark_saved() ​

No description yet.

void set_managers( p_type_manager: EventTypeManager ) ​

No description yet.

bool create_and_add_action( type_data: Dictionary, param_values: Dictionary, additional_data: Dictionary = {} ) ​

No description yet.

bool create_and_add_condition( type_data: Dictionary, param_values: Dictionary, additional_data: Dictionary = {} ) ​

No description yet.

bool update_instance( instance: Resource, type_data: Dictionary, param_values: Dictionary ) ​

No description yet.