Beispiel #1
0
    /// <summary>Called once the world is finished generating.</summary>
    private void PostProgressOp_GenerateWorld()
    {
        Debug.Log("Finished generating world with seed: " + Manager.CurrentWorld.Seed);

        string activeModStrs = string.Join(",", Manager.ActiveModPaths);

        Debug.Log("Active Mods: " + activeModStrs);

        Manager.WorldName = "world_" + Manager.CurrentWorld.Seed;

        _postProgressOp -= PostProgressOp_GenerateWorld;
    }
Beispiel #2
0
    /// <summary>Loads the world.</summary>
    public void LoadSaveAction()
    {
        ProgressDialogPanelScript.SetVisible(true);

        ProgressUpdate(0, "Loading World...", true);

        string path = LoadFileDialogPanelScript.GetPathToLoad();

        Manager.LoadWorldAsync(path, ProgressUpdate);

        Manager.WorldName = Manager.RemoveDateFromWorldName(Path.GetFileNameWithoutExtension(path));

        _postProgressOp += PostProgressOp_LoadAction;

        _preparingWorld = true;
    }
Beispiel #3
0
    /// <summary>Called once the world is finished loading.</summary>
    public void PostProgressOp_LoadAction()
    {
        Debug.Log(string.Format(
                      "Finished loading world. Seed: {0}, Altitude Scale: {1}, Sea Level Offset: {2}, River Strength: {3}, Avg. Temperature: {4}, Avg. Rainfall: {5}, Current Date: {6}",
                      Manager.CurrentWorld.Seed,
                      Manager.CurrentWorld.AltitudeScale,
                      Manager.CurrentWorld.SeaLevelOffset,
                      Manager.CurrentWorld.RiverStrength,
                      Manager.CurrentWorld.TemperatureOffset,
                      Manager.CurrentWorld.RainfallOffset,
                      Manager.GetDateString(Manager.CurrentWorld.CurrentDate)));

        string activeModStrs = string.Join(",", Manager.ActiveModPaths);

        Debug.Log("Active Mods: " + activeModStrs);

        _postProgressOp -= PostProgressOp_LoadAction;
    }
Beispiel #4
0
    /// <summary>Generates the world.</summary>
    /// <param name="seed">The seed.</param>
    private void GenerateWorldInternal(int seed)
    {
        ProgressDialogPanelScript.SetVisible(true);

        ProgressUpdate(0, "Generating World...", true);

        _preparingWorld = true;

        if (SetSeedDialogPanelScript.UseHeightmapToggle.isOn)
        {
            Manager.GenerateNewWorldAsync(seed, _heightmap, ProgressUpdate);
        }
        else
        {
            Manager.GenerateNewWorldAsync(seed, null, ProgressUpdate);
        }

        _postProgressOp += PostProgressOp_GenerateWorld;
    }