Skip to content

CreateEntityDialog ​

Inherits: AcceptDialog

Dialog for creating new entities or player classes with optional template selection

Properties ​

EntityModecreation_modeEntityMode.ENTITY

Variables ​

ResourceManagerresource_manager
Arrayavailable_templates[]
Dictionarymode_config{}

Methods ​

voidsetup_and_show( p_resource_manager: ResourceManager )
boolis_valid_resource_name( name: String )
Dictionaryget_template_info( template_id: int )
voidreset_form()
voidsuggest_name( suggested_name: String )
intget_selected_template_id()
Stringget_resource_name()
voidset_creation_mode( mode: EntityMode )
EntityModeget_creation_mode()
boolis_entity_mode()
boolis_player_class_mode()

Signals ​

selection_made( display_name: String, template_id: int ) ​

Enumerations ​

enum EntityMode ​

  • ENTITY = 0
  • PLAYER_CLASS = 1
  • INTERACTABLE = 2

Property descriptions ​

EntityMode creation_mode = EntityMode.ENTITY ​

Configure what type of resource this dialog creates

Variable descriptions ​

ResourceManager resource_manager ​

No description yet.

Array available_templates = [] ​

No description yet.

Dictionary mode_config = ​

No description yet.

Method descriptions ​

void setup_and_show( p_resource_manager: ResourceManager ) ​

Setup the dialog with resource manager and show

bool is_valid_resource_name( name: String ) ​

Validate resource name

Dictionary get_template_info( template_id: int ) ​

Get template info for display

void reset_form() ​

Reset dialog state

void suggest_name( suggested_name: String ) ​

Pre-fill dialog with suggested name

int get_selected_template_id() ​

Get currently selected template ID

String get_resource_name() ​

Get current resource name

void set_creation_mode( mode: EntityMode ) ​

Set creation mode programmatically

EntityMode get_creation_mode() ​

Get current creation mode

bool is_entity_mode() ​

Check if dialog is configured for entities

bool is_player_class_mode() ​

Check if dialog is configured for player classes