add inventory resetting on server connect, properly handle getting new items from locations, integrate some of archi into new rando ui stuff

For the most part, solo archipelago runs seem to work fine now using the original TP apworld, but im sure there are plenty of weird issues still that need to be handled.
This commit is contained in:
CraftyBoss
2026-06-19 17:07:42 -07:00
parent 7537f1c4a8
commit 6366ab61d1
24 changed files with 894 additions and 175 deletions
+15 -9
View File
@@ -15,6 +15,7 @@
#include <iostream>
#include "dusk/logging.h"
#include "dusk/archipelago/archipelago_context.hpp"
#include "dusk/ui/rando_config.hpp"
#include "dusk/randomizer/game/randomizer_context.hpp"
@@ -45,19 +46,24 @@ namespace randomizer
return std::nullopt;
}
void Randomizer::GenerateTrackerWorld() {
void Randomizer::GenerateTrackerWorld(bool useAntiSpoilerLog) {
auto contextHash = randomizer_GetContext().mHash;
if (contextHash.empty()) {
return;
if (!useAntiSpoilerLog) {
this->_config.LoadFromFile(GetConfigPath(), GetPrefPath());
this->_config.SetHash(contextHash);
}else {
if (contextHash.empty()) {
return;
}
std::filesystem::path seedSettings = dusk::ui::GetRandomizerSeedsPath() /
contextHash / (contextHash + " Anti-Spoiler Log.txt");
this->_config.LoadFromFile(seedSettings, GetPrefPath());
this->_config.SetHash(contextHash);
}
std::filesystem::path seedSettings = dusk::ui::GetRandomizerSeedsPath() /
contextHash / (contextHash + " Anti-Spoiler Log.txt");
this->_config.LoadFromFile(seedSettings, GetPrefPath());
this->_config.SetHash(contextHash);
std::unique_ptr<logic::world::World> world = std::make_unique<logic::world::World>(1, this);
world->SetSettings(this->_config.GetSettingsList().front());
// Always use logic when building a tracker world