Space Plunder
Loading...
Searching...
No Matches
FInteractionData Struct Reference

#include <BaseData.h>

Public Member Functions

 FInteractionData ()
 
 FInteractionData (const EInteractionType Default)
 
 FInteractionData (const EInteractionType Default, const EAIStimuliType Stimuli)
 
 FInteractionData (const FInteractionType Default, const EAIStimuliType Stimuli)
 
bool GetDefaultInteraction (FInteractionType &Default) const
 
bool GetInteraction (FInteractionType &Type, const EInteractionType Interaction) const
 
bool SetInteractionHidden (const EInteractionType Interaction, const bool bValue)
 
void SetOnlyInteractionVisible (const EInteractionType Interaction)
 
void SetOnlyInteractionVisible (const FString &Interaction)
 
bool SetInteractionAvailable (const EInteractionType Interaction, const bool bValue)
 
bool SetInteractionHold (const EInteractionType Interaction, const bool bValue)
 
TArray< FInteractionTypeGetVisibleInteractions () const
 
void SetDefault (const EInteractionType Default, const bool bRemoveOthers=true)
 
bool operator== (const FInteractionData &Other) const
 

Static Public Member Functions

static FInteractionData None ()
 

Public Attributes

FCharacterInfo DisplayInfo
 
TArray< FInteractionTypeInteractionTypes
 
EAIStimuliType StimuliType = EAIStimuliType::Default
 
bool bAIControlled = false
 
bool bShowMenu = false
 
bool bShowDefault = false
 
int32 DefaultInteraction = 0
 

Constructor & Destructor Documentation

◆ FInteractionData() [1/4]

FInteractionData::FInteractionData ( )
inline
451 {
452
453 };

◆ FInteractionData() [2/4]

FInteractionData::FInteractionData ( const EInteractionType Default)
inlineexplicit
456 {
458 // InteractionStructTypes
459 }
int32 DefaultInteraction
Definition BaseData.h:443
TArray< FInteractionType > InteractionTypes
Definition BaseData.h:429
Definition BaseData.h:333

◆ FInteractionData() [3/4]

FInteractionData::FInteractionData ( const EInteractionType Default,
const EAIStimuliType Stimuli )
inlineexplicit
461 {
463 StimuliType = Stimuli;
464 }
EAIStimuliType StimuliType
Definition BaseData.h:432

◆ FInteractionData() [4/4]

FInteractionData::FInteractionData ( const FInteractionType Default,
const EAIStimuliType Stimuli )
inlineexplicit
466 {
468 StimuliType = Stimuli;
469 }

Member Function Documentation

◆ GetDefaultInteraction()

bool FInteractionData::GetDefaultInteraction ( FInteractionType & Default) const
inline

@Returns if Default Interaction is Available

474 {
475 if(InteractionTypes.IsValidIndex(DefaultInteraction))
476 {
478 return true;
479 }
480 return false;
481 }

◆ GetInteraction()

bool FInteractionData::GetInteraction ( FInteractionType & Type,
const EInteractionType Interaction ) const
inline
484 {
485 for(const auto& InteractionType : InteractionTypes)
486 {
487 if(Interaction == InteractionType.InteractionType)
488 {
489 Type = InteractionType;
490 return true;
491 }
492 }
493 return false;
494 }
Definition Interaction.Build.cs:6

◆ GetVisibleInteractions()

TArray< FInteractionType > FInteractionData::GetVisibleInteractions ( ) const
inline
557 {
558 TArray<FInteractionType> VisibleInteractions;
559 for(const auto& Interaction : InteractionTypes)
560 {
561 if(Interaction.bHide == false)
562 {
563 VisibleInteractions.Add(Interaction);
564 }
565 }
566 return VisibleInteractions;
567 }

◆ None()

static FInteractionData FInteractionData::None ( )
inlinestatic
584 {
587 None.bShowDefault = true;
588 return None;
589 }
Definition BaseData.h:420
static FInteractionData None()
Definition BaseData.h:583
void SetDefault(const EInteractionType Default, const bool bRemoveOthers=true)
Definition BaseData.h:570
bool bShowDefault
Definition BaseData.h:440

◆ operator==()

bool FInteractionData::operator== ( const FInteractionData & Other) const
inline
592 {
593 bool bEqual = true;
594 if(InteractionTypes != Other.InteractionTypes)
595 {
596 bEqual = false;
597 }
598 if(DefaultInteraction != Other.DefaultInteraction)
599 {
600 bEqual = false;
601 }
602 if(bShowDefault != Other.bShowDefault)
603 {
604 bEqual = false;
605 }
606 return bEqual;
607 }

◆ SetDefault()

void FInteractionData::SetDefault ( const EInteractionType Default,
const bool bRemoveOthers = true )
inline
571 {
572 if(bRemoveOthers)
573 {
574 InteractionTypes.Empty();
575 }
578 {
580 }
581 }

◆ SetInteractionAvailable()

bool FInteractionData::SetInteractionAvailable ( const EInteractionType Interaction,
const bool bValue )
inline
532 {
533 for(auto& InteractionType : InteractionTypes)
534 {
535 if(Interaction == InteractionType.InteractionType)
536 {
537 InteractionType.bAvailable = bValue;
538 return true;
539 }
540 }
541 return false;
542 }

◆ SetInteractionHidden()

bool FInteractionData::SetInteractionHidden ( const EInteractionType Interaction,
const bool bValue )
inline
497 {
498 for(auto& InteractionType : InteractionTypes)
499 {
500 if(Interaction == InteractionType.InteractionType)
501 {
502 InteractionType.bHide = bValue;
503 return true;
504 }
505 }
506 return false;
507 }

◆ SetInteractionHold()

bool FInteractionData::SetInteractionHold ( const EInteractionType Interaction,
const bool bValue )
inline
544 {
545 for(auto& InteractionType : InteractionTypes)
546 {
547 if(Interaction == InteractionType.InteractionType)
548 {
549 InteractionType.bHold = bValue;
550 return true;
551 }
552 }
553 return false;
554 }

◆ SetOnlyInteractionVisible() [1/2]

void FInteractionData::SetOnlyInteractionVisible ( const EInteractionType Interaction)
inline
509 {
510 for(auto& InteractionType : InteractionTypes)
511 {
512 InteractionType.bHide = true;
513 if(Interaction == InteractionType.InteractionType)
514 {
515 InteractionType.bHide = false;
516 }
517 }
518 }

◆ SetOnlyInteractionVisible() [2/2]

void FInteractionData::SetOnlyInteractionVisible ( const FString & Interaction)
inline
520 {
521 for(auto& InteractionType : InteractionTypes)
522 {
523 InteractionType.bHide = true;
524 if(Interaction == InteractionType.CustomInteractionText)
525 {
526 InteractionType.bHide = false;
527 }
528 }
529 }

Member Data Documentation

◆ bAIControlled

bool FInteractionData::bAIControlled = false

◆ bShowDefault

bool FInteractionData::bShowDefault = false

◆ bShowMenu

bool FInteractionData::bShowMenu = false

If should show multiple Options

◆ DefaultInteraction

int32 FInteractionData::DefaultInteraction = 0

If set to just show default, will display this index, Set to -1 to display none

◆ DisplayInfo

FCharacterInfo FInteractionData::DisplayInfo

◆ InteractionTypes

TArray<FInteractionType> FInteractionData::InteractionTypes

◆ StimuliType

EAIStimuliType FInteractionData::StimuliType = EAIStimuliType::Default

For Perception


The documentation for this struct was generated from the following file: