// 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("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(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(InComponent)) { // Return any associated asset if we had barrel configuration assets return nullptr; } return nullptr; } #undef LOCTEXT_NAMESPACE