Merge branch 'develop' into golden-death-hint

This commit is contained in:
Philip Dubé 2024-11-19 23:58:26 +00:00 committed by GitHub
commit 4f2541662d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 22 additions and 48 deletions

View File

@ -244,7 +244,6 @@ jobs:
- name: Cache build folder
uses: actions/cache@v4
with:
save-always: true
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ github.ref }}

View File

@ -12,7 +12,7 @@ jobs:
if: ${{ github.event.workflow_run.event == 'pull_request' }}
steps:
- id: 'pr-number'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
result-encoding: string
script: |
@ -20,8 +20,9 @@ jobs:
const pullHeadSHA = '${{github.event.workflow_run.head_sha}}';
const pullUserId = ${{github.event.sender.id}};
const prNumber = await (async () => {
const pulls = await github.rest.pulls.list({owner, repo});
for await (const {data} of github.paginate.iterator(pulls)) {
for await (const { data } of github.paginate.iterator(
github.rest.pulls.list, { owner, repo }
)) {
for (const pull of data) {
if (pull.head.sha === pullHeadSHA && pull.user.id === pullUserId) {
return pull.number;
@ -36,7 +37,7 @@ jobs:
return prNumber;
- id: 'artifacts-text'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
result-encoding: string
script: |
@ -47,13 +48,13 @@ jobs:
});
return allArtifacts.data.artifacts.reduce((acc, item) => {
if (item.name === "assets") return acc;
if (item.name === "soh.otr") return acc;
acc += `
- [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`;
return acc;
}, '### Build Artifacts');
- id: 'add-to-pr'
uses: garrettjoecox/pr-section@3.1.0
uses: garrettjoecox/pr-section@4.0.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pr-number: ${{ steps.pr-number.outputs.result }}

View File

@ -74,7 +74,9 @@ void DrawPresetSelector(PresetType presetTypeId) {
applyPreset(selectedPresetDef.entries);
}
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
Rando::Context::GetInstance()->GetSettings()->ReloadOptions();
if (presetTypeId == PRESET_TYPE_RANDOMIZER){
Rando::Context::GetInstance()->GetSettings()->ReloadOptions();
}
}
ImGui::PopStyleVar(1);
}

View File

@ -757,7 +757,7 @@ void CreateStaticHintFromData(RandomizerHint hint, StaticHintInfo staticData){
//If we get to here then it means a location got through with no area assignment, which means something went wrong elsewhere.
SPDLOG_DEBUG("Attempted to hint location with no areas: ");
SPDLOG_DEBUG(Rando::StaticData::GetLocation(loc)->GetName());
assert(false);
//assert(false);
areas.push_back(RA_NONE);
} else {
areas.push_back(ctx->GetItemLocation(loc)->GetRandomArea());

View File

@ -361,9 +361,11 @@ void PlandomizerPopulateSeedList() {
existingSeedList.clear();
auto spoilerPath = Ship::Context::GetPathRelativeToAppDirectory("Randomizer");
for (const auto& entry : std::filesystem::directory_iterator(spoilerPath)) {
if (entry.is_regular_file() && entry.path().extension() == ".json") {
existingSeedList.push_back(entry.path().stem().string());
if (std::filesystem::exists(spoilerPath)) {
for (const auto& entry : std::filesystem::directory_iterator(spoilerPath)) {
if (entry.is_regular_file() && entry.path().extension() == ".json") {
existingSeedList.push_back(entry.path().stem().string());
}
}
}
}
@ -875,15 +877,18 @@ void PlandomizerDrawOptions() {
} else {
ImGui::Text("No Spoiler Logs found.");
}
ImGui::BeginDisabled(existingSeedList.empty());
if (ImGui::Button("Load")) {
logTemp = existingSeedList[selectedList].c_str();
PlandomizerLoadSpoilerLog(logTemp.c_str());
}
ImGui::EndDisabled();
ImGui::BeginDisabled(spoilerLogData.empty());
ImGui::SameLine();
if (ImGui::Button("Save")) {
PlandomizerSaveSpoilerLog();
}
ImGui::EndDisabled();
ImGui::TableNextColumn();
ImGui::SeparatorText("Current Seed Hash");

View File

@ -1399,6 +1399,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
}
break;
}
case VB_FREEZE_ON_SKULL_TOKEN:
case VB_TRADE_TIMER_ODD_MUSHROOM:
case VB_TRADE_TIMER_EYEDROPS:
case VB_TRADE_TIMER_FROG:
@ -2208,7 +2209,7 @@ void RandomizerRegisterHooks() {
onSceneSpawnActorsHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneSpawnActors>(RandomizerOnSceneSpawnActorsHandler);
onPlayDestroyHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayDestroy>(RandomizerOnPlayDestroyHandler);
onGoldenSkulltulaDefeatHook = GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnEnemyDefeat>(ACTOR_EN_SW, RandomizerOnGoldenSkulltulaDefeatHandler);
onPlayDestroyHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnExitGame>(RandomizerOnExitGameHandler);
onExitGameHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnExitGame>(RandomizerOnExitGameHandler);
onKaleidoUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnKaleidoscopeUpdate>(RandomizerOnKaleidoscopeUpdateHandler);
if (RAND_GET_OPTION(RSK_FISHSANITY) != RO_FISHSANITY_OFF) {

View File

@ -34,8 +34,6 @@ extern std::vector<ItemTrackerItem> dungeonRewardMedallions;
extern std::vector<ItemTrackerItem> songItems;
extern std::vector<ItemTrackerItem> equipmentItems;
#define RCO_RAORU { RC_GIFT_FROM_SAGES, RCVORMQ_BOTH, RCTYPE_DUNGEON_REWARD, RCAREA_MARKET, ACTOR_ID_MAX, SCENE_ID_MAX, 0x00, GI_NONE, false, "Gift from Raoru", "Gift from Raoru", true };
using json = nlohmann::json;
namespace CheckTracker {
@ -218,34 +216,6 @@ static ImGuiTextFilter checkSearch;
std::array<bool, RCAREA_INVALID> filterAreasHidden = { 0 };
std::array<bool, RC_MAX> filterChecksHidden = { 0 };
void SongFromImpa() {
if (IS_RANDO) {
if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SKIP_CHILD_ZELDA) == RO_GENERIC_ON && IS_RANDO) {
//if (gSaveContext.checkTrackerData[RC_SONG_FROM_IMPA].status != RCSHOW_SAVED) {
// gSaveContext.checkTrackerData[RC_SONG_FROM_IMPA].status = RCSHOW_SAVED;
//}
}
}
}
void GiftFromSages() {
if (!IS_RANDO) {
//DefaultCheckData(RC_GIFT_FROM_SAGES);
}
}
std::vector<RandomizerCheck> checks;
// Function for adding Link's Pocket check
void LinksPocket() {
/*if (IS_RANDO) {
if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_LINKS_POCKET) != RO_LINKS_POCKET_NOTHING ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_DUNGEON_REWARDS) == RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
DefaultCheckData(RC_LINKS_POCKET);
gSaveContext.checkTrackerData[RC_LINKS_POCKET].status = RCSHOW_SAVED;
}
}*/
}
void TrySetAreas() {
if (checksByArea.empty()) {
for (int i = RCAREA_KOKIRI_FOREST; i < RCAREA_INVALID; i++) {
@ -509,9 +479,6 @@ void CheckTrackerLoadGame(int32_t fileNum) {
showVOrMQ = (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_RANDOM) == RO_MQ_DUNGEONS_RANDOM_NUMBER ||
(OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_RANDOM) == RO_MQ_DUNGEONS_SET_NUMBER &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) < 12));
LinksPocket();
SongFromImpa();
GiftFromSages();
initialized = true;
UpdateAllOrdering();
UpdateInventoryChecks();
@ -1256,7 +1223,6 @@ bool IsCheckShuffled(RandomizerCheck rc) {
(loc->GetRCType() != RCTYPE_SHOP ||
(showShops && OTRGlobals::Instance->gRandomizer->IdentifyShopItem(loc->GetScene(), loc->GetActorParams() + 1).enGirlAShopItem == 50)) &&
(rc != RC_TRIFORCE_COMPLETED || !hideTriforceCompleted) &&
(rc != RC_GIFT_FROM_SAGES || !IS_RANDO) &&
(loc->GetRCType() != RCTYPE_SCRUB ||
showScrubs ||
(showMajorScrubs && (rc == RC_LW_DEKU_SCRUB_NEAR_BRIDGE || // The 3 scrubs that are always randomized