Show / Hide Table of Contents

Class SettlementParentage

Class that determines the parent settlement for another settlement.

Inheritance
System.Object
SettlementParentage
Implements
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
Namespace: Eco.Gameplay.Settlements
Assembly: Eco.Gameplay.dll
Syntax
public class SettlementParentage : Object, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions

Constructors

SettlementParentage()

Declaration
public SettlementParentage()

Properties

Applicants

Declaration
public IReadOnlySet<Settlement> Applicants { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlySet<Settlement>

ChildrenChangedDetailedEvent

Declaration
public ThreadSafeAction<IEnumerable<Settlement>, IEnumerable<Settlement>> ChildrenChangedDetailedEvent { get; set; }
Property Value
Type Description
ThreadSafeAction<System.Collections.Generic.IEnumerable<Settlement>, System.Collections.Generic.IEnumerable<Settlement>>

ChildrenChangedEvent

Declaration
public ThreadSafeAction ChildrenChangedEvent { get; set; }
Property Value
Type Description
ThreadSafeAction

ChildrenSettlementRoster

Declaration
public SettlementRoster ChildrenSettlementRoster { get; }
Property Value
Type Description
SettlementRoster

ChildrenSettlements

Declaration
public IReadOnlySet<Settlement> ChildrenSettlements { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlySet<Settlement>

ChildTypeName

Declaration
public LocString ChildTypeName { get; }
Property Value
Type Description
LocString

ControllerID

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

Invited

Declaration
public IReadOnlySet<Settlement> Invited { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlySet<Settlement>

Members

Declaration
public IReadOnlySet<Settlement> Members { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlySet<Settlement>

ParentChangedEvent

Declaration
public ThreadSafeAction ParentChangedEvent { get; set; }
Property Value
Type Description
ThreadSafeAction

ParentSettlement

Declaration
public Settlement ParentSettlement { get; }
Property Value
Type Description
Settlement

ParentTypeName

Declaration
public LocString ParentTypeName { get; }
Property Value
Type Description
LocString

Settlement

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

SettlementTypeName

Declaration
public LocString SettlementTypeName { get; }
Property Value
Type Description
LocString

Subscriptions

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

Methods

AddChild(Settlement)

Add a child to our roster, taking care to remove it from the old one if it has one.

Declaration
public Result AddChild(Settlement target)
Parameters
Type Name Description
Settlement target
Returns
Type Description
Result

ChildSettlementAttemptApplyOrJoin(Settlement)

Declaration
public Result ChildSettlementAttemptApplyOrJoin(Settlement childSettlement)
Parameters
Type Name Description
Settlement childSettlement
Returns
Type Description
Result

ClearChildrenSettlements()

Declaration
public void ClearChildrenSettlements()

ClearInvites()

Declaration
public bool ClearInvites()
Returns
Type Description
System.Boolean

Destroy()

Declaration
public void Destroy()

GetChildrenSettlementRosterForSyncingOnly()

Declaration
public SettlementRoster GetChildrenSettlementRosterForSyncingOnly()
Returns
Type Description
SettlementRoster

GetSettlementAtHigherLevel(SettlementType)

Returns this settlement if the type matches us, otherwise if its a higher type it passes it too our parent to check. If its lower type, it return null.

Declaration
public Settlement GetSettlementAtHigherLevel(SettlementType type)
Parameters
Type Name Description
SettlementType type
Returns
Type Description
Settlement

HasAncestor(Settlement)

True if ourself or any parent up the hierarchy matches the given settlement.

Declaration
public bool HasAncestor(Settlement potentialAncestor)
Parameters
Type Name Description
Settlement potentialAncestor
Returns
Type Description
System.Boolean

Initialize(WorldObject, Settlement)

Declaration
public void Initialize(WorldObject host, Settlement settlement)
Parameters
Type Name Description
WorldObject host
Settlement settlement

InviteOrAccept(Settlement)

Declaration
public Result InviteOrAccept(Settlement settlement)
Parameters
Type Name Description
Settlement settlement
Returns
Type Description
Result

IsRelated(Settlement)

Returns true if A is parent of B or vice versa (or A == B).

Declaration
public bool IsRelated(Settlement set)
Parameters
Type Name Description
Settlement set
Returns
Type Description
System.Boolean

Lineage()

Return enumerable of this settlement, then each parent in order.

Declaration
public IEnumerable<Settlement> Lineage()
Returns
Type Description
System.Collections.Generic.IEnumerable<Settlement>

LineageName(Boolean)

Describe the parents of this settlement and this settlement itself in a single string. Can do via commas or new lines.

Declaration
public LocString LineageName(bool commas)
Parameters
Type Name Description
System.Boolean commas
Returns
Type Description
LocString

RejectApplication(User, Settlement)

Declaration
public bool RejectApplication(User userApproving, Settlement deniedSettlement)
Parameters
Type Name Description
User userApproving
Settlement deniedSettlement
Returns
Type Description
System.Boolean

RescindInvite(Settlement)

Declaration
public bool RescindInvite(Settlement settlement)
Parameters
Type Name Description
Settlement settlement
Returns
Type Description
System.Boolean

TryRemove(Settlement)

Declaration
public Result TryRemove(Settlement settlement)
Parameters
Type Name Description
Settlement settlement
Returns
Type Description
Result

Events

PropertyChanged

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

Implements

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

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
☀
☾