X-Git-Url: https://git.distorted.org.uk/~mdw/rocl/blobdiff_plain/7f50b5a80358ff9544ad3b965ed88dcf41d252a4..b758c3433840e6a51f285455ccdee07dcebf52b6:/elite-cmdr diff --git a/elite-cmdr b/elite-cmdr index cc8bb50..e534158 100755 --- a/elite-cmdr +++ b/elite-cmdr @@ -1,6 +1,6 @@ #! /usr/bin/tclsh -package require "elite" "1.0.0" +package require "elite" "1.0.1" if {[llength $argv] < 1} { puts stderr "usage: $argv0 \[-OPTION | ATTR | ATTR=VALUE\] ..." @@ -76,7 +76,7 @@ proc set/seed {a v} { proc get/world {a} { global cmdr gov eco - set ww [worldinfo $cmdr(gal-seed)] + set ww [elite-galaxylist $cmdr(gal-seed)] set s [nearest-planet $ww \ [expr {$cmdr(world-x) * 4}] [expr {$cmdr(world-y) * 2}]] elite-worldinfo p $s @@ -90,12 +90,19 @@ proc dump/world {a} { } proc set/world {a v} { global cmdr + set ww [elite-galaxylist $cmdr(gal-seed)] set s [parse-planet-spec $cmdr(gal-seed) $v] if {[string equal $s ""]} { error "bad planet spec `$v'" } if {![in-galaxy-p $cmdr(gal-seed) $s]} { error "planet `[worldname $s]' not in galaxy $cmdr(gal-seed)" } elite-worldinfo p $s + set ss [nearest-planet $ww $p(x) $p(y)] + if {![string equal $s $ss]} { + set n $p(name) + elite-worldinfo p $ss + puts stderr "can't dock at $n: $p(name) is coincident" + } set cmdr(world-x) [expr {$p(x)/4}] set cmdr(world-y) [expr {$p(y)/2}] }