~mdw
/
rocl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Document all of the upheaval.
[rocl]
/
elite-map
diff --git
a/elite-map
b/elite-map
index
72f3a85
..
61eea9e
100755
(executable)
--- a/
elite-map
+++ b/
elite-map
@@
-1,6
+1,6
@@
#! /usr/bin/tclsh
#
#! /usr/bin/tclsh
#
-# $Id: elite-map,v 1.
3 2003/02/26 01:12:57
mdw Exp $
+# $Id: elite-map,v 1.
4 2003/03/07 00:41:46
mdw Exp $
package require "elite" "1.0.0"
package require "elite" "1.0.0"
@@
-109,7
+109,7
@@
proc show-key {l {n {}}} {
set out [format "%2s %s" $sy [world-summary $s]]
if {[llength $n]} {
append out [format " (%.1f LY)" \
set out [format "%2s %s" $sy [world-summary $s]]
if {[llength $n]} {
append out [format " (%.1f LY)" \
- [expr {[
world
-distance $p(x) $p(y) $pp(x) $pp(y)]/10.0}]]
+ [expr {[
elite
-distance $p(x) $p(y) $pp(x) $pp(y)]/10.0}]]
}
puts $out
}
}
puts $out
}
@@
-138,7
+138,7
@@
for {set i 0} {$i < [llength $argv]} {incr i} {
}
"-d" {
incr i
}
"-d" {
incr i
- set d [expr {
[lindex $argv $i] * 10
}]
+ set d [expr {
int([lindex $argv $i] * 10)
}]
}
"-W" {
incr i
}
"-W" {
incr i
@@
-182,18
+182,14
@@
for {set i 0} {$i < [llength $argv]} {incr i} {
}
set p [lrange $argv $i end]
}
set p [lrange $argv $i end]
-set ww [
worldinfo
$g]
+set ww [
elite-galaxylist
$g]
if {![llength $p]} {
set n {}
set rt {}
set w $ww
incr v -1
} else {
if {![llength $p]} {
set n {}
set rt {}
set w $ww
incr v -1
} else {
- if {![string equal $weight ""]} {
- puts -nonewline stderr "\[computing adjacency table..."
- adjacency $ww adj
- puts stderr " done\]"
- }
+ if {![string equal $weight ""]} { elite-adjacency adj $ww $d }
set n {}
foreach a $p {
set s [parse-planet-spec $g $a]
set n {}
foreach a $p {
set s [parse-planet-spec $g $a]
@@
-209,8
+205,8
@@
if {![llength $p]} {
foreach w [lrange $n 1 end] {
destructure {p .} [shortest-path adj $home $w $weight]
if {![llength $p]} {
foreach w [lrange $n 1 end] {
destructure {p .} [shortest-path adj $home $w $weight]
if {![llength $p]} {
- puts
-
stderr \
- "$argv0: no route from [world
info $home] to [worldinfo
$w]"
+ puts stderr \
+ "$argv0: no route from [world
name $home] to [worldname
$w]"
exit 1
}
eval lappend rt $p
exit 1
}
eval lappend rt $p