apply clang-format

This commit is contained in:
Pepper0ni 2025-04-02 14:15:01 +01:00
parent 0a394b0356
commit 4bf78d6b9e
17 changed files with 633 additions and 682 deletions

View file

@ -1129,14 +1129,12 @@ static void RandomizeDungeonItems() {
}
if (ctx->GetOption(RSK_GERUDO_KEYS).Is(RO_GERUDO_KEYS_ANY_DUNGEON)) {
auto gerudoKeys = FilterAndEraseFromPool(ItemPool, [](const auto i) {
return i == RG_HIDEOUT_SMALL_KEY || i == RG_HIDEOUT_KEY_RING;
});
auto gerudoKeys = FilterAndEraseFromPool(
ItemPool, [](const auto i) { return i == RG_HIDEOUT_SMALL_KEY || i == RG_HIDEOUT_KEY_RING; });
AddElementsToPool(anyDungeonItems, gerudoKeys);
} else if (ctx->GetOption(RSK_GERUDO_KEYS).Is(RO_GERUDO_KEYS_OVERWORLD)) {
auto gerudoKeys = FilterAndEraseFromPool(ItemPool, [](const auto i) {
return i == RG_HIDEOUT_SMALL_KEY || i == RG_HIDEOUT_KEY_RING;
});
auto gerudoKeys = FilterAndEraseFromPool(
ItemPool, [](const auto i) { return i == RG_HIDEOUT_SMALL_KEY || i == RG_HIDEOUT_KEY_RING; });
AddElementsToPool(overworldItems, gerudoKeys);
}

View file

