90 lines
3.3 KiB
C++
90 lines
3.3 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
|
#include "MainBlueprintFunctionLibrary.generated.h"
|
|
|
|
class UStatForgeComponent;
|
|
class URetainerBox;
|
|
class UMainGameWidget;
|
|
class UInventoryComponent;
|
|
class ARemovableStaticMeshActor;
|
|
class UEleriAbilitySystemComponent;
|
|
|
|
UENUM(BlueprintType)
|
|
enum class EExpType : uint8
|
|
{
|
|
None,
|
|
Alchemy,
|
|
Botany,
|
|
Gathering,
|
|
Flying,
|
|
Bargaining
|
|
};
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class PROJECTELERI_API UMainBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
//HTTP REQ
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri|HTTP")
|
|
static void PostFeedback(const FString& Message);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Eleri", meta = (WorldContext = "WorldContextObject"))
|
|
static UInventoryComponent* GetPlayerInventory(const UObject* WorldContextObject);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri", meta=(WorldContext="WorldContextObject"))
|
|
static UMainGameWidget* GetMainGameWidget(UObject* WorldContextObject);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri")
|
|
static ARemovableStaticMeshActor* SpawnPlaceable(UWorld* World, UClass* Class, FTransform Transform, FVector ScaleOverride);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Dialogue System")
|
|
static FString GetNextCharacterToType(const FText& CurrentDialogueLine, int32 CurrentLineCharIndex);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Math helpers")
|
|
static FVector2D GetDirectionalityVector(FVector PawnLoc, FVector PawnForwardVector, FVector CameraLoc);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri|Events", meta = (WorldContext = "WorldContext"))
|
|
static void StartEvent(const UObject* WorldContext, FSoftObjectPath EventPath);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Eleri|Inventory", meta = (WorldContext = "WorldContext"))
|
|
static int32 GetPlayerGold(const UObject* WorldContext);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Eleri|Inventory", meta = (WorldContext = "WorldContext"))
|
|
static bool CanSpendGold(const UObject* WorldContext, int32 Amount);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri|Inventory", meta = (WorldContext = "WorldContext"))
|
|
static void SpendGold(const UObject* WorldContext, int32 Amount);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri|Inventory", meta = (WorldContext = "WorldContext"))
|
|
static void AddGold(const UObject* WorldContext, int32 Amount);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Eleri|Helpers", meta = (WorldContext = "WorldContext"))
|
|
static float GetCharacterHeight(const UObject* WorldContext, const UClass* Class, bool bScaled = true);
|
|
|
|
// STATS
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Eleri|Stats")
|
|
static UStatForgeComponent* GetStatForgeComponentFromActor(const AActor* Actor);
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Eleri|Stats", meta = (WorldContext = "WorldContext"))
|
|
static UStatForgeComponent* GetStatForgeComponentFromPlayer(const UObject* WorldContext);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Eleri|Stats", meta = (WorldContext = "WorldContext"))
|
|
static void ModifyExp(const UObject* WorldContext, const EExpType ExpType, const float Amount);
|
|
|
|
|
|
// MATH
|
|
UFUNCTION(BlueprintPure, Category = "Eleri|Math")
|
|
static float NegateFloat(const float& Value) { return Value * -1.f; }
|
|
|
|
};
|