* Add world-brief in elite.tcl to create a summary string.
* Use the brief summaries in elite-tantalus and elite-pairs.
* Document the new function.
Also fix out-of-date docs for elite-summary.
seeds in PP are in G. It's not a problem if the seeds in PP
aren't valid.
- world-summary P
+ world-summary P [IND [SPC]]
Produce a standard one-line summary of information about the
- world P (a seed).
+ world P (a seed). IND is the number of spaces to insert before
+ the world name, and SPC is the number of additional spaces to
+ insert afterwards; both default to 0 if not supplied.
+
+ world-brief P
+ Produce a very short summary about the world P, showing its
+ name, tech-level, and cryptic abbreviations for economic and
+ government status.
jameson ARR
Populate ARR with the standard Commander Jameson.
#! /usr/bin/tclsh
#
-# $Id: elite-pairs,v 1.4 2003/03/07 00:41:46 mdw Exp $
+# $Id$
package require "elite" "1.0.1"
puts [world-summary $ss]
puts ""
} else {
- puts [format "%-11s %-11s (%.1f LY)" $a(name) [worldname $ss] $d]
+ puts [format "%s %s (%.1f LY)" \
+ [world-brief $s] [world-brief $ss] $d]
}
}
}
set dd [$lv get $i $j]
set r [expr {$dd/"$d.0"}]
if {$r >= $minratio} {
- puts [format "%14s %-8s -> %-8s %5.1f %5.1f (%5.1f)" \
- $g [worldname $w] [worldname $ww] \
+ puts [format "%14s %s -> %s %4.1f %5.1f (%4.1f)" \
+ $g [world-brief $w] [world-brief $ww] \
[expr {$d/10.0}] [expr {$dd/10.0}] $r]
}
}
$lv destroy
$pv destroy
}
-
#! /usr/bin/tclsh
#
-# $Id: elite.tcl,v 1.6 2003/03/07 00:44:57 mdw Exp $
+# $Id$
package require "elite-bits" "1.0.1"
rich-ind avg-ind poor-ind mainly-ind \
mainly-agri rich-agri avg-agri poor-agri
+tab gv Ay Fl MG Dp Ct Cy Dy CS
+tab ec RI AI PI MI MA RA AA PA
+
set products {
food "Food"
textiles "Textiles"
$eco($p(economy)) $gov($p(government)) $p(techlevel) $p(seed)]
}
+# --- world-brief PLANET ---
+#
+# Return a very brief summary string for PLANET.
+
+proc world-brief {s} {
+ global gv ec
+ elite-worldinfo p $s
+ return [format "%-8s (%s, %s, %2d)" \
+ $p(name) $ec($p(economy)) $gv($p(government)) $p(techlevel)]
+}
+
# --- jameson ARR ---
#
# Fill ARR with the information about commander JAMESON.