Rando Cleanup (#4741)

* Delete empty files

* Small Cleanup

* Remove some now useless comments

* Re-add log
This commit is contained in:
Pepe20129 2024-12-21 16:08:40 +01:00 committed by GitHub
parent 845e37936e
commit 6fb974bfeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 20 additions and 63 deletions

View File

@ -1,6 +0,0 @@
#pragma once
enum class OptionCategory {
Setting,
Toggle,
};

View File

@ -679,16 +679,16 @@ void GenerateItemPool() {
RG_FIRE_ARROWS,
RG_ICE_ARROWS,
RG_LIGHT_ARROWS,
RG_DOUBLE_DEFENSE, //Double defense
RG_DOUBLE_DEFENSE,
RG_CLAIM_CHECK,
RG_PROGRESSIVE_HOOKSHOT, //Progressive hookshot
RG_PROGRESSIVE_STRENGTH, //Progressive strength
RG_PROGRESSIVE_BOMB_BAG, //Progressive bomb bag
RG_PROGRESSIVE_BOW, //Progressive bow
RG_PROGRESSIVE_SLINGSHOT, //Progressive slingshot
RG_PROGRESSIVE_WALLET, //Progressive wallet
RG_PROGRESSIVE_SCALE, //Progressive scale
RG_PROGRESSIVE_MAGIC_METER, //Progressive magic
RG_PROGRESSIVE_HOOKSHOT,
RG_PROGRESSIVE_STRENGTH,
RG_PROGRESSIVE_BOMB_BAG,
RG_PROGRESSIVE_BOW,
RG_PROGRESSIVE_SLINGSHOT,
RG_PROGRESSIVE_WALLET,
RG_PROGRESSIVE_SCALE,
RG_PROGRESSIVE_MAGIC_METER,
};
//Check song shuffle and dungeon reward shuffle just for ice traps
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_ANYWHERE)) {
@ -742,7 +742,7 @@ void GenerateItemPool() {
if (ctx->GetOption(RSK_SHUFFLE_MASTER_SWORD)) {
AddItemToMainPool(RG_MASTER_SWORD);
ctx->possibleIceTrapModels.push_back(RG_MASTER_SWORD); //Master Sword without the GI enum
ctx->possibleIceTrapModels.push_back(RG_MASTER_SWORD);
} else {
if (!ctx->GetOption(RSK_STARTING_MASTER_SWORD)) {
ctx->PlaceItemInLocation(RC_TOT_MASTER_SWORD, RG_MASTER_SWORD, false, true);
@ -761,7 +761,7 @@ void GenerateItemPool() {
if (ctx->GetOption(RSK_ITEM_POOL).Is(RO_ITEM_POOL_PLENTIFUL)) {
AddItemToPool(PendingJunkPool, RG_PROGRESSIVE_OCARINA);
}
ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_OCARINA); //Progressive ocarina
ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_OCARINA);
} else {
if (ctx->GetOption(RSK_STARTING_OCARINA).Is(RO_STARTING_OCARINA_OFF)) {
ctx->PlaceItemInLocation(RC_LW_GIFT_FROM_SARIA, RG_PROGRESSIVE_OCARINA, false, true);
@ -780,7 +780,6 @@ void GenerateItemPool() {
AddItemToMainPool(RG_OCARINA_C_LEFT_BUTTON);
AddItemToMainPool(RG_OCARINA_C_RIGHT_BUTTON);
//TODO: Re-add when custom models work with ice traps
ctx->possibleIceTrapModels.push_back(RG_OCARINA_A_BUTTON);
ctx->possibleIceTrapModels.push_back(RG_OCARINA_C_UP_BUTTON);
ctx->possibleIceTrapModels.push_back(RG_OCARINA_C_DOWN_BUTTON);
@ -911,7 +910,7 @@ void GenerateItemPool() {
if (ctx->GetOption(RSK_ITEM_POOL).Is(RO_ITEM_POOL_PLENTIFUL)) {
AddItemToPool(PendingJunkPool, RG_MAGIC_BEAN_PACK);
}
ctx->possibleIceTrapModels.push_back(RG_MAGIC_BEAN_PACK); //Magic bean pack
ctx->possibleIceTrapModels.push_back(RG_MAGIC_BEAN_PACK);
} else {
ctx->PlaceItemInLocation(RC_ZR_MAGIC_BEAN_SALESMAN, RG_MAGIC_BEAN, false, true);
}
@ -1410,7 +1409,7 @@ void GenerateItemPool() {
if (/*ProgressiveGoronSword TODO: Implement Setting*/false) {
ReplaceMaxItem(RG_BIGGORON_SWORD, 0);
AddItemToMainPool(RG_PROGRESSIVE_GORONSWORD, 2);
ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_GORONSWORD); // Progressive Goron Sword
ctx->possibleIceTrapModels.push_back(RG_PROGRESSIVE_GORONSWORD);
} else {
ctx->possibleIceTrapModels.push_back(RG_BIGGORON_SWORD);
}

View File

@ -353,13 +353,6 @@ void RegionTable_Init() {
exit.GetConnectedRegion()->entrances.push_front(&exit);
}
}
/*
//Events
}, {
//Locations
}, {
//Exits
*/
}
void ReplaceFirstInString(std::string& s, std::string const& toReplace, std::string const& replaceWith) {

View File

@ -7,7 +7,6 @@
#include "menu.hpp"
#include "playthrough.hpp"
#include "randomizer.hpp"
#include "spoiler_log.hpp"
#include "location_access.hpp"
#include "soh/Enhancements/debugger/performanceTimer.h"

View File

@ -13,16 +13,4 @@
#define DELETE_PRESET 6
#define RESET_TO_DEFAULTS 8
// #define RESET "\x1b[0m"
// #define DIM "\x1b[2m"
// #define BLACK "\x1b[30m"
// #define RED "\x1b[31m"
// #define GREEN "\x1b[32m"
// #define YELLOW "\x1b[33m"
// #define BLUE "\x1b[34m"
// #define MEGANTA "\x1b[35m"
// #define CYAN "\x1b[36m"
// #define WHITE "\x1b[37m"
bool GenerateRandomizer(std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks, std::string seedInput);

View File

@ -97,7 +97,7 @@ int Playthrough_Repeat(std::set<RandomizerCheck> excludedLocations, std::set<Ran
ctx->GetSettings()->SetSeedString(std::to_string(rand() % 0xFFFFFFFF));
repeatedSeed = boost::hash_32<std::string>{}(ctx->GetSettings()->GetSeedString());
ctx->GetSettings()->SetSeed(repeatedSeed % 0xFFFFFFFF);
//CitraPrint("testing seed: " + std::to_string(Settings::seed));
SPDLOG_DEBUG("testing seed: %d", repeatedSeed);
ClearProgress();
Playthrough_Init(ctx->GetSettings()->GetSeed(), excludedLocations, enabledTricks);
SPDLOG_INFO("Seeds Generated: {}", i + 1);

View File

@ -4,7 +4,6 @@
#include "location_access.hpp"
#include "rando_main.hpp"
#include "../context.h"
// #include <soh/Enhancements/randomizer.h>
#include <libultraship/bridge.h>
#include <Context.h>
#include <libultraship/libultra/types.h>
@ -14,9 +13,6 @@
void RandoMain::GenerateRando(std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks,
std::string seedString) {
// std::string settingsFileName = "./randomizer/latest_settings.json";
// CVarSetString(CVAR_RANDOMIZER_SETTING("LoadedPreset"), settingsFileName.c_str());
Rando::Context::GetInstance()->SetSeedGenerated(GenerateRandomizer(excludedLocations, enabledTricks, seedString));
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();

View File

@ -1,4 +0,0 @@
#pragma once
#define RANDOMIZER_VERSION "v3.1"
#define COMMIT_NUMBER "develop"

View File

@ -6,7 +6,6 @@
#include "../entrance.h"
#include "random.hpp"
#include "../trial.h"
#include "utils.hpp"
#include "hints.hpp"
#include "pool_functions.hpp"
#include "soh/Enhancements/randomizer/randomizer_check_objects.h"
@ -147,6 +146,12 @@ static void WriteSettings() {
}
}
// Removes any line breaks from s.
std::string RemoveLineBreaks(std::string s) {
s.erase(std::remove(s.begin(), s.end(), '\n'), s.end());
return s;
}
// Writes the excluded locations to the spoiler log, if there are any.
static void WriteExcludedLocations() {
auto ctx = Rando::Context::GetInstance();

View File

@ -1,7 +0,0 @@
#include "utils.hpp"
// Removes any line breaks from s.
std::string RemoveLineBreaks(std::string s) {
s.erase(std::remove(s.begin(), s.end(), '\n'), s.end());
return s;
}

View File

@ -1,6 +0,0 @@
#pragma once
#include <algorithm>
#include <string>
std::string RemoveLineBreaks(std::string s);