-
-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add galaxy init file, exposing galaxy parameters
Expose parameters for explored space: 'min', 'max' range and 'mix' (drop off) parameters. Note: any change to this file will break saves. But we want it for modders.
- Loading branch information
Showing
4 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details | ||
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt | ||
|
||
#include "GalaxyConfig.h" | ||
#include "FileSystem.h" | ||
|
||
GalaxyConfig::GalaxyConfig() | ||
{ | ||
// set defaults | ||
std::map<std::string, std::string> &map = m_map[""]; | ||
map["GalaxyExploredMax"] = "90"; | ||
map["GalaxyExploredMin"] = "65"; | ||
map["GalaxyExploredMix"] = "40"; | ||
|
||
Read(FileSystem::userFiles, "galaxy.ini"); | ||
|
||
Save(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details | ||
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt | ||
|
||
#ifndef _GALAXYCONFIG_H | ||
#define _GALAXYCONFIG_H | ||
|
||
#include "core/IniConfig.h" | ||
|
||
class GalaxyConfig : public IniConfig { | ||
public: | ||
typedef std::map<std::string, std::string> map_string; | ||
// GalaxyConfig(const map_string &override_ = map_string()); | ||
GalaxyConfig(); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters