Commit graph

95 commits

Author SHA1 Message Date
8fc2c0ffa2 Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2021-01-17 21:24:29 +01:00
50d84c025b econfig: Fix documentation of key assault_penalty
Messed up when keys got documented in 4.2.0.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2021-01-17 21:24:28 +01:00
4a1ec06364 Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2021-01-05 10:41:28 +01:00
d111522fe8 Update copyright notice
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-04-29 10:33:19 +02:00
2bcd875715 Spell BTU and ETU consistently
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2017-08-07 10:08:31 +02:00
afe5001a23 Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2017-08-07 09:38:32 +02:00
bae3f5447e Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2017-07-02 17:45:44 +02:00
e60f0be73f emp_config: Don't monkey-patch WORLD_X to be even
emp_config() silently truncates WORLD_X to even.  Drop that.  We could
flag odd WORLD_X as error, but we don't validate the other
configuration values, so why this one?  Instead document it needs to
be even.  WORLD_Y, too.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-03-02 08:20:52 +01:00
b14f5276ab Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-28 16:21:34 +01:00
dc73207a99 sail: Remove option SAIL
SAIL has issues:

* Sail orders are executed at the update.  Crafty players can use them
  to get around the update window.

* The route is fixed at command time.  You can't let the update find
  the best route, like it does for distribution.

* The info pages documenting it amount to almost 100 non-blank lines
  formatted.  They claim you can follow friendly ships.  This is
  wrong.  They also show incorrect follow syntax.  Unlikely to be the
  only errors.

* Few players use it.  Makes it a nice hidey-hole for bugs.  Here are
  two nice ones:

  - If follow's second argument is negative, the code attempts to
    follow an uninitialized ship.  Could well be a remote hole.

  - If ship #1 follows #2 follows #3 follows #2, the update goes into
    an infinite loop.

* It's more than 500 lines of rather crufty code nobody wants to
  touch.  Thanks to a big effort in Empire 2, it shares some code with
  the navigation command.  It still duplicates other navigation code.
  The sharing complicates fixing the bugs demonstrated by
  navi-march-test.

Reviewing, fixing and testing this mess isn't worth the opportunity
cost.  Remove it instead.  Drop commands follow, mquota, sail and
unsail.  Drop ship selectors mquota, path, follow.

struct shpstr shrinks some more, on my system from 160 to 120 bytes.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-28 16:11:28 +01:00
a109de948b Remove option TREATIES
TREATIES has issues:

* Treaties can cover attack, assault, paradrop, board, lboard, fire,
  build (s|p|l|n) and enlist, but not bomb, launch, torpedo and
  enlistment centers.

* Usability is very poor.  While a treaty is in effect, every player
  action that violates a treaty condition triggers a prompt like this:

    This action is in contravention of  treaty #0 (with Curmudgeon)
    Do you wish to go ahead anyway? [yn]

  If you decline, the action is not executed.  If you accept, it is.
  In both cases, your decision is reported in the news.

  You cannot get rid of these prompts until the treaty expires.

* Virtually nobody uses them.

* Virtually unused code is buggy code.  There is at least one race
  condition: multifire() reads the firing sector, ship or land unit
  before the treaty prompt, and writes it back after, triggering a
  generation oops.  Any updates made by other threads while trechk()
  waits for input are wiped out, triggering a seqno mismatch oops.

* The treaty prompts could confuse smart clients that aren't prepared
  for them.  WinACE isn't, but is reported to work anyway at least
  common usage.  Ron Koenderink (the WinACE maintainer) suspects there
  could be a few situations where it will fail.

This feature is not earning its keep.  Remove it.  Drop command
treaty, consider treaty, offer treaty, xdump treaty, reject treaties.
Output of accept changed, obviously.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-02-16 11:44:14 +01:00
f7ac7532b2 econfig: New key running_test_suite, for use by tests
For now, it just logs "Configured for testing" on startup, and prints
a scary warning on player login.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-01-19 10:09:17 +01:00
bb467c335d Update copyright notice
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-01-02 14:33:48 +01:00
2d3bac803c Drop extra blank line in output of pconfig 2013-05-08 06:57:56 +02:00
1afe0a7993 Document GNU libc lossage in listen_addr doc string
Systems using GNU libc such as Linux are frequently configured in a
way getaddrinfo(NULL, ...) put the IPv4 wildcard "0.0.0.0" *before*
the IPv6 wildcard "::" in the result.  Because of that, listen_addr ""
listens only on all IPv4 addresses.  Workaround: listen_addr "::".

Document it in listen_addr's doc string.
2013-05-08 06:57:56 +02:00
da154ffd06 Fix wildcard bind to at least bind IPv4 or else IPv6 on OpenBSD
OpenBSD refuses to implement IPV6_V6ONLY, in violation of RFC 3493.
RFC 4038 frowningly recognizes this practice.  The only way to bind
both IPv4 and IPv4 there is two separate sockets.  Requires more
surgery than I can do now.

