Class SettlementManager
Handles settlement creation and tracking, mapping their influence as well.
Inheritance
System.Object
SettlementManager
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class SettlementManager : Singleton<SettlementManager>, IController, IViewController, IHasUniversalID, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, INotifyPropertyChanged
Constructors
SettlementManager()
Declaration
public SettlementManager()
Fields
FastTickEvent
Declaration
public ThreadSafeAction FastTickEvent
Field Value
ImmigrationChanged
Declaration
public ThreadSafeAction<Settlement> ImmigrationChanged
Field Value
SettlementInfluenceChangedEvent
Declaration
public ThreadSafeAction<IEnumerable<Settlement>> SettlementInfluenceChangedEvent
Field Value
Properties
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
Debug
Declaration
public SettlementDebug Debug { get; }
Property Value
LegacySettlement
Declaration
public Settlement LegacySettlement { get; set; }
Property Value
Subscriptions
Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Methods
EnsureUpdated()
Allows external processes to trigger an immediate update when big changes happen
Declaration
public void EnsureUpdated()
FastTick()
Declaration
ForceUpdateAllSettlements()
Declaration
public void ForceUpdateAllSettlements()
GetInfluenceAccordingToInfluencePointsOnlyAtPos(PlotPos, Nullable<SettlementType>, Influence[])
Gets the point influencing the given position, considering only the influence points, not anything else like assigned settlement on stakes, which can affect it otherwise.
Passed null means take lowest.
Declaration
public Settlement GetInfluenceAccordingToInfluencePointsOnlyAtPos(PlotPos pos, Nullable<SettlementType> settlementTypeBeingCalculated, Influence[] influences = null)
Parameters
Returns
GetStatusForSettlement(Vector2i)
Declaration
public LocString GetStatusForSettlement(Vector2i pos)
Parameters
Returns
InfluencedBy(Settlement, Vector2i)
Declaration
public bool InfluencedBy(Settlement settlement, Vector2i worldPos)
Parameters
Returns
Type |
Description |
System.Boolean |
|
InfluencedBy(Settlement, PlotPos)
Declaration
public bool InfluencedBy(Settlement settlement, PlotPos plotPos)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Initialize()
Declaration
SlowTick()
Declaration
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods