3 # $Id: elite-describe,v 1.3 2003/03/07 00:41:46 mdw Exp $
5 package require "elite" "1.0.1"
8 global economy government
11 puts "Position: $p(x), $p(y) LY"
12 puts "Economy: $economy($p(economy))"
13 puts "Government: $government($p(government))"
14 puts "Tech. level: $p(techlevel)"
15 puts [format "Population: %s billion (%s)" \
16 [expr {$p(population)/10.0}] $p(inhabitants)]
17 puts "Gross productivity: $p(productivity) M Cr"
18 puts "Radius: $p(radius) km"
22 foreach w $p(description) {
24 incr l [string length $w]
25 if {$l > 72} { puts $ll; set ll {}; set l 0 }
31 if {[llength $argv] < 1} {
32 puts stderr "usage: $argv0 \[-g GALAXY\] PLANET ..."
36 for {set i 0} {$i < [llength $argv]} {incr i} {
37 set a [lindex $argv $i]
41 set a [lindex $argv $i]
42 set g [parse-galaxy-spec $a]
43 if {[string equal $g ""]} {
44 puts stderr "$argv0: bad galaxy string `$a'"
50 set n [parse-planet-spec $g $a]
51 if {[string equal $n ""]} {
52 puts stderr "$argv0: unknown planet `$a'"