-
Notifications
You must be signed in to change notification settings - Fork 43
/
TweakedClanTierModel.cs
25 lines (23 loc) · 993 Bytes
/
TweakedClanTierModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using TaleWorlds.CampaignSystem;
using TaleWorlds.CampaignSystem.SandBox.GameComponents;
namespace BannerlordTweaks
{
public class TweakedClanTierModel : DefaultClanTierModel
{
public override int GetCompanionLimitForTier(int clanTier)
{
if (Settings.Instance.CompanionLimitTweakEnabled)
return Settings.Instance.CompanionBaseLimit + clanTier * Settings.Instance.CompanionLimitBonusPerClanTier;
else
return base.GetCompanionLimitForTier(clanTier);
}
public override int GetPartyLimitForTier(Clan clan, int clanTierToCheck)
{
if (Settings.Instance.ClanPartiesLimitTweakEnabled && clan == Clan.PlayerClan)
return Settings.Instance.BaseClanPartiesLimit + (int)Math.Floor(clanTierToCheck * Settings.Instance.ClanPartiesBonusPerClanTier);
else
return base.GetPartyLimitForTier(clan, clanTierToCheck);
}
}
}