Commit graph

1154 commits

Author SHA1 Message Date
856539fc54 (buil): Use typematch() to search for ship, plane, land unit and nuke
type.  The old code didn't work correctly when "sbb  super battleship"
came before "sb   submarine" in mchr[].
2005-11-06 20:14:28 +00:00
100d0fc495 (arm, tran_nuke): Lookup of the nuke name was broken by nuke.h
rev. 1.10.  Replace by typematch().

(arm): Simplify search for nuke at sector.
2005-11-06 20:01:51 +00:00
610b1cded4 (xdopt, xdver): Simplify the previous rev.
(xdump): Support selecting a dump by table number in addition to name.
2005-11-06 11:05:48 +00:00
Ron Koenderink
a16b3266ff (xdhdr,xdhdr1,xditem,xdmeta,xdopt,xdver,xdfldnam):
Remove the column header.
Not need as the xdump meta is functional.
2005-11-05 17:46:17 +00:00
Ron Koenderink
ba5b1b0a79 (xdopt,xdver,xdump): Add meta data for opt and ver. 2005-11-05 01:49:47 +00:00
Ron Koenderink
0d0800f4ac (xdmeta): Fix the printing of the number of rows dumped.
Incorrectly included the skipped rows.
2005-11-04 23:32:05 +00:00
a4fcd52cd0 (xdmeta): Don't dump meta data for stuff that is not dumped by
xdflds().
2005-11-04 19:56:47 +00:00
b19c2a6c03 (nullify_objects): Patch intrchr[] according to opt_NO_LCMS,
opt_NO_HCMS.  This fixes output of `show se b', which used not to
reflect these options.
(improve): Simplify.
2005-11-04 18:09:08 +00:00
b30f4e7591 (xdmeta): Fix rev. 1.36. 2005-11-04 12:44:33 +00:00
f2eaedfe75 (xdopt, xdver): Fix missing footer. 2005-11-03 09:24:52 +00:00
Ron Koenderink
66f61616cb (xdmeta): Add NULL ca check.
Fixes a crash for xdump meta pow.
2005-11-03 00:03:55 +00:00
bbc1ee8eb1 (trtstr): New members ef_type and trt_uid.
(do_treaty): Initialize them.
(treaty_ca): New selector uid.
2005-11-01 12:53:43 +00:00
05c8377e35 Doc fix. 2005-10-30 16:50:32 +00:00
4c06f31f16 (coun): Last access used to report last login time.
Counter-intuitive.  Report last connection time range instead.
Unfortunately, this requires a change in output format.

(coun): Report on all countries even to mortals.  This used to be
done, and was most probably changed because it gave away too much
information.  Carefully limit the information given to mortals, as
follows.  Limit last access information to whether deities or allies
are logged on right now, no longer report connection time for deities
that are not logged on.  Remove column time for mortals, rename it to
BTU for deities.  Report status, but with less detail if HIDDEN is
enabled.
2005-10-30 14:59:39 +00:00
ada0ed8e61 (buy, check_market, trad, check_trade): Remove the following virtually
undocumented feature: When a buyer didn't have enough money at the
time of the trade, the seller *automatically* granted a high-interest,
medium term loan for up to 90% of the price.  This is just a silly
trap for unwary sellers and buyers alike.
(N_FIN_TROUBLE, N_CREDIT_JUNK): Unused, remove.
(rpt): Update accordingly.
2005-10-30 14:33:44 +00:00
d6581717f2 (xdump): Use xditem() for all empfile tables.
(xdchr, xdmeta): Specialize for meta-tables, rename.
2005-10-29 16:44:53 +00:00
e612db5cb6 (tchrstr, tchr_ca): Remove, use struct symbol and symbol_ca. Users
changed.
(tchr, treaty_flags): Rename for consistency with other flags.
2005-10-29 14:10:23 +00:00
19f2948620 (rpt): Add sentinel.
(EF_NEWS_CHR): New.
(empfile): Add its entry.
2005-10-29 06:27:00 +00:00
01c248cb59 (EF_IS_GAME_STATE): New.
(xdump, main): Use it.

(EF_MAX): Change to largest table ID + 1.  This is now possible
because the changes above get rid of the assumption that
empfile[0..EF_MAX-1] is only game state.  Code can now work on any
table using the advertized empfile interface, not just on game state.
(my_ef_byname): Remove, use ef_byname().
2005-10-28 07:03:31 +00:00
0f6c4296b1 (set): Fix the previous revision. 2005-10-27 23:23:42 +00:00
2fc1e74a72 (ef_byname_from): New.
(set, mission, multifire, fuel, cons_choose, cede): Use it instead of
ef_byname().  Remove the hacks to map unwanted results to wanted
results.  The hacks in set() were broken: bad input made the code cast
arbitrary items to union trdgenstr, with potentially disastrous
consequences.  Closes #906483 and #906486.

(set): Less cryptic prompt and diagnostics.
2005-10-27 21:33:17 +00:00
Ron Koenderink
2df98825e9 (xdftr): Change footer to / instead of dumped. 2005-10-27 21:22:33 +00:00
Ron Koenderink
f9ac7a1f8c (xdump,xdchr,xdhdr,xdhdr1): Add meta data dump to xdump. 2005-10-27 19:37:19 +00:00
cae225a94a (info): Remove dead code. 2005-10-26 16:22:32 +00:00
dab1f0bc7d (START_UNITS, start_unit_type, deity_build_land, new): Remove
undocumented compile-time option START_UNITS.  It hasn't been used in
ages; writing a quick build script is easier than recompiling the
server.
2005-10-23 20:52:46 +00:00
7dbe2d5687 Clean up the previous revision. 2005-10-23 15:03:12 +00:00
ba84b71f8d (draw_map): Parameter bmap abused EF_MAP and EF_BMAP, and required the
silly EF_NMAP.  Use characters instead: 'b' for bmap (was EF_BMAP),
't' for true bmap (was EF_MAP), 'r' for revert (was EF_MAP+EF_BMAP,
more sillness), and 'n' for nmap (was EF_NMAP).  Callers changed.
(EF_NMAP): Remove.
2005-10-23 08:58:23 +00:00
f5a1430bcf (map, draw_map): Remove undocumented feature that lets deities run map
as another country.  It appeared around Chainsaw 3.0 and never fully
worked.  See also #1335316.
2005-10-23 08:32:49 +00:00
01c80490b9 (map): Fix rev. 1.4: it treated nmap as a bmap command. 2005-10-23 07:41:24 +00:00
118d63ff7e (new): Fix initialization of realms for players_at_00. 2005-10-22 10:12:18 +00:00
0ab9260151 (empfile, chr_camap): Merge chr_camap[] into empfile[]. No existing
user sees the new elements of empfile[].
(EF_SECTOR_CHR, EF_SHIP_CHR, EF_PLANE_CHR, EF_LAND_CHR, EF_NUKE_CHR)
(EF_TREATY_CHR, EF_ITEM, EF_INFRASTRUCTURE, EF_PRODUCT): New.  Not yet
used.
(my_ef_byname): Replacement for ef_byname() that sees the new
elements.
(xdchr): Work with empfile[] instead of chr_camap[].
(xdump): Use my_ef_byname() instead of ef_byname() and
chridx_by_name().
(camap, chr_camap, chridx_by_name): Remove.
2005-10-21 19:38:37 +00:00
224cc6328a Fix the previous revision. 2005-10-21 18:21:46 +00:00
ee19f5f944 (show_opts): Pretend option SHIPNAMES still exists for the benefit of
clients that still depend on it.
2005-10-21 18:16:50 +00:00
cf426896af Don't use conditional compilation to time out obsolete stuff. Do it
by hand.
2005-10-21 17:55:34 +00:00
Ron Koenderink
9180b23cfa (do_conv) Remove CR. 2005-10-20 14:52:18 +00:00
Ron Koenderink
c469d1f179 (do_conv) Move the initialization of the natp to be inside sector loop, this
allows the deity to use the research level of the sector owner.  This also
fixes the use of an uninitialized sector data structure.
2005-10-18 16:11:19 +00:00
Ron Koenderink
542709fae3 (ichr_ca,pchr_ca,dchr_ca,mchr_ca,plchr_ca,lchr_ca,nchr_ca,
tchr_ca,rpt_ca,intrchr_ca ) Move from src/lib/commands/xdump.c
to src/lib/global/nsc.c; external linkage.  They were created in
xdump.c to minimize initial impact on the source, but they
really belong to nsc.c, where other code can use them as well.
2005-10-18 12:14:10 +00:00
Ron Koenderink
583f66047c (pin_bomb) Remove unused variable qp. 2005-10-18 12:12:15 +00:00
2d47bff1f7 (set): Fix initialization of trd_y. The initial value is believed not
to be used.
2005-10-11 19:27:05 +00:00
b6f1f90fdb Remove some commented out code that is obviously useless. 2005-10-11 19:22:59 +00:00
41327b44ca Fix bad line breaks. 2005-10-11 19:21:57 +00:00
5a7670d9be (pin_bomb): Remove code to compute bestacc. It is not only wrong,
bestacc is not used.  Been that way since Chainsaw.
2005-10-03 20:03:45 +00:00
e617eba026 (spy): Catching a spy makes contact. 2005-10-03 15:36:39 +00:00
f94f81ee16 (add): Initialize nat_last_login and nat_last_logout to zero rather
than current time.  Nation addition time is irrelevant.
(natstr): Document zero nat_last_login, nat_last_login mean never
logged in/out.
(player_main): Test nat_last_login zero instead of nat_hostaddr empty.

(player_main): Assign nat_userid, nat_hostname, nat_hostaddr straight
from player.  The last connection's host is now shown as dotted quads
instead of nowhere when the name isn't known.
(natstr): Document that nat_userid, nat_hostname may be empty.

(player_main): Simplify printing last connection address: nat_hostaddr
can't be empty here; don't bother to substitute "nobody" for empty
user.
2005-10-03 13:25:54 +00:00
68d7cbd273 (chan): Do not arbitrarily truncate representative to 8 characters,
use the full size of struct natstr member nat_pnam.
2005-10-03 10:40:11 +00:00
47316b593b (add): Use size of struct natstr members nat_cnam and nat_pnam instead
of literals.
2005-10-03 10:38:55 +00:00
5d207af26f (look_ship, look_land): Failed to make contact on sighting ships,
planes and land units.  Partial fix for #857594.
2005-10-02 18:09:42 +00:00
4f1ebae4b7 (natstr): Member nat_connected is inappropriate, because it is
transient server state, not persistent game state.  Remove.
(player_main, edit): Remove uses.
(coun): Use getplayer() instead of nat_connected.  Delete the message
on command being out of order.
2005-10-02 17:01:15 +00:00
caac6e41ca (get_assembly_point): New.
(bomb, drop, fly, para, reco): Use it.
2005-10-01 14:07:35 +00:00
09b0b83971 (IO_CONN, io_conn, IOQ_BUFSIZE, MAXIOV, LND_NOTANY, plur)
(techfactfire, reltech, P_DISTING, PLN_MAXDEF, filetruncate, sct_init)
(nxtsctp, AN_SAILDIR, UDTIMES_MAX, BLITZTIME): Unused, remove.
2005-09-30 19:51:32 +00:00