Files
PHY/Plugins/GGS/Source/GenericGameSystem/Private/Interaction/GGS_InteractionStructLibrary.cpp
2026-03-03 01:23:02 +08:00

31 lines
971 B
C++

// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#include "Interaction/GGS_InteractionStructLibrary.h"
#include "Interaction/GGS_InteractionDefinition.h"
FString FGGS_InteractionOption::ToString() const
{
return FString::Format(TEXT("{0} {1} {2}"), {
Definition ? Definition->Text.ToString() : TEXT("Null Definition"), SlotState == ESmartObjectSlotState::Free ? TEXT("Valid") : TEXT("Invalid"), SlotIndex
});
}
bool operator==(const FGGS_InteractionOption& Lhs, const FGGS_InteractionOption& RHS)
{
return Lhs.Definition == RHS.Definition
&& Lhs.RequestResult == RHS.RequestResult
&& Lhs.SlotIndex == RHS.SlotIndex
&& Lhs.SlotState == RHS.SlotState;
}
bool operator!=(const FGGS_InteractionOption& Lhs, const FGGS_InteractionOption& RHS)
{
return !(Lhs == RHS);
}
bool operator<(const FGGS_InteractionOption& Lhs, const FGGS_InteractionOption& RHS)
{
return Lhs.SlotIndex < RHS.SlotIndex;
}