Show / Hide Table of Contents

Class SettlementManager

Handles settlement creation and tracking, mapping their influence as well.

Inheritance
System.Object
SettlementManager
Implements
IController
IViewController
IHasUniversalID
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
System.ComponentModel.INotifyPropertyChanged
Namespace: Eco.Gameplay.Settlements
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
Type Description
ThreadSafeAction

ImmigrationChanged

Declaration
public ThreadSafeAction<Settlement> ImmigrationChanged
Field Value
Type Description
ThreadSafeAction<Settlement>

SettlementInfluenceChangedEvent

Declaration
public ThreadSafeAction<IEnumerable<Settlement>> SettlementInfluenceChangedEvent
Field Value
Type Description
ThreadSafeAction<System.Collections.Generic.IEnumerable<Settlement>>

Properties

ControllerID

Declaration
public ref int ControllerID { get; }
Property Value
Type Description
System.Int32

Debug

Declaration
public SettlementDebug Debug { get; }
Property Value
Type Description
SettlementDebug

LegacySettlement

Declaration
public Settlement LegacySettlement { get; set; }
Property Value
Type Description
Settlement

Subscriptions

Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Type Description
ThreadSafeSubscriptions

Methods

EnsureUpdated()

Allows external processes to trigger an immediate update when big changes happen

Declaration
public void EnsureUpdated()

FastTick()

Declaration
public void FastTick()

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
Type Name Description
PlotPos pos
System.Nullable<SettlementType> settlementTypeBeingCalculated
Influence[] influences
Returns
Type Description
Settlement

GetStatusForSettlement(Vector2i)

Declaration
public LocString GetStatusForSettlement(Vector2i pos)
Parameters
Type Name Description
Vector2i pos
Returns
Type Description
LocString

InfluencedBy(Settlement, Vector2i)

Declaration
public bool InfluencedBy(Settlement settlement, Vector2i worldPos)
Parameters
Type Name Description
Settlement settlement
Vector2i worldPos
Returns
Type Description
System.Boolean

InfluencedBy(Settlement, PlotPos)

Declaration
public bool InfluencedBy(Settlement settlement, PlotPos plotPos)
Parameters
Type Name Description
Settlement settlement
PlotPos plotPos
Returns
Type Description
System.Boolean

Initialize()

Declaration
public void Initialize()

SlowTick()

Declaration
public void SlowTick()

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

IController
IViewController
IHasUniversalID
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
System.ComponentModel.INotifyPropertyChanged

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