Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002062Core InformKinds and type checkingpublic2018-07-04 08:222018-07-04 08:31
Assigned To 
PrioritynormalSeveritymildReproducibilityhave not tried
PlatformOSOS Version
Product Version6M62 
Target VersionFixed in Version 
Summary0002062: "best route" and "number of moves" don't work on things
DescriptionThe 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.

Minimal Source Text To Reproduce
The Kitchen is a room.
The Dining Room is east of the Kitchen.
The Bathroom is south of the Dining Room.
The tub is in the Bathroom.

Every turn:
	showme the number of moves from the player to the tub;
	showme the best route from the player to the tub.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
zarf (developer)
2018-07-04 08:31

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;"

- Issue History
Date Modified Username Field Change
2018-07-04 08:22 zarf New Issue
2018-07-04 08:31 zarf Note Added: 0004784

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker