Commit 86cb8c0b authored by Kyrium's avatar Kyrium
Browse files

Merge branch 'dev' into 'main'

Update 1.11.0

See merge request !6
parents 34ee4afd 1ce8398e
......@@ -119,6 +119,8 @@ BlueprintReadWrite=(Class="AFGTutorialIntroManager", Property="mHasCompletedIntr
BlueprintReadWrite=(Class="AFGGameState", Property="mUnlockCustomizerSchematic")
BlueprintReadWrite=(Class="UFGPoolSettings", Property="PoolEntry")
BlueprintReadWrite=(Class="AFGBuildableResourceExtractorBase", Property="mExtractResourceNode")
BlueprintReadWrite=(Class="AFGBuildableResourceExtractorBase", Property="mExtractableResource")
Friend=(Class="UFGItemDescriptor", FriendClass="UKBFL_Items")
Friend=(Class="UFGRecipe", FriendClass="UKBFL_Recipes")
......@@ -191,4 +193,5 @@ Friend=(Class="AFGBuildableFrackingExtractor", FriendClass="FKBFLModule")
Friend=(Class="UWorldModuleManager", FriendClass="FKBFLModule")
Friend=(Class="UFGPoolSettings", FriendClass="UKBFLWorldModule")
Friend=(Class="UFGPipeConnectionFactory", FriendClass="AKBFLUtilItemCreaterBuildable")
\ No newline at end of file
Friend=(Class="UFGPipeConnectionFactory", FriendClass="AKBFLUtilItemCreaterBuildable")
Friend=(Class="USubsystemActorManager", FriendClass="UKBFL_Util")
\ No newline at end of file
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.9.5",
"SemVersion": "1.9.5",
"VersionName": "1.11.0",
"SemVersion": "1.11.0",
"FriendlyName": "KBFL",
"Description": "Lib for Kyris Mods",
"Category": "Modding",
......
#include "BFL/KBFL_Asset.h"
DECLARE_LOG_CATEGORY_EXTERN(KBFLAssetLog, Log, All)
DEFINE_LOG_CATEGORY(KBFLAssetLog)
template <class T>
bool UKBFL_Asset::GetSubclassFromAsset(FAssetData AssetData, TSubclassOf<T>& OutClass)
{
if(AssetData.IsValid())
{
if (AssetData.AssetClass != TEXT("Blueprint")) {
//UE_LOG(KBFLAssetLog, Log, TEXT("!Blueprint"));
return false;
}
FString ExportedPath;
if (!AssetData.GetTagValue(FBlueprintTags::GeneratedClassPath, ExportedPath)) {
//UE_LOG(KBFLAssetLog, Log, TEXT("!GeneratedClassPath"));
return false;
}
FString ClassPath;
if (!FPackageName::ParseExportTextPath(ExportedPath, NULL, &ClassPath)) {
//UE_LOG(KBFLAssetLog, Log, TEXT("!ParseExportTextPath"));
return false;
}
/*
UClass* AssetClass = LoadClass<UObject>(NULL, *ClassPath);
if(AssetClass != NULL && AssetClass->IsChildOf(T::StaticClass()))
{
OutClass = TSubclassOf<T>(AssetClass);
return OutClass != NULL;
}
*/
if(TSoftClassPtr<UObject> SoftClass = TSoftClassPtr(FSoftObjectPath(ClassPath)); (SoftClass.IsPending() || SoftClass.IsValid()))
{
UClass* Test = SoftClass.LoadSynchronous();
if(Test)
if(Test->IsChildOf(T::StaticClass()))
{
OutClass = Test;
return OutClass != nullptr;
}
return false;
}
}
return false;
}
......@@ -31,6 +31,11 @@ AFGCharacterPlayer* UKBFL_Player::GetFGCharacter(UObject* WorldContext)
return nullptr;
}
AFGPlayerState* UKBFL_Player::GetFgPlayerState(UObject* WorldContext)
{
return GetFGController(WorldContext)->GetPlayerState<AFGPlayerState>();
}
void UKBFL_Player::GetBuildingGunHitResult(UObject* WorldContext, bool& IsInBuildOrDismantleState, FHitResult& HitResult)
{
const auto BuildGun = GetBuildingGun(WorldContext);
......@@ -51,4 +56,4 @@ EBuildGunState UKBFL_Player::GetPlayerBuildState(UObject* WorldContext)
return BuildGun->mCurrentStateEnum;
}
return EBuildGunState::BGS_NONE;
}
}
\ No newline at end of file
......@@ -32,10 +32,14 @@ AKBFLDataSubsystem* UKBFL_Util::GetDataSubsystem(UObject* WorldContext)
AModSubsystem* UKBFL_Util::GetSubsystem(UObject* WorldContext, TSubclassOf<AModSubsystem> Subsystem)
{
UWorld* WorldObject = GEngine->GetWorldFromContextObjectChecked(WorldContext->GetWorld());
USubsystemActorManager* SubsystemActorManager = WorldObject->GetSubsystem<USubsystemActorManager>();
check(SubsystemActorManager);
return SubsystemActorManager->K2_GetSubsystemActor(Subsystem);
if(WorldContext)
{
UWorld* WorldObject = GEngine->GetWorldFromContextObjectChecked(WorldContext);
USubsystemActorManager* SubsystemActorManager = WorldObject->GetSubsystem<USubsystemActorManager>();
check(SubsystemActorManager);
return SubsystemActorManager->K2_GetSubsystemActor(Subsystem);
}
return nullptr;
}
void UKBFL_Util::RemoveArrayFromScanners(UObject* WorldContext,
......@@ -138,3 +142,19 @@ void UKBFL_Util::RemoveNodeNOTResourcesClassFromWorld(UObject* WorldContext,
}
}
}
/** CPP Helper for instand Clast */
AModSubsystem* UKBFL_Util::GetSubsystemFromChild(UObject* WorldContext, TSubclassOf<AModSubsystem> SubsystemClass)
{
if(WorldContext)
{
const UWorld* WorldObject = GEngine->GetWorldFromContextObjectChecked(WorldContext);
USubsystemActorManager* SubsystemActorManager = WorldObject->GetSubsystem<USubsystemActorManager>();
check(SubsystemActorManager);
for (auto Subsystem : SubsystemActorManager->SubsystemActors)
if(Subsystem.Key->IsChildOf(SubsystemClass))
return Subsystem.Value;
}
return nullptr;
}
......@@ -40,6 +40,46 @@ bool UKBFLCppInventoryHelper::CanStoreItem(UFGInventoryComponent* Inventory, int
return true;
}
bool UKBFLCppInventoryHelper::CanStoreItemStackOnIndex(UFGInventoryComponent* Inventory, int InvIndex, FInventoryStack Stack)
{
if(Inventory && InvIndex >= 0)
return CanStoreItem(Inventory, InvIndex, Stack.Item.ItemClass, Stack.NumItems);
return false;
}
bool UKBFLCppInventoryHelper::CanStoreItemStacksOnIndex(UFGInventoryComponent* Inventory, int InvIndex, TArray<FInventoryStack> Stacks)
{
if(Inventory && InvIndex >= 0 && Stacks.Num() > 0)
for (auto Stack : Stacks)
if(!CanStoreItemStackOnIndex(Inventory, InvIndex, Stack))
return false;
if(!Inventory || InvIndex < 0)
return false;
return true;
}
bool UKBFLCppInventoryHelper::CanStoreItemStacks(UFGInventoryComponent* Inventory, TArray<FInventoryStack> Stacks)
{
if(Inventory && Stacks.Num() > 0)
for (auto Stack : Stacks)
{
if(!Stack.HasItems())
return false;
if(!Inventory->HasEnoughSpaceForStack(Stack))
return false;
}
if(!Inventory)
return false;
return true;
}
bool UKBFLCppInventoryHelper::CanStoreItemStack(UFGInventoryComponent* Inventory, FInventoryStack Stack)
{
if(Inventory && Stack.HasItems())
return Inventory->HasEnoughSpaceForStack(Stack);
return false;
}
void UKBFLCppInventoryHelper::StoreItemStackInInventory(UFGInventoryComponent* inventory, const int InvIndex, const FInventoryStack ItemStack)
{
......@@ -69,8 +109,20 @@ void UKBFLCppInventoryHelper::AddItemsInInventory(UFGInventoryComponent* invento
}
}
void UKBFLCppInventoryHelper::AddStackInInventory(UFGInventoryComponent* inventory, FInventoryStack Stack)
{
AddItemsInInventory(inventory, Stack.Item.ItemClass, Stack.NumItems);
}
void UKBFLCppInventoryHelper::AddStacksInInventory(UFGInventoryComponent* inventory, TArray<FInventoryStack> Stacks)
{
if(Stacks.Num() > 0)
for (FInventoryStack Stack : Stacks)
AddItemsInInventory(inventory, Stack.Item.ItemClass, Stack.NumItems);
}
bool UKBFLCppInventoryHelper::HasItems(UFGInventoryComponent* inventory, TSubclassOf<UFGItemDescriptor> itemClass,
int Amount)
int Amount)
{
if(inventory && itemClass && Amount > 0)
{
......
......@@ -20,7 +20,7 @@ void UKBFLAssetDataSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
if(GetWorld()->GetMapName() != "Map_MenuScene_Update_05" && GetWorld()->GetMapName() != "Untitled_21")
{
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Initialize Subsystem"));
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Initialize Subsystem in WorldName: %s"), *GetWorld()->GetMapName());
InitAssetFinder();
bWasInit = true;
}
......@@ -54,6 +54,12 @@ void UKBFLAssetDataSubsystem::InitAssetFinder()
if(AssetRegistry.GetAssetsByPath(TEXT("/"), AssetData, true))
for (FAssetData Asset : AssetData) {
// ONLY READ BP!
if (Asset.AssetClass != TEXT("Blueprint")) {
continue;
}
TSubclassOf<UFGSchematic> Schematic;
TSubclassOf<UFGRecipe> Recipe;
TSubclassOf<UFGItemDescriptor> Item;
......@@ -67,7 +73,7 @@ void UKBFLAssetDataSubsystem::InitAssetFinder()
if(Schematic)
{
mAllFoundedSchematics.AddUnique(Schematic);
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add To Subsystem > %s"), *Schematic->GetName());
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add Schematic To Subsystem > %s"), *Schematic->GetName());
mAssetClassMap.Add(Schematic, Asset);
}
}
......@@ -78,7 +84,7 @@ void UKBFLAssetDataSubsystem::InitAssetFinder()
if(Recipe)
{
mAllFoundedRecipes.AddUnique(Recipe);
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add To Subsystem > %s"), *Recipe->GetName());
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add Recipe To Subsystem > %s"), *Recipe->GetName());
mAssetClassMap.Add(Recipe, Asset);
}
}
......@@ -89,7 +95,7 @@ void UKBFLAssetDataSubsystem::InitAssetFinder()
if(Item)
{
mAllFoundedItems.AddUnique(Item);
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add To Subsystem > %s"), *Item->GetName());
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add Item To Subsystem > %s"), *Item->GetName());
mAssetClassMap.Add(Item, Asset);
}
}
......@@ -100,7 +106,7 @@ void UKBFLAssetDataSubsystem::InitAssetFinder()
if(Buildable)
{
mAllFoundedBuildables.AddUnique(Buildable);
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add To Subsystem > %s"), *Buildable->GetName());
UE_LOG(AssetDataSubsystemLog, Log, TEXT("Add Buildable To Subsystem > %s"), *Buildable->GetName());
mAssetClassMap.Add(Buildable, Asset);
}
}
......
......@@ -18,6 +18,6 @@ class KBFL_API UKBFL_Asset : public UBlueprintFunctionLibrary
/** Return the Index where the ItemClass allowed on Slot in Inventory */
template<class T>
UFUNCTION(BlueprintCallable, Category="KBFL Items")
UFUNCTION(BlueprintCallable, Category="KMods|Items")
static bool GetSubclassFromAsset(FAssetData AssetData, TSubclassOf<T>& OutClass);
};
\ No newline at end of file
......@@ -20,10 +20,10 @@ class KBFL_API UKBFL_Inventory : public UBlueprintFunctionLibrary
public:
/** Return the Index where the ItemClass allowed on Slot in Inventory */
UFUNCTION(BlueprintCallable, Category="KBFL Items")
UFUNCTION(BlueprintCallable, Category="KMods|Items")
static void FindFirstAllowedSlot(UFGInventoryComponent* Inventory, TSubclassOf<UFGItemDescriptor> Item, KBFLFoundSomething &Found, int32 &Index);
/** Return all Index where the ItemClass allowed on Slot in Inventory */
UFUNCTION(BlueprintCallable, Category="KBFL Items")
UFUNCTION(BlueprintCallable, Category="KMods|Items")
static void FindAllAllowedSlots(UFGInventoryComponent* Inventory, TSubclassOf<UFGItemDescriptor> Item, KBFLFoundSomething &Found, TArray<int32> &Index);
};
......@@ -15,6 +15,6 @@ class KBFL_API UKBFL_Items : public UBlueprintFunctionLibrary
public:
/** Get all Desc Items in game */
UFUNCTION(BlueprintPure, Category="KBFL Schematics", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Schematics", meta = (WorldContext = "WorldContext"))
static TArray<FKBFLDescInfo> GetAllRegisteredDescWithInfos(UObject* WorldContext);
};
......@@ -16,19 +16,19 @@ class KBFL_API UKBFL_Math : public UBlueprintFunctionLibrary
public:
/** Placeholder */
//UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Math")
//UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Math")
//static XXX XXX(UObject* WorldContext);
/** Caclulate Orbit Points for Splines */
UFUNCTION(BlueprintPure, Category="KBFL Math")
UFUNCTION(BlueprintPure, Category="KMods|Math")
static TArray<FVector> CalculateOrbitPoints(float Ellipse = 1.0f, float Radius = 1000.0f, float Tilt = 0.0f, int PointCount = 12);
UFUNCTION(BlueprintPure, Category="KBFL Math")
UFUNCTION(BlueprintPure, Category="KMods|Math")
static float CalculateItemsPerMin(int ItemCount, float ProductionTime);
UFUNCTION(BlueprintPure, Category="KBFL Math")
UFUNCTION(BlueprintPure, Category="KMods|Math")
static float CalculateM3PerMin(int ItemCount, float ProductionTime);
UFUNCTION(BlueprintPure, Category="KBFL Math")
UFUNCTION(BlueprintPure, Category="KMods|Math")
static float CalculateM3PerMinForWidget(int ItemCount, float ProductionTime);
};
......@@ -16,22 +16,26 @@ class KBFL_API UKBFL_Player : public UBlueprintFunctionLibrary
public:
/** get the build gun from local player */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Player")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Player")
static AFGBuildGun* GetBuildingGun(UObject* WorldContext);
/** get the player controller from local player */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Player")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Player")
static AFGPlayerController* GetFGController(UObject* WorldContext);
/** get the player character from local player */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Player")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Player")
static AFGCharacterPlayer* GetFGCharacter(UObject* WorldContext);
/** get the player State from local player */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Player")
static AFGPlayerState* GetFgPlayerState(UObject* WorldContext);
/** Get buildgun HitResult from local player */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Player")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Player")
static void GetBuildingGunHitResult(UObject* WorldContext, bool& IsInBuildOrDismantleState, FHitResult& HitResult);
/** Get buildgun buildstate from local player */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Player")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Player")
static EBuildGunState GetPlayerBuildState(UObject* WorldContext);
};
......@@ -17,34 +17,34 @@ class KBFL_API UKBFL_Recipes : public UBlueprintFunctionLibrary
public:
/** Get all recipes in game */
UFUNCTION(BlueprintPure, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGRecipe>> GetAllRegisteredRecipes(UObject* WorldContext);
/** Get all recipes in game with Infos */
UFUNCTION(BlueprintPure, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static TArray<FKBFLRecipeInfo> GetAllRegisteredRecipesWithInfo(UObject* WorldContext);
/** Get all recipes in game from a Building */
UFUNCTION(BlueprintPure, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGRecipe>> GetAllRecipesFromBuilding(UObject* WorldContext, TSubclassOf<AFGBuildableManufacturer> Building);
/** Get all recipes in game from a Mod */
UFUNCTION(BlueprintPure, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGRecipe>> GetAllModRecipes(UObject* WorldContext, FName ModName);
/** Get all recipes in game from Mods */
UFUNCTION(BlueprintPure, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGRecipe>> GetAllModsRecipes(UObject* WorldContext, TArray<FName> ModNames);
/** Get all recipes in game from Mods with Infos from where it from [!Use not Subsystem = Slower!] */
UFUNCTION(BlueprintPure, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static TArray<FKBFLRecipeInfo> GetAllModsRecipesWithInfo(UObject* WorldContext, TArray<FName> ModNames);
/** Return has this Recipe a Form in it */
UFUNCTION(BlueprintPure, Category="KBFL Recipes")
UFUNCTION(BlueprintPure, Category="KMods|Recipes")
static bool HasRecipeForm(TSubclassOf<UFGRecipe> Recipe, KBFLInOut Side, EResourceForm Form);
/** Moves all Recipes from a building to a other */
UFUNCTION(BlueprintCallable, Category="KBFL Recipes", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintCallable, Category="KMods|Recipes", meta = (WorldContext = "WorldContext"))
static void CDO_MoveRecipesFromBuilding(UObject* WorldContext, TSoftClassPtr<UObject> From, TSoftClassPtr<UObject> To, TArray<TSubclassOf<UFGItemCategory>> IgnoreCategory, TArray<TSubclassOf<UFGRecipe>> IgnoreRecipe);
};
......@@ -16,22 +16,22 @@ class KBFL_API UKBFL_Schematics : public UBlueprintFunctionLibrary
public:
/** Get all Schematics in game */
UFUNCTION(BlueprintPure, Category="KBFL Schematics", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Schematics", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGSchematic>> GetAllRegisteredSchematics(UObject* WorldContext);
/** Get all Schematics in game */
UFUNCTION(BlueprintPure, Category="KBFL Schematics", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Schematics", meta = (WorldContext = "WorldContext"))
static TArray<FKBFLSchematicInfo> GetAllRegisteredSchematicsWithInfos(UObject* WorldContext);
/** Get all Schematics in game from a Mod */
UFUNCTION(BlueprintPure, Category="KBFL Schematics", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Schematics", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGSchematic>> GetAllModSchematics(UObject* WorldContext, FName ModName);
/** Get all Schematics in game from Mods */
UFUNCTION(BlueprintPure, Category="KBFL Schematics", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Schematics", meta = (WorldContext = "WorldContext"))
static TArray<TSubclassOf<UFGSchematic>> GetAllModsSchematics(UObject* WorldContext, TArray<FName> ModNames);
/** Get all Schematics in game from Mods with Infos from where it from [!Use not Subsystem = Slower!] */
UFUNCTION(BlueprintPure, Category="KBFL Schematics", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintPure, Category="KMods|Schematics", meta = (WorldContext = "WorldContext"))
static TArray<FKBFLSchematicInfo> GetAllModsSchematicsWithInfo(UObject* WorldContext, TArray<FName> ModNames);
};
......@@ -5,6 +5,7 @@
#include "Resources/FGResourceDescriptor.h"
#include "Resources/FGResourceNode.h"
#include "Subsystem/ModSubsystem.h"
#include "Subsystem/SubsystemActorManager.h"
#include "Subsystems/KBFLDataSubsystem.h"
#include "KBFL_Util.generated.h"
......@@ -16,38 +17,41 @@ class KBFL_API UKBFL_Util : public UBlueprintFunctionLibrary
public:
/** Get Data Subsystem */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static AKBFLDataSubsystem* GetDataSubsystem(UObject* WorldContext);
/** Get Subsystem by Class */
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static AModSubsystem* GetSubsystem(UObject* WorldContext, TSubclassOf<AModSubsystem> Subsystem);
UFUNCTION(BlueprintPure, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static AModSubsystem* GetSubsystemFromChild(UObject* WorldContext, TSubclassOf<AModSubsystem> SubsystemClass);
/** Remove a Array from Resources from the Scanner */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveArrayFromScanners(UObject* WorldContext, const TArray<TSubclassOf<UFGResourceDescriptor>> Resources);
/** Remove all from the Scanner what not in the Array */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveAllNotAllowedScanners(UObject* WorldContext, const TArray<TSubclassOf<UFGResourceDescriptor>> Resources);
/** Remove one Resource from the Scanner */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveFromScanner(UObject* WorldContext, const TSubclassOf<UFGResourceDescriptor> Resource);
/** Remove all Resource Nodes from a Class */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveNodeClassFromWorld(UObject* WorldContext, const TSubclassOf<AFGResourceNode> NodeClass);
/** Remove all Resource Nodes from a resource item Class */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveNodeResourceClassFromWorld(UObject* WorldContext, const TSubclassOf<UFGResourceDescriptor> Resource);
/** Remove all Resource Nodes from a Array of resource item Class */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveNodeResourcesClassFromWorld(UObject* WorldContext, const TArray<TSubclassOf<UFGResourceDescriptor>> Resources);
/** Remove all Resource not what NOT in the Array */
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KBFL Util")
UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContext"), Category="KMods|Util")
static void RemoveNodeNOTResourcesClassFromWorld(UObject* WorldContext, const TArray<TSubclassOf<UFGResourceDescriptor>> Resources);
};
};
\ No newline at end of file
......@@ -13,10 +13,10 @@ class KBFL_API UKBFL_Widgets : public UBlueprintFunctionLibrary
public:
/** Can Bind a Event what hit on construct a widget from a Class (Contain the widget Object) */
UFUNCTION(BlueprintCallable, Category="KBFL WidgetUtils")
UFUNCTION(BlueprintCallable, Category="KMods|WidgetUtils")
static void BindOnWidget(const TSubclassOf<UUserWidget> WidgetClass, FOnWidgetCreated Binding);
UFUNCTION(BlueprintPure, Category="KBFL WidgetUtils")
UFUNCTION(BlueprintPure, Category="KMods|WidgetUtils")
static void TextToNumbers(float& Float, int& Int, FText Text, bool ShouldClamp, float ClampMin, float ClampMax, bool ShouldRound);
static FOnWidgetCreated OnWidgetCreated;
......
......@@ -15,12 +15,12 @@ class KBFL_API UKBFLCppActorHelper : public UBlueprintFunctionLibrary
public:
UFUNCTION(BlueprintCallable, Category="KBFL Actor Helper", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintCallable, Category="KMods|Actor Helper", meta = (WorldContext = "WorldContext"))
static bool ActorsInSphere(UObject* WorldContext, UClass* ActorClass, FVector Location, TArray<AActor*> Ignore, TArray<AActor*>& OutActors, float Range = 250.0f);
UFUNCTION(BlueprintCallable, Category="KBFL Actor Helper", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintCallable, Category="KMods|Actor Helper", meta = (WorldContext = "WorldContext"))
static bool HasFreeLineToActor(UObject* WorldContext, AActor* ActorSource, AActor* ActorTarget, float ZOffsetSource = 0.0f, float ZOffsetTarget = 0.0f);
UFUNCTION(BlueprintCallable, Category="KBFL Actor Helper", meta = (WorldContext = "WorldContext"))
UFUNCTION(BlueprintCallable, Category="KMods|Actor Helper", meta = (WorldContext = "WorldContext"))
static bool HasFreeLineToComponent(UObject* WorldContext, USceneComponent* ComponentSource, USceneComponent* ComponentTarget, float ZOffsetSource = 0.0f, float ZOffsetTarget = 0.0f);
};
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