Started rework of clothing slots and UI
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "NakedDesire/Global/Constants.h"
|
||||
#include "NakedDesire/Global/NakedDesireUserSettings.h"
|
||||
#include "NakedDesire/UI/RadialMenu/RadialMenuController.h"
|
||||
#include "NakedDesire/Clothing/ClothingSlotWidgetsInfo.h"
|
||||
#include "Perception/AIPerceptionStimuliSourceComponent.h"
|
||||
#include "Perception/AISense_Sight.h"
|
||||
|
||||
@@ -163,8 +164,6 @@ void ANakedDesireCharacter::BeginPlay()
|
||||
StimuliSourceComponent->RegisterForSense(TSubclassOf<UAISense_Sight>());
|
||||
StimuliSourceComponent->RegisterWithPerceptionSystem();
|
||||
|
||||
SetupClothingSlots();
|
||||
|
||||
ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingEquip);
|
||||
ClothingManager->OnClothingUnequip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingUnequip);
|
||||
|
||||
@@ -368,105 +367,25 @@ void ANakedDesireCharacter::OnCrouchToggle(const FInputActionValue& Value)
|
||||
|
||||
void ANakedDesireCharacter::OnEquipmentPress(const FInputActionValue& Value)
|
||||
{
|
||||
BuildRadialMenuEntries();
|
||||
RadialMenuController->OpenMenu();
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::SetupClothingSlots()
|
||||
void ANakedDesireCharacter::BuildRadialMenuEntries()
|
||||
{
|
||||
#define LOCTEXT_NAMESPACE "ClothingSlots"
|
||||
TArray<FRadialMenuEntry> Entries;
|
||||
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
NipplesMeshComponent, EClothingSlotType::Nipples,
|
||||
nullptr,
|
||||
LOCTEXT("Nipples", "Nipples")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
AnalMeshComponent, EClothingSlotType::Anal,
|
||||
nullptr,
|
||||
LOCTEXT("Anal", "Anal")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
VaginaMeshComponent, EClothingSlotType::Vagina,
|
||||
nullptr,
|
||||
LOCTEXT("Vagina", "Vagina")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
HeadMeshComponent, EClothingSlotType::Head,
|
||||
nullptr,
|
||||
LOCTEXT("Head", "Head")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
NeckMeshComponent, EClothingSlotType::Neck,
|
||||
nullptr,
|
||||
LOCTEXT("Neck", "Neck")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
FaceMeshComponent, EClothingSlotType::Face,
|
||||
nullptr,
|
||||
LOCTEXT("Face", "Face")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
EyesMeshComponent, EClothingSlotType::Eyes,
|
||||
nullptr,
|
||||
LOCTEXT("Eyes", "Eyes")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
BodySuitMeshComponent, EClothingSlotType::Bodysuit,
|
||||
nullptr,
|
||||
LOCTEXT("Bodysuit", "Bodysuit")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
TopMeshComponent, EClothingSlotType::Top,
|
||||
nullptr,
|
||||
LOCTEXT("Top", "Top")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
BottomMeshComponent, EClothingSlotType::Bottom,
|
||||
nullptr,
|
||||
LOCTEXT("Bottom", "Bottom")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
UnderwearTopMeshComponent, EClothingSlotType::UnderwearTop,
|
||||
nullptr,
|
||||
LOCTEXT("UnderwearTop", "UnderwearTop")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
UnderwearBottomMeshComponent, EClothingSlotType::UnderwearBottom,
|
||||
nullptr,
|
||||
LOCTEXT("UnderwearBottom", "UnderwearBottom")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
SocksMeshComponent, EClothingSlotType::Socks,
|
||||
nullptr,
|
||||
LOCTEXT("Socks", "Socks")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
FootwearMeshComponent, EClothingSlotType::Footwear,
|
||||
nullptr,
|
||||
LOCTEXT("Footwear", "Footwear")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
FootwearMeshComponent, EClothingSlotType::Outerwear,
|
||||
nullptr,
|
||||
LOCTEXT("Outerwear", "Outerwear")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
FootwearMeshComponent, EClothingSlotType::WristRestraint,
|
||||
nullptr,
|
||||
LOCTEXT("WristRestraint", "WristRestraint")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
FootwearMeshComponent, EClothingSlotType::AnkleRestraint,
|
||||
nullptr,
|
||||
LOCTEXT("AnkleRestraint", "AnkleRestraint")));
|
||||
ClothingManager->ClothingSlots.Add(
|
||||
FClothingSlotData(
|
||||
FootwearMeshComponent, EClothingSlotType::NeckRestraint,
|
||||
nullptr,
|
||||
LOCTEXT("NeckRestraint", "NeckRestraint")));
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
for (const FClothingSlotData& SlotData : ClothingManager->ClothingSlots)
|
||||
{
|
||||
FRadialMenuEntry Entry;
|
||||
Entry.bEnabled = SlotData.ClothingItemInstance != nullptr;
|
||||
Entry.DisplayName = SlotData.Name;
|
||||
Entry.Icon = SlotData.ClothingItemInstance ? SlotData.ClothingItemInstance->GetClothingItem()->Icon : SlotData.Icon;
|
||||
Entry.ItemId = FName(SlotData.Name.ToString());
|
||||
Entries.Push(Entry);
|
||||
}
|
||||
|
||||
RadialMenuController->Entries = Entries;
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::NotifyNoticed(ANPCAIController* NPCController)
|
||||
|
||||
@@ -20,6 +20,7 @@ struct FClothingSlotData;
|
||||
class UInteractionManager;
|
||||
class UClothingPickerWidget;
|
||||
class UClothingManager;
|
||||
class UClothingSlotInfo;
|
||||
class UStatsManager;
|
||||
class UMissionsManager;
|
||||
class ANPCAIController;
|
||||
@@ -122,6 +123,9 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Censorship")
|
||||
UStaticMeshComponent* AnalCensorship;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Clothing")
|
||||
TObjectPtr<UClothingSlotInfo> SlotInfo;
|
||||
|
||||
// Components
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing")
|
||||
UClothingManager* ClothingManager;
|
||||
@@ -201,7 +205,7 @@ private:
|
||||
void OnCrouchToggle(const FInputActionValue& Value);
|
||||
void OnEquipmentPress(const FInputActionValue& Value);
|
||||
|
||||
void SetupClothingSlots();
|
||||
void BuildRadialMenuEntries();
|
||||
|
||||
bool CheckSight(const FVector& StartLocation, const FVector& EndLocation, FHitResult& HitResult, const AActor* IgnoreActor);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user