This commit is contained in:
2025-07-02 22:40:58 -07:00
parent 8d4b45e0e0
commit 995b0b93e2
59 changed files with 6496 additions and 0 deletions
@@ -0,0 +1,51 @@
// Copyright 2016 Mookie. All Rights Reserved.
#include "EBBarrelComponentFactory.h"
#include "EBBarrel.h"
#include "AssetToolsModule.h"
#define LOCTEXT_NAMESPACE "EBBarrelComponentFactory"
UClass* FEBBarrelComponentFactory::GetSupportedClass() const
{
return UEBBarrel::StaticClass();
}
uint32 FEBBarrelComponentFactory::GetCategories()
{
IAssetTools& AssetTools = FModuleManager::LoadModuleChecked<FAssetToolsModule>("AssetTools").Get();
return AssetTools.RegisterAdvancedAssetCategory(FName(TEXT("Ballistics")), LOCTEXT("BallisticsCategory", "Ballistics"));
}
FText FEBBarrelComponentFactory::GetAssetDescription(const FAssetData& AssetData) const
{
return LOCTEXT("EBBarrelComponentDescription", "A weapon barrel component that handles firing mechanics, ammunition management, and ballistic calculations for projectile weapons.");
}
UClass* FEBBarrelComponentAssetBroker::GetSupportedAssetClass()
{
return UEBBarrel::StaticClass();
}
bool FEBBarrelComponentAssetBroker::AssignAssetToComponent(UActorComponent* InComponent, UObject* InAsset)
{
if (UEBBarrel* BarrelComponent = Cast<UEBBarrel>(InComponent))
{
// Components don't typically have assets assigned to them directly
// This would be used if we had barrel configuration assets
return false;
}
return false;
}
UObject* FEBBarrelComponentAssetBroker::GetAssetFromComponent(UActorComponent* InComponent)
{
if (UEBBarrel* BarrelComponent = Cast<UEBBarrel>(InComponent))
{
// Return any associated asset if we had barrel configuration assets
return nullptr;
}
return nullptr;
}
#undef LOCTEXT_NAMESPACE