Class PlotUtil
Functions for translating to/from property plot coordinates.
Inheritance
System.Object
PlotUtil
Assembly: Eco.Shared.dll
Syntax
public static class PlotUtil : Object
Fields
PlotSize
Declaration
public const int PlotSize = 5
Field Value
Type |
Description |
System.Int32 |
|
PropertyPlotArea
Declaration
public const int PropertyPlotArea = 25
Field Value
Type |
Description |
System.Int32 |
|
PropertyPlotLength
Declaration
public const int PropertyPlotLength = 5
Field Value
Type |
Description |
System.Int32 |
|
Properties
WorldPlotDims
Returns many plots exist in the x and z dimensions of the world.
Declaration
public static Vector2i WorldPlotDims { get; }
Property Value
Methods
CornerOfCurrentPlot(Vector3i)
Return the corner of whatever plot the position currently is in.
Declaration
public static Vector3i CornerOfCurrentPlot(this Vector3i pos)
Parameters
Returns
Corners(PlotPos)
Declaration
public static IEnumerable<Vector2i> Corners(this PlotPos pos)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vector2i> |
|
IntersectingPlotsExc(WorldRange)
Get the list of Plot Positions for each plot that this range intersects.
Declaration
public static IEnumerable<PlotPos> IntersectingPlotsExc(this WorldRange range)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<PlotPos> |
|
IntersectingPlotsInc(WorldRange)
Declaration
public static IEnumerable<PlotPos> IntersectingPlotsInc(this WorldRange range)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<PlotPos> |
|
RawPlotPos(Vector2i)
Converts a Vector2i to a plotpos structure, with no coordinate transformation at all. Careful with this one. Asserts its pre-wrapped.
Declaration
public static PlotPos RawPlotPos(this Vector2i worldPos)
Parameters
Returns
RawPlotPosWrap(Vector2i)
Converts the raw value of a vector2i already in plot space to a plot pos, wrapping in the process. Needed to work with things that
iterate on vector2is past world bounds, like WorldRange.
Declaration
public static PlotPos RawPlotPosWrap(this Vector2i vectorInPlotSpace)
Parameters
Type |
Name |
Description |
Vector2i |
vectorInPlotSpace |
|
Returns
ToPlotPos(Vector2i)
Converts a position in world space to a position in plot space. Performs the wrap.
Declaration
public static PlotPos ToPlotPos(this Vector2i worldPos)
Parameters
Returns
ToPlotPos(Vector3i)
Converts a position in world space to a position in plot space. Performs the wrap. Ignores 'y' value.
Declaration
public static PlotPos ToPlotPos(this Vector3i worldPos)
Parameters
Returns