mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-05 05:00:26 -04:00
Added places of interest to #location. Resolves #69
This commit is contained in:
parent
ac71bbad3e
commit
264ced0e08
2 changed files with 16 additions and 1 deletions
15
Output.js
15
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`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue