This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Command pre-flight checks


I have now checked in fixes to the new build command pre-flight code.
Setting a resume build task should now work, as should making more than one
unit build on the same target. The modal mode can now again be exited by
hitting the escape key. Finally, more feedback messages have been added so
that the user knows what he is supposed to do (i.e. click on the map again
if the first click fails).

You can get several kinds of build error messages. One is if there is no
room for a new unit in the selected cell. Another is if a mobile builder
cannot get within create-range of the target cell. This pre-flight check
uses the new path-finding code. A third kind of error is if an immobile
builder is out of build range.

More importantly, I have implemented the same pre-flight checks for the
move and move-to commands. This means that commands to move somewhere (by
using either 'm' or clicking on the map) may fail even before execution,
and the computer will in that case tell you why. You then get a second
chance to issue a correct command while staying in modal mode.  The most
common errors are that the terrain has no room for your unit, or that no
path exists that will take you there.

This is how unit type selection already works in the tcltk interface (the
computer will beep if you hit an invalid key and give you a second chance)
so it should not be too difficult to adapt to. It does save a lot of time
since you don't have to reissue the 'P' or 'm' command if you make a
mistake.

The ability to issue certain commands is affected right now by two bugs in
the path-finding code :

1. Failure of units to exit transports when you click several cells away.
This bug appeared quite recently. We should be able to track down exactly
when.

2. Path-finding does not work for transported units, i.e. if you click on
the other side of the sea, you will always get a no-path error, even if the
unit is sitting on a ship that is on its way to the destination. Hopefully,
the improved path-finding code that Peter is working on will fix that.

These two bugs have nothing to do with the new command pre-flight checks,
but there may well be more bugs in the latter code, too, that remain to be
found. Bug reports are welcome.

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]