Class CampaignExtensions
- Namespace
- Bannerlord.ButterLib.Common.Extensions
- Assembly
- Bannerlord.ButterLib.dll
Helper extension of the Campaign class returning additional information, provided by the ButterLib.
public static class CampaignExtensions
- Inheritance
-
CampaignExtensions
- Inherited Members
Remarks
Contains easy accessible distance matrices for the settlements, clans and kingdoms.
Methods
GetDefaultClanDistanceMatrix(Campaign)
Gets the DistanceMatrix<T> calculated by default for the Clan object type.
public static DistanceMatrix<Clan>? GetDefaultClanDistanceMatrix(this Campaign campaign)
Parameters
campaign
CampaignThe campaign
Returns
- DistanceMatrix<Clan>
Distance matrix for all the active clans of the current campaign, or null if the campaign has not started yet.
Remarks
Calculation is based on the average distance between clans fiefs weighted by the fief type.
GetDefaultKingdomDistanceMatrix(Campaign)
Gets the DistanceMatrix<T> calculated by default for the Kingdom object type.
public static DistanceMatrix<Kingdom>? GetDefaultKingdomDistanceMatrix(this Campaign campaign)
Parameters
campaign
CampaignThe campaign
Returns
- DistanceMatrix<Kingdom>
Distance matrix for all the active kingdoms of the current campaign, or null if the campaign has not started yet.
Remarks
Calculation is based on the average distance between kingdoms fiefs weighted by the fief type.
GetDefaultSettlementDistanceMatrix(Campaign)
Gets the DistanceMatrix<T> calculated by default for the Settlement object type.
public static DistanceMatrix<Settlement>? GetDefaultSettlementDistanceMatrix(this Campaign campaign)
Parameters
campaign
CampaignThe campaign
Returns
- DistanceMatrix<Settlement>
Distance matrix for all the towns, castles and villages of the current campaign, or null if the campaign has not started yet.