mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -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) {
|
||||
// todo pull this in from cvar or something
|
||||
std::ifstream spoilerFileStream("spoiler.json");
|
||||
if (!spoilerFileStream) return;
|
||||
json spoilerFileJson;
|
||||
spoilerFileStream >> spoilerFileJson;
|
||||
json locationsJson = spoilerFileJson["locations"];
|
||||
|
|
|
@ -278,6 +278,7 @@ typedef enum {
|
|||
|
||||
// based on https://github.com/TestRunnerSRL/OoT-Randomizer/blob/e337d7f603b91a6bacb618fb32cc7fd70ed9ffca/ItemList.py
|
||||
typedef enum {
|
||||
UNKNOWN_GET = 0,
|
||||
BOMBS_5,
|
||||
DEKU_NUTS_5,
|
||||
BOMBCHUS_10,
|
||||
|
@ -499,8 +500,7 @@ typedef enum {
|
|||
WATER_MEDALLION,
|
||||
SPIRIT_MEDALLION,
|
||||
SHADOW_MEDALLION,
|
||||
LIGHT_MEDALLION,
|
||||
UNKNOWN_GET
|
||||
LIGHT_MEDALLION
|
||||
} RandomizerGet;
|
||||
|
||||
class Randomizer {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue