Ejemplo n.º 1
0
        public void RecalculateStatsInternal(PlayerController owner)
        {
            orig_RecalculateStatsInternal(owner);
            var new_active_ids = new HashSet <ID>();

            //TODO @performance can you avoid these expensive loops here?
            for (int k = 0; k < owner.ActiveExtraSynergies.Count; k++)
            {
                var entry = (AdvancedSynergyEntry)global::GameManager.Instance.SynergyManager.synergies[owner.ActiveExtraSynergies[k]];
                if (entry.SynergyIsActive(global::GameManager.Instance.PrimaryPlayer, global::GameManager.Instance.SecondaryPlayer))
                {
                    new_active_ids.Add(entry.UniqueID);
                }
            }
            foreach (var id in SemiLoader.ActiveSynergyIDs)
            {
                if (!new_active_ids.Contains(id))
                {
                    SemiLoader.InvokeSynergyDeactivated(id, owner);
                }
            }
            foreach (var id in new_active_ids)
            {
                if (!SemiLoader.ActiveSynergyIDs.Contains(id))
                {
                    SemiLoader.InvokeSynergyActivated(id, owner);
                }
            }
        }
Ejemplo n.º 2
0
 private void Update()
 {
     orig_Update();
     if (!_OpenedLoadErrorScreen && IsDioramaRevealed(false))
     {
         _OpenedLoadErrorScreen = true;
         SemiLoader.OpenLoadErrorScreenIfNecessary();
     }
 }
Ejemplo n.º 3
0
 public new void InitializeMainMenu()
 {
     orig_InitializeMainMenu();
     if (!_InitializedMainMenuUIHelpers)
     {
         SemiLoader.InitializeMainMenuUIHelpers();
         _InitializedMainMenuUIHelpers = true;
     }
 }
Ejemplo n.º 4
0
        private void Awake()
        {
            if (!SemiLoader.Loaded)
            {
                SemiLoader.Loaded = true;
                SemiLoader.Logger.Info($"Semi Loader {SemiLoader.VERSION} starting");

                SemiLoader.OnGameManagerAlive((global::GameManager)(object)this);
            }
            orig_Awake();
            StartCoroutine(SemiLoader.OnGameManagerReady((global::GameManager)(object)this));
        }