Fishsanity - Rando v3 (#3738)

* Update z_fishing documentation from decomp

* undo sCameraAt/Eye rename

* forgot to include these defines Heehee

* adding enums, settings

* adding more stuff back in

* more work

* we're literally typing words into computer

* include unordered map

maybe this fixes mac build idk

* wahoo

* hmm

* add make sure disabled flag gets popped

* poggers in the chat?

* doing some refactoring

* fixing build

* documentation, moving fishsanity instance to rando

* move FS back to context, fixing build, mod progress

since FS is needed during rando generation & provides perpetual info abt. fishsanity in the seed, seems to make more sense if it lives on the context

* moving some stuff around

* it's starting to get real in here

* ELIMINATE FISHSANITYMETA

* IT WROKS

* Update trackers, fix pond fish flagging

* ZD fish shuffle initial checkpoint

* ZD fish "working"

aside from the crashing

* wrapping up

* fix for partial pond shuffle

* remove misc. unrelated debugconsole modification

* updating GI model

* get build working

* add a todo for this

* removeoopsie

* Rework hints a bit

* update hint loc

* Use visual indicator instead of despawning caught fish

---------

Co-authored-by: jordanpg <jordanpg@users.noreply.github.com>
This commit is contained in:
Jordan Gilbreath 2024-01-14 12:02:23 -05:00 committed by GitHub
commit 4cbf3a5621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
82 changed files with 6012 additions and 1541 deletions

View file

@ -9,6 +9,7 @@
#include "entrance.h"
#include "settings.h"
#include "rando_hash.h"
#include "fishsanity.h"
#include <fstream>
#include <spdlog/spdlog.h>
@ -91,6 +92,7 @@ Context::Context() {
mLogic = std::make_shared<Logic>();
mTrials = std::make_shared<Trials>();
mSettings = std::make_shared<Settings>();
mFishsanity = std::make_shared<Fishsanity>();
for (auto& location : StaticData::GetLocationTable()) {
mSpoilerfileCheckNameToEnum[location.GetName()] = location.GetRandomizerCheck();
}
@ -204,6 +206,10 @@ void Context::GenerateLocationPool() {
}
AddLocations(StaticData::overworldLocations);
if (mSettings->GetOption(RSK_FISHSANITY).IsNot(RO_FISHSANITY_OFF)) {
AddLocations(mFishsanity->GetFishsanityLocations().first);
}
for (const auto dungeon : mDungeons->GetDungeonList()) {
AddLocations(dungeon->GetDungeonLocations());
}
@ -477,6 +483,14 @@ void Context::ParseHintJson(nlohmann::json spoilerFileJson) {
AddHint(RH_SARIA, Text(sariaText), sariaHintLoc, HINT_TYPE_STATIC, "Static", mSpoilerfileAreaNameToEnum[sariaRegion]);
}
// Fishing Pole Hint
if(spoilerFileJson.contains("fishingPoleText")) {
std::string fishingPoleText = spoilerFileJson["fishingPoleText"].get<std::string>();
std::string fishingPoleRegion = spoilerFileJson["fishingPoleRegion"].get<std::string>();
RandomizerCheck fishingPoleHintLoc = mSpoilerfileCheckNameToEnum[spoilerFileJson["fishingPoleHintLoc"].get<std::string>()];
AddHint(RH_FISHING_POLE, Text(fishingPoleText), fishingPoleHintLoc, HINT_TYPE_STATIC, "Static", mSpoilerfileAreaNameToEnum[fishingPoleRegion]);
}
// Warp Songs
if (spoilerFileJson.contains("warpMinuetText")) {
std::string warpMinuetText = spoilerFileJson["warpMinuetText"].get<std::string>(); //RANDOTODO fall back for if location is used
@ -529,6 +543,10 @@ std::shared_ptr<Dungeons> Context::GetDungeons() {
return mDungeons;
}
std::shared_ptr<Fishsanity> Context::GetFishsanity() {
return mFishsanity;
}
DungeonInfo* Context::GetDungeon(size_t key) const {
return mDungeons->GetDungeon(static_cast<DungeonKey>(key));
}