From d9d453501eff870c52405ae822995fb8c096dec3 Mon Sep 17 00:00:00 2001 From: Jerom Venneker Date: Wed, 28 May 2025 10:30:58 +0200 Subject: [PATCH] Corrected spelling on receive --- README.md | 2 +- .../GameInteractor_HookTable.h | 2 +- .../game-interactor/GameInteractor_Hooks.cpp | 4 +-- .../game-interactor/GameInteractor_Hooks.h | 2 +- soh/soh/Enhancements/randomizer/context.cpp | 10 +++---- soh/soh/Enhancements/randomizer/context.h | 4 +-- .../Enhancements/randomizer/hook_handlers.cpp | 10 +++---- .../Enhancements/randomizer/item_location.cpp | 2 +- .../Enhancements/randomizer/randomizerTypes.h | 2 +- soh/soh/Network/Archipelago/Archipelago.cpp | 26 +++++++++---------- soh/soh/Network/Archipelago/Archipelago.h | 4 +-- 11 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index edae15c6b..6fa826854 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ You can currently connect to the multiworld server, scout the items. If you have no randomizer genereted (the `Randomizer` folder is empty) `Connect` to the multiworld from the main screen, click the `Scout` button to load all of the item locations and finally press the `Link up` button, you'll be able to start a randomizer save file. with the items populated with the location from the server. -Sending and Recieving should be implemented, Saving the game doesn't save the current item index localy (the library is a bit anoying with that). +Sending and Receiving should be implemented, Saving the game doesn't save the current item index localy (the library is a bit anoying with that). Not all checks have been mapped, and some may be mapped incorrectly. The victory condition should be implemented but has largely gone untested. diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h b/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h index 73e447999..69118b5ab 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_HookTable.h @@ -71,5 +71,5 @@ DEFINE_HOOK(OnAssetAltChange, ()); DEFINE_HOOK(OnKaleidoUpdate, ()); DEFINE_HOOK(OnRandomizerItemGivenHooks, (uint32_t rc, GetItemEntry gi, uint8_t isGiSkipped)); -DEFINE_HOOK(OnArchipelagoItemRecieved, (uint32_t rg)); +DEFINE_HOOK(OnArchipelagoItemReceived, (uint32_t rg)); DEFINE_HOOK(OnRandomizerExternalCheck, (uint32_t rc)); diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp index 238cff3b0..b1f4bb447 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp @@ -309,8 +309,8 @@ void GameInteractor_ExecuteOnRandomizerItemGivenHooks(uint32_t rc, GetItemEntry } // MARK: Archipelago -void GameInteractor_ExecuteOnArchipelagoItemRecieved(uint32_t rg) { - GameInteractor::Instance->ExecuteHooks(rg); +void GameInteractor_ExecuteOnArchipelagoItemReceived(uint32_t rg) { + GameInteractor::Instance->ExecuteHooks(rg); } void GameInteractor_ExecuteOnRandomizerExternalCheck(uint32_t rc) { diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h index 17de14e5f..0306dc38d 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h @@ -85,7 +85,7 @@ void GameInteractor_ExecuteOnKaleidoUpdate(); void GameInteractor_ExecuteOnRandomizerItemGivenHooks(uint32_t rc, GetItemEntry gi, uint8_t isGiSkipped); // Mark: - Archipelago -void GameInteractor_ExecuteOnArchipelagoItemRecieved(uint32_t rg); +void GameInteractor_ExecuteOnArchipelagoItemReceived(uint32_t rg); void GameInteractor_ExecuteOnRandomizerExternalCheck(uint32_t rc); #ifdef __cplusplus diff --git a/soh/soh/Enhancements/randomizer/context.cpp b/soh/soh/Enhancements/randomizer/context.cpp index 149e656a5..af2d403db 100644 --- a/soh/soh/Enhancements/randomizer/context.cpp +++ b/soh/soh/Enhancements/randomizer/context.cpp @@ -346,27 +346,27 @@ void Context::SetSpoilerLoaded(const bool spoilerLoaded) { mSpoilerLoaded = spoilerLoaded; } -void Context::AddRecievedArchipelagoItem(const RandomizerGet item) { - mAPrecieveQueue.emplace(item); +void Context::AddReceivedArchipelagoItem(const RandomizerGet item) { + mAPreceiveQueue.emplace(item); std::string logMessage = "[LOG] Item Pushed: " + item; ArchipelagoConsole_SendMessage(logMessage.c_str(), true); } GetItemEntry Context::GetArchipelagoGIEntry() { ArchipelagoConsole_SendMessage("[LOG] Trying to get Item Entry", true); - if(mAPrecieveQueue.empty()) { + if(mAPreceiveQueue.empty()) { // something must have gone wrong here, just give a rupee return ItemTableManager::Instance->RetrieveItemEntry(MOD_NONE, GI_HEART); } // get the first item from the archipelago queue - RandomizerGet item_id = mAPrecieveQueue.front(); + RandomizerGet item_id = mAPreceiveQueue.front(); assert(item_id != RG_NONE); Item& item = StaticData::RetrieveItem(item_id); SPDLOG_TRACE("Found item! {}, {}", item.GetName().GetEnglish(), (int)item_id); GetItemEntry item_entry = item.GetGIEntry_Copy(); - mAPrecieveQueue.pop(); + mAPreceiveQueue.pop(); return item_entry; // todo: add custom text maybe? } diff --git a/soh/soh/Enhancements/randomizer/context.h b/soh/soh/Enhancements/randomizer/context.h index f97b21287..648b9c731 100644 --- a/soh/soh/Enhancements/randomizer/context.h +++ b/soh/soh/Enhancements/randomizer/context.h @@ -107,7 +107,7 @@ class Context { */ RandoOptionLACSCondition LACSCondition() const; GetItemEntry GetFinalGIEntry(RandomizerCheck rc, bool checkObtainability = true, GetItemID ogItemId = GI_NONE); - void AddRecievedArchipelagoItem(const RandomizerGet item); + void AddReceivedArchipelagoItem(const RandomizerGet item); GetItemEntry GetArchipelagoGIEntry(); void ParseSpoiler(const char* spoilerFileName); void ParseHashIconIndexesJson(nlohmann::json spoilerFileJson); @@ -189,6 +189,6 @@ class Context { std::string mHash; std::string mSeedString; uint32_t mFinalSeed = 0; - std::queue mAPrecieveQueue = {}; + std::queue mAPreceiveQueue = {}; }; } // namespace Rando \ No newline at end of file diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 601b2be0d..d1e41bceb 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -222,11 +222,11 @@ static std::queue randomizerQueuedChecks; static RandomizerCheck randomizerQueuedCheck = RC_UNKNOWN_CHECK; static GetItemEntry randomizerQueuedItemEntry = GET_ITEM_NONE; -void ArchipelagoOnRecieveItem(const int32_t item) { +void ArchipelagoOnReceiveItem(const int32_t item) { std::string logMessage = "[LOG] Receive item handler called: " + item; ArchipelagoConsole_SendMessage(logMessage.c_str(), true); - randomizerQueuedChecks.push(RC_ARCHIPELAGO_RECIEVED_ITEM); - Rando::Context::GetInstance()->AddRecievedArchipelagoItem(static_cast(item)); + randomizerQueuedChecks.push(RC_ARCHIPELAGO_RECEIVED_ITEM); + Rando::Context::GetInstance()->AddReceivedArchipelagoItem(static_cast(item)); } void RandomizerOnFlagSetHandler(int16_t flagType, int16_t flag) { @@ -313,7 +313,7 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() { auto loc = Rando::Context::GetInstance()->GetItemLocation(rc); uint8_t isGiSkipped = 0; - if (rc == RC_ARCHIPELAGO_RECIEVED_ITEM) { + if (rc == RC_ARCHIPELAGO_RECEIVED_ITEM) { getItemEntry = Rando::Context::GetInstance()->GetArchipelagoGIEntry(); } else { RandomizerGet vanillaRandomizerGet = Rando::StaticData::GetLocation(rc)->GetVanillaItem(); @@ -2540,7 +2540,7 @@ void RandomizerRegisterHooks() { onCuccoOrChickenHatchHook = GameInteractor::Instance->RegisterGameHook( RandomizerOnCuccoOrChickenHatch); - COND_HOOK(GameInteractor::OnArchipelagoItemRecieved, IS_ARCHIPELAGO, ArchipelagoOnRecieveItem); + COND_HOOK(GameInteractor::OnArchipelagoItemReceived, IS_ARCHIPELAGO, ArchipelagoOnReceiveItem); COND_HOOK(GameInteractor::OnRandomizerExternalCheck, IS_ARCHIPELAGO, RandomizerOnExternalCheckHandler) if (RAND_GET_OPTION(RSK_FISHSANITY) != RO_FISHSANITY_OFF) { diff --git a/soh/soh/Enhancements/randomizer/item_location.cpp b/soh/soh/Enhancements/randomizer/item_location.cpp index b31914548..3269287a2 100644 --- a/soh/soh/Enhancements/randomizer/item_location.cpp +++ b/soh/soh/Enhancements/randomizer/item_location.cpp @@ -133,7 +133,7 @@ bool ItemLocation::HasObtained() const { } void ItemLocation::SetCheckStatus(RandomizerCheckStatus status_) { - if(rc == RC_ARCHIPELAGO_RECIEVED_ITEM) // never count the AP recieve trigger as 'collected' + if(rc == RC_ARCHIPELAGO_RECEIVED_ITEM) // never count the AP receive trigger as 'collected' return; status = status_; } diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index 959e78f87..fe79f7c92 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -3472,7 +3472,7 @@ typedef enum { RC_DEKU_TREE_QUEEN_GOHMA_GRASS_8, // End Grass - RC_ARCHIPELAGO_RECIEVED_ITEM, + RC_ARCHIPELAGO_RECEIVED_ITEM, RC_MAX } RandomizerCheck; diff --git a/soh/soh/Network/Archipelago/Archipelago.cpp b/soh/soh/Network/Archipelago/Archipelago.cpp index 8f5d08748..539ff836a 100644 --- a/soh/soh/Network/Archipelago/Archipelago.cpp +++ b/soh/soh/Network/Archipelago/Archipelago.cpp @@ -67,7 +67,7 @@ bool ArchipelagoClient::StartClient() { // we won't have to request an itemSynch if(GameInteractor::IsSaveLoaded(true)) { SynchSentLocations(); - SynchRecievedLocations(); + SynchReceivedLocations(); } }); @@ -147,7 +147,7 @@ void ArchipelagoClient::GameLoaded() { SynchItems(); SynchSentLocations(); - SynchRecievedLocations(); + SynchReceivedLocations(); } void ArchipelagoClient::StartLocationScouts() { @@ -185,7 +185,7 @@ void ArchipelagoClient::SynchSentLocations() { apClient->LocationChecks(checkedLocations); } -void ArchipelagoClient::SynchRecievedLocations() { +void ArchipelagoClient::SynchReceivedLocations() { // Open checks that have been found previously but went unsaved for(const int64_t apLoc : apClient->get_checked_locations()) { QueueExternalCheck(apLoc); @@ -244,17 +244,17 @@ void ArchipelagoClient::OnItemReceived(const ApItem apItem) { return; } - std::string logMessage = "[LOG] Recieved " + apItem.itemName; + std::string logMessage = "[LOG] Received " + apItem.itemName; ArchipelagoConsole_SendMessage(logMessage.c_str(), true); // add item to the queue - recieveQueue.push(apItem); + receiveQueue.push(apItem); } void ArchipelagoClient::QueueItem(const ApItem item) { if(item.index < gSaveContext.ship.quest.data.archipelago.lastReceivedItemIndex) { // Skip queueing any items we already have - std::string logMessage = "[LOG] Skipping giving " + item.itemName + ". We recieved this previously."; + std::string logMessage = "[LOG] Skipping giving " + item.itemName + ". We received this previously."; ArchipelagoConsole_SendMessage(logMessage.c_str(), true); return; } @@ -267,7 +267,7 @@ void ArchipelagoClient::QueueItem(const ApItem item) { } itemQueued = true; - GameInteractor_ExecuteOnArchipelagoItemRecieved(static_cast(RG)); + GameInteractor_ExecuteOnArchipelagoItemReceived(static_cast(RG)); } void ArchipelagoClient::SendGameWon() { @@ -282,11 +282,11 @@ void ArchipelagoClient::Poll() { return; } - // queue another item to be recieved - if(!itemQueued && recieveQueue.size() > 0) { + // queue another item to be received + if(!itemQueued && receiveQueue.size() > 0) { - const ApItem item = recieveQueue.front(); - recieveQueue.pop(); + const ApItem item = receiveQueue.front(); + receiveQueue.pop(); QueueItem(item); } @@ -327,7 +327,7 @@ const char* ArchipelagoClient::GetConnectionStatus() { return "Socket Connected!"; } case APClient::State::ROOM_INFO: { - return "Room info Recieved!"; + return "Room info Received!"; } case APClient::State::SLOT_CONNECTED: { return "Slot Connected!"; @@ -425,7 +425,7 @@ void RegisterArchipelago() { COND_HOOK(GameInteractor::OnRandomizerItemGivenHooks, IS_ARCHIPELAGO, [](uint32_t rc, GetItemEntry gi, uint8_t isGiSkipped) { - if (rc == RC_ARCHIPELAGO_RECIEVED_ITEM) { + if (rc == RC_ARCHIPELAGO_RECEIVED_ITEM) { gSaveContext.ship.quest.data.archipelago.lastReceivedItemIndex++; ArchipelagoClient::GetInstance().itemQueued = false; } else { diff --git a/soh/soh/Network/Archipelago/Archipelago.h b/soh/soh/Network/Archipelago/Archipelago.h index 314c0a34a..46b7adb07 100644 --- a/soh/soh/Network/Archipelago/Archipelago.h +++ b/soh/soh/Network/Archipelago/Archipelago.h @@ -36,7 +36,7 @@ class ArchipelagoClient{ void StartLocationScouts(); void SynchItems(); void SynchSentLocations(); - void SynchRecievedLocations(); + void SynchReceivedLocations(); // getters const std::string GetSlotName() const; @@ -75,7 +75,7 @@ class ArchipelagoClient{ nlohmann::json slotData; std::set locations; std::vector scoutedItems; - std::queue recieveQueue; + std::queue receiveQueue; }; void LoadArchipelagoData();