Massive changes to the npc system

This commit is contained in:
2026-09-20 14:22:08 +02:00
parent 1fe94cfa7a
commit 5d61de068c
58 changed files with 3752 additions and 188 deletions

View File

@@ -8,6 +8,7 @@
#include "ItemDataAssetCustomization.h"
#include "ItemEditorWindow.h"
#include "NpcScheduleActionCustomization.h"
#define LOCTEXT_NAMESPACE "ProjectEleriEditorModule"
@@ -24,6 +25,14 @@ void FProjectEleriEditorModule::StartupModule()
FOnGetDetailCustomizationInstance::CreateStatic(&FItemDataAssetCustomization::MakeInstance)
);
// Details customization for schedule actions, so an anchor is picked from the level instead of
// being typed in as a PersistentId. Registered under the struct's script name, which is the C++
// struct name without its F prefix.
PropEd.RegisterCustomPropertyTypeLayout(
TEXT("ScheduledAction"),
FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FNpcScheduleActionCustomization::MakeInstance)
);
// Register the Item Editor as a docking tab.
if (FGlobalTabmanager::Get()->HasTabSpawner(ItemEditorTabName))
{
@@ -63,6 +72,7 @@ void FProjectEleriEditorModule::ShutdownModule()
{
FPropertyEditorModule& PropEd = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropEd.UnregisterCustomClassLayout(TEXT("ItemDataAsset"));
PropEd.UnregisterCustomPropertyTypeLayout(TEXT("ScheduledAction"));
}
if (FGlobalTabmanager::Get()->HasTabSpawner(ItemEditorTabName))