Class SettlementParentage
Class that determines the parent settlement for another settlement.
Inheritance
System.Object
SettlementParentage
Implements
System.ComponentModel.INotifyPropertyChanged
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
ChildrenChangedEvent
Declaration
public ThreadSafeAction ChildrenChangedEvent { get; set; }
Property Value
ChildrenSettlementRoster
Declaration
public SettlementRoster ChildrenSettlementRoster { get; }
Property Value
ChildrenSettlements
Declaration
public IReadOnlySet<Settlement> ChildrenSettlements { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IReadOnlySet<Settlement> |
|
ChildTypeName
Declaration
public LocString ChildTypeName { get; }
Property Value
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
ParentSettlement
Declaration
public Settlement ParentSettlement { get; }
Property Value
ParentTypeName
Declaration
public LocString ParentTypeName { get; }
Property Value
Settlement
Declaration
public Settlement Settlement { get; }
Property Value
SettlementTypeName
Declaration
public LocString SettlementTypeName { get; }
Property Value
Subscriptions
Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
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
Returns
ChildSettlementAttemptApplyOrJoin(Settlement)
Declaration
public Result ChildSettlementAttemptApplyOrJoin(Settlement childSettlement)
Parameters
Returns
ClearChildrenSettlements()
Declaration
public void ClearChildrenSettlements()
ClearInvites()
Declaration
public bool ClearInvites()
Returns
| Type |
Description |
| System.Boolean |
|
Destroy()
Declaration
GetChildrenSettlementRosterForSyncingOnly()
Declaration
public SettlementRoster GetChildrenSettlementRosterForSyncingOnly()
Returns
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
Returns
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
InviteOrAccept(Settlement)
Declaration
public Result InviteOrAccept(Settlement settlement)
Parameters
Returns
Returns true if A is parent of B or vice versa (or A == B).
Declaration
public bool IsRelated(Settlement set)
Parameters
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
RejectApplication(User, Settlement)
Declaration
public bool RejectApplication(User userApproving, Settlement deniedSettlement)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
RescindInvite(Settlement)
Declaration
public bool RescindInvite(Settlement settlement)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
TryRemove(Settlement)
Declaration
public Result TryRemove(Settlement settlement)
Parameters
Returns
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
Description |
| System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods