Class ClaimingUtils
Inheritance
System.Object
ClaimingUtils
Assembly: Eco.Gameplay.dll
Syntax
public static class ClaimingUtils : Object
Methods
ChangeWithDialog(Player, IEnumerable<Deed>, PlotPos, ItemStack)
Declaration
public static void ChangeWithDialog(Player player, IEnumerable<Deed> nearbyDeeds, PlotPos plotPos, ItemStack claimStack = null)
Parameters
CheckCanChangePlotsAndNotify(Deed, User, IEnumerable<PlotPos>, IEnumerable<PlotPos>)
Check whether we can remove that plot from this deed or not.
Declaration
public static Result CheckCanChangePlotsAndNotify(this Deed deed, User user, IEnumerable<PlotPos> newPlots, IEnumerable<PlotPos> removedPlots)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
user |
|
System.Collections.Generic.IEnumerable<PlotPos> |
newPlots |
|
System.Collections.Generic.IEnumerable<PlotPos> |
removedPlots |
|
Returns
CheckDeedIsContiguousAndNotify(Deed, User, List<PlotPos>, List<PlotPos>, LocString)
We check whether by removing or adding the specified plots the deed stay contiguous or become split.
Declaration
public static bool CheckDeedIsContiguousAndNotify(this Deed deed, User user, List<PlotPos> toAdd = null, List<PlotPos> toRemove = null, LocString details = null)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
user |
|
System.Collections.Generic.List<PlotPos> |
toAdd |
|
System.Collections.Generic.List<PlotPos> |
toRemove |
|
LocString |
details |
|
Returns
Type |
Description |
System.Boolean |
|
ClaimAsync(User, Nullable<PlotPos>, InteractionModifier, ItemStack, Deed, Boolean)
Declaration
public static Task<Result> ClaimAsync(User actor, Nullable<PlotPos> plotPos, InteractionModifier modifier, ItemStack claimStack, Deed forceDeed, bool usePlotCount)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<Result> |
|
DeedOwnedByAbandonedPlayer(Deed)
If all the owners are abandoned then this deed is considered abandoned also.
Declaration
public static bool DeedOwnedByAbandonedPlayer(this Deed deed)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
Returns
Type |
Description |
System.Boolean |
|
GetContiguousPartsWithAlterations(Deed, List<PlotPos>, List<PlotPos>)
Gets all contiguous parts for deed after adding to it to Add plots and removing toRemove
It's used to show dialog about changes (remove some deed will create N deeds by example) and to split deed to subdeeds if needed
Declaration
public static List<List<PlotPos>> GetContiguousPartsWithAlterations(this Deed deed, List<PlotPos> toAdd = null, List<PlotPos> toRemove = null)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
System.Collections.Generic.List<PlotPos> |
toAdd |
|
System.Collections.Generic.List<PlotPos> |
toRemove |
|
Returns
Type |
Description |
System.Collections.Generic.List<System.Collections.Generic.List<PlotPos>> |
|
PositionNeighborsDeed(Deed, PlotPos)
Check if the given plot pos neighbors any plot on this deed.
Declaration
public static bool PositionNeighborsDeed(this Deed deed, PlotPos plotPos)
Parameters
Returns
Type |
Description |
System.Boolean |
|