Пример #1
0
        public void OnGameLoaded(CampaignGameStarter starter)
        {
            if (!Campaign.Current.GameStarted || Campaign.Current.Settlements == null)
            {
                return;
            }

            // Reset between sessions to avoid culture cross contamination
            DynaCultureManager.Reset();
        }
Пример #2
0
        public void DailyTickSettlementMod(Settlement settlement)
        {
            if (!Campaign.Current.GameStarted || Campaign.Current.Settlements == null)
            {
                return;
            }

            if (DynaCultureManager.Instance.InfluenceMap.Count == 0)
            {
                DynaCultureManager.Initialize();
            }

            if (!DynaCultureSettings.Instance.PlayerKingdomOnly || (DynaCultureSettings.Instance.PlayerKingdomOnly && settlement.OwnerClan.Leader.IsHumanPlayerCharacter))
            {
                if (settlement.IsVillage || settlement.IsCastle || settlement.IsTown)
                {
                    DynaCultureManager.Instance.InfluenceMap[settlement.StringId].OnDailyTick();
                }
            }
        }
Пример #3
0
        public void OnGameLoaded(CampaignGameStarter starter)
        {
            if (!Campaign.Current.GameStarted || Campaign.Current.Settlements == null)
            {
                return;
            }

            // Reset between sessions to avoid culture cross contamination
            DynaCultureManager.Reset();

            // clean up corrupted troops from previous sessions, if they exist
            foreach (var party in Campaign.Current.MobileParties)
            {
                RemoveCorruptedTroops(party);
            }

            // clean up corrupted recruits from previous sessions, if they exist
            foreach (var settlement in Campaign.Current.Settlements)
            {
                RemoveCorruptedRecruits(settlement);
            }
        }
Пример #4
0
 internal static void Reset()
 {
     _instance = null;
 }
Пример #5
0
 public DynaCultureBehavior()
 {
     // Clean up any existing CultureChangeManagers from current session
     DynaCultureManager.Reset();
 }