More fixes for removal mode and cleanup of some stuff
This commit is contained in:
@@ -193,6 +193,8 @@ CameraZoomLevels=(((TagName="Camera.BoomOffset.Default"), (X=-1200.000000,Y=0.00
|
|||||||
+ProfessionExpArray=240000.000000
|
+ProfessionExpArray=240000.000000
|
||||||
ExpIncreaseEffectClass=/Script/Engine.BlueprintGeneratedClass'/Game/Blueprints/GameEffects/GSE_AddExp_Template.GSE_AddExp_Template_C'
|
ExpIncreaseEffectClass=/Script/Engine.BlueprintGeneratedClass'/Game/Blueprints/GameEffects/GSE_AddExp_Template.GSE_AddExp_Template_C'
|
||||||
GlobalSettingsDataSheet=/Game/GameData/CSV/GlobalKeyValueSettings.GlobalKeyValueSettings
|
GlobalSettingsDataSheet=/Game/GameData/CSV/GlobalKeyValueSettings.GlobalKeyValueSettings
|
||||||
|
ItemSeedCarouselClass=None
|
||||||
|
RemovableStaticMeshClass=/Script/Engine.BlueprintGeneratedClass'/Game/Prefabs/BP_RemovableStaticMeshActor.BP_RemovableStaticMeshActor_C'
|
||||||
|
|
||||||
[/Script/InteractionSystem.InteractionSettings]
|
[/Script/InteractionSystem.InteractionSettings]
|
||||||
DefaultInteractionWidgetClass=/Script/UMG.WidgetBlueprintGeneratedClass'/Game/UI/InteractionUI/WBP_Eleri_Interaction.WBP_Eleri_Interaction_C'
|
DefaultInteractionWidgetClass=/Script/UMG.WidgetBlueprintGeneratedClass'/Game/UI/InteractionUI/WBP_Eleri_Interaction.WBP_Eleri_Interaction_C'
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Prefabs/Bush1.uasset
LFS
BIN
Content/Prefabs/Bush1.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Prefabs/Bush2.uasset
LFS
BIN
Content/Prefabs/Bush2.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Prefabs/Bush3.uasset
LFS
BIN
Content/Prefabs/Bush3.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Prefabs/Bush4.uasset
LFS
BIN
Content/Prefabs/Bush4.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Prefabs/Tree1.uasset
LFS
BIN
Content/Prefabs/Tree1.uasset
LFS
Binary file not shown.
BIN
Content/Prefabs/Tree2.uasset
LFS
BIN
Content/Prefabs/Tree2.uasset
LFS
Binary file not shown.
BIN
Content/Prefabs/Tree3.uasset
LFS
BIN
Content/Prefabs/Tree3.uasset
LFS
Binary file not shown.
BIN
Content/Prefabs/Tree4.uasset
LFS
BIN
Content/Prefabs/Tree4.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -426,18 +426,6 @@ bool UMoveActorsComponent::PlaceableActionUsed(ERemovalAction ActionUsed)
|
|||||||
case ERemovalAction::PLACE:
|
case ERemovalAction::PLACE:
|
||||||
if (PlayerController && MovingActor->IsPlaceable())
|
if (PlayerController && MovingActor->IsPlaceable())
|
||||||
{
|
{
|
||||||
FPrimaryAssetId ItemId = MovingActor->ItemStack.ItemId;
|
|
||||||
if (!ItemId.IsValid())
|
|
||||||
{
|
|
||||||
ItemId = MovingActor->DataAssetId;
|
|
||||||
}
|
|
||||||
if (ItemId.IsValid())
|
|
||||||
{
|
|
||||||
if (UInventoryComponent* Inventory = UMainBlueprintFunctionLibrary::GetPlayerInventory(GetWorld()))
|
|
||||||
{
|
|
||||||
Inventory->RemoveItemFromInventory(ItemId, 1, false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PlaceObjectForPlacing();
|
PlaceObjectForPlacing();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -445,26 +433,16 @@ bool UMoveActorsComponent::PlaceableActionUsed(ERemovalAction ActionUsed)
|
|||||||
|
|
||||||
case ERemovalAction::REMOVE:
|
case ERemovalAction::REMOVE:
|
||||||
{
|
{
|
||||||
// A world object is returned to the player's inventory before it is removed.
|
if (UObjectPersistenceSubsystem* ObjectPersistenceSubsystem = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem<UObjectPersistenceSubsystem>())
|
||||||
if (MovingActor->DataAssetId.IsValid() && !MovingActor->bFromInventory)
|
|
||||||
{
|
{
|
||||||
if (UInventoryComponent* Inventory = UMainBlueprintFunctionLibrary::GetPlayerInventory(GetWorld()))
|
ObjectPersistenceSubsystem->RemoveActorFromLevel(MovingActor);
|
||||||
{
|
|
||||||
Inventory->AddItemToInventory(MovingActor->DataAssetId, 1, false, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld()))
|
if (UItemDatabase* ItemDatabase = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem<UItemDatabase>())
|
||||||
{
|
{
|
||||||
if (UObjectPersistenceSubsystem* ObjectPersistenceSubsystem = GameInstance->GetSubsystem<UObjectPersistenceSubsystem>())
|
ItemDatabase->RemoveDecorationItem(MovingActor);
|
||||||
{
|
|
||||||
ObjectPersistenceSubsystem->RemoveActorFromLevel(MovingActor);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback if the persistence subsystem is unavailable.
|
|
||||||
MovingActor->Destroy();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,9 +451,10 @@ bool UMoveActorsComponent::PlaceableActionUsed(ERemovalAction ActionUsed)
|
|||||||
// Cancel the current placement/move without committing it.
|
// Cancel the current placement/move without committing it.
|
||||||
if (MovingActor->bFromInventory)
|
if (MovingActor->bFromInventory)
|
||||||
{
|
{
|
||||||
// A preview spawned from the inventory: return the item and destroy the preview.
|
if (UItemDatabase* ItemDatabase = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem<UItemDatabase>())
|
||||||
MovingActor->ReturnToInventory();
|
{
|
||||||
MovingActor->Destroy();
|
ItemDatabase->RemoveDecorationItem(MovingActor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -519,7 +498,6 @@ bool UMoveActorsComponent::PlaceObjectForPlacing()
|
|||||||
}
|
}
|
||||||
MovingActor->Place();
|
MovingActor->Place();
|
||||||
|
|
||||||
RemovalModePlacingStack--;
|
|
||||||
return RemoveObjectForPlacing();
|
return RemoveObjectForPlacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,22 +505,15 @@ bool UMoveActorsComponent::RemoveObjectForPlacing()
|
|||||||
{
|
{
|
||||||
if (!PlayerController) return false;
|
if (!PlayerController) return false;
|
||||||
|
|
||||||
// Get the Enhanced Input Local Player Subsystem from the Local Player related to our Player Controller.
|
|
||||||
if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer()))
|
|
||||||
{
|
|
||||||
if (RemovalModePlacingStack <= 0)
|
|
||||||
{
|
|
||||||
Subsystem->RemoveMappingContext(PlayerController->RemoveModeContext);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MovingActor = nullptr;
|
MovingActor = nullptr;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UMoveActorsComponent::StartObjectRemoval(bool bStart, int32 Stack)
|
void UMoveActorsComponent::StartObjectRemoval(bool bStart)
|
||||||
{
|
{
|
||||||
|
if (bStart && bRemovalMode) return;
|
||||||
|
|
||||||
if (!PlayerCharacter) return;
|
if (!PlayerCharacter) return;
|
||||||
|
|
||||||
if (!bStart)
|
if (!bStart)
|
||||||
@@ -551,7 +522,6 @@ void UMoveActorsComponent::StartObjectRemoval(bool bStart, int32 Stack)
|
|||||||
}
|
}
|
||||||
PlayerCharacter->CurrentlyDoing = bStart ? ECurrentlyDoing::OBJECT_PLACING : ECurrentlyDoing::NOTHING;
|
PlayerCharacter->CurrentlyDoing = bStart ? ECurrentlyDoing::OBJECT_PLACING : ECurrentlyDoing::NOTHING;
|
||||||
|
|
||||||
RemovalModePlacingStack = Stack;
|
|
||||||
if (bStart && !bRemovalModePossible) return;
|
if (bStart && !bRemovalModePossible) return;
|
||||||
|
|
||||||
if (!bStart)
|
if (!bStart)
|
||||||
@@ -566,9 +536,6 @@ void UMoveActorsComponent::StartObjectRemoval(bool bStart, int32 Stack)
|
|||||||
bRemovalMode = bStart;
|
bRemovalMode = bStart;
|
||||||
OnRemovalModeToggled.Broadcast(bRemovalMode);
|
OnRemovalModeToggled.Broadcast(bRemovalMode);
|
||||||
|
|
||||||
PlayerCharacter->SetNewCameraPitches(
|
|
||||||
bStart ? PlayerCharacter->CameraPitchMin - 50 : PlayerCharacter->CameraPitchMin,
|
|
||||||
bStart ? PlayerCharacter->CameraPitchMax + 5 : PlayerCharacter->CameraPitchMax);
|
|
||||||
|
|
||||||
if (PlayerController && PlayerController->GetMainGameWidget())
|
if (PlayerController && PlayerController->GetMainGameWidget())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "Components/ActorComponent.h"
|
#include "Components/ActorComponent.h"
|
||||||
|
#include "ProjectEleri/GameObjects/RemovableStaticMeshActor.h"
|
||||||
|
|
||||||
#include "MoveActorsComponent.generated.h"
|
#include "MoveActorsComponent.generated.h"
|
||||||
|
|
||||||
@@ -53,9 +54,6 @@ public:
|
|||||||
UPROPERTY(BlueprintReadWrite)
|
UPROPERTY(BlueprintReadWrite)
|
||||||
ARemovableStaticMeshActor* MovingActor;
|
ARemovableStaticMeshActor* MovingActor;
|
||||||
|
|
||||||
UPROPERTY()
|
|
||||||
int32 RemovalModePlacingStack;
|
|
||||||
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
TArray<TSubclassOf<AActor>> ActorsToIgnore;
|
TArray<TSubclassOf<AActor>> ActorsToIgnore;
|
||||||
@@ -135,9 +133,9 @@ protected:
|
|||||||
ARemovableStaticMeshActor* HighligtedMovingActor;
|
ARemovableStaticMeshActor* HighligtedMovingActor;
|
||||||
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
||||||
bool bRemovalModePossible;
|
bool bRemovalModePossible;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
||||||
bool bRemovalMode;
|
bool bRemovalMode;
|
||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
bool bGridMovementActive;
|
bool bGridMovementActive;
|
||||||
@@ -188,6 +186,8 @@ public:
|
|||||||
bool IsRemovingModePossible() const { return bRemovalModePossible; }
|
bool IsRemovingModePossible() const { return bRemovalModePossible; }
|
||||||
UFUNCTION(BlueprintCallable, BlueprintPure)
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
||||||
bool IsRemovingMode() const { return bRemovalMode; }
|
bool IsRemovingMode() const { return bRemovalMode; }
|
||||||
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
||||||
|
bool IsPlacingObject() const { return IsValid(MovingActor); }
|
||||||
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
@@ -199,7 +199,7 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
bool RemoveObjectForPlacing();
|
bool RemoveObjectForPlacing();
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void StartObjectRemoval(bool bStart = true, int32 Stack = 9999);
|
void StartObjectRemoval(bool bStart = true);
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
bool HighlightRemovableObject(ARemovableStaticMeshActor* Placable);
|
bool HighlightRemovableObject(ARemovableStaticMeshActor* Placable);
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
|
|||||||
@@ -98,10 +98,17 @@ bool ARemovableStaticMeshActor::IsInteractable_Implementation() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARemovableStaticMeshActor::BindToItem(UInventoryComponent* InInventory, FItemStack InItemStack)
|
void ARemovableStaticMeshActor::Initialize(UStaticMesh* StaticMesh, UItemDataAsset* InItemDataAsset)
|
||||||
|
{
|
||||||
|
GetStaticMeshComponent()->SetStaticMesh(StaticMesh);
|
||||||
|
GetStaticMeshComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
||||||
|
MeshMaterials = GetStaticMeshComponent()->GetMaterials();
|
||||||
|
ItemDataAsset = InItemDataAsset;
|
||||||
|
DataAssetId = ItemDataAsset->GetPrimaryAssetId();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ARemovableStaticMeshActor::BindToItem(UInventoryComponent* InInventory)
|
||||||
{
|
{
|
||||||
InventoryRef = InInventory;
|
|
||||||
ItemStack = InItemStack;
|
|
||||||
bFromInventory = true;
|
bFromInventory = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,8 +133,6 @@ void ARemovableStaticMeshActor::Place(bool ReturnToOldLocation, bool bForce)
|
|||||||
if (bPlaced)
|
if (bPlaced)
|
||||||
{
|
{
|
||||||
//Reset this because we've placed the item in the world
|
//Reset this because we've placed the item in the world
|
||||||
InventoryRef = nullptr;
|
|
||||||
ItemStack = FItemStack();
|
|
||||||
bFromInventory = false;
|
bFromInventory = false;
|
||||||
|
|
||||||
if (ReturnToOldLocation)
|
if (ReturnToOldLocation)
|
||||||
@@ -147,6 +152,7 @@ void ARemovableStaticMeshActor::Place(bool ReturnToOldLocation, bool bForce)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CurrentMemorizedTransform = GetActorTransform();
|
CurrentMemorizedTransform = GetActorTransform();
|
||||||
|
GetStaticMeshComponent()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
|
||||||
OnPlaced.Broadcast();
|
OnPlaced.Broadcast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -192,10 +198,3 @@ void ARemovableStaticMeshActor::ReportGridFootprint()
|
|||||||
CellsX * Pitch - Size.X, CellsY * Pitch - Size.Y, FillScale);
|
CellsX * Pitch - Size.X, CellsY * Pitch - Size.Y, FillScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARemovableStaticMeshActor::ReturnToInventory()
|
|
||||||
{
|
|
||||||
if (InventoryRef)
|
|
||||||
{
|
|
||||||
InventoryRef->AddItemToInventory(ItemStack.ItemId, 1, false, ItemStack.HQ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -52,14 +52,12 @@ public:
|
|||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
FTransform CurrentMemorizedTransform;
|
FTransform CurrentMemorizedTransform;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
||||||
UInventoryComponent* InventoryRef;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
||||||
FItemStack ItemStack;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
AActor* PlayerRef;
|
AActor* PlayerRef;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
UItemDataAsset* ItemDataAsset;
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
bool bPlaced;
|
bool bPlaced;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
@@ -115,8 +113,6 @@ public:
|
|||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintPure)
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
||||||
FORCEINLINE bool IsPlaceable() const { return bPlaceable; }
|
FORCEINLINE bool IsPlaceable() const { return bPlaceable; }
|
||||||
UFUNCTION(BlueprintCallable, BLueprintPure)
|
|
||||||
FORCEINLINE bool FromInventory() const { return InventoryRef != nullptr; }
|
|
||||||
|
|
||||||
UPROPERTY(BlueprintAssignable, EditAnywhere, BLueprintReadWrite)
|
UPROPERTY(BlueprintAssignable, EditAnywhere, BLueprintReadWrite)
|
||||||
FOnPlaced OnPlaced;
|
FOnPlaced OnPlaced;
|
||||||
@@ -125,11 +121,13 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
|
||||||
UInteractionWidgetComponent* WidgetComponent;
|
UInteractionWidgetComponent* WidgetComponent;
|
||||||
|
|
||||||
|
void Initialize(UStaticMesh* StaticMesh, UItemDataAsset* InItemDataAsset);
|
||||||
|
|
||||||
//Used when placing stuff from inventory so we can return it to inventory
|
//Used when placing stuff from inventory so we can return it to inventory
|
||||||
//if we cancel placing item
|
//if we cancel placing item
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void BindToItem(UInventoryComponent* InInventory, FItemStack InItemStack);
|
void BindToItem(UInventoryComponent* InInventory);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void PickUp();
|
void PickUp();
|
||||||
@@ -140,9 +138,6 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void Rotate(bool bPositive);
|
void Rotate(bool bPositive);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
|
||||||
void ReturnToInventory();
|
|
||||||
|
|
||||||
virtual bool CanPlace() { return true; }
|
virtual bool CanPlace() { return true; }
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class ARemovableStaticMeshActor;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UCLASS(BlueprintType)
|
UCLASS(BlueprintType, PrioritizeCategories = ("Default", "Info", "Placeable", "Craftable", "Property Map", "Seed"))
|
||||||
class PROJECTELERI_API UItemDataAsset : public UPrimaryDataAsset
|
class PROJECTELERI_API UItemDataAsset : public UPrimaryDataAsset
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
@@ -120,10 +120,16 @@ public:
|
|||||||
bool Stackable = true;
|
bool Stackable = true;
|
||||||
|
|
||||||
/** Mesh that the item / potion have, ignored for seeds */
|
/** Mesh that the item / potion have, ignored for seeds */
|
||||||
UPROPERTY()
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Placeable", meta=(EditCondition="ItemCategory==Category::Decoration", EditConditionHides))
|
||||||
TSoftObjectPtr<UStaticMesh> ItemMesh;
|
TSoftObjectPtr<UStaticMesh> ItemMesh;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info", meta=(EditCondition="ItemCategory==Category::Decoration", EditConditionHides, MetaClass="/Script/ProjectEleri.RemovableStaticMeshActor"))
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Placeable", meta=(EditCondition="ItemCategory==Category::Decoration", EditConditionHides))
|
||||||
|
int32 GridScale = 1;
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Placeable", meta=(EditCondition="ItemCategory==Category::Decoration", EditConditionHides))
|
||||||
|
FVector BoxExtentOverride;
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Placeable", meta=(EditCondition="ItemCategory==Category::Decoration", EditConditionHides, MetaClass="/Script/ProjectEleri.RemovableStaticMeshActor"))
|
||||||
FSoftClassPath DecorationActorClassPath;
|
FSoftClassPath DecorationActorClassPath;
|
||||||
|
|
||||||
|
|
||||||
@@ -132,9 +138,6 @@ public:
|
|||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Info", AssetRegistrySearchable, meta = (AssetBundles = "Inventory, Book"))
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Info", AssetRegistrySearchable, meta = (AssetBundles = "Inventory, Book"))
|
||||||
int32 BaseCost;
|
int32 BaseCost;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info", AssetRegistrySearchable, meta = (AssetBundles = "Inventory, Book"))
|
|
||||||
TSoftObjectPtr<UTexture2D> PropertyMapTexture;
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/** What part of the world grants faster growth and higher chance to harvest an HQ ingredient */
|
/** What part of the world grants faster growth and higher chance to harvest an HQ ingredient */
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
#include "Engine/AssetManager.h"
|
#include "Engine/AssetManager.h"
|
||||||
#include "BookOfAlchemyManager.h"
|
#include "BookOfAlchemyManager.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
#include "ProjectEleri/Components/MoveActorsComponent.h"
|
||||||
|
#include "ProjectEleri/Settings/EleriGameSettings.h"
|
||||||
|
#include "ProjectEleri/System/MainBlueprintFunctionLibrary.h"
|
||||||
|
|
||||||
UWorld* UItemDatabase::GetWorld() const {
|
UWorld* UItemDatabase::GetWorld() const {
|
||||||
if (const UGameInstance* GameInstance = GetGameInstance()) {
|
if (const UGameInstance* GameInstance = GetGameInstance()) {
|
||||||
@@ -52,6 +55,9 @@ void UItemDatabase::Initialize(FSubsystemCollectionBase& Collection) {
|
|||||||
else {
|
else {
|
||||||
UAssetManager::CallOrRegister_OnCompletedInitialScan(FStopRenderingThreadDelegate::CreateLambda(LoadDataLambda));
|
UAssetManager::CallOrRegister_OnCompletedInitialScan(FStopRenderingThreadDelegate::CreateLambda(LoadDataLambda));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RemovableStaticMeshClass = GetDefault<UEleriGameSettings>()->RemovableStaticMeshClass;
|
||||||
|
ItemSeedCarouselClass = GetDefault<UEleriGameSettings>()->ItemSeedCarouselClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -427,6 +433,53 @@ Element UItemDatabase::GetStrongestElement(const TArray<UItemDataAsset*>& Potion
|
|||||||
return (Element)StrongestIndex;
|
return (Element)StrongestIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UItemDatabase::SpawnDecorationItem(UItemDataAsset* ItemAsset)
|
||||||
|
{
|
||||||
|
if (!ItemAsset || ItemAsset->ItemMesh.IsNull())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemAsset->ItemMesh.LoadAsync(FLoadSoftObjectPathAsyncDelegate::CreateUObject(this, &UItemDatabase::OnDecorationItemLoaded, ItemAsset));
|
||||||
|
}
|
||||||
|
|
||||||
|
void UItemDatabase::RemoveDecorationItem(ARemovableStaticMeshActor* DecorationItem)
|
||||||
|
{
|
||||||
|
if (DecorationItem->ItemDataAsset && DecorationItem->bFromInventory)
|
||||||
|
{
|
||||||
|
UInventoryComponent* InventoryComponent = UMainBlueprintFunctionLibrary::GetPlayerInventory(GetWorld());
|
||||||
|
InventoryComponent->AddItemToInventory(DecorationItem->ItemDataAsset->GetPrimaryAssetId(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
DecorationItem->Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void UItemDatabase::OnDecorationItemLoaded(const FSoftObjectPath& Path, UObject* Object, UItemDataAsset* ItemAsset)
|
||||||
|
{
|
||||||
|
UStaticMesh* StaticMesh = Cast<UStaticMesh>(Object);
|
||||||
|
if (!StaticMesh || !ItemAsset) return;
|
||||||
|
|
||||||
|
ACharacter* PlayerCharacter = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);
|
||||||
|
const FVector Location = PlayerCharacter->GetActorLocation() + (PlayerCharacter->GetActorForwardVector() * 1000.f);
|
||||||
|
FActorSpawnParameters SpawnParams;
|
||||||
|
SpawnParams.Instigator = PlayerCharacter;
|
||||||
|
SpawnParams.Owner = PlayerCharacter;
|
||||||
|
ARemovableStaticMeshActor* SpawnedActor = GetWorld()->SpawnActor<ARemovableStaticMeshActor>(RemovableStaticMeshClass, Location, FRotator::ZeroRotator, SpawnParams);
|
||||||
|
if (!SpawnedActor) return;
|
||||||
|
SpawnedActor->SetMobility(EComponentMobility::Movable);
|
||||||
|
SpawnedActor->Initialize(StaticMesh, ItemAsset);
|
||||||
|
|
||||||
|
UInventoryComponent* InventoryComponent = UMainBlueprintFunctionLibrary::GetPlayerInventory(GetWorld());
|
||||||
|
SpawnedActor->BindToItem(InventoryComponent);
|
||||||
|
InventoryComponent->RemoveItemFromInventory(ItemAsset->GetPrimaryAssetId(), 1);
|
||||||
|
|
||||||
|
UMoveActorsComponent* MoveActorsComponent = PlayerCharacter->GetComponentByClass<UMoveActorsComponent>();
|
||||||
|
if (!MoveActorsComponent) return;
|
||||||
|
|
||||||
|
MoveActorsComponent->StartObjectRemoval(true);
|
||||||
|
MoveActorsComponent->PickUpObjectForPlacing(SpawnedActor);
|
||||||
|
}
|
||||||
|
|
||||||
void FArrayOfItemRefs::SortByName()
|
void FArrayOfItemRefs::SortByName()
|
||||||
{
|
{
|
||||||
ItemArray.Sort();
|
ItemArray.Sort();
|
||||||
|
|||||||
@@ -58,67 +58,76 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly)
|
UPROPERTY(EditDefaultsOnly, Category = "Item Database")
|
||||||
TSubclassOf<AActor> ItemSeedCarouselClass;
|
TSubclassOf<AActor> ItemSeedCarouselClass;
|
||||||
|
UPROPERTY(EditDefaultsOnly, Category = "Item Database")
|
||||||
|
TSubclassOf<ARemovableStaticMeshActor> RemovableStaticMeshClass;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item Database")
|
||||||
TArray<FPrimaryAssetId> AllAssetIds;
|
TArray<FPrimaryAssetId> AllAssetIds;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item Database")
|
||||||
TArray<UItemDataAsset*> LoadedItems;
|
TArray<UItemDataAsset*> LoadedItems;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item Database")
|
||||||
TMap<Category, FArrayOfItemRefs> LoadedItemsByCategory;
|
TMap<Category, FArrayOfItemRefs> LoadedItemsByCategory;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Item Database")
|
||||||
TArray<ASeedCarousel*> SeedsPlanted;
|
TArray<ASeedCarousel*> SeedsPlanted;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
void WaterAllSeeds();
|
void WaterAllSeeds();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
bool DoChemicalAlignmentsMatch(TArray<int32> Alignments, TArray<int32> PotionAlignments);
|
bool DoChemicalAlignmentsMatch(TArray<int32> Alignments, TArray<int32> PotionAlignments);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
UItemDataAsset* GetPotionFromItems(TArray<UItemDataAsset*> Items, bool& Found);
|
UItemDataAsset* GetPotionFromItems(TArray<UItemDataAsset*> Items, bool& Found);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
UItemDataAsset* GetPotionDataFromItems(TArray<UItemDataAsset*> Items);
|
UItemDataAsset* GetPotionDataFromItems(TArray<UItemDataAsset*> Items);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
TArray<UItemDataAsset*> GetPotionsMatchingChemicalAlignment(UItemDataAsset* Ingredient);
|
TArray<UItemDataAsset*> GetPotionsMatchingChemicalAlignment(UItemDataAsset* Ingredient);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
TArray<UItemDataAsset*> GetPotionsMatchingProperties(const TArray<UItemDataAsset*> &PotionList, TMap<ItemProperty, int32> PropertyList);
|
TArray<UItemDataAsset*> GetPotionsMatchingProperties(const TArray<UItemDataAsset*> &PotionList, TMap<ItemProperty, int32> PropertyList);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
UItemDataAsset* GetDataAssetFromId(FPrimaryAssetId AssetId);
|
UItemDataAsset* GetDataAssetFromId(FPrimaryAssetId AssetId);
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
TArray<UItemDataAsset*> GetDataAssetsFromIds(TArray<FPrimaryAssetId> AssetIds);
|
TArray<UItemDataAsset*> GetDataAssetsFromIds(TArray<FPrimaryAssetId> AssetIds);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
float CalculatePotionPurity(TMap<ItemProperty, int32> PropertyList, TArray<FPropertyStrength> MainProperties);
|
float CalculatePotionPurity(TMap<ItemProperty, int32> PropertyList, TArray<FPropertyStrength> MainProperties);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
int32 GetCrystalCostForPotion(UItemDataAsset* Potion);
|
int32 GetCrystalCostForPotion(UItemDataAsset* Potion);
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
int32 GetCrystalCostForItems(TArray<UItemDataAsset*> Items);
|
int32 GetCrystalCostForItems(TArray<UItemDataAsset*> Items);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
Element GetStrongestElement(const TArray<UItemDataAsset*>& PotionList);
|
Element GetStrongestElement(const TArray<UItemDataAsset*>& PotionList);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = "Item Database")
|
||||||
|
void SpawnDecorationItem(UItemDataAsset* ItemAsset);
|
||||||
|
void RemoveDecorationItem(ARemovableStaticMeshActor* DecorationItem);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Item Database")
|
||||||
TArray<FItemPriceData> ItemPriceDataList;
|
TArray<FItemPriceData> ItemPriceDataList;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void PrepareItemPriceData();
|
void PrepareItemPriceData();
|
||||||
|
|
||||||
|
UFUNCTION()
|
||||||
|
void OnDecorationItemLoaded(const FSoftObjectPath& Path, UObject* Object, UItemDataAsset* ItemAsset);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintPure)
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Item Database")
|
||||||
int32 GetCurrentPriceForItem(FPrimaryAssetId ItemId);
|
int32 GetCurrentPriceForItem(FPrimaryAssetId ItemId);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintPure)
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Item Database")
|
||||||
TArray<int32> GetPriceHistoryForItem(FPrimaryAssetId ItemId);
|
TArray<int32> GetPriceHistoryForItem(FPrimaryAssetId ItemId);
|
||||||
};
|
};
|
||||||
|
|||||||
26
Source/ProjectEleri/Items/SeedBedActor.cpp
Normal file
26
Source/ProjectEleri/Items/SeedBedActor.cpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "SeedBedActor.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Sets default values
|
||||||
|
ASeedBedActor::ASeedBedActor()
|
||||||
|
{
|
||||||
|
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||||
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when the game starts or when spawned
|
||||||
|
void ASeedBedActor::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called every frame
|
||||||
|
void ASeedBedActor::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
25
Source/ProjectEleri/Items/SeedBedActor.h
Normal file
25
Source/ProjectEleri/Items/SeedBedActor.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/Actor.h"
|
||||||
|
#include "SeedBedActor.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class PROJECTELERI_API ASeedBedActor : public AActor
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Sets default values for this actor's properties
|
||||||
|
ASeedBedActor();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Called when the game starts or when spawned
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Called every frame
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
};
|
||||||
@@ -570,7 +570,6 @@ void AEleriPlayerController::OnRemoveAction(const FInputActionValue &Value)
|
|||||||
{
|
{
|
||||||
MoveActorsComp->PlaceableActionUsed(ERemovalAction::REMOVE);
|
MoveActorsComp->PlaceableActionUsed(ERemovalAction::REMOVE);
|
||||||
MoveActorsComp->MovingActor = nullptr;
|
MoveActorsComp->MovingActor = nullptr;
|
||||||
MoveActorsComp->RemovalModePlacingStack = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,43 +616,18 @@ void AEleriPlayerController::OnPlaceObjectAction(const FInputActionValue &Value)
|
|||||||
|
|
||||||
if (MoveActorsComp->MovingActor)
|
if (MoveActorsComp->MovingActor)
|
||||||
{
|
{
|
||||||
UClass *ClassToLoad = MoveActorsComp->MovingActor->GetClass();
|
UItemDatabase* ItemDatabase = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem<UItemDatabase>();
|
||||||
FVector Location = MoveActorsComp->MovingActor->GetActorLocation();
|
UInventoryComponent *Inventory = UMainBlueprintFunctionLibrary::GetPlayerInventory(this);
|
||||||
UInventoryComponent *Inventory = MoveActorsComp->MovingActor->InventoryRef;
|
UItemDataAsset* DataAsset = MoveActorsComp->MovingActor->ItemDataAsset;
|
||||||
FItemStack Stack = MoveActorsComp->MovingActor->ItemStack;
|
|
||||||
|
|
||||||
if (!MoveActorsComp->PlaceableActionUsed(ERemovalAction::PLACE))
|
if (!MoveActorsComp->PlaceableActionUsed(ERemovalAction::PLACE))
|
||||||
return;
|
return;
|
||||||
if (Inventory)
|
|
||||||
|
int32 StackCount = Inventory->GetStackForItem(DataAsset->GetPrimaryAssetId(), false, false);
|
||||||
|
if (StackCount > 0)
|
||||||
{
|
{
|
||||||
Stack.Stack = Inventory->GetStackForItem(Stack.ItemId, Stack.Seed, Stack.HQ);
|
ensure(ItemDatabase);
|
||||||
}
|
ItemDatabase->SpawnDecorationItem(DataAsset);
|
||||||
else
|
|
||||||
{
|
|
||||||
Stack.Stack = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ClassToLoad && Stack.Stack > 0)
|
|
||||||
{
|
|
||||||
FTransform PlaceableTransform;
|
|
||||||
PlaceableTransform.SetLocation(Location);
|
|
||||||
if (ARemovableStaticMeshActor *SpawnedActor = UMainBlueprintFunctionLibrary::SpawnPlaceable(GetWorld(), ClassToLoad, PlaceableTransform, FVector::OneVector))
|
|
||||||
{
|
|
||||||
if (!MoveActorsComp || !MoveActorsComp->IsRemovingMode())
|
|
||||||
{
|
|
||||||
SpawnedActor->Destroy();
|
|
||||||
MoveActorsComp->MovingActor = nullptr;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
SpawnedActor->BindToItem(Inventory, Stack);
|
|
||||||
SpawnedActor->PickUp();
|
|
||||||
MoveActorsComp->MovingActor = SpawnedActor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MoveActorsComp->RemovalModePlacingStack <= 0)
|
|
||||||
{
|
|
||||||
MoveActorsComp->StartObjectRemoval(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "EleriGameSettings.generated.h"
|
#include "EleriGameSettings.generated.h"
|
||||||
|
|
||||||
|
class ARemovableStaticMeshActor;
|
||||||
class UDataTable;
|
class UDataTable;
|
||||||
class UNpcDataAsset;
|
class UNpcDataAsset;
|
||||||
class UNpcScheduleAsset;
|
class UNpcScheduleAsset;
|
||||||
@@ -28,6 +29,10 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Items", meta = (ForceInlineRow, Categories = "Items"))
|
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Items", meta = (ForceInlineRow, Categories = "Items"))
|
||||||
TMap<FGameplayTag, FPrimaryAssetId> SpecialItemsMap;
|
TMap<FGameplayTag, FPrimaryAssetId> SpecialItemsMap;
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Items")
|
||||||
|
TSubclassOf<ARemovableStaticMeshActor> RemovableStaticMeshClass;
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Items")
|
||||||
|
TSubclassOf<AActor> ItemSeedCarouselClass;
|
||||||
|
|
||||||
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Camera")
|
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Camera")
|
||||||
TMap<FGameplayTag, FVector> CameraZoomLevels;
|
TMap<FGameplayTag, FVector> CameraZoomLevels;
|
||||||
@@ -59,7 +64,6 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Items")
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Items")
|
||||||
static UItemDataAsset* GetSpecialItem(UObject* WorldContext, FGameplayTag Tag);
|
static UItemDataAsset* GetSpecialItem(UObject* WorldContext, FGameplayTag Tag);
|
||||||
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Ability System|Professions")
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Ability System|Professions")
|
||||||
static int32 GetProfessionLevelForExp(float Exp);
|
static int32 GetProfessionLevelForExp(float Exp);
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,7 @@ void UObjectPersistenceSubsystem::RemoveActorFromLevel(AActor* ActorToRemove)
|
|||||||
if (ActorIndex != INDEX_NONE)
|
if (ActorIndex != INDEX_NONE)
|
||||||
{
|
{
|
||||||
PlacedActors.RemoveAt(ActorIndex);
|
PlacedActors.RemoveAt(ActorIndex);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActorToRemove->Destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UObjectPersistenceSubsystem::PlacebleActorMoved(AActor* ActorMoved, bool bNewVisiblity)
|
void UObjectPersistenceSubsystem::PlacebleActorMoved(AActor* ActorMoved, bool bNewVisiblity)
|
||||||
|
|||||||
Reference in New Issue
Block a user