Class Settlement
A settlement defines 'influence' in the world upon which its government is applied and land can be claimed.
It also maintains a list of citizens associated with the government, and polices for changing citizens.
Inheritance
System.Object
Settlement
Implements
ISuffixName
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
[ExactlyOnePerHost]
public sealed class Settlement : SimpleEntry, ILinkableParameterized<bool>, ILinkableParameterized<SimpleEntry.NamingOptions>, IValidity, IDescribable, ISuffixName, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IInitializationSubscribable, IInfluencer, IHostedObject, ILinkable, IHasTeleportOption, IAnnexable, IGivesReputation, IReputationAssociated, ICachesValidity, IHasID, IController, IViewController, IHasUniversalID, INamed, IReInitializable, IHasReferenceableSerializableID, IHasSerializableID, INotifyPropertyChanged
Constructors
Settlement()
Declaration
Settlement(SettlementType, Vector3i, WorldObject)
Declaration
public Settlement(SettlementType type, Vector3i position, WorldObject host)
Parameters
Fields
FoundedEvent
Declaration
public ThreadSafeAction FoundedEvent
Field Value
Founders
Declaration
public ThreadSafeList<User> Founders
Field Value
WorldObjectsWithAssignedJurisdiction
Tracks all world objects that have a jurisdiction which is assigned to us.
Declaration
public ThreadSafeHashSet<WorldObject> WorldObjectsWithAssignedJurisdiction
Field Value
Properties
AdvertisementToNewPeopleEnteringWorld
Declaration
public string AdvertisementToNewPeopleEnteringWorld { get; set; }
Property Value
| Type |
Description |
| System.String |
|
AllCurrentCivicArticlesCached
All the active articles, from both the constitution and any amendments that modify that list. Will contain invalid articles too.
Declaration
public IEnumerable<CivicArticle> AllCurrentCivicArticlesCached { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<CivicArticle> |
|
AllowAnyUnaffiliatedHomesteadDeedToExpandWithinOurInfluence
Declaration
public bool AllowAnyUnaffiliatedHomesteadDeedToExpandWithinOurInfluence { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowBrandNewPeopleChangedEvent
Declaration
public static ThreadSafeAction AllowBrandNewPeopleChangedEvent { get; }
Property Value
AssignedCulturalDeeds
The cultrual properties chosen on a diplomacy desk, foreced to be part of the set of influencing deeds.
Declaration
public ThreadSafeList<Deed> AssignedCulturalDeeds { get; set; }
Property Value
CachedData
Declaration
[NewTooltipChildren]
public SettlementCachedData CachedData { get; set; }
Property Value
CanBeDeleted
Declaration
public override bool CanBeDeleted { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
CitizenDemographic
Declaration
public Demographic CitizenDemographic { get; set; }
Property Value
Citizens
Declaration
public ThreadSafeHashSet<User> Citizens { get; }
Property Value
Citizenship
Declaration
[NewTooltipChildren]
public SettlementCitizenship Citizenship { get; set; }
Property Value
Color
Declaration
public Color Color { get; }
Property Value
Constitution
Declaration
public Constitution Constitution { get; set; }
Property Value
CultureBoost
Declaration
public float CultureBoost { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
DefaultCurrency
Declaration
public Currency DefaultCurrency { get; set; }
Property Value
ElectionProcess
Declaration
public ElectionProcess ElectionProcess { get; set; }
Property Value
Enabled
Declaration
public bool Enabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Founded
Declaration
public bool Founded { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
FoundingElection
Declaration
public Election FoundingElection { get; set; }
Property Value
FoundingPosition
Declaration
public Vector3i FoundingPosition { get; }
Property Value
HasValidConstitution
Returns false when where is currently no active and valid constitution.
Declaration
public bool HasValidConstitution { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
HostObject
Declaration
public WorldObjectHandle HostObject { get; }
Property Value
IconName
Declaration
public override string IconName { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
IgnoreRequiresHost
Declaration
public bool IgnoreRequiresHost { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
ImmigrationPolicy
Declaration
public ImmigrationPolicy ImmigrationPolicy { get; set; }
Property Value
Influence
Declaration
[NewTooltipChildren]
public SettlementInfluence Influence { get; set; }
Property Value
InfluenceSourceDeeds
The current cached list of influence source deeds, which can change when none are assigned. It uses all the assigned ones, then takes remaining ones in descending order to reach the max count.
Declaration
public ControllerList<Deed> InfluenceSourceDeeds { get; set; }
Property Value
Initializer
Declaration
public Initializer Initializer { get; }
Property Value
IsActive
Declaration
public bool IsActive { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
LastAnnexedTime
Declaration
public double LastAnnexedTime { get; set; }
Property Value
| Type |
Description |
| System.Double |
|
LastValidTime
Declaration
public double LastValidTime { get; set; }
Property Value
| Type |
Description |
| System.Double |
|
Leader
Declaration
public ElectedTitle Leader { get; set; }
Property Value
LeaderAndCitizensUpdatedEvent
Declaration
public static ThreadSafeAction<Settlement> LeaderAndCitizensUpdatedEvent { get; }
Property Value
Legal
Declaration
public SettlementLegal Legal { get; set; }
Property Value
Markers
Declaration
public ControllerList<WorldMarker> Markers { get; }
Property Value
OriginalName
Declaration
public string OriginalName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Parentage
Declaration
public SettlementParentage Parentage { get; }
Property Value
ParentSettlement
Declaration
public Settlement ParentSettlement { get; }
Property Value
Picture
Declaration
public PictureItem Picture { get; }
Property Value
| Type |
Description |
| Eco.Mods.TechTree.PictureItem |
|
Position
Declaration
public Vector3i Position { get; }
Property Value
Property
Declaration
[NewTooltipChildren]
public SettlementProperty Property { get; set; }
Property Value
ProposableUpdatedEvent
Declaration
public ThreadSafeAction<IProposable> ProposableUpdatedEvent { get; }
Property Value
RequiresHost
Declaration
public bool RequiresHost { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
ScanPeriodically
Declaration
public bool ScanPeriodically { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
SettlementLineageNameChangedEvent
Declaration
public ThreadSafeAction SettlementLineageNameChangedEvent { get; }
Property Value
SettlementType
Declaration
public SettlementType SettlementType { get; }
Property Value
Taxes
Declaration
public SettlementTaxes Taxes { get; set; }
Property Value
TimeFounded
Declaration
public double TimeFounded { get; }
Property Value
| Type |
Description |
| System.Double |
|
TreasuryBankAccount
Declaration
public BankAccount TreasuryBankAccount { get; set; }
Property Value
TypeAndName
The type of settlement prepending the name. IE, "Town Johnkville"
Declaration
public LocString TypeAndName { get; }
Property Value
WasRemoved
Declaration
public bool WasRemoved { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
AssignHostObject(WorldObject)
Declaration
public void AssignHostObject(WorldObject newHost)
Parameters
CanBeAssignedTo(IOrphanAssignment)
Declaration
public bool CanBeAssignedTo(IOrphanAssignment container)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
ClearCoreProposables()
Remove all references to the core proposables, as in cases of annexing where we dont want them to get updated.
Declaration
public void ClearCoreProposables()
CreatorText(Player)
Declaration
public override LocString CreatorText(Player reader)
Parameters
| Type |
Name |
Description |
| Player |
reader |
|
Returns
Overrides
Destroyed()
Declaration
public override void Destroyed()
Overrides
DisableHostedObject()
Declaration
public void DisableHostedObject()
FastTick()
Declaration
FounderDesc()
Declaration
public LocString FounderDesc()
Returns
FoundSettlement(IEnumerable<User>, Election)
Declaration
public void FoundSettlement(IEnumerable<User> founders, Election election = null)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<User> |
founders |
|
| Election |
election |
|
GetCoreProposable(Type)
Provides any of the built-in proposables the settlement makes.
Declaration
public IHasID GetCoreProposable(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
GetCoreSettlementParts()
Itrerates through the linked parts of the settlement.
Declaration
public IEnumerable<IHasID> GetCoreSettlementParts()
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<IHasID> |
|
HasAncestor(Settlement)
Declaration
public bool HasAncestor(Settlement settlement)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
HasAuth(User)
Declaration
public bool HasAuth(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
| Type |
Description |
| System.Boolean |
|
HasCitizen(User)
Declaration
public bool HasCitizen(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
| Type |
Description |
| System.Boolean |
|
HostObjectSetup(WorldObject)
Declaration
public void HostObjectSetup(WorldObject hostObject)
Parameters
Influences(Vector2i)
Returns true if the settlement influences the given position.
Declaration
public bool Influences(Vector2i pos)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Influences(PlotPos)
Declaration
public bool Influences(PlotPos pos)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Initialize()
Declaration
public override void Initialize()
Overrides
IsSettlementCoreProposable(IProposable)
Returns true if the given proposable is one our special ones listed above.
Declaration
public bool IsSettlementCoreProposable(IProposable proposable)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
OnCreationCompleted()
Declaration
public void OnCreationCompleted()
Declaration
public LocString PositionTooltip()
Returns
SetSettlementPicture(PictureItem)
Assign Picture to the Settlement from its Foundation and notify clients.
Declaration
public void SetSettlementPicture(PictureItem picture)
Parameters
| Type |
Name |
Description |
| Eco.Mods.TechTree.PictureItem |
picture |
|
Tick()
Declaration
UILinkContent(Boolean)
Declaration
public override LocString UILinkContent(bool param)
Parameters
| Type |
Name |
Description |
| System.Boolean |
param |
|
Returns
Overrides
UnfoundSettlement()
Revert to unfounded, which happens when annexed into the same type of settlement.
Declaration
public void UnfoundSettlement()
UpdatedProposable(IProposable)
Declaration
public void UpdatedProposable(IProposable element)
Parameters
Explicit Interface Implementations
ICachesValidity.IgnoreValidity
Declaration
bool ICachesValidity.IgnoreValidity { get; }
Returns
| Type |
Description |
| System.Boolean |
|
IGivesReputation.DisplayPriority
Declaration
int IGivesReputation.DisplayPriority { get; }
Returns
| Type |
Description |
| System.Int32 |
|
IGivesReputation.GivableReputationPerDay
Declaration
float IGivesReputation.GivableReputationPerDay { get; }
Returns
| Type |
Description |
| System.Single |
|
IGivesReputation.GivableReputationPerDayPerTarget
Declaration
float IGivesReputation.GivableReputationPerDayPerTarget { get; }
Returns
| Type |
Description |
| System.Single |
|
IGivesReputation.GivableReputationToSingleTargetTotal
Declaration
Range IGivesReputation.GivableReputationToSingleTargetTotal { get; }
Returns
IInfluencer.Priority
Declaration
int IInfluencer.Priority { get; }
Returns
| Type |
Description |
| System.Int32 |
|
IHostedObject.CanBeEdited
Declaration
bool IHostedObject.CanBeEdited { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
IHostedObject.ExpirationWarningsIssued
Declaration
int IHostedObject.ExpirationWarningsIssued { get; set; }
Returns
| Type |
Description |
| System.Int32 |
|
IHostedObject.HostingSettlement
Declaration
Settlement IHostedObject.HostingSettlement { get; }
Returns
IHostedObject.ReenableHostedObject()
Declaration
void IHostedObject.ReenableHostedObject()
IAnnexable.Citizens()
Declaration
IEnumerable<User> IAnnexable.Citizens()
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<User> |
|
IAnnexable.CultureTotal
Declaration
float IAnnexable.CultureTotal { get; }
Returns
| Type |
Description |
| System.Single |
|
IAnnexable.DistanceTo(Vector2i)
Declaration
float IAnnexable.DistanceTo(Vector2i worldPos)
Parameters
Returns
| Type |
Description |
| System.Single |
|
IAnnexable.Notify(LocString)
Declaration
void IAnnexable.Notify(LocString s)
Parameters
IAnnexable.Parent
Declaration
Settlement IAnnexable.Parent { get; }
Returns
IAnnexable.PlotPosSet
Declaration
HashSet<PlotPos> IAnnexable.PlotPosSet { get; }
Returns
| Type |
Description |
| System.Collections.Generic.HashSet<PlotPos> |
|
IAnnexable.ReductionPercentageForAnnexation
Declaration
float IAnnexable.ReductionPercentageForAnnexation { get; }
Returns
| Type |
Description |
| System.Single |
|
IAnnexable.SettlementIDtoAnnexWarningIssued
Declaration
ThreadSafeDictionary<int, int> IAnnexable.SettlementIDtoAnnexWarningIssued { get; set; }
Returns
IAnnexable.SettlementType
Declaration
Nullable<SettlementType> IAnnexable.SettlementType { get; }
Returns
IAnnexable.TypeDisplayName
Declaration
LocString IAnnexable.TypeDisplayName { get; }
Returns
Implements
ISuffixName
System.ComponentModel.INotifyPropertyChanged
Extension Methods