Class SettlementInfluence
Handles settlement influence for a given settlement.
Inheritance
System.Object
SettlementInfluence
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public sealed class SettlementInfluence : Object, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IController, IViewController, IHasUniversalID, INotifyPropertyChanged
Constructors
SettlementInfluence()
Declaration
public SettlementInfluence()
Properties
Color
Declaration
public Color Color { get; set; }
Property Value
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
InfluencePoints
Declaration
public IReadOnlySet<RadPoint> InfluencePoints { get; }
Property Value
Type |
Description |
System.Collections.Generic.IReadOnlySet<RadPoint> |
|
InfluencePointsNowOrWhenFounded
If founded, returns the cached influence points. If not, returns what the initial influence will be when founded.
Declaration
public IEnumerable<RadPoint> InfluencePointsNowOrWhenFounded { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<RadPoint> |
|
Influencer
Declaration
public IInfluencer Influencer { get; }
Property Value
InfluenceTimerRunOut
Declaration
public static ThreadSafeAction<IInfluencer> InfluenceTimerRunOut { get; }
Property Value
InfluenceWholeWorld
Declaration
public bool InfluenceWholeWorld { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
InfluencingDeeds
Declaration
public IReadOnlySet<Deed> InfluencingDeeds { get; }
Property Value
Type |
Description |
System.Collections.Generic.IReadOnlySet<Deed> |
|
Subscriptions
Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Methods
InfluencePointOnceFounded()
Gives the influence point of the settlement once it's founded, which is the passed position with the given influence radius for our type.
Declaration
public RadPoint InfluencePointOnceFounded()
Returns
Initialize(IInfluencer, Vector3i, SettlementType, Boolean, Func<Boolean>, Func<IEnumerable<Deed>>, SettlementCachedData, Func<Deed>)
Declaration
public void Initialize(IInfluencer influencer, Vector3i pos, SettlementType type, bool isFounded, Func<bool> settlementEnabled, Func<IEnumerable<Deed>> getInfluencingDeeds, SettlementCachedData cachedData, Func<Deed> sourceDeed)
Parameters
MakeInfluence()
Declaration
public Influence MakeInfluence()
Returns
ParentFounded(Vector3i)
Get called whenever the parent influencer get gounded.
Declaration
public void ParentFounded(Vector3i foundingPosition)
Parameters
Type |
Name |
Description |
Vector3i |
foundingPosition |
|
ParentUnfounded()
Declaration
public void ParentUnfounded()
Tick()
This will get called constantly and will take care of checking whether there's a deed that has just became invalid or not.
Declaration
UpdateInfluencePoints()
Calling this will make sure to update the cached influence points.
Declaration
public void UpdateInfluencePoints()
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods