Class PropertyManager
Inheritance
System.Object
PropertyManager
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class PropertyManager : Singleton<PropertyManager>, IContainsRegistrars, IServerPlugin, IDisplayablePlugin, IGUIPlugin, IHasDisplayTabs, IDisplayTab, ISaveablePlugin, IInitializablePlugin, IController, IViewController, IHasUniversalID, IMapEntryOverlay, IMinimapOption, IWorkerPlugin, INotifyPropertyChanged, IThreadedPlugin, IShutdownablePlugin
Constructors
PropertyManager()
Declaration
Fields
DeedDestroyedEvent
Declaration
public static ThreadSafeAction<Deed, User> DeedDestroyedEvent
Field Value
DeedOwnerChangedEvent
Declaration
public static ThreadSafeAction<Deed> DeedOwnerChangedEvent
Field Value
Initializer
Declaration
public static Initializer Initializer
Field Value
PropertyClaimedOrUnclaimedEvent
Declaration
public static ThreadSafeAction<bool, Deed, User> PropertyClaimedOrUnclaimedEvent
Field Value
PropertyPlotCreatedEvent
Declaration
public static ThreadSafeAction<PropertyPlot> PropertyPlotCreatedEvent
Field Value
PropertySettlementChanged
Declaration
public static ThreadSafeAction<Deed> PropertySettlementChanged
Field Value
Properties
CategoryTree
Declaration
public string CategoryTree { get; }
Property Value
Type |
Description |
System.String |
|
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
Data
Declaration
public static PropertyData Data { get; }
Property Value
Deeds
Declaration
public List<Deed> Deeds { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<Deed> |
|
DeedSettlementInitializer
Declaration
public Initializer DeedSettlementInitializer { get; }
Property Value
IsOnByDefault
Declaration
public bool IsOnByDefault { get; }
Property Value
Type |
Description |
System.Boolean |
|
Map
Declaration
public Array2D<int> Map { get; }
Property Value
Type |
Description |
Array2D<System.Int32> |
|
MapEntries
Declaration
public Dictionary<int, MapEntry> MapEntries { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Int32, MapEntry> |
|
MarkedUpName
Declaration
public LocString MarkedUpName { get; }
Property Value
Name
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
OverburnedDeeds
Declaration
public ThreadSafeHashSet<Deed> OverburnedDeeds { get; }
Property Value
OverlayName
Declaration
public string OverlayName { get; }
Property Value
Type |
Description |
System.String |
|
Priority
Declaration
public float Priority { get; }
Property Value
Type |
Description |
System.Single |
|
PropertyValueManager
Declaration
public PropertyValueManager PropertyValueManager { get; }
Property Value
RentableDeeds
Declaration
public List<Deed> RentableDeeds { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<Deed> |
|
Methods
AdjacentDeeds(User, PlotPos)
Declaration
public static IEnumerable<Deed> AdjacentDeeds(User user, PlotPos plotPos)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Deed> |
|
All()
Declaration
public static IEnumerable<PropertyPlot> All()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<PropertyPlot> |
|
AllDeedsOwnerIs(IAlias)
All deeds that are specifically owned by the specified alias. This is a slow operation.
Declaration
public static IEnumerable<Deed> AllDeedsOwnerIs(IAlias alias)
Parameters
Type |
Name |
Description |
IAlias |
alias |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Deed> |
|
AllOwnedDeeds(User)
All deeds who have the specified user as part of the owners. This is a slow operation.
Declaration
public static IEnumerable<Deed> AllOwnedDeeds(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Deed> |
|
ClearSingleton()
Declaration
public override void ClearSingleton()
CreateUnclaimAction(User, PlotPos, InventoryChangeSet, GameActionPack, Boolean, Boolean)
Declaration
public static Result CreateUnclaimAction(User user, PlotPos plotPos, InventoryChangeSet userInventoryChanges, GameActionPack pack, bool spawnClaims = true, bool deleteDeedIfEmpty = true)
Parameters
Returns
DebugForceClaim(User, PlotPos)
Declaration
public static Deed DebugForceClaim(User actor, PlotPos plotPos)
Parameters
Returns
DoWork(CancellationToken)
Declaration
public Task DoWork(CancellationToken token)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
token |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
ForceClaim(Deed, User, PlotPos, Boolean)
Declaration
public static void ForceClaim(Deed deed, User actor, PlotPos plotPos, bool unclaimFirst = false)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
actor |
|
PlotPos |
plotPos |
|
System.Boolean |
unclaimFirst |
|
ForceRemoveDeed(Deed, Player)
Declaration
public static Result ForceRemoveDeed(Deed deed, Player performer = null)
Parameters
Returns
ForceRemoveDeed(Deed, User)
Declaration
public static Result ForceRemoveDeed(Deed deed, User performer)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
performer |
|
Returns
ForceRemoveFromDeed(PropertyPlot)
Declaration
public static void ForceRemoveFromDeed(PropertyPlot plot)
Parameters
ForceResolveOverburdened()
Declaration
public void ForceResolveOverburdened()
ForceUnclaim(PlotPos, User, Boolean)
Declaration
public static void ForceUnclaim(PlotPos plotPos, User user = null, bool deleteDeedIfEmpty = true)
Parameters
Type |
Name |
Description |
PlotPos |
plotPos |
|
User |
user |
|
System.Boolean |
deleteDeedIfEmpty |
|
GetAllDeeds()
Declaration
public static IEnumerable<Deed> GetAllDeeds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Deed> |
|
GetCategory()
Declaration
public string GetCategory()
Returns
Type |
Description |
System.String |
|
GetDeed(PlotPos)
Declaration
public static Deed GetDeed(PlotPos plotPos)
Parameters
Type |
Name |
Description |
PlotPos |
plotPos |
|
Returns
GetDeed(Int32)
Declaration
public static Deed GetDeed(int deedId)
Parameters
Type |
Name |
Description |
System.Int32 |
deedId |
|
Returns
GetDeedID(Vector2i)
Declaration
public static int GetDeedID(Vector2i worldPos)
Parameters
Returns
Type |
Description |
System.Int32 |
|
GetDeedWorldPos(Vector2i)
Declaration
public static Deed GetDeedWorldPos(Vector2i worldPos)
Parameters
Returns
GetDisplayText()
Declaration
public string GetDisplayText()
Returns
Type |
Description |
System.String |
|
GetOrCreatePlotAtWorldPos(Vector2i)
Declaration
public static PropertyPlot GetOrCreatePlotAtWorldPos(Vector2i worldPos)
Parameters
Returns
GetPlotFromPlotPos(PlotPos)
Declaration
public static PropertyPlot GetPlotFromPlotPos(PlotPos plotPos)
Parameters
Type |
Name |
Description |
PlotPos |
plotPos |
|
Returns
GetPlotFromWorldPos(Vector2i)
Declaration
public static PropertyPlot GetPlotFromWorldPos(Vector2i worldPos)
Parameters
Returns
GetStatus()
Declaration
public string GetStatus()
Returns
Type |
Description |
System.String |
|
Initialize(TimedTask)
Declaration
public void Initialize(TimedTask timer)
Parameters
InitializeForSettlements()
Declaration
public void InitializeForSettlements()
InitializeRegistrars(TimedTask)
Declaration
public void InitializeRegistrars(TimedTask timer)
Parameters
IsClaimed(PlotPos)
Declaration
public static bool IsClaimed(PlotPos pos)
Parameters
Returns
Type |
Description |
System.Boolean |
|
MarkDirty()
Declaration
NearbyDeeds(User, PlotPos, Int32)
Declaration
public static IEnumerable<Deed> NearbyDeeds(User user, PlotPos plotPos, int range = 2)
Parameters
Type |
Name |
Description |
User |
user |
|
PlotPos |
plotPos |
|
System.Int32 |
range |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Deed> |
|
NotifyRentablesChanged()
Declaration
public void NotifyRentablesChanged()
PropertyForAlias(IAlias)
Declaration
public static IEnumerable<PropertyPlot> PropertyForAlias(IAlias alias)
Parameters
Type |
Name |
Description |
IAlias |
alias |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<PropertyPlot> |
|
RemoveDeed(Deed, User, Boolean)
This removes the deed, when force parameter is true it forces the process avoiding prompts and laws.
Declaration
public static Result RemoveDeed(Deed deed, User performer, bool force)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
performer |
|
System.Boolean |
force |
|
Returns
Run()
Declaration
SaveAll()
Declaration
SetClaimsAndUnclaims(Deed, User, IEnumerable<PlotPos>, IEnumerable<PlotPos>, Boolean)
Declaration
public static void SetClaimsAndUnclaims(Deed deed, User user, IEnumerable<PlotPos> toClaimPlotPos, IEnumerable<PlotPos> toUnclaimPlotPos, bool unclaimFirstToClaim = false)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
user |
|
System.Collections.Generic.IEnumerable<PlotPos> |
toClaimPlotPos |
|
System.Collections.Generic.IEnumerable<PlotPos> |
toUnclaimPlotPos |
|
System.Boolean |
unclaimFirstToClaim |
|
SetMapUpdateNeeded()
Declaration
public void SetMapUpdateNeeded()
ShutdownAsync()
Declaration
public Task ShutdownAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
TryClaimOrUnclaim(User, List<PlotPos>, List<PlotPos>, Deed)
Declaration
public void TryClaimOrUnclaim(User user, List<PlotPos> unclaimPos, List<PlotPos> claimPos, Deed deed)
Parameters
Type |
Name |
Description |
User |
user |
|
System.Collections.Generic.List<PlotPos> |
unclaimPos |
|
System.Collections.Generic.List<PlotPos> |
claimPos |
|
Deed |
deed |
|
TryRemoveDeed(Deed, Player)
Declaration
public static Result TryRemoveDeed(Deed deed, Player performer = null)
Parameters
Returns
TryRemoveDeed(Deed, User)
Declaration
public static Result TryRemoveDeed(Deed deed, User performer)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
performer |
|
Returns
TryUnclaim(GameActionPack, User, Inventory, PlotPos, Boolean, Boolean, Boolean)
Declaration
public static Result TryUnclaim(GameActionPack pack, User user, Inventory propertyClaimInv, PlotPos plotPos, bool autoPerform = true, bool deleteDeedIfEmpty = true, bool spawnClaims = true)
Parameters
Type |
Name |
Description |
GameActionPack |
pack |
|
User |
user |
|
Inventory |
propertyClaimInv |
|
PlotPos |
plotPos |
|
System.Boolean |
autoPerform |
|
System.Boolean |
deleteDeedIfEmpty |
|
System.Boolean |
spawnClaims |
|
Returns
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods