UnifiedResourceDialog ​
Inherits: AcceptDialog
Unified dialog for creating and editing resources with dynamic UI generation Similar to EventTypeSelector but for creating/editing resources like Rewards and Requirements
Description ​
Uses property name mapping to determine which UI control to create Automatically scans directories for resource types Builds UI dynamically based on exported properties
Variables ​
OptionButton | resource_type_option | |
VBoxContainer | dynamic_container | |
Resource | current_resource | |
bool | is_editing | false |
Dictionary | param_values | {} # Property name -> current value |
String | current_type_key | "" |
String | current_class_name | "" |
Dictionary | current_type_info | {} # Store current type info for single-type mode |
DialogManager | dialog_manager | |
String | resource_category | "" # "reward" or "requirement" |
Array[Dictionary] | scanned_types | [] |
Methods ​
void | setup_managers( p_dialog_manager: DialogManager ) |
void | setup( category: String ) |
void | setup_single_type( resource_script: Script, display_name: String = "" ) |
void | edit_resource( resource: Resource, is_single_type: bool = false ) |
Signals ​
resource_configured( resource: Resource ) ​
Constants ​
DictionaryTYPE_PATHS ={DictionaryPROJECT_PATHS ={- Where a project keeps its own types of a category (the addon folder is overwritten by updates, these never are). Missing folders are fineDictionaryPROPERTY_SELECTORS ={
Variable descriptions ​
OptionButton resource_type_option ​
No description yet.
VBoxContainer dynamic_container ​
No description yet.
Resource current_resource ​
No description yet.
bool is_editing = false ​
No description yet.
Dictionary param_values = # Property name -> current value ​
No description yet.
String current_type_key = "" ​
No description yet.
String current_class_name = "" ​
No description yet.
Dictionary current_type_info = # Store current type info for single-type mode ​
No description yet.
DialogManager dialog_manager ​
No description yet.
String resource_category = "" # "reward" or "requirement" ​
No description yet.
Array[Dictionary] scanned_types = [] ​
No description yet.
Method descriptions ​
void setup_managers( p_dialog_manager: DialogManager ) ​
No description yet.
void setup( category: String ) ​
Setup for creating a new resource of a specific category (reward/requirement)
void setup_single_type( resource_script: Script, display_name: String = "" ) ​
Setup for creating a new resource of a specific single type (e.g., CombatReaction, EncounterReaction) This is for resources that don't have multiple types to choose from
void edit_resource( resource: Resource, is_single_type: bool = false ) ​
Setup for editing an existing resource