@ -27,10 +27,11 @@ HintDistributionSetting::HintDistributionSetting(std::string _name, HintType _ty
dungeonLimit = _dungeonLimit;
}
//RANDOTODO rearrange once all HintText's have names
// RANDOTODO rearrange once all HintText's have names
HintText::HintText(CustomMessage clearText_, std::vector<CustomMessage> ambiguousText_,
std::vector<CustomMessage> obscureText_, CustomMessage name_)
: clearText(std::move(clearText_)), ambiguousText(std::move(ambiguousText_)), obscureText(std::move(obscureText_)), name(std::move(name_)) {
: clearText(std::move(clearText_)), ambiguousText(std::move(ambiguousText_)), obscureText(std::move(obscureText_)),
name(std::move(name_)) {
}
const CustomMessage& HintText::GetClear() const {

View file

@ -462,28 +462,17 @@ void GenerateItemPool() {
// Initialize ice trap models to always major items
ctx->possibleIceTrapModels = {
RG_MIRROR_SHIELD,
RG_BOOMERANG,
RG_LENS_OF_TRUTH,
RG_MEGATON_HAMMER,
RG_IRON_BOOTS,
RG_HOVER_BOOTS,
RG_STONE_OF_AGONY,
RG_DINS_FIRE,
RG_FARORES_WIND,
RG_NAYRUS_LOVE,
RG_FIRE_ARROWS,
RG_ICE_ARROWS,
RG_LIGHT_ARROWS,
RG_DOUBLE_DEFENSE,
RG_CLAIM_CHECK,
RG_PROGRESSIVE_HOOKSHOT,
RG_PROGRESSIVE_STRENGTH,
RG_PROGRESSIVE_BOMB_BAG,
RG_PROGRESSIVE_BOW,
RG_PROGRESSIVE_SLINGSHOT,
RG_PROGRESSIVE_WALLET,
RG_PROGRESSIVE_SCALE,
RG_MIRROR_SHIELD, RG_BOOMERANG,
RG_LENS_OF_TRUTH, RG_MEGATON_HAMMER,
RG_IRON_BOOTS, RG_HOVER_BOOTS,
RG_STONE_OF_AGONY, RG_DINS_FIRE,
RG_FARORES_WIND, RG_NAYRUS_LOVE,
RG_FIRE_ARROWS, RG_ICE_ARROWS,
RG_LIGHT_ARROWS, RG_DOUBLE_DEFENSE,
RG_CLAIM_CHECK, 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,
};
// Check song shuffle and dungeon reward shuffle just for ice traps

View file

@ -74,7 +74,8 @@ static void WriteLocation(std::string sphere, const RandomizerCheck locationKey,
Rando::Location* location = Rando::StaticData::GetLocation(locationKey);
Rando::ItemLocation* itemLocation = Rando::Context::GetInstance()->GetItemLocation(locationKey);
jsonData["playthrough"][sphere][location->GetName()] = itemLocation->GetPlacedItemName().GetForCurrentLanguage(MF_RAW);
jsonData["playthrough"][sphere][location->GetName()] =
itemLocation->GetPlacedItemName().GetForCurrentLanguage(MF_RAW);
}
// Writes a shuffled entrance to the specified node
@ -255,39 +256,39 @@ static void WriteAllLocations() {
for (const RandomizerCheck key : ctx->allLocations) {
Rando::ItemLocation* location = ctx->GetItemLocation(key);
std::string placedItemName = location->GetPlacedItemName().GetForCurrentLanguage(MF_RAW);
std::string locName = Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName();
// If it's a simple item (not an ice trap, doesn't have a price)
// just add the name of the item and move on
if (!location->HasCustomPrice() && location->GetPlacedRandomizerGet() != RG_ICE_TRAP) {
jsonData["locations"][Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName()] =
placedItemName;
jsonData["locations"][locName] = placedItemName;
continue;
}
// We're dealing with a complex item, build out the json object for it
jsonData["locations"][Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName()]["item"] =
placedItemName;
jsonData["locations"][locName]["item"] = placedItemName;
if (location->HasCustomPrice()) {
jsonData["locations"][Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName()]["price"] =
location->GetPrice();
jsonData["locations"][locName]["price"] = location->GetPrice();
}
if (location->IsAHintAccessible()) {
hintedLocations.emplace(Rando::StaticData::GetLocation(key)->GetHintKey(), location);
}
if (location->GetPlacedRandomizerGet() == RG_ICE_TRAP) {
jsonData["locations"][Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName()]["model"] =
Rando::StaticData::RetrieveItem(ctx->overrides[location->GetRandomizerCheck()].LooksLike()).GetName().GetForCurrentLanguage(MF_RAW);
jsonData["locations"][locName]["model"] =
Rando::StaticData::RetrieveItem(ctx->overrides[location->GetRandomizerCheck()].LooksLike())
.GetName()
.GetForCurrentLanguage(MF_RAW);
switch (gSaveContext.language) {
case 0:
default:
jsonData["locations"][Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName()]["trickName"] =
jsonData["locations"][locName]["trickName"] =
ctx->overrides[location->GetRandomizerCheck()].GetTrickName().english;
break;
case 2:
jsonData["locations"][Rando::StaticData::GetLocation(location->GetRandomizerCheck())->GetName()]["trickName"] =
jsonData["locations"][locName]["trickName"] =
ctx->overrides[location->GetRandomizerCheck()].GetTrickName().french;
break;
}

View file

@ -87,8 +87,7 @@ std::vector<RandomizerGet> infiniteItemList = {
RG_BOMBS_20, RG_BOMBCHU_5, RG_BOMBCHU_10, RG_BOMBCHU_20, RG_RECOVERY_HEART, RG_ICE_TRAP, RG_SOLD_OUT
};
std::unordered_map<RandomizerGet, std::string> itemImageMap = {
{ RG_NONE, "ITEM_SOLD_OUT" },
std::unordered_map<RandomizerGet, std::string> itemImageMap = { { RG_NONE, "ITEM_SOLD_OUT" },
{ RG_KOKIRI_SWORD, "ITEM_SWORD_KOKIRI" },
{ RG_GIANTS_KNIFE, "ITEM_SWORD_KNIFE" },
{ RG_BIGGORON_SWORD, "ITEM_SWORD_BGS" },
@ -221,7 +220,7 @@ std::unordered_map<RandomizerGet, std::string> itemImageMap = {
{ RG_PIECE_OF_HEART, "ITEM_HEART_PIECE" },
{ RG_HEART_CONTAINER, "ITEM_HEART_CONTAINER" },
{ RG_ICE_TRAP, "ITEM_ICE_TRAP" },
{ RG_MILK, "ITEM_MILK_BOTTLE"},
{ RG_MILK, "ITEM_MILK_BOTTLE" },
{ RG_BOMBS_5, "ITEM_BOMB" },
{ RG_BOMBS_10, "ITEM_BOMB" },
{ RG_BOMBS_20, "ITEM_BOMB" },
@ -251,8 +250,7 @@ std::unordered_map<RandomizerGet, std::string> itemImageMap = {
{ RG_FISHING_POLE, "ITEM_FISHING_POLE" },
{ RG_SOLD_OUT, "ITEM_SOLD_OUT" },
{ RG_TRIFORCE_PIECE, "TRIFORCE_PIECE" },
{ RG_SKELETON_KEY, "ITEM_KEY_SMALL" }
};
{ RG_SKELETON_KEY, "ITEM_KEY_SMALL" } };
Rando::Item plandomizerRandoRetrieveItem(RandomizerGet randoGetItem) {
auto randoGetItemEntry = Rando::StaticData::RetrieveItem(randoGetItem);
@ -530,15 +528,19 @@ void PlandomizerSaveSpoilerLog() {
for (auto& import : plandoLogData) {
if (import.checkRewardItem.GetRandomizerGet() == RG_ICE_TRAP) {
spoilerSave["locations"][import.checkName] = { { "item", import.checkRewardItem.GetName().GetForCurrentLanguage(MF_RAW) },
spoilerSave["locations"][import.checkName] = {
{ "item", import.checkRewardItem.GetName().GetForCurrentLanguage(MF_RAW) },
{ "model", import.iceTrapModel.GetName().GetForCurrentLanguage(MF_RAW) },
{ "trickName", import.iceTrapName.c_str() } };
{ "trickName", import.iceTrapName.c_str() }
};
if (import.shopPrice > -1) {
spoilerSave["locations"][import.checkName]["price"] = import.shopPrice;
}
} else if (import.shopPrice > -1) {
spoilerSave["locations"][import.checkName] = { { "item", import.checkRewardItem.GetName().GetForCurrentLanguage(MF_RAW) },
{ "price", import.shopPrice } };
spoilerSave["locations"][import.checkName] = {
{ "item", import.checkRewardItem.GetName().GetForCurrentLanguage(MF_RAW) },
{ "price", import.shopPrice }
};
} else {
spoilerSave["locations"][import.checkName] = import.checkRewardItem.GetName().GetForCurrentLanguage(MF_RAW);
}
@ -622,8 +624,7 @@ void PlandomizerLoadSpoilerLog(std::string logFile) {
checkObject.checkRewardItem =
plandomizerRandoRetrieveItem(Rando::StaticData::itemNameToEnum[value.get<std::string>()]);
checkObject.shopPrice = -1;
if (checkObject.shopPrice == -1 &&
checkObject.checkRewardItem.GetItemType() == ITEMTYPE_SHOP) {
if (checkObject.shopPrice == -1 && checkObject.checkRewardItem.GetItemType() == ITEMTYPE_SHOP) {
checkObject.shopPrice = checkObject.checkRewardItem.GetPrice();
}
}

View file

@ -170,13 +170,12 @@ Dungeons::Dungeons() {
"Shadow Temple", RHT_SHADOW_TEMPLE, RG_SHADOW_TEMPLE_MAP, RG_SHADOW_TEMPLE_COMPASS, RG_SHADOW_TEMPLE_SMALL_KEY,
RG_SHADOW_TEMPLE_KEY_RING, RG_SHADOW_TEMPLE_BOSS_KEY, RA_SHADOW_TEMPLE, 5, 6, RSK_MQ_SHADOW_TEMPLE);
dungeonList[BOTTOM_OF_THE_WELL] =
DungeonInfo("Bottom of the Well", RHT_BOTTOM_OF_THE_WELL, RG_BOTW_MAP,
RG_BOTW_COMPASS, RG_BOTW_SMALL_KEY, RG_BOTW_KEY_RING,
RG_NONE, RA_BOTTOM_OF_THE_WELL, 3, 2, RSK_MQ_BOTTOM_OF_THE_WELL);
DungeonInfo("Bottom of the Well", RHT_BOTTOM_OF_THE_WELL, RG_BOTW_MAP, RG_BOTW_COMPASS, RG_BOTW_SMALL_KEY,
RG_BOTW_KEY_RING, RG_NONE, RA_BOTTOM_OF_THE_WELL, 3, 2, RSK_MQ_BOTTOM_OF_THE_WELL);
dungeonList[ICE_CAVERN] = DungeonInfo("Ice Cavern", RHT_ICE_CAVERN, RG_ICE_CAVERN_MAP, RG_ICE_CAVERN_COMPASS,
RG_NONE, RG_NONE, RG_NONE, RA_ICE_CAVERN, 0, 0, RSK_MQ_ICE_CAVERN);
dungeonList[GERUDO_TRAINING_GROUND] = DungeonInfo(
"Gerudo Training Ground", RHT_GERUDO_TRAINING_GROUND, RG_NONE, RG_NONE, RG_GTG_SMALL_KEY,
dungeonList[GERUDO_TRAINING_GROUND] =
DungeonInfo("Gerudo Training Ground", RHT_GERUDO_TRAINING_GROUND, RG_NONE, RG_NONE, RG_GTG_SMALL_KEY,
RG_GTG_KEY_RING, RG_NONE, RA_GERUDO_TRAINING_GROUND, 9, 3, RSK_MQ_GTG);
dungeonList[GANONS_CASTLE] =
DungeonInfo("Ganon's Castle", RHT_GANONS_CASTLE, RG_NONE, RG_NONE, RG_GANONS_CASTLE_SMALL_KEY,

View file

@ -276,7 +276,8 @@ const HintText Hint::GetHintText(uint8_t id) const {
return StaticData::hintTextTable[RHT_CAN_BE_FOUND_AT];
}
} else {
return HintText(CustomMessage("ERROR: ITEM AREA HINT WITH NO LOCATION")); // RANDOTODO get isDungeon from area?
return HintText(
CustomMessage("ERROR: ITEM AREA HINT WITH NO LOCATION")); // RANDOTODO get isDungeon from area?
}
default:
return HintText(CustomMessage("ERROR: NO HINTKEY PROVIDED AND HINT TYPE HAS NO DEFAULT"));
@ -411,15 +412,13 @@ oJson Hint::toJSON() {
if (!(StaticData::staticHintInfoMap.contains(ownKey) &&
StaticData::staticHintInfoMap[ownKey].targetItems.size() > 0)) {
if (items.size() == 1) {
log["item"] = StaticData::GetItemTable()[items[0]]
.GetName()
.GetForCurrentLanguage(MF_RAW); // RANDOTODO change to CustomMessage;
log["item"] = StaticData::GetItemTable()[items[0]].GetName().GetForCurrentLanguage(
MF_RAW); // RANDOTODO change to CustomMessage;
} else if (items.size() > 1) {
std::vector<std::string> itemStrings = {};
for (size_t c = 0; c < items.size(); c++) {
itemStrings.push_back(StaticData::GetItemTable()[items[c]]
.GetName()
.GetForCurrentLanguage(MF_RAW)); // RANDOTODO change to CustomMessage
itemStrings.push_back(StaticData::GetItemTable()[items[c]].GetName().GetForCurrentLanguage(
MF_RAW)); // RANDOTODO change to CustomMessage
}
log["items"] = itemStrings;
}

View file

@ -1034,7 +1034,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
});
} else if (item00->itemEntry.modIndex == MOD_RANDOMIZER) {
Notification::Emit({
.message = "You found ",//RANDOTODO change based on language
.message = "You found ", // RANDOTODO change based on language
.suffix = Rando::StaticData::RetrieveItem((RandomizerGet)item00->itemEntry.getItemId)
.GetName()
.GetForCurrentLanguage(MF_RAW),

View file

@ -15,13 +15,12 @@ Item::Item()
: randomizerGet(RG_NONE), type(ITEMTYPE_ITEM), getItemId(GI_NONE), advancement(false), hintKey(RHT_NONE),
progressive(false), price(0) {
}
Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16_t getItemId_,
const bool advancement_, LogicVal logicVal_, const RandomizerHintTextKey hintKey_, const uint16_t itemId_,
const uint16_t objectId_, const uint16_t gid_, const uint16_t textId_, const uint16_t field_,
const int16_t chestAnimation_, const GetItemCategory category_, const uint16_t modIndex_,
const bool progressive_, const uint16_t price_)
: randomizerGet(randomizerGet_), type(type_), getItemId(getItemId_),
advancement(advancement_), logicVal(logicVal_), hintKey(hintKey_), progressive(progressive_), price(price_) {
Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16_t getItemId_, const bool advancement_,
LogicVal logicVal_, const RandomizerHintTextKey hintKey_, const uint16_t itemId_, const uint16_t objectId_,
const uint16_t gid_, const uint16_t textId_, const uint16_t field_, const int16_t chestAnimation_,
const GetItemCategory category_, const uint16_t modIndex_, const bool progressive_, const uint16_t price_)
: randomizerGet(randomizerGet_), type(type_), getItemId(getItemId_), advancement(advancement_), logicVal(logicVal_),
hintKey(hintKey_), progressive(progressive_), price(price_) {
if (modIndex_ == MOD_RANDOMIZER || getItemId > 0x7D) {
giEntry = std::make_shared<GetItemEntry>(GetItemEntry{
itemId_, field_, static_cast<int16_t>((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_,
@ -35,27 +34,31 @@ Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16
}
}
Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16_t getItemId_,
const bool advancement_, LogicVal logicVal_, const RandomizerHintTextKey hintKey_,
const uint16_t objectId_, const uint16_t gid_, const uint16_t textId_, const uint16_t field_,
const int16_t chestAnimation_, const GetItemCategory category_, const uint16_t modIndex_,
const bool progressive_, const uint16_t price_)
: randomizerGet(randomizerGet_), type(type_), getItemId(getItemId_),
advancement(advancement_), logicVal(logicVal_), hintKey(hintKey_), progressive(progressive_), price(price_) {
Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16_t getItemId_, const bool advancement_,
LogicVal logicVal_, const RandomizerHintTextKey hintKey_, const uint16_t objectId_, const uint16_t gid_,
const uint16_t textId_, const uint16_t field_, const int16_t chestAnimation_,
const GetItemCategory category_, const uint16_t modIndex_, const bool progressive_, const uint16_t price_)
: randomizerGet(randomizerGet_), type(type_), getItemId(getItemId_), advancement(advancement_), logicVal(logicVal_),
hintKey(hintKey_), progressive(progressive_), price(price_) {
if (modIndex_ == MOD_RANDOMIZER || getItemId > 0x7D) {
giEntry = std::make_shared<GetItemEntry>(GetItemEntry{ static_cast<uint16_t>(randomizerGet_), field_, static_cast<int16_t>((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, TABLE_RANDOMIZER, static_cast<int16_t>(randomizerGet_), gid_, true, ITEM_FROM_NPC, category_, static_cast<uint16_t>(randomizerGet_), MOD_RANDOMIZER, NULL });
}
else {
giEntry = std::make_shared<GetItemEntry>(GetItemEntry{ static_cast<uint16_t>(randomizerGet_), field_, static_cast<int16_t>((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_, objectId_, modIndex_, TABLE_VANILLA, getItemId_, gid_, true, ITEM_FROM_NPC, category_, static_cast<uint16_t>(randomizerGet_), modIndex_, NULL });
giEntry = std::make_shared<GetItemEntry>(
GetItemEntry{ static_cast<uint16_t>(randomizerGet_), field_,
static_cast<int16_t>((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_,
objectId_, modIndex_, TABLE_RANDOMIZER, static_cast<int16_t>(randomizerGet_), gid_, true,
ITEM_FROM_NPC, category_, static_cast<uint16_t>(randomizerGet_), MOD_RANDOMIZER, NULL });
} else {
giEntry = std::make_shared<GetItemEntry>(
GetItemEntry{ static_cast<uint16_t>(randomizerGet_), field_,
static_cast<int16_t>((chestAnimation_ != CHEST_ANIM_SHORT ? 1 : -1) * (gid_ + 1)), textId_,
objectId_, modIndex_, TABLE_VANILLA, getItemId_, gid_, true, ITEM_FROM_NPC, category_,
static_cast<uint16_t>(randomizerGet_), modIndex_, NULL });
}
}
Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16_t getItemId_,
const bool advancement_, LogicVal logicVal_, const RandomizerHintTextKey hintKey_, const bool progressive_,
const uint16_t price_)
: randomizerGet(randomizerGet_), type(type_), getItemId(getItemId_),
advancement(advancement_), logicVal(logicVal_), hintKey(hintKey_), progressive(progressive_), price(price_) {
Item::Item(const RandomizerGet randomizerGet_, const ItemType type_, const int16_t getItemId_, const bool advancement_,
LogicVal logicVal_, const RandomizerHintTextKey hintKey_, const bool progressive_, const uint16_t price_)
: randomizerGet(randomizerGet_), type(type_), getItemId(getItemId_), advancement(advancement_), logicVal(logicVal_),
hintKey(hintKey_), progressive(progressive_), price(price_) {
}
Item::~Item() = default;

View file

@ -30,16 +30,16 @@ namespace Rando {
class Item {
public:
Item();
Item(RandomizerGet randomizerGet_, ItemType type_, int16_t getItemId_, bool advancement_,
LogicVal logicVal_, RandomizerHintTextKey hintKey_, uint16_t itemId_, uint16_t objectId_, uint16_t gid_,
uint16_t textId_, uint16_t field_, int16_t chestAnimation_, GetItemCategory category_, uint16_t modIndex_,
Item(RandomizerGet randomizerGet_, ItemType type_, int16_t getItemId_, bool advancement_, LogicVal logicVal_,
RandomizerHintTextKey hintKey_, uint16_t itemId_, uint16_t objectId_, uint16_t gid_, uint16_t textId_,
uint16_t field_, int16_t chestAnimation_, GetItemCategory category_, uint16_t modIndex_,
bool progressive_ = false, uint16_t price_ = 0);
Item(RandomizerGet randomizerGet_, ItemType type_, int16_t getItemId_, bool advancement_,
LogicVal logicVal_, RandomizerHintTextKey hintKey_, uint16_t objectId_, uint16_t gid_,
uint16_t textId_, uint16_t field_, int16_t chestAnimation_, GetItemCategory category_, uint16_t modIndex_,
bool progressive_ = false, uint16_t price_ = 0);
Item(RandomizerGet randomizerGet_, ItemType type_, int16_t getItemId_, bool advancement_,
LogicVal logicVal_, RandomizerHintTextKey hintKey_, bool progressive_ = false, uint16_t price_ = 0);
Item(RandomizerGet randomizerGet_, ItemType type_, int16_t getItemId_, bool advancement_, LogicVal logicVal_,
RandomizerHintTextKey hintKey_, uint16_t objectId_, uint16_t gid_, uint16_t textId_, uint16_t field_,
int16_t chestAnimation_, GetItemCategory category_, uint16_t modIndex_, bool progressive_ = false,
uint16_t price_ = 0);
Item(RandomizerGet randomizerGet_, ItemType type_, int16_t getItemId_, bool advancement_, LogicVal logicVal_,
RandomizerHintTextKey hintKey_, bool progressive_ = false, uint16_t price_ = 0);
~Item();
void ApplyEffect() const;

View file

@ -406,9 +406,9 @@ void Rando::StaticData::InitItemTable() {
// Init itemNameToEnum
for (auto& item : itemTable) {
std::vector<std::string> strings = item.GetName().GetAllMessages(MF_RAW);
for (std::string string: strings){
if (itemNameToEnum.contains(string) && string != ""){
if (itemNameToEnum[string] != item.GetRandomizerGet()){
for (std::string string : strings) {
if (itemNameToEnum.contains(string) && string != "") {
if (itemNameToEnum[string] != item.GetRandomizerGet()) {
SPDLOG_DEBUG("\tREPEATED STRING WITH " + string + "\n\n");
}
} else {

View file

@ -1460,7 +1460,7 @@ std::map<RandomizerGet, uint32_t> Logic::RandoGetToEquipFlag = {
{ RG_IRON_BOOTS, EQUIP_FLAG_BOOTS_IRON }, { RG_HOVER_BOOTS, EQUIP_FLAG_BOOTS_HOVER }
};
std::map<RandomizerGet, uint32_t> Logic::RandoGetToRandInf = {
std::map<RandomizerGet, uint32_t> Logic::RandoGetToRandInf = {
{ RG_ZELDAS_LETTER, RAND_INF_ZELDAS_LETTER },
{ RG_WEIRD_EGG, RAND_INF_WEIRD_EGG },
{ RG_GOHMA_SOUL, RAND_INF_GOHMA_SOUL },
@ -1504,9 +1504,9 @@ std::map<RandomizerGet, uint32_t> Logic::RandoGetToEquipFlag = {
{ RG_BACK_TOWER_KEY, RAND_INF_BACK_TOWER_KEY_OBTAINED },
{ RG_HYLIA_LAB_KEY, RAND_INF_HYLIA_LAB_KEY_OBTAINED },
{ RG_FISHING_HOLE_KEY, RAND_INF_FISHING_HOLE_KEY_OBTAINED },
};
};
std::map<uint32_t, uint32_t> Logic::RandoGetToDungeonScene = {
std::map<uint32_t, uint32_t> Logic::RandoGetToDungeonScene = {
{ RG_FOREST_TEMPLE_SMALL_KEY, SCENE_FOREST_TEMPLE },
{ RG_FIRE_TEMPLE_SMALL_KEY, SCENE_FIRE_TEMPLE },
{ RG_WATER_TEMPLE_SMALL_KEY, SCENE_WATER_TEMPLE },
@ -1552,7 +1552,7 @@ std::map<RandomizerGet, uint32_t> Logic::RandoGetToEquipFlag = {
{ RG_BOTW_COMPASS, SCENE_BOTTOM_OF_THE_WELL },
{ RG_ICE_CAVERN_COMPASS, SCENE_ICE_CAVERN },
{ RG_TCG_SMALL_KEY, SCENE_TREASURE_BOX_SHOP }
};
};
std::map<uint32_t, uint32_t> Logic::RandoGetToQuestItem = {
{ RG_FOREST_MEDALLION, QUEST_MEDALLION_FOREST },

View file

@ -635,17 +635,21 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
// Inventory Items
case RG_PROGRESSIVE_STICK_BAG:
return infiniteUpgrades != RO_INF_UPGRADES_OFF ?
(Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_STICK_UPGRADE) ? CANT_OBTAIN_ALREADY_HAVE : CAN_OBTAIN) :
(CUR_UPG_VALUE(UPG_STICKS) < 3 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE);
return infiniteUpgrades != RO_INF_UPGRADES_OFF
? (Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_STICK_UPGRADE) ? CANT_OBTAIN_ALREADY_HAVE
: CAN_OBTAIN)
: (CUR_UPG_VALUE(UPG_STICKS) < 3 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE);
case RG_DEKU_STICK_1:
case RG_BUY_DEKU_STICK_1:
return CUR_UPG_VALUE(UPG_STICKS) || !OTRGlobals::Instance->gRandoContext->GetOption(RSK_SHUFFLE_DEKU_STICK_BAG).Get()
? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
return CUR_UPG_VALUE(UPG_STICKS) ||
!OTRGlobals::Instance->gRandoContext->GetOption(RSK_SHUFFLE_DEKU_STICK_BAG).Get()
? CAN_OBTAIN
: CANT_OBTAIN_NEED_UPGRADE;
case RG_PROGRESSIVE_NUT_BAG:
return infiniteUpgrades != RO_INF_UPGRADES_OFF ?
(Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_NUT_UPGRADE) ? CANT_OBTAIN_ALREADY_HAVE : CAN_OBTAIN) :
(CUR_UPG_VALUE(UPG_NUTS) < 3 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE);
return infiniteUpgrades != RO_INF_UPGRADES_OFF
? (Flags_GetRandomizerInf(RAND_INF_HAS_INFINITE_NUT_UPGRADE) ? CANT_OBTAIN_ALREADY_HAVE
: CAN_OBTAIN)
: (CUR_UPG_VALUE(UPG_NUTS) < 3 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE);
case RG_DEKU_NUTS_5:
case RG_DEKU_NUTS_10:
case RG_BUY_DEKU_NUTS_5:
@ -874,7 +878,8 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
case RG_SHADOW_TEMPLE_COMPASS:
return !CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, SCENE_SHADOW_TEMPLE) ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
case RG_BOTW_COMPASS:
return !CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, SCENE_BOTTOM_OF_THE_WELL) ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return !CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, SCENE_BOTTOM_OF_THE_WELL) ? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_ICE_CAVERN_COMPASS:
return !CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, SCENE_ICE_CAVERN) ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
case RG_FOREST_TEMPLE_BOSS_KEY:
@ -906,17 +911,30 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_SHADOW_TEMPLE_SMALL_KEY:
return gSaveContext.inventory.dungeonKeys[SCENE_SHADOW_TEMPLE] < SHADOW_TEMPLE_SMALL_KEY_MAX ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return gSaveContext.inventory.dungeonKeys[SCENE_SHADOW_TEMPLE] < SHADOW_TEMPLE_SMALL_KEY_MAX
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_BOTW_SMALL_KEY:
return gSaveContext.inventory.dungeonKeys[SCENE_BOTTOM_OF_THE_WELL] < BOTTOM_OF_THE_WELL_SMALL_KEY_MAX ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return gSaveContext.inventory.dungeonKeys[SCENE_BOTTOM_OF_THE_WELL] < BOTTOM_OF_THE_WELL_SMALL_KEY_MAX
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_GTG_SMALL_KEY:
return gSaveContext.inventory.dungeonKeys[SCENE_GERUDO_TRAINING_GROUND] < GERUDO_TRAINING_GROUND_SMALL_KEY_MAX ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return gSaveContext.inventory.dungeonKeys[SCENE_GERUDO_TRAINING_GROUND] <
GERUDO_TRAINING_GROUND_SMALL_KEY_MAX
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_HIDEOUT_SMALL_KEY:
return gSaveContext.inventory.dungeonKeys[SCENE_THIEVES_HIDEOUT] < GERUDO_FORTRESS_SMALL_KEY_MAX ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return gSaveContext.inventory.dungeonKeys[SCENE_THIEVES_HIDEOUT] < GERUDO_FORTRESS_SMALL_KEY_MAX
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_GANONS_CASTLE_SMALL_KEY:
return gSaveContext.inventory.dungeonKeys[SCENE_INSIDE_GANONS_CASTLE] < GANONS_CASTLE_SMALL_KEY_MAX ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return gSaveContext.inventory.dungeonKeys[SCENE_INSIDE_GANONS_CASTLE] < GANONS_CASTLE_SMALL_KEY_MAX
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
case RG_TCG_SMALL_KEY:
return gSaveContext.inventory.dungeonKeys[SCENE_TREASURE_BOX_SHOP] < TREASURE_GAME_SMALL_KEY_MAX ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
return gSaveContext.inventory.dungeonKeys[SCENE_TREASURE_BOX_SHOP] < TREASURE_GAME_SMALL_KEY_MAX
? CAN_OBTAIN
: CANT_OBTAIN_ALREADY_HAVE;
// Dungeon Rewards
case RG_KOKIRI_EMERALD:
@ -5185,177 +5203,134 @@ void Randomizer::CreateCustomMessages() {
"vielleicht&dafür...",
"Vous obtenez une %rBouteille avec&un Esprit%w! Ça intéresserait&peut-être le vendeur d'Âme "),
GIMESSAGE(RG_HIDEOUT_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %yThieves Hideout &%wSmall Key!",
GIMESSAGE(RG_HIDEOUT_SMALL_KEY, ITEM_KEY_SMALL, "You found a %yThieves Hideout &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %yDiebesversteck%w!",
"Vous obtenez une %rPetite Clé %w&du %yRepaire des Voleurs%w!"),
GIMESSAGE(RG_FOREST_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %gForest Temple &%wSmall Key!",
GIMESSAGE(RG_FOREST_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %gForest Temple &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gWaldtempel%w!",
"Vous obtenez une %rPetite Clé %w&du %gTemple de la Forêt%w!"),
GIMESSAGE(RG_FIRE_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %rFire Temple &%wSmall Key!",
GIMESSAGE(RG_FIRE_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %rFire Temple &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %rFeuertempel%w!",
"Vous obtenez une %rPetite Clé %w&du %rTemple du Feu%w!"),
GIMESSAGE(RG_WATER_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %bWater Temple &%wSmall Key!",
GIMESSAGE(RG_WATER_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %bWater Temple &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %bWassertempel%w!",
"Vous obtenez une %rPetite Clé %w&du %bTemple de l'Eau%w!"),
GIMESSAGE(RG_SPIRIT_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %ySpirit Temple &%wSmall Key!",
GIMESSAGE(RG_SPIRIT_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %ySpirit Temple &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %yGeistertempel%w!",
"Vous obtenez une %rPetite Clé %w&du %yTemple de l'Esprit%w!"),
GIMESSAGE(RG_SHADOW_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %pShadow Temple &%wSmall Key!",
GIMESSAGE(RG_SHADOW_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %pShadow Temple &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %pSchattentempel%w!",
"Vous obtenez une %rPetite Clé %w&du %pTemple de l'Ombre%w!"),
GIMESSAGE(RG_BOTW_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %pBottom of the &Well %wSmall Key!",
GIMESSAGE(RG_BOTW_SMALL_KEY, ITEM_KEY_SMALL, "You found a %pBottom of the &Well %wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %pGrund des Brunnens%w!",
"Vous obtenez une %rPetite Clé %w&du %pPuits%w!"),
GIMESSAGE(RG_GTG_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %yGerudo Training &Ground %wSmall Key!",
GIMESSAGE(RG_GTG_SMALL_KEY, ITEM_KEY_SMALL, "You found a %yGerudo Training &Ground %wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %yGerudo-Trainingsgelände%w!",
"Vous obtenez une %rPetite Clé %w&du %yGymnase Gerudo%w!"),
GIMESSAGE(RG_GANONS_CASTLE_SMALL_KEY, ITEM_KEY_SMALL,
"You found a %rGanon's Castle &%wSmall Key!",
GIMESSAGE(RG_GANONS_CASTLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %rGanon's Castle &%wSmall Key!",
"Du erhältst einen %rkleinen&Schlüssel%w für %rGanons Schloß%w!",
"Vous obtenez une %rPetite Clé %w&du %rChâteau de Ganon%w!"),
GIMESSAGE(RG_GUARD_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gGuard House%w!",
GIMESSAGE(RG_GUARD_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to the&%gGuard House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus der Wachen%w!",
"Vous obtenez la %rClé %wde la&%gMaison des Gardes%w!"),
GIMESSAGE(RG_MARKET_BAZAAR_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gMarket Bazaar%w!",
GIMESSAGE(RG_MARKET_BAZAAR_KEY, ITEM_KEY_SMALL, "You found the key to the&%gMarket Bazaar%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gBasar des Marktes%w!",
"Vous obtenez la %rClé %wdu %gBazar&de la Place du Marché%w!"),
GIMESSAGE(RG_MARKET_POTION_SHOP_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gMarket Potion Shop%w!",
GIMESSAGE(RG_MARKET_POTION_SHOP_KEY, ITEM_KEY_SMALL, "You found the key to the&%gMarket Potion Shop%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gMagie-Laden des Marktes%w!",
"Vous obtenez la %rClé %wde la&%gPlace du Marché%w!"),
GIMESSAGE(RG_MASK_SHOP_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gMask Shop%w!",
GIMESSAGE(RG_MASK_SHOP_KEY, ITEM_KEY_SMALL, "You found the key to the&%gMask Shop%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gMaskenladen%w!",
"Vous obtenez la %rClé %wde la&%gFoire aux Masques%w!"),
GIMESSAGE(RG_MARKET_SHOOTING_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gMarket Shooting Gallery%w!",
GIMESSAGE(RG_MARKET_SHOOTING_KEY, ITEM_KEY_SMALL, "You found the key to the&%gMarket Shooting Gallery%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für die %gSchießbude des Marktes%w!",
"Vous obtenez la %rClé %wdu %gStand de&Tir de la Place du Marché%w!"),
GIMESSAGE(RG_BOMBCHU_BOWLING_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gBombchu Bowling Alley%w!",
GIMESSAGE(RG_BOMBCHU_BOWLING_KEY, ITEM_KEY_SMALL, "You found the key to the&%gBombchu Bowling Alley%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für die %gMinenbowlingbahn%w!",
"Vous obtenez la %rClé %wdu %gBowling&Teigneux%w!"),
GIMESSAGE(RG_TCG_BUILDING_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gTreasure Chest Game Building%w!",
GIMESSAGE(RG_TCG_BUILDING_KEY, ITEM_KEY_SMALL, "You found the key to the&%gTreasure Chest Game Building%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus des Schatzkisten-Pokers%w!",
"Vous obtenez la %rClé %wdu %gJeu de la&Chasse au Trésor%w!"),
GIMESSAGE(RG_BOMBCHU_SHOP_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gBombchu Shop%w!",
GIMESSAGE(RG_BOMBCHU_SHOP_KEY, ITEM_KEY_SMALL, "You found the key to the&%gBombchu Shop%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gKrabbelminenladen%w!",
"Vous obtenez la %rClé %wdu %gMagasin&de Missiles%w!"),
GIMESSAGE(RG_RICHARDS_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to&%gRichard's House%w!",
GIMESSAGE(RG_RICHARDS_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to&%gRichard's House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus von Richard%w!",
"Vous obtenez la %rClé %wde la %gMaison&de Kiki%w!"),
GIMESSAGE(RG_ALLEY_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to&the %gAlley House%w!",
GIMESSAGE(RG_ALLEY_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to&the %gAlley House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus in der Gasse%w!",
"Vous obtenez la %rClé %wde la %gMaison&de la Ruelle%w!"),
GIMESSAGE(RG_KAK_BAZAAR_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gKakariko Bazaar%w!",
GIMESSAGE(RG_KAK_BAZAAR_KEY, ITEM_KEY_SMALL, "You found the key to the&%gKakariko Bazaar%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gBasar von Kakariko%w!",
"Vous obtenez la %rClé %wdu %gBazar&de Cocorico%w!"),
GIMESSAGE(RG_KAK_POTION_SHOP_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gKakariko Potion Shop%w!",
GIMESSAGE(RG_KAK_POTION_SHOP_KEY, ITEM_KEY_SMALL, "You found the key to the&%gKakariko Potion Shop%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gMagie-Laden von Kakariko%w!",
"Vous obtenez la %rClé %wdu %gMagasin de&Potions de Cocorico%w!"),
GIMESSAGE(RG_BOSS_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gBoss's House%w!",
GIMESSAGE(RG_BOSS_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to the&%gBoss's House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus des Chefs%w!",
"Vous obtenez la %rClé %wde la %gMaison&du chef des ouvriers%w!"),
GIMESSAGE(RG_GRANNYS_POTION_SHOP_KEY, ITEM_KEY_SMALL,
"You found the key to&%gGranny's Potion Shop%w!",
GIMESSAGE(RG_GRANNYS_POTION_SHOP_KEY, ITEM_KEY_SMALL, "You found the key to&%gGranny's Potion Shop%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für %gAsas Hexenladen%w!",
"Vous obtenez la %rClé %wde&l'%gApothicaire%w!"),
GIMESSAGE(RG_SKULLTULA_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gSkulltula House%w!",
GIMESSAGE(RG_SKULLTULA_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to the&%gSkulltula House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gSkulltula-Haus%w!",
"Vous obtenez la %rClé %wde la %gMaison&des Araignées%w!"),
GIMESSAGE(RG_IMPAS_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to&%gImpa's House%w!",
GIMESSAGE(RG_IMPAS_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to&%gImpa's House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus von Impa%w!",
"Vous obtenez la %rClé %wde la %gMaison&d'Impa%w!"),
GIMESSAGE(RG_WINDMILL_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gWindmill%w!",
GIMESSAGE(RG_WINDMILL_KEY, ITEM_KEY_SMALL, "You found the key to the&%gWindmill%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für die %gWindmühle%w!",
"Vous obtenez la %rClé %w du %gMoulin%w!"),
GIMESSAGE(RG_KAK_SHOOTING_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gKakariko Shooting Gallery%w!",
GIMESSAGE(RG_KAK_SHOOTING_KEY, ITEM_KEY_SMALL, "You found the key to the&%gKakariko Shooting Gallery%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für die %gSchießbude von Kakariko%w!",
"Vous obtenez la %rClé %w du %gStand de&Tir de Cocorico%w!"),
GIMESSAGE(RG_DAMPES_HUT_KEY, ITEM_KEY_SMALL,
"You found the key to&%gDampe's Hut%w!",
GIMESSAGE(RG_DAMPES_HUT_KEY, ITEM_KEY_SMALL, "You found the key to&%gDampe's Hut%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für die %gHütte von Boris%w!",
"Vous obtenez la %rClé %wde la %gCabane&d'Igor%w!"),
GIMESSAGE(RG_TALONS_HOUSE_KEY, ITEM_KEY_SMALL,
"You found the key to&%gTalon's House%w!",
GIMESSAGE(RG_TALONS_HOUSE_KEY, ITEM_KEY_SMALL, "You found the key to&%gTalon's House%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHaus von Talon%w!",
"Vous obtenez la %rClé %wde la %gMaison&de Talon%w!"),
GIMESSAGE(RG_STABLES_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gStables%w!",
GIMESSAGE(RG_STABLES_KEY, ITEM_KEY_SMALL, "You found the key to the&%gStables%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für die %gStälle%w!",
"Vous obtenez la %rClé %wdes %gÉcuries%w!"),
GIMESSAGE(RG_BACK_TOWER_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gBack Tower%w!",
GIMESSAGE(RG_BACK_TOWER_KEY, ITEM_KEY_SMALL, "You found the key to the&%gBack Tower%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %ghinteren Turm%w!",
"Vous obtenez la %rClé %wdu %gSilo%w!"),
GIMESSAGE(RG_HYLIA_LAB_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gHylia Laboratory%w!",
GIMESSAGE(RG_HYLIA_LAB_KEY, ITEM_KEY_SMALL, "You found the key to the&%gHylia Laboratory%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für das %gHylia-Labor%w!",
"Vous obtenez la %rClé %wdu %gLaboratoire&du Lac Hylia%w!"),
GIMESSAGE(RG_FISHING_HOLE_KEY, ITEM_KEY_SMALL,
"You found the key to the&%gPond%w!",
GIMESSAGE(RG_FISHING_HOLE_KEY, ITEM_KEY_SMALL, "You found the key to the&%gPond%w!",
"Du erhältst einen %rkleinen&Schlüssel%w für den %gFischweiher%w!",
"Vous obtenez la %rClé %wde l'%gÉtang%w!"),
GIMESSAGE(RG_HIDEOUT_KEY_RING, ITEM_KEY_SMALL,
"You found a %yThieves Hideout&%wKeyring!",
GIMESSAGE(RG_HIDEOUT_KEY_RING, ITEM_KEY_SMALL, "You found a %yThieves Hideout&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für das %yDiebesversteck%w!",
"Vous obtenez le trousseau de&clés du %yRepaire des Voleurs%w!"),
GIMESSAGE(RG_FOREST_TEMPLE_KEY_RING, ITEM_KEY_SMALL,
"You found a %gForest Temple&%wKeyring!",
GIMESSAGE(RG_FOREST_TEMPLE_KEY_RING, ITEM_KEY_SMALL, "You found a %gForest Temple&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für den %gWaldtempel%w!",
"Vous obtenez le trousseau de&clés du %gTemple de la Forêt%w!"),
GIMESSAGE(RG_FIRE_TEMPLE_KEY_RING, ITEM_KEY_SMALL,
"You found a %rFire Temple&%wKeyring!",
GIMESSAGE(RG_FIRE_TEMPLE_KEY_RING, ITEM_KEY_SMALL, "You found a %rFire Temple&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für den %rFeuertempel%w!",
"Vous obtenez le trousseau de&clés du %rTemple du Feu%w!"),
GIMESSAGE(RG_WATER_TEMPLE_KEY_RING, ITEM_KEY_SMALL,
"You found a %bWater Temple&%wKeyring!",
GIMESSAGE(RG_WATER_TEMPLE_KEY_RING, ITEM_KEY_SMALL, "You found a %bWater Temple&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für den %bWassertempel%w!",
"Vous obtenez le trousseau de&clés du %bTemple de l'Eau%w!"),
GIMESSAGE(RG_SPIRIT_TEMPLE_KEY_RING, ITEM_KEY_SMALL,
"You found a %ySpirit Temple&%wKeyring!",
GIMESSAGE(RG_SPIRIT_TEMPLE_KEY_RING, ITEM_KEY_SMALL, "You found a %ySpirit Temple&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für den %yGeistertempel%w!",
"Vous obtenez le trousseau de&clés du %yTemple de l'Esprit%w!"),
GIMESSAGE(RG_SHADOW_TEMPLE_KEY_RING, ITEM_KEY_SMALL,
"You found a %pShadow Temple&%wKeyring!",
GIMESSAGE(RG_SHADOW_TEMPLE_KEY_RING, ITEM_KEY_SMALL, "You found a %pShadow Temple&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für den %pSchattentempel%w!",
"Vous obtenez le trousseau de&clés du %pTemple de l'Ombre%w!"),
GIMESSAGE(RG_BOTW_KEY_RING, ITEM_KEY_SMALL,
"You found a %pBottom of the&Well %wKeyring!",
GIMESSAGE(RG_BOTW_KEY_RING, ITEM_KEY_SMALL, "You found a %pBottom of the&Well %wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für den %pGrund des Brunnens%w!",
"Vous obtenez le trousseau de&clés du %pPuits%w!"),
GIMESSAGE(RG_GTG_KEY_RING, ITEM_KEY_SMALL,
"You found a %yGerudo Training&Ground %wKeyring!",
GIMESSAGE(RG_GTG_KEY_RING, ITEM_KEY_SMALL, "You found a %yGerudo Training&Ground %wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für das %yGerudo-Trainingsgelände%w!",
"Vous obtenez le trousseau de&clés du %yGymnase Gerudo%w!"),
GIMESSAGE(RG_GANONS_CASTLE_KEY_RING, ITEM_KEY_SMALL,
"You found a %rGanon's Castle&%wKeyring!",
GIMESSAGE(RG_GANONS_CASTLE_KEY_RING, ITEM_KEY_SMALL, "You found a %rGanon's Castle&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w&für %rGanons Schloß%w!",
"Vous obtenez le trousseau de&clés du %rChâteau de Ganon%w!"),
GIMESSAGE(RG_TCG_KEY_RING, ITEM_KEY_SMALL,
"You found a %rTreasure Chest Game&%wKeyring!",
GIMESSAGE(RG_TCG_KEY_RING, ITEM_KEY_SMALL, "You found a %rTreasure Chest Game&%wKeyring!",
"Du erhältst ein %rSchlüsselbund%w& für das %rSchatztruhen-Poker&%w!",
"Vous obtenez le trousseau de&clés du %rJeu de la Chasse au Trésor%w!"),
@ -5378,85 +5353,65 @@ void Randomizer::CreateCustomMessages() {
"Du erhältst den %rMaster-Schlüssel%w&für %rGanons Schloß%w!",
"Vous obtenez la %rClé d'or %wdu&%rChâteau de Ganon%w!"),
GIMESSAGE(RG_DEKU_TREE_MAP, ITEM_DUNGEON_MAP,
"You found the %gDeku Tree&%wMap![[typeHint]]",
GIMESSAGE(RG_DEKU_TREE_MAP, ITEM_DUNGEON_MAP, "You found the %gDeku Tree&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%gDeku-Baum%w![[typeHint]]",
"Vous obtenez la %rCarte %wde&l'%gArbre Mojo%w![[typeHint]]"),
GIMESSAGE(RG_DODONGOS_CAVERN_MAP, ITEM_DUNGEON_MAP,
"You found the %rDodongo's Cavern&%wMap![[typeHint]]",
GIMESSAGE(RG_DODONGOS_CAVERN_MAP, ITEM_DUNGEON_MAP, "You found the %rDodongo's Cavern&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für&%rDodongos Höhle%w![[typeHint]]",
"Vous obtenez la %rCarte %wde la&%rCaverne Dodongo%w![[typeHint]]"),
GIMESSAGE(RG_JABU_JABUS_BELLY_MAP, ITEM_DUNGEON_MAP,
"You found the %bJabu Jabu's Belly&%wMap![[typeHint]]",
GIMESSAGE(RG_JABU_JABUS_BELLY_MAP, ITEM_DUNGEON_MAP, "You found the %bJabu Jabu's Belly&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für&%bJabu-Jabus Bauch%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%bVentre de Jabu-Jabu%w![[typeHint]]"),
GIMESSAGE(RG_FOREST_TEMPLE_MAP, ITEM_DUNGEON_MAP,
"You found the %gForest Temple&%wMap![[typeHint]]",
GIMESSAGE(RG_FOREST_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %gForest Temple&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%gWaldtempel%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%gTemple de la Forêt%w![[typeHint]]"),
GIMESSAGE(RG_FIRE_TEMPLE_MAP, ITEM_DUNGEON_MAP,
"You found the %rFire Temple&%wMap![[typeHint]]",
GIMESSAGE(RG_FIRE_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %rFire Temple&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%rFeuertempel%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%rTemple du Feu%w![[typeHint]]"),
GIMESSAGE(RG_WATER_TEMPLE_MAP, ITEM_DUNGEON_MAP,
"You found the %bWater Temple&%wMap![[typeHint]]",
GIMESSAGE(RG_WATER_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %bWater Temple&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%bWassertempel%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%bTemple de l'Eau%w![[typeHint]]"),
GIMESSAGE(RG_SPIRIT_TEMPLE_MAP, ITEM_DUNGEON_MAP,
"You found the %ySpirit Temple&%wMap![[typeHint]]",
GIMESSAGE(RG_SPIRIT_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %ySpirit Temple&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%yGeistertempel%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%yTemple de l'Esprit%w![[typeHint]]"),
GIMESSAGE(RG_SHADOW_TEMPLE_MAP, ITEM_DUNGEON_MAP,
"You found the %pShadow Temple&%wMap![[typeHint]]",
GIMESSAGE(RG_SHADOW_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %pShadow Temple&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%pSchattentempel%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%pTemple de l'Ombre%w![[typeHint]]"),
GIMESSAGE(RG_BOTW_MAP, ITEM_DUNGEON_MAP,
"You found the %pBottom of the&Well %wMap![[typeHint]]",
GIMESSAGE(RG_BOTW_MAP, ITEM_DUNGEON_MAP, "You found the %pBottom of the&Well %wMap![[typeHint]]",
"Du erhältst die %rKarte%w für den&%pGrund des Brunnens%w![[typeHint]]",
"Vous obtenez la %rCarte %wdu&%pPuits%w![[typeHint]]"),
GIMESSAGE(RG_ICE_CAVERN_MAP, ITEM_DUNGEON_MAP,
"You found the %cIce Cavern&%wMap![[typeHint]]",
GIMESSAGE(RG_ICE_CAVERN_MAP, ITEM_DUNGEON_MAP, "You found the %cIce Cavern&%wMap![[typeHint]]",
"Du erhältst die %rKarte%w für die&%cEishöhle%w![[typeHint]]",
"Vous obtenez la %rCarte %wde&la %cCaverne Polaire%w![[typeHint]]"),
GIMESSAGE(RG_DEKU_TREE_COMPASS, ITEM_COMPASS,
"You found the %gDeku Tree&%wCompass!",
GIMESSAGE(RG_DEKU_TREE_COMPASS, ITEM_COMPASS, "You found the %gDeku Tree&%wCompass!",
"Du erhältst den %rKompaß%w für den&%gDeku-Baum%w!",
"Vous obtenez la %rBoussole %wde&l'%gArbre Mojo%w!"),
GIMESSAGE(RG_DODONGOS_CAVERN_COMPASS, ITEM_COMPASS,
"You found the %rDodongo's Cavern&%wCompass!",
GIMESSAGE(RG_DODONGOS_CAVERN_COMPASS, ITEM_COMPASS, "You found the %rDodongo's Cavern&%wCompass!",
"Du erhältst den %rKompaß%w für&%rDodongos Höhle%w!",
"Vous obtenez la %rBoussole %wde la&%rCaverne Dodongo%w!"),
GIMESSAGE(RG_JABU_JABUS_BELLY_COMPASS, ITEM_COMPASS,
"You found the %bJabu Jabu's Belly&%wCompass!",
GIMESSAGE(RG_JABU_JABUS_BELLY_COMPASS, ITEM_COMPASS, "You found the %bJabu Jabu's Belly&%wCompass!",
"Du erhältst den %rKompaß%w für den&%bJabu-Jabus Bauch%w!",
"Vous obtenez la %rBoussole %wdu&%bVentre de Jabu-Jabu%w!"),
GIMESSAGE(RG_FOREST_TEMPLE_COMPASS, ITEM_COMPASS,
"You found the %gForest Temple&%wCompass!",
GIMESSAGE(RG_FOREST_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %gForest Temple&%wCompass!",
"Du erhältst den %rKompaß%w für den&%gWaldtempel%w!",
"Vous obtenez la %rBoussole %wdu&%gTemple de la Forêt%w!"),
GIMESSAGE(RG_FIRE_TEMPLE_COMPASS, ITEM_COMPASS,
"You found the %rFire Temple&%wCompass!",
GIMESSAGE(RG_FIRE_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %rFire Temple&%wCompass!",
"Du erhältst den %rKompaß%w für den&%rFeuertempel%w!",
"Vous obtenez la %rBoussole %wdu&%rTemple du Feu%w!"),
GIMESSAGE(RG_WATER_TEMPLE_COMPASS, ITEM_COMPASS,
"You found the %bWater Temple&%wCompass!",
GIMESSAGE(RG_WATER_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %bWater Temple&%wCompass!",
"Du erhältst den %rKompaß%w für den&%bWassertempel%w!",
"Vous obtenez la %rBoussole %wdu&%bTemple de l'Eau%w!"),
GIMESSAGE(RG_SPIRIT_TEMPLE_COMPASS, ITEM_COMPASS,
"You found the %ySpirit Temple&%wCompass!",
GIMESSAGE(RG_SPIRIT_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %ySpirit Temple&%wCompass!",
"Du erhältst den %rKompaß%w für den&%yGeistertempel%w!",
"Vous obtenez la %rBoussole %wdu&%yTemple de l'Esprit%w!"),
GIMESSAGE(RG_SHADOW_TEMPLE_COMPASS, ITEM_COMPASS,
"You found the %pShadow Temple&%wCompass!",
GIMESSAGE(RG_SHADOW_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %pShadow Temple&%wCompass!",
"Du erhältst den %rKompaß%w für den&%pSchattentempel%w!",
"Vous obtenez la %rBoussole %wdu&%pTemple de l'Ombre%w!"),
GIMESSAGE(RG_BOTW_COMPASS, ITEM_COMPASS,
"You found the %pBottom of the&Well %wCompass!",
GIMESSAGE(RG_BOTW_COMPASS, ITEM_COMPASS, "You found the %pBottom of the&Well %wCompass!",
"Du erhältst den %rKompaß%w für den&%pGrund des Brunnens%w!",
"Vous obtenez la %rBoussole %wdu&%pPuits%w!"),
GIMESSAGE(RG_ICE_CAVERN_COMPASS, ITEM_COMPASS,
"You found the %cIce Cavern&%wCompass!",
GIMESSAGE(RG_ICE_CAVERN_COMPASS, ITEM_COMPASS, "You found the %cIce Cavern&%wCompass!",
"Du erhältst den %rKompaß%w für die&%cEishöhle%w!",
"Vous obtenez la %rBoussole %wde&la %cCaverne Polaire%w!"),

View file

@ -1809,7 +1809,9 @@ void DrawLocation(RandomizerCheck rc) {
txt = itemLoc->GetPlacedItem().GetName().GetForCurrentLanguage(MF_RAW);
} else {
if (IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID())) {
txt = Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetName().GetForCurrentLanguage(MF_RAW);
txt = Rando::StaticData::RetrieveItem(loc->GetVanillaItem())
.GetName()
.GetForCurrentLanguage(MF_RAW);
}
}
break;
@ -1838,7 +1840,9 @@ void DrawLocation(RandomizerCheck rc) {
}
} else {
if (IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID())) {
txt = Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetName().GetForCurrentLanguage(MF_RAW);
txt = Rando::StaticData::RetrieveItem(loc->GetVanillaItem())
.GetName()
.GetForCurrentLanguage(MF_RAW);
}
}
break;

View file

@ -233,13 +233,14 @@ StaticData::PopulateTranslationMap(std::unordered_map<uint32_t, CustomMessage> i
return output;
}
std::unordered_map<std::string, uint32_t> StaticData::PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input){
std::unordered_map<std::string, uint32_t>
StaticData::PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input) {
std::unordered_map<std::string, uint32_t> output = {};
for (const auto& [key, text] : input) {
std::vector<std::string> strings = hintTextTable[text].GetClear().GetAllMessages();
for (std::string string: strings){
if (output.contains(string)){
if (output[string] != key && string != ""){
for (std::string string : strings) {
if (output.contains(string)) {
if (output[string] != key && string != "") {
SPDLOG_DEBUG("\tREPEATED STRING WITH " + string + "\n\n");
}
} else {

View file

@ -558,8 +558,8 @@ void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool f
std::vector<RandomizerGet> items = hint->GetHintedItems();
SaveManager::Instance->SaveArray("items", items.size(), [&](size_t i) {
SaveManager::Instance->SaveData("",
Rando::StaticData::GetItemTable()[items[i]].GetName().GetEnglish(MF_RAW));
SaveManager::Instance->SaveData(
"", Rando::StaticData::GetItemTable()[items[i]].GetName().GetEnglish(MF_RAW));
});
std::vector<uint8_t> itemNamesChosen = hint->GetItemNamesChosen();