Merge branch 'develop' of https://github.com/HarbourMasters/Shipwright into rando-custom-messages

This commit is contained in:
Christopher Leggett 2022-07-14 10:06:05 -04:00
commit 9c57ed6642
No known key found for this signature in database
GPG key ID: 7093AE5FF7037D79
13 changed files with 72 additions and 353 deletions

View file

@ -942,6 +942,7 @@
<ClCompile Include="src\overlays\misc\ovl_kaleido_scope\z_lmap_mark.c" />
<ClCompile Include="src\overlays\misc\ovl_kaleido_scope\z_lmap_mark_data.c" />
<ClCompile Include="src\overlays\misc\ovl_map_mark_data\z_map_mark_data.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="soh\Enhancements\cosmetics\CosmeticsEditor.h" />

View file

@ -521,7 +521,7 @@ void DebugConsole_LoadLegacyCVars() {
}
}
fs::remove("cvars.cfg");
fs::remove(cvarsConfig);
}
}

View file

@ -7,6 +7,9 @@
// #include <soh/Enhancements/randomizer.h>
#include <Cvar.h>
#include <GameSettings.h>
#define NOGDI
#define WIN32_LEAN_AND_MEAN
#include <GlobalCtx2.h>
#define TICKS_PER_SEC 268123480.0
@ -18,7 +21,7 @@ void RandoMain::GenerateRando(std::unordered_map<RandomizerSettingKey, u8> cvarS
// std::string settingsFileName = "./randomizer/latest_settings.json";
// CVar_SetString("gLoadedPreset", settingsFileName.c_str());
std::string fileName = GenerateRandomizer(cvarSettings);
std::string fileName = Ship::GlobalCtx2::GetPathRelativeToAppDirectory(GenerateRandomizer(cvarSettings).c_str());
CVar_SetString("gSpoilerLog", fileName.c_str());
Game::SaveSettings();

View file

@ -26,6 +26,10 @@
#include <filesystem>
#include <variables.h>
#define NOGDI
#define WIN32_LEAN_AND_MEAN
#include "GlobalCtx2.h"
using json = nlohmann::json;
json jsonData;
@ -721,12 +725,13 @@ const char* SpoilerLog_Write(int language) {
//WriteShuffledEntrances(spoilerLog);
WriteAllLocations(language);
if (!std::filesystem::exists("./Randomizer")) {
std::filesystem::create_directory("./Randomizer");
if (!std::filesystem::exists(Ship::GlobalCtx2::GetPathRelativeToAppDirectory("Randomizer"))) {
std::filesystem::create_directory(Ship::GlobalCtx2::GetPathRelativeToAppDirectory("Randomizer"));
}
std::string jsonString = jsonData.dump(4);
std::ofstream jsonFile("./Randomizer/" + Settings::seed + ".json");
std::ofstream jsonFile(Ship::GlobalCtx2::GetPathRelativeToAppDirectory(
(std::string("Randomizer/") + std::string(Settings::seed) + std::string(".json")).c_str()));
jsonFile << std::setw(4) << jsonString << std::endl;
jsonFile.close();

View file

@ -1,4 +1,4 @@
const char gBuildVersion[] = "ROY ALFA (2.0.0)";
const char gBuildVersion[] = "RACHAEL ALFA (3.0.0)";
const char gBuildTeam[] = "github.com/harbourmasters";
const char gBuildDate[] = __DATE__ " " __TIME__;
const char gBuildMakeOption[] = "";