(show, show_item): New `show item'. From Ron Koenderink; changes to

info files heavily hacked by me.
This commit is contained in:
Markus Armbruster 2003-12-17 19:50:20 +00:00
parent a889b6ba0e
commit 800027023a
4 changed files with 105 additions and 32 deletions

View file

@ -1,22 +1,26 @@
.TH Command SHOW
.NA show "Stats for building ships, planes, units, or bridges"
.NA show "Characteristics of bridges, items, ships, planes, land units or sectors"
.LV Basic
.SY "show <sector|bridge|land|plane|ship|nuke> [build|stats|capabilities] [tech]"
The show command either gives information on the indicated unit types.
This information is gleaned directly from the current Empire
data structures so is always up to date.
The format of each output is more fully described
in the relevant info pages
(Ship-types, Nuke-types etc.).
.SY "show <bridge|item|land|nuke|plane|sector|ship|tower> [b|s|c] [tech]"
The show command describes the characteristics of bridge spans, bridge
towers, items, planes, ships, land units, nukes, and sectors for a
given technology level.
.s1
Describe currently knows about bridges, planes, ships, land units, nukes,
and sectors at a given tech (up to 1.25 times your current tech.)
The format of each output is more fully described in separate info
pages (Ship-types, Nuke-types, etc.).
.s1
Except for bridge (bridge span), tower (bridge tower) and item, a
further parameter is required to indicate whether you wish information
about building (b), statistics (s) or capabilities (c) of the selected
type.
.s1
The tech parameter defaults to 1.25 times your current technology
level.
.s1
You can only get information on ships, planes, land units and
nukes that you are `almost' capable of building (within 1.25 times of
your current technology level).
.s1
To get information on a particular topic type:
.EX show unit-type
Unless the unit is a bridge, a further parameter is needed to indicate
whether you wish information about construction of units, the statistics
of units or the capabilities & abilities of units.
So, for example
.EX show nuke capabilities
will give something like
@ -29,13 +33,6 @@ will give something like
500kt fusion 5 170 6 295 $9000
1mt fusion 6 190 8 310 $12000
3mt fusion 7 210 10 325 $19000
.s1
Note that you can only get information on items that you are actually
technologically capable of building (within 1.25 times of your current
tech.)
.FI
.s1
To learn about the various build costs, stats, capabilities, and their
meanings, see the info files below.
.s1
.SA "Ship-types, Nuke-types, Plane-types, Unit-types, Sector-types, Ships, Planes, LandUnits"
.SA "Ship-types, Nuke-types, Plane-types, Unit-types, Sector-types, Item-types, Ships, Planes, LandUnits, Products"

View file

@ -0,0 +1,59 @@
.TH Concept "Items"
.NA Item-types "Characteristics of Items"
.LV Basic
.s1
Items are the products produced in Empire. Items are also known as
Commodities.
.s1
The show command displays the detailed characteristics of items.
.s1
For example
.EX show item
.NF
Printing for tech level '344'
item value sell lbs packing item
mnemo rg wh ur bk name
c 1 no 1 10 10 10 10 civilians
m 0 no 1 1 1 1 1 military
s 5 yes 1 1 10 1 1 shells
g 60 yes 10 1 10 1 1 guns
p 4 yes 1 1 10 1 1 petrol
i 2 yes 1 1 10 1 1 iron ore
d 20 yes 5 1 10 1 1 dust (gold)
b 280 yes 50 1 5 1 4 bars of gold
f 0 yes 1 1 10 1 1 food
o 8 yes 1 1 10 1 1 oil
l 2 yes 1 1 10 1 1 light products
h 4 yes 1 1 10 1 1 heavy products
u 1 yes 2 1 2 1 1 uncompensated workers
r 150 yes 8 1 10 1 1 radioactive materials
.FI
.s1
The meaning of the headings are:
.in \w'packing wh\0\0'u
.L item mnemo
A one-letter mnemonic abbreviation of the item name. Commands let you
use this to select the item.
.L value
The value if the item is mortgaged.
.L sell
Whether you can sell the item on the market.
.L lbs
The weight of the item, which determines how much mobility it takes to
move it.
.L packing rg
The packing bonus the item receives in regular sectors.
.L packing wh
The packing bonus the item receives in warehouse sectors.
.L packing ur
The packing bonus the item receives in urban sectors.
.L packing bk
The packing bonus the item receives in bank sectors.
.L item name
The full name of the item.
.in
.s1
To find out which sectors are in what packing groups, try the "show
sector s" command.
.s1
.SA "Commodities, Products, show, Sector-types, Production"

View file

@ -54,11 +54,10 @@ show(void)
extern float drnuke_const;
int rlev;
if (!
(p =
getstarg(player->argp[1],
"Describe what (plane, nuke, bridge, ship, sect, land unit, tower)? ",
buf)) || !*p)
if (!(p = getstarg(player->argp[1],
"Describe what (plane, nuke, bridge, ship, sect, land unit, tower, item)? ",
buf))
|| !*p)
return RET_SYN;
natp = getnatp(player->cnum);
@ -83,6 +82,9 @@ show(void)
case 't':
show_tower(99999);
return RET_OK;
case 'i':
show_item(99999);
return RET_OK;
case 'n':
if (opt_DRNUKE)
tlev = ((rlev / drnuke_const) > tlev ? tlev :
@ -115,9 +117,7 @@ show(void)
default:
return RET_SYN;
}
if (!
(p =
getstarg(player->argp[2],
if (!(p = getstarg(player->argp[2],
"Build, stats, or capability data (b,s,c)? ", buf))
|| !*p)
return RET_SYN;

View file

@ -264,6 +264,23 @@ show_tower(int tlev)
1 + (buil_tower_bh * 40 / 100), buil_tower_bc);
}
void
show_item(int tlev)
{
register struct ichrstr *ip;
register int n;
pr("item value sell lbs packing item\n");
pr("mnemo rg wh ur bk name\n");
for (n = 1; n <= itm_maxno; n++) {
ip = &ichr[n];
pr(" %c %5d %4s %3d %2d %2d %2d %2d %s\n",
ip->i_mnem, ip->i_value, (ip->i_sell == 1) ? "yes" : "no",
ip->i_lbs, ip->i_pkg[NPKG], ip->i_pkg[WPKG], ip->i_pkg[UPKG],
ip->i_pkg[BPKG], ip->i_name);
}
}
void
show_nuke_stats(int tlev)
{