mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
don't crash with no spoilerfile, fix unknown_get
This commit is contained in:
parent
56cdaff0c8
commit
177211611d
2 changed files with 3 additions and 2 deletions
|
@ -510,6 +510,7 @@ std::unordered_map<std::string, RandomizerGet> SpoilerfileGetNameToEnum = {
|
||||||
void Randomizer::PopulateItemLocations(std::string spoilerFileName) {
|
void Randomizer::PopulateItemLocations(std::string spoilerFileName) {
|
||||||
// todo pull this in from cvar or something
|
// todo pull this in from cvar or something
|
||||||
std::ifstream spoilerFileStream("spoiler.json");
|
std::ifstream spoilerFileStream("spoiler.json");
|
||||||
|
if (!spoilerFileStream) return;
|
||||||
json spoilerFileJson;
|
json spoilerFileJson;
|
||||||
spoilerFileStream >> spoilerFileJson;
|
spoilerFileStream >> spoilerFileJson;
|
||||||
json locationsJson = spoilerFileJson["locations"];
|
json locationsJson = spoilerFileJson["locations"];
|
||||||
|
|
|
@ -278,6 +278,7 @@ typedef enum {
|
||||||
|
|
||||||
// based on https://github.com/TestRunnerSRL/OoT-Randomizer/blob/e337d7f603b91a6bacb618fb32cc7fd70ed9ffca/ItemList.py
|
// based on https://github.com/TestRunnerSRL/OoT-Randomizer/blob/e337d7f603b91a6bacb618fb32cc7fd70ed9ffca/ItemList.py
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
UNKNOWN_GET = 0,
|
||||||
BOMBS_5,
|
BOMBS_5,
|
||||||
DEKU_NUTS_5,
|
DEKU_NUTS_5,
|
||||||
BOMBCHUS_10,
|
BOMBCHUS_10,
|
||||||
|
@ -499,8 +500,7 @@ typedef enum {
|
||||||
WATER_MEDALLION,
|
WATER_MEDALLION,
|
||||||
SPIRIT_MEDALLION,
|
SPIRIT_MEDALLION,
|
||||||
SHADOW_MEDALLION,
|
SHADOW_MEDALLION,
|
||||||
LIGHT_MEDALLION,
|
LIGHT_MEDALLION
|
||||||
UNKNOWN_GET
|
|
||||||
} RandomizerGet;
|
} RandomizerGet;
|
||||||
|
|
||||||
class Randomizer {
|
class Randomizer {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue