#include "Rando.h"
#include <ship/Context.h>
#include "port/Enhancements/Events/Hooks/Events.h"
#include "ObjectBehavior/ObjectBehavior.h"
#include "MiscBehavior/MiscBehavior.h"
#include "port/Rando/CheckTracker/CheckTracker.h"
#include "port/Rando/Spoiler/Spoiler.h"
#include "port/ShipInit.hpp"
#include "spdlog/spdlog.h"
#include <fstream>
#include <filesystem>
namespace fs = std::filesystem;
int16_t selectedFileNum = DEFAULT_FILE_NUM;
const fs::path randomizerFolderPath(Ship::Context::GetPathRelativeToAppDirectory("randomizer", "bk64"));
void Rando::Init() {
if (!fs::exists(randomizerFolderPath)) {
fs::create_directory(randomizerFolderPath);
}
Rando::Spoiler::RefreshSpoilerLogs();
Rando::MiscBehavior::Init();
REGISTER_LISTENER(InitRandoEvents, EVENT_PRIORITY_NORMAL, [](IEvent* event) {
InitRandoEvents* ev = (InitRandoEvents*)event;
Rando::ObjectBehavior::Init();
Rando::CheckTracker::Init();
});
}