Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ body {
padding: 0 2px;
}

.check-tracker .starting-age--unselected {
color: #ffc107;
}

.check-tracker .starting-age-prompt {
font-size: 0.75em;
padding: 0 2px;
color: #ffc107;
}

/** *************************************** */
/** Requirements Tooltip */
/** *************************************** */
Expand Down
15 changes: 14 additions & 1 deletion src/scenes/Checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const Checks = () => {
return (
<div id="checks" className="check-tracker" style={{ backgroundColor: layoutContext.layoutConfig.backgroundColor }}>
<Buttons efkActive={efkActive} type={type} setType={setType} />
<StartingAgePrompt />
<LocationsList
actions={actions}
countLocations={countLocations}
Expand Down Expand Up @@ -415,6 +416,18 @@ const Info = ({ locationsCounter }) => {
);
};

// Until the player picks a starting age, every check evaluates as inaccessible,
// so tell them why the regions look empty.
const StartingAgePrompt = () => {
const { startingAge } = useStartingAge();

if (!SettingsHelper.needsStartingAgeSelection() || startingAge) {
return null;
}

return <div className="starting-age-prompt mb-2">Select starting age to see available checks.</div>;
};

// With Closed Door of Time and a random starting age, nothing is reachable until the
// player picks starting age.
const StartingAge = () => {
Expand All @@ -425,7 +438,7 @@ const StartingAge = () => {
}

return (
<div className="starting-age">
<div className={`starting-age${startingAge ? "" : " starting-age--unselected"}`}>
<span className="me-2">Starting age</span>
{["child", "adult"].map(age => (
<button
Expand Down
10 changes: 5 additions & 5 deletions src/utils/locations.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,16 @@ class Locations {
return false;
}

// Song from Impa
else if (location.locationName === "Song from Impa") {
return !SettingsHelper.getRenamedAttribute("skip_child_zelda");
}

// Disabled Locations
else if (SettingsHelper.isDisabledLocation(location.locationName)) {
return false;
}

// Song from Impa
else if (location.locationName === "Song from Impa") {
return !SettingsHelper.getRenamedAttribute("skip_child_zelda");
}

// Always Placed Items
else if (this._isAlwaysPlacedLocation(location)) {
return false;
Expand Down
21 changes: 16 additions & 5 deletions src/utils/logic-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ class LogicHelper {
// Share renamedAttributes with SettingsHelper to break circular dependency
SettingsHelper.setRenamedAttributes(this.renamedAttributes);

// Fenhl's fork splits open_forest into two booleans (open_forest = can
// leave the forest, open_deku = Deku Tree open). Stable expects a
// single string enum, so translate the bools back into the enum.
if (typeof this.settings.open_forest === "boolean") {
const openForest = this.settings.open_forest;
const openDeku = this.settings.open_deku;
_.set(this.settings, "open_forest", openDeku ? "open" : openForest ? "closed_deku" : "closed");
}

if (
this.settings.open_forest === "closed" &&
(this.renamedAttributes.shuffle_special_interior_entrances ||
Expand Down Expand Up @@ -769,11 +778,13 @@ class LogicHelper {
case "Weird_Egg":
return this.items[name] > 0 || this._hasLaterChildTradeItem("Weird_Egg");
case "Zeldas_Letter":
return (
this.items[name] > 0 ||
this.renamedAttributes.skip_child_zelda ||
this.isLocationAvailable("HC Zeldas Letter")
);
if (this.items[name] > 0 || this.renamedAttributes.skip_child_zelda) {
return true;
}
if (SettingsHelper.hasShuffleChildTrade("Zeldas Letter")) {
return false;
}
return this.isLocationAvailable("HC Zeldas Letter");
}

if (name in MASK_LOCATIONS) {
Expand Down
Loading