I’m working different ways to do route-finding and was trying to use conditional statements in order to find the best route which the actor has access to (taking into account things like what keys they are carrying and whatnot). Here’s a somewhat simplified version of what I’m trying to do:
Laboratory is a room.
Closet is a room.
Closet Door is a door. It is west of the laboratory and east of the closet. It is open.
Traversability relates doors (called the door) to people (called the person) when the door is open. The verb to be traversable by means the traversability relation.
Walking to is an action applying to one visible thing.
Understand "Walk to [any room]" as walking to.
Carry out walking to:
showme whether or not the closet door is traversable by the player;
let x be the best route from the location to the noun through doors traversable by the player;
try going x.
The showme phrase is returning that the closet door is traversable by the player however the best route phrase keeps returning nothing. If I remember correctly the examples of using “through” in the documentation has to do with properties like ‘visited rooms’, is best route simply not meant to be used with conditional relations like this, or is there something else I’m doing wrong?