diff --git a/Input.js b/Input.js index 6ff1ac2..a1a76ea 100644 --- a/Input.js +++ b/Input.js @@ -1972,7 +1972,7 @@ function doGoToLocation(command) { } function doGetLocation(command) { - state.show = "none" + state.show = "location" return `\n[You are at ${state.location == null ? "" : "the location " + toTitleCase(state.location) + " "}(${state.x},${state.y})]` } diff --git a/Output.js b/Output.js index daafa52..6cf5b39 100644 --- a/Output.js +++ b/Output.js @@ -221,6 +221,21 @@ const modifier = (text) => { } text += "******************\n\n" break + case "location": + var localLocations = [] + for (location of state.locations) { + if (location.x == state.x && location.y == state.y) localLocations.push(location) + } + + if (localLocations.length > 0) { + text += "Places of interest here:\n" + for (location of localLocations) { + text += `* ${location.name}\n` + } + } else { + text += " " + } + break case "locations": text += `Player location: ${state.location == null ? "" : state.location + " "}(${state.x},${state.y})\n` text += `*** LOCATIONS ***\n`