Since we can't have both IPv6 and IPv6 on OpenBSD with our single
socket, prefer IPv4, but if that doesn't work, do IPv6.

To prefer IPv6 instead, put 'listen_addr "::"' into econfig.  Document
that in listen_addr's doc string.
2013-05-08 06:57:56 +02:00
5f46ced826 Use int instead of long for money
Code dealing with money mixes int and long pretty haphazardly.
Harmless, because practical amounts of money fit into int on any
machine capable of running the server.  Clean up anyway.
2013-05-08 06:57:54 +02:00
df4925d696 Update copyright notice 2013-01-12 17:45:01 +01:00
1118f1c0ca Update copyright notice 2012-06-10 10:52:22 +02:00
918f3ec6ae Separate max_idle_visitor from max_idle
Cut it to 5 minutes, from max_idle's 15.

Since max_idle now applies only to authenticated players, increasing
it is perfectly safe.
2012-04-26 19:57:19 +02:00
1a97cc3cfd Separate login_grace_time from max_idle
max_idle applies in state PS_PLAYING, login_grace_time before (login,
state PS_INIT) and after (logout, state PS_SHUTDOWN).

Cut login_grace_time to two minutes, from max_idle's 15.  Two minutes
is plenty to complete login and logout.  Makes swamping the server
with connections slightly harder, as they get dropped faster.  While
that makes sense all by itself, the real aim is making increasing
max_idle safe.  The next commit will complete that job.
2012-04-26 19:57:19 +02:00
9f3e9f833a Clarify buytax econfig doc string
Reported by Scott C. Zielinski.
2012-02-21 18:11:23 +01:00
93edcf0ac4 Remove option LANDSPIES, customize table land-chr instead
Spy units are now enabled when a land unit type with capability spy
exists.  To disable them, deities have to customize table land-chr.

Before, spy units types were ignored when option LANDSPIES was
disabled.  Except for xdump land-chr, which happily dumped unusable
spy unit types.
2011-06-25 16:53:02 +02:00
352bc320d2 Remove option TRADESHIPS, customize table ship-chr instead
Trade ships are now enabled when a ship type with capability trade
exists.  No such type exists by default; to enable trade ships,
deities have to customize table ship-chr.

Before, trade ship types were ignored when option TRADESHIPS was
disabled.  Except for xdump ship-chr, which happily dumped unusable
trade ship types.
2011-06-25 16:52:08 +02:00
577c74b739 Commit 44db5453 added a FIXME comment accidentally, drop it 2011-04-16 14:50:51 +02:00
4785662587 New journal event "output"
Redundant information, but incredibly useful when you want to figure
out what happened without a (still nonexistent) journal replay tool.
The redundancy could help making a journal replay tool more robust.

To enable, set econfig key keep_journal to at least 2.  Output events
are *not* flushed to disk immediately.
2011-04-14 20:21:21 +02:00
44db545344 Disable BRIDGETOWERS by default
A deity can easily break BRIDGETOWERS by reducing etu_per_update
without compensating customization of buil_tower_bh,
rollover_avail_max or bridge span maxpop.

Document the issue in output of pconfig (which is installed as
$prefix/etc/empire/econfig).

To increase the chance deities actually read the documentation,
disable BRIDGETOWERS.
2011-04-12 21:51:32 +02:00
7e2008e7f4 License upgrade to GPL version 3 or later
Why upgrade?  I'm not a lawyer, but here's my take on the differences
to version 2:

* Software patents: better protection against abuse of patents to
  prevent users from exercising the rights under the GPL.  I doubt
  we'll get hit with a patent suit, but it's a good move just on
  general principles.

* License compatibility: compatible with more free licenses, i.e. can
  "steal" more free software for use in Empire.  I don't expect to steal
  much, but it's nice to have the option.

* Definition of "source code": modernization of some details for today's
  networked world, to make it easier to distribute the software.  Not
  really relevant to us now, as we normally distribute full source code.

* Tivoization: this is about putting GPL-licensed software in hardware,
  then make the hardware refuse to run modified software.  "Neat" trick
  to effectively deny its users their rights under the GPL.  Abuse was
  "pioneered" by TiVo (popular digital video recorders).  GPLv3 forbids
  it.  Unlikely to become a problem for us.

* Internationalization: more careful wording, to harden the license
  outside the US.  The lawyers tell us it better be done that way.

* License violations: friendlier way to deal with license violations.
  This has come out of past experience enforcing the GPL.

* Additional permissions: Probably not relevant to us.

Also include myself in the list of principal authors.
2011-04-12 21:20:58 +02:00
439f111f98 Remove option SLOW_WAR
SLOW_WAR has issues:

* The check whether the attacker old-owns the attacked sector is
  broken, because att_abort() uses sect.sct_oldown uninitialized.

  Spotted by the Clang Static Analyzer.

* Its implementation in setrel() is somewhat scary.  It's actually
  okay, because that part of setrel() only runs within decl().  Other
  callers don't reach it: update_main() because player->god != 0
  there, and the rest because they never pass a rel < HOSTILE.

