Class SettlementInfluenceUtils
Inheritance
System.Object
SettlementInfluenceUtils
Assembly: Eco.Gameplay.dll
Syntax
public static class SettlementInfluenceUtils : Object
Methods
CouldInfluence(Settlement, PlotPos)
Return true if the influence could influence the given plot pos, if there wasnt other settlements/homesteads in the way.
Declaration
public static bool CouldInfluence(this Settlement set, PlotPos pos)
Parameters
Returns
Type |
Description |
System.Boolean |
|
CouldInfluence(IEnumerable<RadPoint>, PlotPos)
Declaration
public static bool CouldInfluence(this IEnumerable<RadPoint> pts, PlotPos pos)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<RadPoint> |
pts |
|
PlotPos |
pos |
|
Returns
Type |
Description |
System.Boolean |
|
DistanceToNearestInfluence(Settlement, Vector2i)
Declaration
public static float DistanceToNearestInfluence(this Settlement set, Vector2i center)
Parameters
Returns
Type |
Description |
System.Single |
|
DistanceToNearestInfluence(Settlement, PlotPos)
Get the nearest distance to an influence point of this settlement (anticipating the base influence if its not founded).
Declaration
public static float DistanceToNearestInfluence(this Settlement set, PlotPos pos)
Parameters
Returns
Type |
Description |
System.Single |
|
HasSatisfactoryCoverage(Settlement, IAnnexable, out Single, IEnumerable<PlotPos>, IEnumerable<PlotPos>)
Determines if the settlement has satisfactory coverage of the given child settlement or homestead.
This means it's influence covers a given percentage of the child's influence (or plots, in the case of homestead).
Can also accept extra plots to consider as 'in the target' or 'out of the target' for calculating this coverage.
Declaration
public static LazyResult HasSatisfactoryCoverage(this Settlement settlement, IAnnexable target, out float percentCovered, IEnumerable<PlotPos> considerExtraPlots = null, IEnumerable<PlotPos> ignorePlots = null)
Parameters
Type |
Name |
Description |
Settlement |
settlement |
|
IAnnexable |
target |
|
System.Single |
percentCovered |
|
System.Collections.Generic.IEnumerable<PlotPos> |
considerExtraPlots |
|
System.Collections.Generic.IEnumerable<PlotPos> |
ignorePlots |
|
Returns
WillHaveSatisfactoryCoverage(SettlementType, PlotPos, IAnnexable, out Single, IEnumerable<PlotPos>, IEnumerable<PlotPos>)
Declaration
public static LazyResult WillHaveSatisfactoryCoverage(this SettlementType setType, PlotPos pos, IAnnexable target, out float percentCovered, IEnumerable<PlotPos> considerExtraPlots = null, IEnumerable<PlotPos> ignorePlots = null)
Parameters
Type |
Name |
Description |
SettlementType |
setType |
|
PlotPos |
pos |
|
IAnnexable |
target |
|
System.Single |
percentCovered |
|
System.Collections.Generic.IEnumerable<PlotPos> |
considerExtraPlots |
|
System.Collections.Generic.IEnumerable<PlotPos> |
ignorePlots |
|
Returns