Commit 011cc03d authored by Kyrium's avatar Kyrium
Browse files

CDO Log fix

parent de85b52b
#pragma once
#include "Subsystems/HelperClasses/KBFL_CDOHelperClass_Items.h"
DECLARE_LOG_CATEGORY_EXTERN(CDOHelperItemsLog, Log, All)
DEFINE_LOG_CATEGORY(CDOHelperItemsLog)
void UKBFL_CDOHelperClass_Items::DoCDO(UObject* Context)
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperItems > Called %s"), *this->GetName());
UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > Called %s"), *this->GetName());
for (const auto DefaultObject : GetDefaultObjects<UFGItemDescriptor>())
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperItems > DoItemCDO > %s"), *DefaultObject->GetName());
UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > DoItemCDO > %s"), *DefaultObject->GetName());
if(DefaultObject)
{
if(mDisplayNameOverride)
{
DefaultObject->mDisplayName = mDisplayName;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mDisplayName > %s"), *DefaultObject->GetName());
}
if(mDescriptionOverride)
{
DefaultObject->mDescription = mDescription;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mDescription > %s"), *DefaultObject->GetName());
}
if(mStackSizeOverride)
{
DefaultObject->mStackSize = mStackSize;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mStackSize > %s"), *DefaultObject->GetName());
}
if(mRememberPickUpOverride)
{
DefaultObject->mRememberPickUp = mRememberPickUp;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mRememberPickUp > %s"), *DefaultObject->GetName());
}
if(mCanBeDiscardedOverride)
{
DefaultObject->mCanBeDiscarded = mCanBeDiscarded;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mCanBeDiscarded > %s"), *DefaultObject->GetName());
}
if(mRadioactiveDecayOverride)
{
DefaultObject->mRadioactiveDecay = mRadioactiveDecay;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mRadioactiveDecay > %s"), *DefaultObject->GetName());
}
if(mEnergyValueOverride)
{
DefaultObject->mEnergyValue = mEnergyValue;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mEnergyValue > %s"), *DefaultObject->GetName());
}
if(mFormOverride)
{
DefaultObject->mForm = mForm;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mForm > %s"), *DefaultObject->GetName());
}
if(mConveyorMeshOverride)
{
DefaultObject->mConveyorMesh = mConveyorMesh;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mConveyorMesh > %s"), *DefaultObject->GetName());
}
if(mSmallIconOverride)
{
DefaultObject->mSmallIcon = mSmallIcon;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mSmallIcon > %s"), *DefaultObject->GetName());
}
if(mPersistentBigIconOverride)
{
DefaultObject->mPersistentBigIcon = mPersistentBigIcon;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mPersistentBigIcon > %s"), *DefaultObject->GetName());
}
if(mCategoryOverride)
{
DefaultObject->mCategory = mCategory;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mCategory > %s"), *DefaultObject->GetName());
}
if(mSubCategoriesOverride)
{
DefaultObject->mSubCategories = mSubCategories;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mSubCategories > %s"), *DefaultObject->GetName());
}
if(mQuickSwitchGroupOverride)
{
DefaultObject->mQuickSwitchGroup = mQuickSwitchGroup;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mQuickSwitchGroup > %s"), *DefaultObject->GetName());
}
if(mFluidColorOverride)
{
DefaultObject->mFluidColor = mFluidColor;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mFluidColor > %s"), *DefaultObject->GetName());
}
if(mGasColorOverride)
{
DefaultObject->mGasColor = mGasColor;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mGasColor > %s"), *DefaultObject->GetName());
}
UFGResourceDescriptor* ResDefault = Cast<UFGResourceDescriptor>(DefaultObject);
if(ResDefault)
{
if(mDepositMeshOverride)
{
ResDefault->mDepositMesh = mDepositMesh;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mDepositMesh > %s"), *DefaultObject->GetName());
}
if(mDepositMaterialOverride)
{
ResDefault->mDepositMaterial = mDepositMaterial;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mDepositMaterial > %s"), *DefaultObject->GetName());
}
if(mDecalSizeOverride)
{
ResDefault->mDecalSize = mDecalSize;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mDecalSize > %s"), *DefaultObject->GetName());
}
if(mCompassTextureOverride)
{
ResDefault->mCompassTexture = mCompassTexture;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mCompassTexture > %s"), *DefaultObject->GetName());
}
if(mCollectSpeedMultiplierOverride)
{
ResDefault->mCollectSpeedMultiplier = mCollectSpeedMultiplier;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mCollectSpeedMultiplier > %s"), *DefaultObject->GetName());
}
}
UFGItemDescriptorNuclearFuel* NuclearFuelDefault = Cast<UFGItemDescriptorNuclearFuel>(DefaultObject);
if(NuclearFuelDefault)
{
if(mSpentFuelClassOverride)
{
NuclearFuelDefault->mSpentFuelClass = mSpentFuelClass;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mSpentFuelClass > %s"), *DefaultObject->GetName());
}
if(mAmountOfWasteOverride)
{
NuclearFuelDefault->mAmountOfWaste = mAmountOfWaste;
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > mAmountOfWaste > %s"), *DefaultObject->GetName());
}
}
DefaultObject->MarkPackageDirty();
......@@ -97,10 +170,9 @@ TArray<UClass*> UKBFL_CDOHelperClass_Items::GetClasses()
TArray<UClass*> Re;
for (auto Class : mItems)
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperItems > GetSubclassesOf > Found SoftClass"));
//UE_LOG(CDOHelperItemsLog, Log, TEXT("CDOHelperItems > GetSubclassesOf > Found SoftClass"));
if(IsValidSoftClass(Class))
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperRecipe > GetSubclassesOf > Add %s"), *Class->GetName());
Re.Add(Class.LoadSynchronous());
}
}
......
#pragma once
#include "Subsystems/HelperClasses/KBFL_CDOHelperClass_Recipes.h"
DECLARE_LOG_CATEGORY_EXTERN(CDOHelperRecipesLog, Log, All)
DEFINE_LOG_CATEGORY(CDOHelperRecipesLog)
void UKBFL_CDOHelperClass_Recipes::DoCDO(UObject* Context)
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperSchematic > Called %s"), *this->GetName());
for (const auto DefaultObject : GetDefaultObjects<UFGRecipe>())
UE_LOG(CDOHelperRecipesLog, Log, TEXT("CDOHelperRecipes > Called %s"), *this->GetName());
for (auto DefaultObject : GetDefaultObjects<UFGRecipe>())
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperSchematic > DoSchematicCDO > %s"), *DefaultObject->GetName());
UE_LOG(CDOHelperRecipesLog, Log, TEXT("CDOHelperRecipes > DoSchematicCDO > %s"), *DefaultObject->GetName());
if(DefaultObject)
{
if(mDisplayNameOverride)
......@@ -55,10 +59,9 @@ TArray<UClass*> UKBFL_CDOHelperClass_Recipes::GetClasses()
TArray<UClass*> Re;
for (auto Class : mRecipes)
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperRecipe > GetSubclassesOf > Found SoftClass"));
UE_LOG(CDOHelperRecipesLog, Log, TEXT("CDOHelperRecipes > GetSubclassesOf > Found SoftClass"));
if(IsValidSoftClass(Class))
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperRecipe > GetSubclassesOf > Add %s"), *Class->GetName());
Re.Add(Class.LoadSynchronous());
}
}
......
#pragma once
#include "Subsystems/HelperClasses/KBFL_CDOHelperClass_Schematic.h"
DECLARE_LOG_CATEGORY_EXTERN(CDOHelperSchematicLog, Log, All)
DEFINE_LOG_CATEGORY(CDOHelperSchematicLog)
void UKBFL_CDOHelperClass_Schematic::DoCDO(UObject* Context)
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperSchematic > Called %s"), *this->GetName());
for (const auto DefaultObject : GetDefaultObjects<UFGSchematic>())
UE_LOG(CDOHelperSchematicLog, Log, TEXT("CDOHelperSchematic > Called %s"), *this->GetName());
for (auto DefaultObject : GetDefaultObjects<UFGSchematic>())
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperSchematic > DoSchematicCDO > %s"), *DefaultObject->GetName());
UE_LOG(CDOHelperSchematicLog, Log, TEXT("CDOHelperSchematic > DoSchematicCDO > %s"), *DefaultObject->GetName());
if(DefaultObject)
{
if(mTypeOverride)
......@@ -67,10 +71,9 @@ TArray<UClass*> UKBFL_CDOHelperClass_Schematic::GetClasses()
TArray<UClass*> Re;
for (auto Class : mSchematics)
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperSchematic > GetSubclassesOf > Found SoftClass"));
UE_LOG(CDOHelperSchematicLog, Log, TEXT("CDOHelperSchematic > GetSubclassesOf > Found SoftClass"));
if(IsValidSoftClass(Class))
{
UE_LOG(LogTemp, Log, TEXT("CDOHelperSchematic > GetSubclassesOf > Add %s"), *Class->GetName());
Re.Add(Class.LoadSynchronous());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment