Exemple #1
0
        internal void Update()
        {
            if (Input.GetKeyDown(KeyCode.F11))
            {
                DM_Enemy.ParseAllEnemies();
                //StartCoroutine(ForceSpawnAllBuildings());
            }

            if (Input.GetKeyDown(KeyCode.ScrollLock))
            {
                DM_Merchant.ParseAllMerchants();
            }

            if (Input.GetKeyDown(KeyCode.Pause))
            {
                if (!m_parsing)
                {
                    if (CharacterManager.Instance.GetFirstLocalCharacter() != null)
                    {
                        SL.Log("___________ Starting Scenes Parse ___________");
                        m_coroutine = StartCoroutine(ParseCoroutine());
                        m_parsing   = true;
                    }
                }
                else
                {
                    m_parsing = false;

                    if (m_coroutine != null)
                    {
                        SL.Log("___________ Stopping Scenes Parse ___________");
                        StopCoroutine(m_coroutine);
                    }
                }
            }
        }
Exemple #2
0
        private IEnumerator ParseCoroutine()
        {
            foreach (string sceneName in SceneHelper.SceneBuildNames.Keys)
            {
                /*        Load Scene        */

                if (SceneManagerHelper.ActiveSceneName != sceneName)
                {
                    SL.Log("--- Loading " + sceneName + " ---");

                    NetworkLevelLoader.Instance.RequestSwitchArea(sceneName, 0, 1.5f);

                    yield return(new WaitForSeconds(5f));

                    while (NetworkLevelLoader.Instance.IsGameplayPaused || NetworkLevelLoader.Instance.InLoading)
                    {
                        NetworkLevelLoader loader = NetworkLevelLoader.Instance;
                        At.SetField(loader, "m_continueAfterLoading", true);

                        yield return(new WaitForSeconds(1f));
                    }
                    yield return(new WaitForSeconds(2f));

                    MenuManager.Instance.HideMasterLoadingScreen();
                }

                SL.Log("Parsing scene " + sceneName + "...");

                /*        Parse Scene        */

                //// Disable the TreeBehaviour Managers while we do stuff with enemies
                //DisableCanvases();

                // Parse Enemies
                SL.Log("Parsing enemies");
                DM_Enemy.ParseAllEnemies();

                // Parse Merchants
                SL.Log("Parsing merchants");
                DM_Merchant.ParseAllMerchants();

                // Parse Loot (+ item sources)
                SL.Log("Parsing loot");
                ParseAllLoot();

                // check if New Sirocco

                if (SceneManagerHelper.ActiveSceneName == "NewSirocco")
                {
                    SL.LogWarning("NEW SIROCCO: Dumping all buildings...");

                    StartCoroutine(DatamineBuildings());

                    while (!s_doneBuildings)
                    {
                        yield return(null);
                    }

                    ClearScene();
                    yield return(new WaitForSeconds(1f));
                }

                SL.Log("--- Finished Scene: " + SceneManagerHelper.ActiveSceneName + " ---");
            }

            SL.Log("___________ Finished Scenes Parse ___________");

            SL.Log("[Dataminer] Saving lists...");
            ListManager.SaveLists();

            SL.Log("[Dataminer] Finished.");
        }