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

#include <AIDataTypes.h>

Inheritance diagram for FFactionRelationship:

Public Member Functions

void AddHostility (const float Value)
 
void AddTrust (const float Value)
 
void UpdateRelationshipStatus ()
 
bool IsHostile () const
 

Static Public Member Functions

static FFactionRelationship Empty ()
 

Public Attributes

ERelationshipStatus RelationshipStatus = ERelationshipStatus::Default
 
EFactionType OtherFaction = EFactionType::Default
 
float TrustLevel = 0.0f
 
float HostilityLevel = 0.0f
 

Detailed Description

Struct representing the relationship between two factions. Trust Level & Hostility Level

Member Function Documentation

◆ AddHostility()

void FFactionRelationship::AddHostility ( const float Value)
inline
297 {
298 HostilityLevel += Value;
300 }
float HostilityLevel
Definition AIDataTypes.h:294
void UpdateRelationshipStatus()
Definition AIDataTypes.h:307

◆ AddTrust()

void FFactionRelationship::AddTrust ( const float Value)
inline
302 {
303 TrustLevel += Value;
305 }
float TrustLevel
Definition AIDataTypes.h:291

◆ Empty()

static FFactionRelationship FFactionRelationship::Empty ( )
inlinestatic
351 {
353 return EmptyData;
354 }
Definition AIDataTypes.h:279

◆ IsHostile()

bool FFactionRelationship::IsHostile ( ) const
inline
342 {
343 if(HostilityLevel >= 100.0f)
344 {
345 return true;
346 }
347 return false;
348 }

◆ UpdateRelationshipStatus()

void FFactionRelationship::UpdateRelationshipStatus ( )
inline
308 {
309 if (TrustLevel >= 100 && HostilityLevel == 0)
310 {
312 }
313 else if (TrustLevel >= 40 && HostilityLevel == 0)
314 {
316 }
317 else if (TrustLevel >= 20 && HostilityLevel <= 20)
318 {
320 }
321 else if (TrustLevel == 0 && HostilityLevel >= 40)
322 {
324 }
326 {
328 }
330 {
332 }
333 else
334 {
335 // Handle any other case, possibly setting to Default or another status
337 }
338 }
ERelationshipStatus RelationshipStatus
Definition AIDataTypes.h:284

Member Data Documentation

◆ HostilityLevel

float FFactionRelationship::HostilityLevel = 0.0f

◆ OtherFaction

EFactionType FFactionRelationship::OtherFaction = EFactionType::Default

◆ RelationshipStatus

ERelationshipStatus FFactionRelationship::RelationshipStatus = ERelationshipStatus::Default

◆ TrustLevel

float FFactionRelationship::TrustLevel = 0.0f

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