autonav: Remove the feature
The autonavigation feature has issues: * Autonavigation orders are executed at the update. Crafty players can use them to get around the update window. * Usability is poor: - The order command is overly complex, not least because it can do five different things: clear, suspend, resume, declare route, set cargo levels. - Unlike every other command involving movement, order does not let you specify routes, only destination sectors. - Setting cargo levels can silently swap start and end point of a circular route, because "this keeps the load_it() procedure happy". Maybe it does, but it surely keeps players confused. - Setting "start" cargo levels actually sets the "end" levels, and vice versa. Has always been broken that way. - Predicting what exactly autonavigation will do at the update isn't easy. * The info pages documenting it amount to almost 400 non-blank lines formatted. They claim only merchant ships can be given orders. This is wrong. Unlikely to be the only error. * Few players use it, and its workings at the update a fairly opaque. Makes it a nice hidey-hole for bugs. Here are two: - Unlike the scuttle command, autonavigation happily scuttles trade ships while they're on the trading block. - Unlike the load command, autonavigation can load in friendly and allied sectors. * It's more than 700 lines of rather crufty code nobody wants to touch. Thanks to a big effort in Empire 2, it shares code with the navigation command. It still duplicates load code. The sharing complicates fixing the bugs demonstrated by navi-march-test. Reviewing, fixing and testing this mess isn't worth the opportunity cost. Remove it instead. Drop commands order, qorder and sorder. Drop ship selectors xstart, xend, ystart, yend, cargostart, cargoend, amtstart, amtend, autonav. xdump ship sheds almost half its columns. struct shpstr shrinks, on my system from 200 to 160 bytes. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
a4e519c377
commit
48e656c057
37 changed files with 306 additions and 1764 deletions
|
@ -75,8 +75,6 @@ prod_ship(int etus, int natnum, struct bp *bp, int build)
|
|||
np = getnatp(sp->shp_own);
|
||||
start_money = np->nat_money;
|
||||
upd_ship(sp, etus, np, bp, build);
|
||||
if (build && !player->simulation) /* make sure to only autonav once */
|
||||
nav_ship(sp); /* autonav the ship */
|
||||
sea_money[sp->shp_own] += np->nat_money - start_money;
|
||||
if (!build || np->nat_money != start_money)
|
||||
k++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue