mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-11 21:00:12 -05:00
parent
d77e810aae
commit
6d10e6b9f8
@ -163,8 +163,8 @@ static int GetMaxGSCount() {
|
|||||||
else if (Location(KAK_10_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() && Location(KAK_10_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
|
else if (Location(KAK_10_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() && Location(KAK_10_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
|
||||||
maxUseful = 10;
|
maxUseful = 10;
|
||||||
}
|
}
|
||||||
//Return max of the two possible reasons tokens could be important
|
//Return max of the two possible reasons tokens could be important, minus the tokens in the starting inventory
|
||||||
return std::max(maxUseful, maxBridge);
|
return std::max(maxUseful, maxBridge) - StartingSkulltulaToken.Value<uint8_t>();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetShopItemBaseName(std::string itemName) {
|
std::string GetShopItemBaseName(std::string itemName) {
|
||||||
@ -772,7 +772,7 @@ static void RandomizeOwnDungeon(const Dungeon::DungeonInfo* dungeon) {
|
|||||||
|
|
||||||
//Add specific items that need be randomized within this dungeon
|
//Add specific items that need be randomized within this dungeon
|
||||||
if (Keysanity.Is(KEYSANITY_OWN_DUNGEON) && dungeon->GetSmallKey() != NONE) {
|
if (Keysanity.Is(KEYSANITY_OWN_DUNGEON) && dungeon->GetSmallKey() != NONE) {
|
||||||
std::vector<uint32_t> dungeonSmallKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const uint32_t i){ return i == dungeon->GetSmallKey();});
|
std::vector<uint32_t> dungeonSmallKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const uint32_t i){ return (i == dungeon->GetSmallKey()) || (i == dungeon->GetKeyRing());});
|
||||||
AddElementsToPool(dungeonItems, dungeonSmallKeys);
|
AddElementsToPool(dungeonItems, dungeonSmallKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -813,10 +813,10 @@ static void RandomizeDungeonItems() {
|
|||||||
|
|
||||||
for (auto dungeon : dungeonList) {
|
for (auto dungeon : dungeonList) {
|
||||||
if (Keysanity.Is(KEYSANITY_ANY_DUNGEON)) {
|
if (Keysanity.Is(KEYSANITY_ANY_DUNGEON)) {
|
||||||
auto dungeonKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const uint32_t i){return i == dungeon->GetSmallKey();});
|
auto dungeonKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const uint32_t i){return (i == dungeon->GetSmallKey()) || (i == dungeon->GetKeyRing());});
|
||||||
AddElementsToPool(anyDungeonItems, dungeonKeys);
|
AddElementsToPool(anyDungeonItems, dungeonKeys);
|
||||||
} else if (Keysanity.Is(KEYSANITY_OVERWORLD)) {
|
} else if (Keysanity.Is(KEYSANITY_OVERWORLD)) {
|
||||||
auto dungeonKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const uint32_t i){return i == dungeon->GetSmallKey();});
|
auto dungeonKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const uint32_t i){return (i == dungeon->GetSmallKey()) || (i == dungeon->GetKeyRing());});
|
||||||
AddElementsToPool(overworldItems, dungeonKeys);
|
AddElementsToPool(overworldItems, dungeonKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ void MenuUpdate(uint32_t kDown, bool updatedByHeld) {
|
|||||||
kDown = 0;
|
kDown = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentMenu->mode != GENERATE_MODE) {
|
if (currentMenu->mode != POST_GENERATE) {
|
||||||
|
|
||||||
// New Random Seed
|
// New Random Seed
|
||||||
if (kDown & KEY_Y) {
|
if (kDown & KEY_Y) {
|
||||||
|
@ -53,7 +53,7 @@ bool CreatePresetDirectories() {
|
|||||||
std::vector<std::string> GetSettingsPresets() {
|
std::vector<std::string> GetSettingsPresets() {
|
||||||
std::vector<std::string> presetEntries = {};
|
std::vector<std::string> presetEntries = {};
|
||||||
for (const auto& entry : fs::directory_iterator(GetBasePath(OptionCategory::Setting))) {
|
for (const auto& entry : fs::directory_iterator(GetBasePath(OptionCategory::Setting))) {
|
||||||
if(entry.path().stem().string() != CACHED_SETTINGS_FILENAME) {
|
if(entry.is_regular_file() && entry.path().stem().string() != CACHED_SETTINGS_FILENAME) {
|
||||||
presetEntries.push_back(entry.path().stem().string());
|
presetEntries.push_back(entry.path().stem().string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user