mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Merge branch 'develop' into ItemName
This commit is contained in:
commit
bd6d4cddfc
159 changed files with 1232 additions and 597 deletions
|
@ -1886,16 +1886,16 @@ static std::set<std::string> rainbowCVars = {
|
|||
|
||||
int hue = 0;
|
||||
void RainbowTick() {
|
||||
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
|
||||
float freqHue = hue * 2 * M_PIf / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
|
||||
for (auto& cvar : rainbowCVars) {
|
||||
if (CVarGetInteger((cvar + ".Rainbow").c_str(), 0) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Color_RGBA8 newColor;
|
||||
newColor.r = sin(freqHue + 0) * 127 + 128;
|
||||
newColor.g = sin(freqHue + (2 * M_PI / 3)) * 127 + 128;
|
||||
newColor.b = sin(freqHue + (4 * M_PI / 3)) * 127 + 128;
|
||||
newColor.r = static_cast<uint8_t>(sin(freqHue + 0) * 127) + 128;
|
||||
newColor.g = static_cast<uint8_t>(sin(freqHue + (2 * M_PI / 3)) * 127) + 128;
|
||||
newColor.b = static_cast<uint8_t>(sin(freqHue + (4 * M_PI / 3)) * 127) + 128;
|
||||
newColor.a = 255;
|
||||
|
||||
CVarSetColor((cvar + ".Value").c_str(), newColor);
|
||||
|
@ -1961,7 +1961,7 @@ void RecalculateAvailableChecks() {
|
|||
StartPerformanceTimer(PT_RECALCULATE_AVAILABLE_CHECKS);
|
||||
|
||||
std::vector<RandomizerCheck> targetLocations;
|
||||
targetLocations.reserve(RR_MAX);
|
||||
targetLocations.reserve(RC_MAX);
|
||||
for (auto& location : Rando::StaticData::GetLocationTable()) {
|
||||
RandomizerCheck rc = location.GetRandomizerCheck();
|
||||
Rando::ItemLocation* itemLocation = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc);
|
||||
|
@ -1973,15 +1973,8 @@ void RecalculateAvailableChecks() {
|
|||
|
||||
std::vector<RandomizerCheck> availableChecks = ReachabilitySearch(targetLocations, RG_NONE, true);
|
||||
for (auto& rc : availableChecks) {
|
||||
const auto& location = Rando::StaticData::GetLocation(rc);
|
||||
const auto& itemLocation = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc);
|
||||
if (location->GetRCType() == RCTYPE_SHOP && itemLocation->GetCheckStatus() == RCSHOW_IDENTIFIED) {
|
||||
if (CanBuyAnother(rc)) {
|
||||
itemLocation->SetAvailable(true);
|
||||
}
|
||||
} else {
|
||||
itemLocation->SetAvailable(true);
|
||||
}
|
||||
itemLocation->SetAvailable(true);
|
||||
}
|
||||
|
||||
totalChecksAvailable = 0;
|
||||
|
@ -2108,7 +2101,10 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
|||
"with your current progress.")
|
||||
.Color(THEME_COLOR))) {
|
||||
enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0);
|
||||
RecalculateAvailableChecks();
|
||||
|
||||
if (GameInteractor::IsSaveLoaded(true)) {
|
||||
RecalculateAvailableChecks();
|
||||
}
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue