mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
fix: use trick names for scrub and house of skulltula hints (#2528)
* update writealllocations to always write trickname and start seeing where things break * handle simple vs complex items * always grab a trick name --------- Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
parent
df6da69f7d
commit
95fe6b492b
@ -726,42 +726,39 @@ static void WriteAllLocations(int language) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eventually check for other things here like fake name
|
// If it's a simple item (not an ice trap, doesn't have a price)
|
||||||
if (location->HasScrubsanityPrice() || location->HasShopsanityPrice()) {
|
// just add the name of the item and move on
|
||||||
jsonData["locations"][location->GetName()]["item"] = placedItemName;
|
if (!location->HasScrubsanityPrice() &&
|
||||||
if (location->GetPlacedItemKey() == ICE_TRAP && location->IsCategory(Category::cShop)) {
|
!location->HasShopsanityPrice() &&
|
||||||
switch (language) {
|
location->GetPlacedItemKey() != ICE_TRAP) {
|
||||||
case 0:
|
|
||||||
default:
|
|
||||||
jsonData["locations"][location->GetName()]["model"] =
|
|
||||||
ItemFromGIID(iceTrapModels[location->GetRandomizerCheck()]).GetName().english;
|
|
||||||
jsonData["locations"][location->GetName()]["trickName"] =
|
|
||||||
NonShopItems[TransformShopIndex(GetShopIndex(key))].Name.english;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
jsonData["locations"][location->GetName()]["model"] =
|
|
||||||
ItemFromGIID(iceTrapModels[location->GetRandomizerCheck()]).GetName().french;
|
|
||||||
jsonData["locations"][location->GetName()]["trickName"] =
|
|
||||||
NonShopItems[TransformShopIndex(GetShopIndex(key))].Name.french;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsonData["locations"][location->GetName()]["price"] = location->GetPrice();
|
|
||||||
} else if (location->GetPlacedItemKey() == ICE_TRAP && iceTrapModels.contains(location->GetRandomizerCheck())) {
|
|
||||||
jsonData["locations"][location->GetName()]["item"] = placedItemName;
|
|
||||||
switch (language) {
|
|
||||||
case 0:
|
|
||||||
default:
|
|
||||||
jsonData["locations"][location->GetName()]["model"] =
|
|
||||||
ItemFromGIID(iceTrapModels[location->GetRandomizerCheck()]).GetName().english;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
jsonData["locations"][location->GetName()]["model"] =
|
|
||||||
ItemFromGIID(iceTrapModels[location->GetRandomizerCheck()]).GetName().french;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
jsonData["locations"][location->GetName()] = placedItemName;
|
jsonData["locations"][location->GetName()] = placedItemName;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We're dealing with a complex item, build out the json object for it
|
||||||
|
jsonData["locations"][location->GetName()]["item"] = placedItemName;
|
||||||
|
|
||||||
|
if (location->HasScrubsanityPrice() || location->HasShopsanityPrice()) {
|
||||||
|
jsonData["locations"][location->GetName()]["price"] = location->GetPrice();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location->GetPlacedItemKey() == ICE_TRAP) {
|
||||||
|
switch (language) {
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
jsonData["locations"][location->GetName()]["model"] =
|
||||||
|
ItemFromGIID(iceTrapModels[location->GetRandomizerCheck()]).GetName().english;
|
||||||
|
jsonData["locations"][location->GetName()]["trickName"] =
|
||||||
|
GetIceTrapName(iceTrapModels[location->GetRandomizerCheck()]).english;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
jsonData["locations"][location->GetName()]["model"] =
|
||||||
|
ItemFromGIID(iceTrapModels[location->GetRandomizerCheck()]).GetName().french;
|
||||||
|
jsonData["locations"][location->GetName()]["trickName"] =
|
||||||
|
GetIceTrapName(iceTrapModels[location->GetRandomizerCheck()]).french;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user