Open curiousdannii-testing opened 2 years ago
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by zarf :
While I'm in here, I notice that "number of moves from" inconsistently returns 0 when one room or the other is nothing. It should return -1.
This is a fairly common case when the code looks like "number of moves from the location of X to the location of Y". If Y is out of play, this should return -1.
The problem is that MapRouteTo() has some fail-early checks which always return nothing. They should look like "if (count) return -1; else return nothing;"
Reported by : zarf
Description :
The documentation and phrase specs for these phrases are defined for "objects", but the implementation only works on rooms. If you try to use them on things, you get nonsensical results.
The phrases should either be limited to rooms, or the top-level call (MapRouteTo) should do a "location of..." canonicalization on non-room arguments.
Steps to reproduce :
Additional information :
imported from: [Mantis 2062] "best route" and "number of moves" don't work on things