Fix bug where location names aren't recognized

This commit is contained in:
Andrew Miner
2018-05-28 20:58:34 -06:00
parent c3a66b1bc6
commit ea93b42eef
+1 -1
View File
@@ -327,7 +327,7 @@ class Parser
throw new ParseError("You can't go #{rawWord} from here.") throw new ParseError("You can't go #{rawWord} from here.")
for direction, transition of @story.currentLocation.transitions for direction, transition of @story.currentLocation.transitions
if transition.toLocation.name.indexOf(rawWord) isnt -1 if transition.toLocation.name.toLowerCase().indexOf(rawWord) isnt -1
candidates.add(transition.toLocation) candidates.add(transition.toLocation)
if @story.currentLocation.name.indexOf(rawWord) isnt -1 if @story.currentLocation.name.indexOf(rawWord) isnt -1