Class PropertyUtils
Inheritance
System.Object
PropertyUtils
Assembly: Eco.Gameplay.dll
Syntax
public static class PropertyUtils : Object
Methods
ForceClaim(Deed, User, Rect)
Force all the plots under the given rect in world space to be claimed, on the given settlement if set. Handles wrapping.
Declaration
public static Deed ForceClaim(Deed deed, User user, Rect worldPosXZRect)
Parameters
Type |
Name |
Description |
Deed |
deed |
|
User |
user |
|
Rect |
worldPosXZRect |
|
Returns
GetNeighboringPlotCount(HashSet<PlotPos>, HashSet<PlotPos>)
Given a list of plots, return how many of the neighboring spaces are occupied by a plot from 'neighborPlots' as 'Count', and return the total number of
neighboring plots as 'Total'.
Declaration
public static (int, int) GetNeighboringPlotCount(this HashSet<PlotPos> plots, HashSet<PlotPos> neighborPlots)
Parameters
Type |
Name |
Description |
System.Collections.Generic.HashSet<PlotPos> |
plots |
|
System.Collections.Generic.HashSet<PlotPos> |
neighborPlots |
|
Returns
Type |
Description |
System.ValueTuple<System.Int32, System.Int32> |
|
GetRoadEfficiency(Type)
Declaration
public static float GetRoadEfficiency(this Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Single |
|
GetUnclaimedPlotPos(PlotPos)
Find a plot thats not yet claimed.
Declaration
public static Nullable<PlotPos> GetUnclaimedPlotPos(PlotPos pos)
Parameters
Returns
Type |
Description |
System.Nullable<PlotPos> |
|
GetUnclaimedPlotWorldPos(PlotPos)
Find a plot thats not yet claimed.
Declaration
public static Vector3i GetUnclaimedPlotWorldPos(PlotPos pos)
Parameters
Returns
GetUnclaimedPlotWorldPosNearUser(User)
Find a plot thats not yet claimed starting from the given user.
Declaration
public static Vector3i GetUnclaimedPlotWorldPosNearUser(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
MatchesRoadEfficiency(Block, Single)
Declaration
public static bool MatchesRoadEfficiency(this Block block, float minValue)
Parameters
Type |
Name |
Description |
Block |
block |
|
System.Single |
minValue |
|
Returns
Type |
Description |
System.Boolean |
|
RoadExists(WrappedPosition3i, WrappedPosition3i, Type, Int32)
Declaration
public static RoadCheckResults RoadExists(WrappedPosition3i posA, WrappedPosition3i posB, Type roadItemType, int minWidth)
Parameters
Returns
TopBlocksOnProperty(Vector2i, Int32)
Declaration
public static IEnumerable<Vector3i> TopBlocksOnProperty(Vector2i pos, int depth = 1)
Parameters
Type |
Name |
Description |
Vector2i |
pos |
|
System.Int32 |
depth |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vector3i> |
|