Loading...
Searching...
No Matches
PixelCrushers.LoveHate.LoveHate Class Reference

This static wrapper class provides easy access to FactionManager methods. More...

Static Public Member Functions

static Faction GetFaction (int factionID)
 Looks up a faction by its ID.
 
static Faction GetFactionSilent (int factionID)
 Looks up a faction by its ID.
 
static Faction GetFaction (int factionID, bool silent)
 Looks up a faction by its ID.
 
static Faction GetFaction (string factionName)
 Looks up a faction by its name.
 
static int GetFactionID (string factionName)
 Looks up a faction ID by its name.
 
static bool FactionHasAncestor (int factionID, int ancestorID)
 Checks if a faction has an ancestor (parent, grandparent, etc.)
 
static bool FactionHasDirectParent (int factionID, int parentID)
 Checks if a faction has a direct parent.
 
static void AddFactionParent (int factionID, int parentID)
 Adds a parent to a faction.
 
static void RemoveFactionParent (int factionID, int parentID, bool inheritRelationships)
 Removes a parent from a faction.
 
static bool FindPersonalAffinity (int judgeFactionID, int subjectFactionID, out float affinity)
 Finds this faction's personal affinity for another faction.
 
static bool FindAffinity (int judgeFactionID, int subjectFactionID, out float affinity)
 Finds the affinity of a judging faction to a subject faction.
 
static float GetAffinity (int judgeFactionID, int subjectFactionID)
 Gets the affinity of a judging faction to a subject faction.
 
static float GetAffinity (string judgeFactionName, string subjectFactionName)
 Gets a judge's affinity to a subject using their faction names.
 
static void SetPersonalAffinity (int judgeFactionID, int subjectFactionID, float affinity)
 Sets this faction's personal affinity to another faction.
 
static void SetPersonalAffinity (string judgeFactionName, string subjectFactionName, float affinity)
 Sets a judge's personal affinity to a subject using their faction names.
 
static void ModifyPersonalAffinity (int judgeFactionID, int subjectFactionID, float affinityChange)
 Modifies (increments or decrements) a judge's personal affinity to a subject using their faction IDs.
 
static void ModifyPersonalAffinity (string judgeFactionName, string subjectFactionName, float affinityChange)
 Modifies (increments or decrements) a judge's personal affinity to a subject using their faction names.
 
static void ShareAffinity (int judgeFactionID, int otherFactionID, int subjectFactionID)
 If the faction has personal affinity for a subject and the other doesn't, this gives the other an affinity for the subject based on the other's affinity for this faction.
 
static void CommitDeed (FactionMember actor, Deed deed, bool requiresSight, Dimension dimension, float radius)
 Informs factions that a deed was committed.
 
static void CommitDeed (FactionMember actor, Deed deed, bool requiresSight)
 Commits the deed.
 

Properties

static FactionManager factionManager [get]
 The current FactionManager instance.
 
static FactionDatabase factionDatabase [get]
 The faction database managed by FactionManager instance.
 
static int witnessesPerUpdate [get, set]
 When a deed is committed, process this many potential witnesses each Update.
 
static bool canWitnessSelf [get, set]
 Faction members can witness their own deeds.
 
static bool debug [get, set]
 Log activity to the console.
 

Detailed Description

This static wrapper class provides easy access to FactionManager methods.

Member Function Documentation

◆ AddFactionParent()

static void PixelCrushers.LoveHate.LoveHate.AddFactionParent ( int  factionID,
int  parentID 
)
inlinestatic

Adds a parent to a faction.

Parameters
factionIDFaction ID.
parentIDParent ID.

◆ CommitDeed() [1/2]

static void PixelCrushers.LoveHate.LoveHate.CommitDeed ( FactionMember  actor,
Deed  deed,
bool  requiresSight 
)
inlinestatic

Commits the deed.

This version has no distance restrictions.

Parameters
actorActor.
deedDeed.
requiresSightIf set to true requires sight.

◆ CommitDeed() [2/2]

static void PixelCrushers.LoveHate.LoveHate.CommitDeed ( FactionMember  actor,
Deed  deed,
bool  requiresSight,
Dimension  dimension,
float  radius 
)
inlinestatic

Informs factions that a deed was committed.

Parameters
actorFactionMember who committed the deed.
deedDeed.
requiresSightIf true, the deed must be seen to be witnessed.
dimensionThe world space dimension to use for radius checks.
radiusMax distance from position that factions can witness the deed (0=anywhere).

◆ FactionHasAncestor()

static bool PixelCrushers.LoveHate.LoveHate.FactionHasAncestor ( int  factionID,
int  ancestorID 
)
inlinestatic

Checks if a faction has an ancestor (parent, grandparent, etc.)

Returns
true, if has ancestor, false otherwise.
Parameters
factionIDFaction ID.
ancestorIDAncestor ID.

◆ FactionHasDirectParent()

static bool PixelCrushers.LoveHate.LoveHate.FactionHasDirectParent ( int  factionID,
int  parentID 
)
inlinestatic

Checks if a faction has a direct parent.

Returns
true, if has direct parent, false otherwise.
Parameters
factionIDFaction ID.
parentIDParent ID.

◆ FindAffinity()

static bool PixelCrushers.LoveHate.LoveHate.FindAffinity ( int  judgeFactionID,
int  subjectFactionID,
out float  affinity 
)
inlinestatic

Finds the affinity of a judging faction to a subject faction.

Returns
true, if affinity was found, false otherwise.
Parameters
judgeFactionIDJudge faction ID.
subjectFactionIDSubject faction ID.
affinityAffinity of judge to subject.

◆ FindPersonalAffinity()

static bool PixelCrushers.LoveHate.LoveHate.FindPersonalAffinity ( int  judgeFactionID,
int  subjectFactionID,
out float  affinity 
)
inlinestatic