* Documentation is a bit vague.

SLOW_WAR hasn't been used in a public game in years.  Fixing it is not
worth it, so remove it instead.
2011-02-13 15:59:49 +01:00
25d29c8f8f Convert tab after #define to space 2010-06-20 18:38:54 +02:00
73e25ff21e Update copyright notice 2010-01-19 08:40:17 +01:00
c528fcbe3e Update known contributors comments 2009-12-13 17:34:28 +01:00
2b31f644db Enable marine msl. unconditionally, remove option PINPOINTMISSILE
Deities can still control them by customizing table plane-chr.
2009-12-08 08:15:50 +01:00
35ef345ecb Update copyright notice 2009-02-08 09:33:18 +01:00
3a1577a6b5 Remove econfig key mission_mob_cost
Questionable feature, and hasn't been used in a long time.
2008-12-25 11:47:33 +01:00
b27298d4c5 New option RAILWAYS
With RAILWAYS, highway-like sectors double as rail.  They need to be
at least 5% efficient to be operational, and then they additionally
extend rail into adjacent sectors that are at least 60% efficient.

New opt_RAILWAYS, SCT_HAS_RAIL(), sct_rail_track().  Update
sector_mcost(), bp_neighbors(), lnd_mar_one_sector() for RAILWAYS
mobility rules.  Update sinfra(), spyline(), satdisp_sect() to show
rail track instead of rail infrastructure for RAILWAYS.

New virtual sector selector track, implemented by nsc_sct_track().
2008-11-01 11:40:15 -04:00
d702068457 Fix trailing whitespace 2008-09-17 21:31:40 -04:00
3e15a8e226 Make trade show exactly what's on sale, remove option SHOW_PLANE
Planes and land units on ships are sold along with the ship, but trade
showed them only when SHOWPLANE was enabled.  Show them always.

Planes on land units are not sold along with the land unit, but trade
showed them when SHOWPLANE was enabled.  Don't.
2008-09-16 19:11:18 -04:00
b72fd20674 Replace econfig key lost_items_timeout by lost_keep_hours 2008-09-12 18:05:58 -04:00
3b4de2feb1 Remove option FUEL
The abstract idea of tying ships and land units to a logistical tether
is sound, the concrete implementation as option FUEL is flawed.  It
adds too much busy-work to the game to be enjoyable.  It hasn't been
enabled in a public game for years.  The code implementing it is ugly,
repetitive, and a burden to maintain.

Remove selector fuel from ship_ca[] and land_ca[], and selectors
fuelc, fuelu from mchr_ca[] and lchr_ca[].  Remove fields fuelc, fuelu
from ship.config and land.config.

Remove command fuel from player_coms[].

Deprecate edit key 'B' in doship(), dounit(), and don't show it in
pr_ship(), pr_land().

Drop opt_FUEL code from build_ship(), shi(), sdump(), ship_damage(),
show_ship_stats(), do_mob_ship(), nav_ship(), build_land(), land(),
ldump(), land_damage(), show_land_stats(), do_mob_land(),
resupply_all(), resupply_commod(), get_minimum(), has_supply(),
unit_list(), vers().

Remove opt_FUEL, fuel_mult, struct shpstr member shp_fuel, struct
mchrstr members m_fuelc and m_fuelu, M_OILER, struct lndstr member
lnd_fuel, struct lchrstr members l_fuelc and l_fuelu, fuel(), and
auto_fuel_ship().
2008-05-12 09:25:20 +02:00
f63401329d New post_crash_dump_hook
Run it from crash_dump().  Useful to move core files out of the way,
alert deities by e-mail, and so forth.
2008-04-25 22:12:22 +02:00
ba628b82bd Fix and polish comments emitted by pconfig 2008-04-15 20:29:29 +02:00
0dd6702df1 Update known contributors comments 2008-03-14 20:25:44 +01:00
4bb23dd1a6 Make econfig keys data and info work for relative names
File names in econfig need to be interpreted relative to configdir.
This wasn't the case everywhere for keys data and info.

Fix this by changing variables gamedir and infodir to hold absolute
names.  Change builtindir likewise, for consistency.  Store the values
from econfig in gamedir_conf, infodir_conf and builtindir_conf.

Uses new fnameat() to derive absolute names from possibly relative
ones.
2008-02-07 08:01:54 +01:00
312e6d4c5b Document econfig key info setting for running without installing 2008-02-02 16:15:40 +01:00
b8a9136242 Trim extra newline from documentation of econfig key update_demand 2008-02-02 07:53:19 +01:00
db02dda32f Update copyright notice 2008-01-19 10:15:37 +01:00
a1646c8aa7 (gamedir): Not all programs treat relative names the same. Document
the lossage.
2007-08-03 04:44:54 +00:00
f915f91b47 Update known contributors comment. 2007-07-27 20:16:19 +00:00
ab55ea7381 (s_p_etu): econfig key no longer used, remove. 2007-07-15 09:59:52 +00:00