Started rework of clothing slots and UI

This commit is contained in:
koritsa
2026-05-26 18:52:37 +03:00
parent e4cc9ee66c
commit 75d1059e91
37 changed files with 280 additions and 152 deletions
@@ -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)