23 #include "Components/ActorComponent.h"
24 #include "CoreMinimal.h"
25 #include "Engine/MemberReference.h"
29 #include "Fingerprint.h"
31 #include "Subjective.h"
33 #include "SubjectiveActorComponent.generated.h"
35 UCLASS(ClassGroup =
"Apparatus", Meta = (BlueprintSpawnableComponent))
37 : public UActorComponent,
45 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category = Subject,
46 Meta = (AllowPrivateAccess =
"true"))
53 class UBelt* Belt =
nullptr;
63 UPROPERTY(EditAnywhere, Category = Subject,
64 Meta = (AllowPrivateAccess =
"true"))
65 class UBelt* PreferredBelt =
nullptr;
67 friend class FSubjectDetails;
72 UPROPERTY(EditAnywhere, Instanced, Category = Details,
73 Meta = (AllowPrivateAccess =
"true"))
78 FORCEINLINE struct
FBeltSlot* GetSlot()
const override
84 return &(*Belt)[SlotIndex];
91 virtual void BeginPlay()
override;
93 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
97 if (InBelt ==
nullptr)
105 SlotIndex = InSlotIndex;
133 return PreferredBelt;
139 return TScriptInterface<class ISubjective>(GetOuter());
An interface for all sorts of subjects.
Definition: Subjective.h:42
The conveyor belt consisting of subjects.
Definition: Belt.h:60
static const int32 InvalidSlotIndex
Is this a special buffering belt?
Definition: Belt.h:96
The base subject detail (component) class.
Definition: Detail.h:35
TScriptInterface< class ISubjective > GetOwner() const
The owning subjective of the detail.
Definition: SubjectiveActorComponent.h:137
Definition: SubjectiveActorComponent.h:39
FFingerprint & GetFingerprint() override
Get the internal fingerprint of the subjective.
Definition: SubjectiveActorComponent.h:114
const TArray< UDetail * > & GetDetailsRef() const override
Direct access for the internal details array.
Definition: SubjectiveActorComponent.h:121
TArray< UDetail * > & GetDetailsRef() override
Direct access for the internal details array.
Definition: SubjectiveActorComponent.h:109
const FFingerprint & GetFingerprint() const override
Get the active fingerprint of the subjective.
Definition: SubjectiveActorComponent.h:126
void TakeBeltSlot(UBelt *InBelt, int32 InSlotIndex) override
Set the current belt slot of the subjective (if any).
Definition: SubjectiveActorComponent.h:95
class UBelt * GetPreferredBelt() const override
Get the preferred belt of the subjective (if any).
Definition: SubjectiveActorComponent.h:131
The belt slot, containing the cached details.
Definition: BeltSlot.h:40
The details fingerprint.
Definition: Fingerprint.h:117