Skip to content

Commit

Permalink
Change clientVersion and add support triforce pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjoecox committed Jul 12, 2023
1 parent 5871cbe commit 431ce50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void to_json(json& j, const SaveContext& saveContext) {
{"inventory", saveContext.inventory},
{"sohStats", saveContext.sohStats},
{"adultTradeItems", saveContext.adultTradeItems},
{"triforcePiecesCollected", saveContext.triforcePiecesCollected},
};
}

Expand All @@ -179,11 +180,12 @@ void from_json(const json& j, SaveContext& saveContext) {
j.at("inventory").get_to(saveContext.inventory);
j.at("sohStats").get_to(saveContext.sohStats);
j.at("adultTradeItems").get_to(saveContext.adultTradeItems);
j.contains("triforcePiecesCollected") ? j.at("triforcePiecesCollected").get_to(saveContext.triforcePiecesCollected) : gSaveContext.triforcePiecesCollected;
}

std::map<uint32_t, AnchorClient> GameInteractorAnchor::AnchorClients = {};
std::vector<uint32_t> GameInteractorAnchor::FairyIndexToClientId = {};
std::string GameInteractorAnchor::clientVersion = "Anchor Build 7";
std::string GameInteractorAnchor::clientVersion = "Anchor + Triforce Hunt 2";
std::string GameInteractorAnchor::seed = "00000";
std::vector<std::pair<uint16_t, int16_t>> receivedItems = {};
std::vector<AnchorMessage> anchorMessages = {};
Expand Down
5 changes: 4 additions & 1 deletion soh/soh/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ std::vector<std::string> randomizerItemNames = {
"Buy Red Potion (40)",
"Buy Red Potion (50)",
"Triforce",
"Triforce Piece",
"Hint",
"Tycoon Wallet"
};
Expand Down Expand Up @@ -629,7 +630,8 @@ std::map<uint32_t, const char*> itemIcons = {
ITEM_ICON(ITEM_DUNGEON_MAP),
ITEM_ICON(ITEM_KEY_SMALL),
ITEM_ICON(ITEM_MAGIC_SMALL),
ITEM_ICON(ITEM_MAGIC_LARGE)
ITEM_ICON(ITEM_MAGIC_LARGE),
ITEM_ICON(ITEM_TRIFORCE_PIECE),
};

std::map<int32_t, int32_t> randomizerGetToItemIdIcon = {
Expand Down Expand Up @@ -825,6 +827,7 @@ std::map<int32_t, int32_t> randomizerGetToItemIdIcon = {
{ RG_BUY_RED_POTION_40, ITEM_POTION_RED },
{ RG_BUY_RED_POTION_50, ITEM_POTION_RED },
{ RG_TYCOON_WALLET, ITEM_WALLET_GIANT },
{ RG_TRIFORCE_PIECE, ITEM_TRIFORCE_PIECE },
};

int32_t SohUtils::GetItemIdIconFromRandomizerGet(int32_t randomizerGet) {
Expand Down

0 comments on commit 431ce50

Please sign in to comment.