Finds this faction's personal affinity for another faction.

Doesn't check parents.

Returns
true if personal affinity was found, false otherwise.
Parameters
subjectFactionIDThe other faction ID.
affinityAffinity of this faction to the subject.

◆ GetAffinity() [1/2]

static float PixelCrushers.LoveHate.LoveHate.GetAffinity ( int  judgeFactionID,
int  subjectFactionID 
)
inlinestatic

Gets the affinity of a judging faction to a subject faction.

Returns
The affinity.
Parameters
judgeFactionIDJudge faction ID.
subjectFactionIDSubject faction ID.

◆ GetAffinity() [2/2]

static float PixelCrushers.LoveHate.LoveHate.GetAffinity ( string  judgeFactionName,
string  subjectFactionName 
)
inlinestatic

Gets a judge's affinity to a subject using their faction names.

Returns
The affinity.
Parameters
judgeFactionNameJudge faction name.
subjectFactionNameSubject faction name.

◆ GetFaction() [1/3]

static Faction PixelCrushers.LoveHate.LoveHate.GetFaction ( int  factionID)
inlinestatic

Looks up a faction by its ID.

Returns
The faction.
Parameters
factionIDFaction ID.

◆ GetFaction() [2/3]

static Faction PixelCrushers.LoveHate.LoveHate.GetFaction ( int  factionID,
bool  silent 
)
inlinestatic

Looks up a faction by its ID.

Returns
The faction.
Parameters
factionIDFaction ID.
silentIf set to true, don't log warnings.

◆ GetFaction() [3/3]

static Faction PixelCrushers.LoveHate.LoveHate.GetFaction ( string  factionName)
inlinestatic

Looks up a faction by its name.

Returns
The faction.
Parameters
factionNameFaction name.

◆ GetFactionID()

static int PixelCrushers.LoveHate.LoveHate.GetFactionID ( string  factionName)
inlinestatic

Looks up a faction ID by its name.

Returns
The faction ID.
Parameters
factionNameFaction name.

◆ GetFactionSilent()

static Faction PixelCrushers.LoveHate.LoveHate.GetFactionSilent ( int  factionID)
inlinestatic

Looks up a faction by its ID.

Doesn't log any warning messages.

Returns
The faction.
Parameters
factionIDFaction ID.

◆ ModifyPersonalAffinity() [1/2]

static void PixelCrushers.LoveHate.LoveHate.ModifyPersonalAffinity ( int  judgeFactionID,
int  subjectFactionID,
float  affinityChange 
)
inlinestatic

Modifies (increments or decrements) a judge's personal affinity to a subject using their faction IDs.

Parameters
judgeFactionIDJudge faction ID.
subjectFactionIDSubject faction ID.
affinityChangeAffinity change.

◆ ModifyPersonalAffinity() [2/2]

static void PixelCrushers.LoveHate.LoveHate.ModifyPersonalAffinity ( string  judgeFactionName,
string  subjectFactionName,
float  affinityChange 
)
inlinestatic

Modifies (increments or decrements) a judge's personal affinity to a subject using their faction names.

Parameters
judgeFactionNameJudge faction name.
subjectFactionNameSubject faction name.
affinityChangeAffinity change.

◆ RemoveFactionParent()

static void PixelCrushers.LoveHate.LoveHate.RemoveFactionParent ( int  factionID,
int  parentID,
bool  inheritRelationships 
)
inlinestatic

Removes a parent from a faction.

Parameters
factionIDFaction ID.
parentIDParent ID.
inheritRelationshipsIf set to true keep the parent's relationships if the faction doesn't already have a personal relationship.

◆ SetPersonalAffinity() [1/2]

static void PixelCrushers.LoveHate.LoveHate.SetPersonalAffinity ( int  judgeFactionID,
int  subjectFactionID,
float  affinity 
)
inlinestatic

Sets this faction's personal affinity to another faction.

Parameters
subjectFactionIDSubject faction ID.
affinityAffinity to the other faction.

◆ SetPersonalAffinity() [2/2]

static void PixelCrushers.LoveHate.LoveHate.SetPersonalAffinity ( string  judgeFactionName,
string  subjectFactionName,
float  affinity 
)
inlinestatic

Sets a judge's personal affinity to a subject using their faction names.

Parameters
judgeFactionNameJudge faction name.
subjectFactionNameSubject faction name.
affinityAffinity.

◆ ShareAffinity()

static void PixelCrushers.LoveHate.LoveHate.ShareAffinity ( int  judgeFactionID,
int  otherFactionID,
int  subjectFactionID 
)
inlinestatic

If the faction has personal affinity for a subject and the other doesn't, this gives the other an affinity for the subject based on the other's affinity for this faction.

Parameters
judgeFactionIDJudging faction ID (gives affinity).
otherFactionIDOther faction ID (maybe receives affinity).
subjectFactionIDSubject faction ID (affinity about this faction).

Property Documentation

◆ canWitnessSelf

bool PixelCrushers.LoveHate.LoveHate.canWitnessSelf
staticgetset

Faction members can witness their own deeds.

◆ debug

bool PixelCrushers.LoveHate.LoveHate.debug
staticgetset

Log activity to the console.

◆ factionDatabase

FactionDatabase PixelCrushers.LoveHate.LoveHate.factionDatabase
staticget

The faction database managed by FactionManager instance.

◆ factionManager

FactionManager PixelCrushers.LoveHate.LoveHate.factionManager
staticget

The current FactionManager instance.

◆ witnessesPerUpdate

int PixelCrushers.LoveHate.LoveHate.witnessesPerUpdate
staticgetset

When a deed is committed, process this many potential witnesses each Update.


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