Steve McClure (ionica@empire.cx) (Wolfpack)
It is due to these above people pulling projects together that the
-Empire server has gotten to where it is today.
+Empire server has gotten to where it is today.
Empire is copyrighted and released by the 5 people above under the GNU
GPL. See files README, COPYING and CREDITS for related information
Karl Hagen
Doug Hay (Doug_Hay@tsb.ca)
Ken Huisman
-Ray Hyatt (Ray.Hyatt@gmail.com)
+Ray Hyatt (Ray.Hyatt@gmail.com)
Lewis R. Jansen (lrj@helios.tn.cornell.edu)
Mike St. Johns (stjohns@edn-vax.arpa)
Beorn Johnson
-#
+#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
+#
# ---
-#
+#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
-#
+#
# ---
-#
+#
# @configure_input@
# GNUmakefile.in: Makefile template for configure
-#
+#
# Known contributors to this file:
# Markus Armbruster, 2005-2008
-#
+#
# The real meat is in Make.mk, which see.
-#
+#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
+#
# ---
-#
+#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
-#
+#
# ---
-#
+#
# Make.mk: The real Makefile, included by GNUmakefile
-#
+#
# Known contributors to this file:
# Markus Armbruster, 2005-2008
-#
+#
# This makefile was inspired by `Recursive Make Considered Harmful',
# Peter Miller, 1997.
-#
+#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
+#
# ---
-#
+#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
-#
+#
# ---
-#
+#
# configure.ac: Autoconf input file
-#
+#
# Known contributors to this file:
# Markus Armbruster, 2005-2008
-#
+#
# Process this file with autoconf to produce a configure script.
# Autoconf makes checking for and programming around assorted ancient
shutdown aborted it. The bug allowed players to delay update and
shutdown indefinitely.
* Thread priorities are only implemented by LWP and no longer used.
- With LWP, they let players with a sufficiently fast connection
+ With LWP, they let players with a sufficiently fast connection
starve out the threads that clean the lost file and kill idle
connections. Drop them.
* Show nuke rounded required research incorrectly.
in 4.0.2), and trains could be sent down paths without rail (never
worked). Also fixes unit reaction path cost.
* The custom table reader can now deal with sector, item, product and
- infra tables more comfortably.
+ infra tables more comfortably.
* Remove option BIG_CITY. Deities can customize the sect table to
get the same effect.
* Many more selectors can now be compared with names, not just
* News no longer call all sub-launched missiles nuclear.
* Incoming missiles are now reported with coordinates.
* Removed some code that served no purpose except crashing on
- Windows.
+ Windows.
* Fixed Mac OSX and AIX build problems.
* Don't resolve player IP addresses for now, because it can crash
with certain versions of GNU libc.
* Updated order of firing flak in Flak.t.
* Fixed 80% efficient planes on ships must be maintained.
* Fixed initial MOB_ACCESS check thread sleep time was set by an uninitialized
- variable.
+ variable.
* Removed "TEMPORARILY DISABLED" message from mission command for escort
missions. Escort missions have been re-enabled since 4.0.15.
* Using sonar from the navigate command will print the sonar map.
* Fixed bug in sectors that don't revolt not showing up as lost items.
* Fixed bug where maps with an X of exactly 200 is not drawing third line.
* Fixed bug where MOB_ACCESS was not updating the mobility just before
- the update.
+ the update.
* Fixed bug in the way treaties are examined and sometimes produce
wrong results.
* Fixed edit to allow creating negative mobility for sectors.
* Fixed bug where scrapping land units was creating military.
* Fixed description of sect_mob_neg_factor in econfig file.
* Increased speed of PT boats.
-
+
Changes to Empire 4.2.4 - Tue Feb 2 05:47:44 PST 1999
* Added check to make military values match up correctly for land
units.
* Fixed bug in explore command not setting mobility to correct
value when MOB_ACCESS was enabled.
* Fixed bug in enlist setting mobility incorrectly sometimes.
- * Added doc/backup file for deities which recommends how backups and
+ * Added doc/backup file for deities which recommends how backups and
restores of the data directory should be done.
Changes to Empire 4.2.3 - Wed Jan 13 06:02:35 PST 1999
* Fixed bug where satellites were not orbiting the world during the
update.
* Fixed bug in torpedos being too smart. They knew how to jump over
- land! :) Now the "line_of_sight" routine is used to determine if a
+ land! :) Now the "line_of_sight" routine is used to determine if a
torpedo has a straight path to the destination. If it doesn't, the
torpedo no longer jumps over land, but instead slams into it. This was
an interesting bug because you could torp ships on the other side of
destination sector. Goods are now attempted to be returned to the
start sector, and apporpriate steps taken if the start sector is no
longer available.
- * Fixed march to prompt you before you abandon a sector you own by
+ * Fixed march to prompt you before you abandon a sector you own by
marching out the last land unit.
- * Fixed check functions to only check the relevant portions of the structure
+ * Fixed check functions to only check the relevant portions of the structure
and not the timestamp info that doesn't affect how the object functions.
* Fixed bug in spy command that always told you if a spy unit was in a
non-owned sector.
gained information that you wouldn't normally know.)
* Merged bestpath and bestownedpath and wrote new wrappers, "BestShipPath"
and "BestAirPath" to use it properly. It is also good to note that
- bestownedpath is used to determine paths for ships and for planes,
+ bestownedpath is used to determine paths for ships and for planes,
and that best_path (which uses the A* algorithm) is used for all land
based paths, and that the two are never interchanged.
* Removed "jet recon" plane (it slipped in during the PLANENAMES conversion,
properly, and thus causing crashes when accessing certain plane
routines. This happened during the move to make the PLANENAMES option
run-time configurable.
-
+
Changes to Empire 4.2.0 - Thu Oct 29 06:27:15 PST 1998
* Bumped rev to 4.2.0 since this is a major release (the server is now
run-time configurable for just about everything and is released under
* Updated Education.t
* Modified (increased) chances of hitting mines slightly.
* Removed unused variables from shp_check_mines.
-
+
Changes to Empire 4.0.17 - Fri Jul 31 06:12:21 PDT 1998
* Added ability in edit to change coastal flag for sectors.
* Added ability in edit to edit plague values for ships.
(works for sea and land mines, used "lmine" to distinguish it from "min"
which determines mineral (iron) content of a sector.)
* No longer able to pin bomb land units on a ship.
- * Land units are required to have at least one military loaded to perform
+ * Land units are required to have at least one military loaded to perform
a mission.
* Firing land units are required to have at least on military loaded to
be able to fire (or return fire.)
they were not cargo capable.
* Fixed bug in potentially crashing in update code for nations tech/research.
* Fixed bug in execute putting you into execute mode incorrectly.
- * Fixed bug in board not allowing land units to board from 0 mobility
+ * Fixed bug in board not allowing land units to board from 0 mobility
sectors.
* Fixed bug where interdicted land units that were missed displayed
a "SPLASH! Bombs miss your ships" message.
before.)
* Fixed bug in neweff not reporting stopped sectors. It now (correctly)
reports them as not changing eff.
-
+
Changes to Empire 4.0.15 - Wed May 20 12:35:53 EDT 1998
* Fixed the spelling of Markus' name in CHANGES4.0 files.
* Added Markus' patches/fixes. Some are detailed below.
* Fixed bug in setsector telling the deity coordinates of sectors being
granted/taken away.
* Fixed bug in setting budget of enlistment sectors to 0.
-
+
Changes to Empire 4.0.14 - Wed Apr 8 08:47:54 EDT 1998
* Fixed time_t problem in common/log.c
* Fixed bug in headlines
* Fixed bug in printing of "No ship(s)" twice in cargo command when no
ships were selected.
* Temporarily disabled escort missions until a fix is found. They are
- randomly crashing the server.
+ randomly crashing the server.
* Fixed morale.t to reflect that retreat percentage is based off of
morale_base and not 75.
* Fixed bug in bridgefall where planes and units on ship in a sector
* Fixed bug in produce command reporting incorrect costs (sometimes).
* Land units on ships will now try to draw supply from the ship they
are on.
-
+
Changes to Empire 4.0.13 - Mon Mar 2 11:04:28 EST 1998
* Fixed bug in distribute when world sizes are other than 64x32
* Fixed bug in getcommand (not really a bug, just made it work like
* Fixed building of POSIX threads on Alpha running Digital Unix.
* Fixed line_of_sight prototype in sona.c
* Fixed fairland not to conuse stupid C++ compilers.
-
+
Changes to Empire 4.0.12 - Tue Feb 24 11:27:31 EST 1998
* Fixed client build on linux (whoops)
-
+
Changes to Empire 4.0.11 - Tue Feb 10 10:53:10 EST 1998
* AIX build seems to only work with gcc right now (but at least that works)
* Vax Ultrix (vaxultrix) build should work now (hopefully) out of the box.
* Fixed bug where spies were not dying when damaged.
* Fixed bug in HIDDEN mods in declare command not printing country # of
uncontacted country correctly (or at all as a matter of fact)
-
+
Changes to Empire 4.0.10 - Mon Aug 18 12:34:58 EDT 1997
* Fixed bug where fleets were being interdicted but the damage was being
spread to ships not in the same sectors.
a sector.
* Documented mountains only holding and using 1/10th of the normal sector
population in Sector-types.t.
- * Fixed documentation on ship's firing ranges in fire.t to be less
+ * Fixed documentation on ship's firing ranges in fire.t to be less
ambiguous.
* Updated nukes in nuke.t
* Added apropos command (thanks to Mike Wise)
there are two files of the same name, and you don't get a complete match,
then whichever file is found first in the directory is used.
* Changed documentation in wantupd.h
-
+
Changes to Empire 4.0.9 - Sat Apr 19 23:01:51 EDT 1997
* Fixed dump info pages that were getting formatted funny.
* Fixed improve info page.
This was major because it affected timestamp values which are more
than 65535.
* Fixed bug in sdump.c for typo in reporting the trade ships origin.
-
+
Changes to Empire 4.0.7 - Mon Feb 24 22:48:54 EST 1997
* Fixed bug in aircombat.c when calculating the air combat odds. Negative
numbers were screwing things up good...
* Spies caught in Neutral or Friendly countries cause the Neutral or
Friendly country to go Hostile towards the owner of the spy.
* Tweaked ammunition numbers for artillery units.
- * No more automatic declarations of War should be made. You will go
+ * No more automatic declarations of War should be made. You will go
hostile, but since going to war doesn't increase your countries
defenses, and is purely political, it is left to the player to go
that final step.
* Fixed doconfig.c to create directories with right modes.
* Fixed install macros in makefiles to move binaries to the right
places.
-
+
Changes to Empire 4.0.3 - Wed Dec 4 22:46:53 EST 1996
* Added HP/UX port.
* Fixed doconfig.c (put exit(0) at the end of main.)
* Fixed attack value in attack_val in lndsub.c
* Fixed lload in commands/load.c
* Fixed defense_val in lndsub.c - Made it a minimum of 1, so that units will
- always fight until dead or retreating. 0 makes them get stuck.
+ always fight until dead or retreating. 0 makes them get stuck.
* Fixed update/deliver.c - no delivery of non-oldowned civvies (or anything
else for that matter.)
* Fixed llook in commands/look.c
* Added NO_LCMS, NO_HCMS and NO_OIL options. When any of these options are
enabled, you don't need any of that type of material to build things.
If NO_HCMS is enabled, you don't need HCMS to build bridges, you need
- lcms. If both NO_HCMS and NO_LCMS are enabled, then you don't need
+ lcms. If both NO_HCMS and NO_LCMS are enabled, then you don't need
any materials to build a bridge.
* There is no mobility cost for assigning missions. But, there is also
no longer any benefit for being on a mission either.
* Che can now be lessened by making happiness. If you have more happiness
than your conquered populace, they don't fight as hard or recruit as
much. If you have less than them, they fight harder and recruit more.
- It's not much though - it ranges from 2.0 in your favor to only 0.8
+ It's not much though - it ranges from 2.0 in your favor to only 0.8
against you (whereas it was always 1.0 before.) So, it definitely
favors the attackers to make lots of happy now.
* Bridgeheads can only be built on coasts.
troubleshooting
Some common problems and solutions.
-configuration
+configuration
How to turn options on and off, change game parameters, etc...
debugging
Sasha Mikheev's notes on Empire's threading abstraction, and
its LWP and POSIX threads implementation.
-coding
+coding
Guidelines for coding style
unicode
git
---
-Commit related changes together, unrelated changes separately.
+Commit related changes together, unrelated changes separately.
Write meaningfull commit messages. Start with a single short line
(ideally less than 50 characters) summarizing the change, followed by
Sasha Mikheev on indentation:
-The empire indentation style can be achived by using
+The empire indentation style can be achived by using
indent -orig -i8 foo.c
or in old c-mode emacs (versions before 19.29):
- No comment syntax.
* Each table is self-contained. You don't have to look into other
- tables to make sense of it.
+ tables to make sense of it.
This conflicts with xdump's separation of data and meta-data. You
need the table's meta-data to identify fields, and the referenced
* ---
*
* budg.h: Budget related definitions
- *
+ *
* Known contributors to this file:
* Ville Virrankoski, 1995
*/
* ---
*
* com.h: Definitions used to parse Empire commands
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef COM_H
* ---
*
* combat.h: Definitions for things having to do with combat
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* commands.h: Definitions used for command stuff
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef COMMANDS_H
*
* commodity.h: Definitions for buy/market/sell commands in a time delay
* market
- *
+ *
* Known contributors to this file:
* Pat Loney, 1992
* Steve McClure, 1996
* ---
*
* damage.h: Damage formulas
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* distribute.h: Definitions for distribution stuff
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef DISTRIBUTE_H
* ---
*
* econfig-spec.h: Combined include for optlist.h and emp_config.c
- *
+ *
* Known contributors to this file:
* Marc Olzheim, 2004
* Markus Armbruster, 2004-2008
* ---
*
* empio.h: Describes io pointers used in Empire
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef EMPIO_H
* ---
*
* empobj.h: General empire objects.
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2006
* Markus Armbruster, 2006-2008
signed char effic;
signed char mobil;
unsigned char off;
- short tech;
+ short tech;
char group; /* valid if EFF_GROUP is in table's flags */
coord opx, opy;
short mission;
struct lndstr land;
struct lonstr loan;
struct loststr lost;
- struct natstr nat;
+ struct natstr nat;
struct nwsstr news;
struct nukstr nuke;
struct plnstr plane;
* ---
*
* empthread.h: Definitions for Empire threading
- *
+ *
* Known contributors to this file:
* Sasha Mikheev
* Doug Hay, 1998
* ---
*
* file.h: Describes Empire tables (`files' for historical reasons)
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2005-2008
*/
* ---
*
* game.h: The game file
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007-2008
*/
* ioqueue.h: Stores and frees data associated with a file descriptor.
* uses writev to write, and read to read
* Known contributors to this file:
- *
+ *
*/
#ifndef IOQUEUE_H
* ---
*
* item.h: Definitions for item characteristics stuff
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef ITEM_H
* ---
*
* journal.h: Log a journal of events to a file
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* land.h: Definitions for land units
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1992
* Ken Stevens, 1995
* ---
*
* loan.h: Definitions for loans
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef LOAN_H
* ---
*
* lost.h: Definitions for lost items
- *
+ *
* Known contributors to this file:
* Steve McClure, 1997
*/
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* ---
*
* map.h: Definitions for making maps
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef MAP_H
* ---
*
* match.h: Used for string compare matching
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef MATCH_H
*
* misc.h: Misc. definitions which don't really belong anywhere,
* but have to go somewhere!
- *
+ *
* Known contributors to this file:
* Doug Hay, 1998
*/
extern char *getstarg(char *input, char *prompt, char buf[]);
extern char *getstring(char *prompt, char buf[]);
extern char *ugetstring(char *prompt, char buf[]);
-
+
extern char *prbuf(char *format, ...)
ATTRIBUTE((format (printf, 1, 2)));
* ---
*
* mission.h: Definitions for things having to do with missions.
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* nat.h: Definitions for things having to do with nations
- *
+ *
* Known contributors to this file:
* Thomas Ruschak
* Ken Stevens, 1995
* ---
*
* news.h: Definitions for Empire News
- *
+ *
* Known contributors to this file:
* Dave Pare
* Thomas Ruschak
* ---
*
* nsc.h: Definitions for Empire conditionals
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2004-2008
* ---
*
* nuke.h: Definitions for things having to do with nukes
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* optlist.h: Definitions of option listings
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* path.h: Definitions for directions, paths, etc.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef PATH_H
* ---
*
* plague.h: plague defines.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef PLAGUE_H
* ---
*
* plane.h: Definitions for planes and plane types
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* ---
*
* player.h: Definitions for player information (threads)
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Doug Hay, 1998
* ---
*
* power.h: Definitions for things having to do with the power report.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef POWER_H
* ---
*
* product.h: Definitions for things having to do with products
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef PRODUCT_H
* ---
*
* proto.h: Protocol for client
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* prototypes.h: Prototypes for server functions
- *
+ *
* Known contributors to this file:
* Curtis Larsen, 1998
* Steve McClure, 1998,2000
/* in empthread.h */
/*
- * src/lib/commands/ *.c
+ * src/lib/commands/ *.c
*/
extern int check_market(void);
extern void gift(natid, natid, void *, char *);
int zdon(void);
/*
- * src/lib/common/ *.c
+ * src/lib/common/ *.c
*/
/* bestpath.c */
extern char *bestownedpath(char *, char *, int, int, int, int, int);
/* in xdump.h */
/*
- * src/lib/gen/ *.c
+ * src/lib/gen/ *.c
*/
/* fnameat.c */
extern char *fnameat(const char *, const char *);
/* more in misc.h */
/*
- * src/lib/global/ *.c
+ * src/lib/global/ *.c
*/
extern void global_init(void);
/*
- * src/lib/player/ *.c
+ * src/lib/player/ *.c
*/
/* accept.c */
extern void player_init(void);
/* more in service.h */
/*
- * src/lib/subs/ *.c
+ * src/lib/subs/ *.c
*/
/* askyn.c */
extern int confirm(char *);
extern int wu(natid, natid, char *, ...) ATTRIBUTE((format (printf, 3, 4)));
/*
- * src/lib/update/ *.c
+ * src/lib/update/ *.c
*/
/* age.c */
extern void age_levels(int);
* ---
*
* queue.h: Generic vax-like doubly linked list queues
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef QUEUE_H
* ---
*
* retreat.h: Things having to do with retreating
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* sect.h: Definitions for things having to do with sectors.
- *
+ *
* Known contributors to this file:
* Dave Pare
* Ken Stevens, 1995
* ---
*
* server.h: Server startup, control and shutdown
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* service.h: Windows services support
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2004
*/
* ---
*
* ship.h: Definitions for things having to do with ships
- *
+ *
* Known contributors to this file:
* Dave Pare
* Thomas Ruschak, 1992
* ---
*
* tel.h: Definitions for things having to do with telegrams
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef TEL_H
*
* trade.h: Definitions for trading units/ships/planes in a time delay
* system
- *
+ *
* Known contributors to this file:
* Dave Pare
* Pat Loney, 1992
* ---
*
* treaty.h: Definitions for treaties
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
*/
* ---
*
* types.h: Empire types
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006-2007
*/
* ---
*
* unit.h: Generalize unit data structures and functions.
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2006-2007
* Markus Armbruster, 2006
*/
-
+
#ifndef UNIT_H
#define UNIT_H
* ---
*
* update.h: Include headers used for updates
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#ifndef UPDATE_H
* ---
*
* version.h: Version information
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1992
* Ken Stevens, 1995
* ---
*
* xdump.h: Extended dumps
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2008
*/
* ---
*
* xy.h: Constants having to do with world locations.
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
*/
you would like to attack with.
You must always leave at least 1 mil in
the sector or ship you are attacking from, so you may never attack
-with all of your mil out of a sector or ship.
+with all of your mil out of a sector or ship.
The following limitations apply to the aggressor's mil:
.NF
Attack: You are limited by the mobility of the attacking sector
When you move your mil into the target sector after an attack, you
will risk the same chances of interdiction (number of mil / 200) and
stepping on land mines (see "info lmine") as
-if you were moving them using the "move" command.
+if you were moving them using the "move" command.
.s1
Similarly, once you have specified which land units you'd like to move
into the conquered sector, then all of your units will move in at
Each ship can be ordered to proceed to a destination. During each update,
the ship will try and use ALL the mobility it has and use the shortest
possible path. It will also avoid any known mines (sectors marked
-with an 'X' or 'x' on your bmap). Note that this movement is all
+with an 'X' or 'x' on your bmap). Note that this movement is all
done before mobility is accumulated, so that after the update is
complete the ship will have a full updates worth of mobility
in case you need to move it by hand. Should a ship be fired upon
.s1
Bugs: if you find a bug,
you are REQUIRED to report it to the deity.
-I will not let other people know about the bug
+I will not let other people know about the bug
and in most cases, you may exploit it until it is fixed.
Punishment for use without telling: at least $50,000 or
-getting your country removed from the game.
+getting your country removed from the game.
.s1
Denial-of-service attacks are forbidden. Any form of attack that
prevents a player from connecting to the server is against the rules.
A bridge can be built in any sector adjacent to one of yours, providing
that the target sector is adjacent to a non-sea, non-bridge sector. Since
bridgeheads are not required, you can't collapse bridges by killing the head.
-(You can still kill them by taking the bridge below 20%) This also fixes a
+(You can still kill them by taking the bridge below 20%) This also fixes a
problem with planes on bridges not dying when the bridge dies. (This was partly
fixed before, but the fix didn't work all the time)
.s1
.s1
Your ships/sects will no longer shoot themselves in defense.
You can cheerfully blast your own ships/sects without fear of
-retaliation from your own forces. You can also torp your own
+retaliation from your own forces. You can also torp your own
ships, and they will resignedly watch as the torps slam into them.
.s1
Gun ranges are no longer truncated. Instead, there is a % chance equal to the
.s1
Your civs will work on allied ships in your harbors. (If ALLYHARBOR is used)
.s1
-You may assault your own sectors. Mil assaulting are simply added to the
+You may assault your own sectors. Mil assaulting are simply added to the
number in the sector.
.s1
You may now land planes on a carrier in an allied harbor. (If ALLYHARBOR is
mob for 2 fuel, etc. Ships with no fuel do not get mobility. Ships with a fuel
usage of 0 do not need fuel. (Sailing ships & nuc ships/subs)
.s1
-A new command, "fuel" is added. It allows fueling from a harbor sector, or a
+A new command, "fuel" is added. It allows fueling from a harbor sector, or a
ship or ships with the "oiler" flag. When fueling, petrol and/or oil in the
harbor or on the oiler is exchanged for fuel points, which are loaded on the
ship. Petrol is used first, if available, at a rate of 1 pet = 10 fuel. If
Chainsaw 2.1 has some minor differences from Chainsaw 2.0.
.s1
Now, when navigating, sonar or radar commands will
-default to the current ship, or the first (lowest
+default to the current ship, or the first (lowest
numbered) ship in a group. You may override this by
specifying the desired ship on the command line.
(I.e. "r 12" or "radar 212", etc)
.s1
-The chance of a plane aborting is changed to
+The chance of a plane aborting is changed to
(100-eff)%. This means that if a 100% plane
takes a hit for 30% damage, it has a 30% chance to abort.
If it then takes another hit for 20% more, a total of 50% damage,
than rolling every time the plane takes a flak
hit from a ship.
.s1
-A new command has been added, the 'payoff' command.
+A new command has been added, the 'payoff' command.
It shows the value of trade ships if scuttled at
the current sect (check info payoff).
.s1
-Constants have been added to control ship & plane
+Constants have been added to control ship & plane
efficiency growth rate. It is now possible to allow
2xETUS growth in efficiency, 3x, etc.
.s1
.s1
When assaulting, troops will always leave at least 1 food on the ship.
.s1
-You may now build multiples of an item by adding a build count at the
+You may now build multiples of an item by adding a build count at the
end of your build command. (see info build)
.s1
You may now give comments in the hours file. Comment lines start with a
.s1
A new option, SNEAK_ATTACK is included. It can only be used in
conjunction with SLOW_WAR. It allows you to attack a sector of
-someone you're not at war with. Once attacked, the attacker
+someone you're not at war with. Once attacked, the attacker
automatically declares war against the defender, and pays $5K.
-At that point, the attacker has to go through the normal SLOW_WAR
+At that point, the attacker has to go through the normal SLOW_WAR
procedure before attacking again. See info attack, info assault.
SNEAK_ATTACKs may not be done by parachute.
.s1
Land units have been added. There are many new commands for dealing with them.
Look at info Land-units for a general overview.
.s1
-Sectors that don't have enough food at the update will now attempt to
+Sectors that don't have enough food at the update will now attempt to
draw food from supply sources. (see info supply for details on supply sources.
Conquered sectors will not draw food)
Other sectors/ships/units will now draw supplies (mostly shells) when they
Distribution has been changed. Each sector now has a distribution sector
rather than a distribution path (during the update, the least-cost path
is found and used) Also, importing & exporting via distribute now happen
-in separate phases, rather than being mingled. See info distribute
+in separate phases, rather than being mingled. See info distribute
and info update-sequence for a full description.
Read info distribute, or don't cry.
.s1
A new command, cede, allows you to give a sector or ship to a neighbor. See
info cede for more details.
.s1
-There are several new information commands, such as neweff and
+There are several new information commands, such as neweff and
starvation. See the info pages for details.
.s1
Sectors are damaged by combat occurring in them. See info attack for details.
.s1
-Missions may be given to ships/planes/units, allowing them to interdict
+Missions may be given to ships/planes/units, allowing them to interdict
enemy movement, support friendly attacks & defense, and other things.
See info mission for details.
.s1
population of a sector can starve in one update. Example: if you have 200 uw's,
100 mil, and 500 civilians, and no food, normally you'd have 100 uw's, 50 mil,
and 250 civs after the update. With NEW_STARVE in effect, you'd have 0 uw's,
-300 civilians, and 100 mil.
+300 civilians, and 100 mil.
.s1
NEW_WORK: When moving civs to or from a sector with low work, the new loyalty
and work percentage of the destination sector is computed proportionally.
work and how you can use them to help improve your clients.
.s1
In addition, there is a "timestamp" field on each object (sectors, ships,
-land units, planes, nuclear stockpiles, lost items) that you can use to
+land units, planes, nuclear stockpiles, lost items) that you can use to
compare against to keep data between clients and the database in sync with
each other. These timestamps are kept in systems seconds, so they should
be accurate down to 1 second. Every time an object is changed, it's
Also, it now costs engineers 1 point of mobility per mine laid.
.L -
If land units are accompanied by engineers, then their chance of
-hitting a land mine is reduced by a factor of 3. E.g. if there
+hitting a land mine is reduced by a factor of 3. E.g. if there
are 25 mines in the sector, then a land unit has a 33%
-chance of hitting a land mine. If it is accompanied by an
+chance of hitting a land mine. If it is accompanied by an
engineer, then that chance drops to 11%.
.L -
If an engineer sweeps a land mine that it cannot carry, it drops
Each country now has two bmaps, their 'working' bmap and their 'true' bmap. The true bmap contains only information put there by the
server. The working bmap also contains information put there by the
bdes and sharebmap commands. The 'bmap' command usually displays the
-working bmap unless the player specifies 'bmap <SECTS> true'.
+working bmap unless the player specifies 'bmap <SECTS> true'.
If the players working bmap becomes corrupted somehow, then they can
type 'bmap <SECTS> revert' to revert their working bmap back to their
true bmap. This change was necessary to prevent abuse of the new 'sharebmap' command (which compares the players true bmaps when
shutdown aborted it. The bug allowed players to delay update and
shutdown indefinitely.
* Thread priorities are only implemented by LWP and no longer used.
- With LWP, they let players with a sufficiently fast connection
+ With LWP, they let players with a sufficiently fast connection
starve out the threads that clean the lost file and kill idle
connections. Drop them.
* Show nuke rounded required research incorrectly.
in 4.0.2), and trains could be sent down paths without rail (never
worked). Also fixes unit reaction path cost.
* The custom table reader can now deal with sector, item, product and
- infra tables more comfortably.
+ infra tables more comfortably.
* Remove option BIG_CITY. Deities can customize the sect table to
get the same effect.
* Many more selectors can now be compared with names, not just
* News no longer call all sub-launched missiles nuclear.
* Incoming missiles are now reported with coordinates.
* Removed some code that served no purpose except crashing on
- Windows.
+ Windows.
* Fixed Mac OSX and AIX build problems.
* Don't resolve player IP addresses for now, because it can crash
with certain versions of GNU libc.
* Updated order of firing flak in Flak.t.
* Fixed 80% efficient planes on ships must be maintained.
* Fixed initial MOB_ACCESS check thread sleep time was set by an uninitialized
- variable.
+ variable.
* Removed "TEMPORARILY DISABLED" message from mission command for escort
missions. Escort missions have been re-enabled since 4.0.15.
* Using sonar from the navigate command will print the sonar map.
* Fixed bug in sectors that don't revolt not showing up as lost items.
* Fixed bug where maps with an X of exactly 200 is not drawing third line.
* Fixed bug where MOB_ACCESS was not updating the mobility just before
- the update.
+ the update.
* Fixed bug in the way treaties are examined and sometimes produce
wrong results.
* Fixed edit to allow creating negative mobility for sectors.
* Fixed bug where scrapping land units was creating military.
* Fixed description of sect_mob_neg_factor in econfig file.
* Increased speed of PT boats.
-
+
Changes to Empire 4.2.4 - Tue Feb 2 05:47:44 PST 1999
* Added check to make military values match up correctly for land
units.
* Fixed bug in explore command not setting mobility to correct
value when MOB_ACCESS was enabled.
* Fixed bug in enlist setting mobility incorrectly sometimes.
- * Added doc/backup file for deities which recommends how backups and
+ * Added doc/backup file for deities which recommends how backups and
restores of the data directory should be done.
Changes to Empire 4.2.3 - Wed Jan 13 06:02:35 PST 1999
* Fixed bug where satellites were not orbiting the world during the
update.
* Fixed bug in torpedos being too smart. They knew how to jump over
- land! :) Now the "line_of_sight" routine is used to determine if a
+ land! :) Now the "line_of_sight" routine is used to determine if a
torpedo has a straight path to the destination. If it doesn't, the
torpedo no longer jumps over land, but instead slams into it. This was
an interesting bug because you could torp ships on the other side of
destination sector. Goods are now attempted to be returned to the
start sector, and apporpriate steps taken if the start sector is no
longer available.
- * Fixed march to prompt you before you abandon a sector you own by
+ * Fixed march to prompt you before you abandon a sector you own by
marching out the last land unit.
- * Fixed check functions to only check the relevant portions of the structure
+ * Fixed check functions to only check the relevant portions of the structure
and not the timestamp info that doesn't affect how the object functions.
* Fixed bug in spy command that always told you if a spy unit was in a
non-owned sector.
gained information that you wouldn't normally know.)
* Merged bestpath and bestownedpath and wrote new wrappers, "BestShipPath"
and "BestAirPath" to use it properly. It is also good to note that
- bestownedpath is used to determine paths for ships and for planes,
+ bestownedpath is used to determine paths for ships and for planes,
and that best_path (which uses the A* algorithm) is used for all land
based paths, and that the two are never interchanged.
* Removed "jet recon" plane (it slipped in during the PLANENAMES conversion,
properly, and thus causing crashes when accessing certain plane
routines. This happened during the move to make the PLANENAMES option
run-time configurable.
-
+
Changes to Empire 4.2.0 - Thu Oct 29 06:27:15 PST 1998
* Bumped rev to 4.2.0 since this is a major release (the server is now
run-time configurable for just about everything and is released under
* Updated Education.t
* Modified (increased) chances of hitting mines slightly.
* Removed unused variables from shp_check_mines.
-
+
Changes to Empire 4.0.17 - Fri Jul 31 06:12:21 PDT 1998
* Added ability in edit to change coastal flag for sectors.
* Added ability in edit to edit plague values for ships.
(works for sea and land mines, used "lmine" to distinguish it from "min"
which determines mineral (iron) content of a sector.)
* No longer able to pin bomb land units on a ship.
- * Land units are required to have at least one military loaded to perform
+ * Land units are required to have at least one military loaded to perform
a mission.
* Firing land units are required to have at least on military loaded to
be able to fire (or return fire.)
they were not cargo capable.
* Fixed bug in potentially crashing in update code for nations tech/research.
* Fixed bug in execute putting you into execute mode incorrectly.
- * Fixed bug in board not allowing land units to board from 0 mobility
+ * Fixed bug in board not allowing land units to board from 0 mobility
sectors.
* Fixed bug where interdicted land units that were missed displayed
a "SPLASH! Bombs miss your ships" message.
before.)
* Fixed bug in neweff not reporting stopped sectors. It now (correctly)
reports them as not changing eff.
-
+
Changes to Empire 4.0.15 - Wed May 20 12:35:53 EDT 1998
* Fixed the spelling of Markus' name in CHANGES4.0 files.
* Added Markus' patches/fixes. Some are detailed below.
* Fixed bug in setsector telling the deity coordinates of sectors being
granted/taken away.
* Fixed bug in setting budget of enlistment sectors to 0.
-
+
Changes to Empire 4.0.14 - Wed Apr 8 08:47:54 EDT 1998
* Fixed time_t problem in common/log.c
* Fixed bug in headlines
* Fixed bug in printing of "No ship(s)" twice in cargo command when no
ships were selected.
* Temporarily disabled escort missions until a fix is found. They are
- randomly crashing the server.
+ randomly crashing the server.
* Fixed morale.t to reflect that retreat percentage is based off of
morale_base and not 75.
* Fixed bug in bridgefall where planes and units on ship in a sector
* Fixed bug in produce command reporting incorrect costs (sometimes).
* Land units on ships will now try to draw supply from the ship they
are on.
-
+
Changes to Empire 4.0.13 - Mon Mar 2 11:04:28 EST 1998
* Fixed bug in distribute when world sizes are other than 64x32
* Fixed bug in getcommand (not really a bug, just made it work like
* Fixed building of POSIX threads on Alpha running Digital Unix.
* Fixed line_of_sight prototype in sona.c
* Fixed fairland not to conuse stupid C++ compilers.
-
+
Changes to Empire 4.0.12 - Tue Feb 24 11:27:31 EST 1998
* Fixed client build on linux (whoops)
-
+
Changes to Empire 4.0.11 - Tue Feb 10 10:53:10 EST 1998
* AIX build seems to only work with gcc right now (but at least that works)
* Vax Ultrix (vaxultrix) build should work now (hopefully) out of the box.
* Fixed bug where spies were not dying when damaged.
* Fixed bug in HIDDEN mods in declare command not printing country # of
uncontacted country correctly (or at all as a matter of fact)
-
+
Changes to Empire 4.0.10 - Mon Aug 18 12:34:58 EDT 1997
* Fixed bug where fleets were being interdicted but the damage was being
spread to ships not in the same sectors.
a sector.
* Documented mountains only holding and using 1/10th of the normal sector
population in Sector-types.t.
- * Fixed documentation on ship's firing ranges in fire.t to be less
+ * Fixed documentation on ship's firing ranges in fire.t to be less
ambiguous.
* Updated nukes in nuke.t
* Added apropos command (thanks to Mike Wise)
there are two files of the same name, and you don't get a complete match,
then whichever file is found first in the directory is used.
* Changed documentation in wantupd.h
-
+
Changes to Empire 4.0.9 - Sat Apr 19 23:01:51 EDT 1997
* Fixed dump info pages that were getting formatted funny.
* Fixed improve info page.
This was major because it affected timestamp values which are more
than 65535.
* Fixed bug in sdump.c for typo in reporting the trade ships origin.
-
+
Changes to Empire 4.0.7 - Mon Feb 24 22:48:54 EST 1997
* Fixed bug in aircombat.c when calculating the air combat odds. Negative
numbers were screwing things up good...
* Spies caught in Neutral or Friendly countries cause the Neutral or
Friendly country to go Hostile towards the owner of the spy.
* Tweaked ammunition numbers for artillery units.
- * No more automatic declarations of War should be made. You will go
+ * No more automatic declarations of War should be made. You will go
hostile, but since going to war doesn't increase your countries
defenses, and is purely political, it is left to the player to go
that final step.
* Fixed doconfig.c to create directories with right modes.
* Fixed install macros in makefiles to move binaries to the right
places.
-
+
Changes to Empire 4.0.3 - Wed Dec 4 22:46:53 EST 1996
* Added HP/UX port.
* Fixed doconfig.c (put exit(0) at the end of main.)
* Fixed attack value in attack_val in lndsub.c
* Fixed lload in commands/load.c
* Fixed defense_val in lndsub.c - Made it a minimum of 1, so that units will
- always fight until dead or retreating. 0 makes them get stuck.
+ always fight until dead or retreating. 0 makes them get stuck.
* Fixed update/deliver.c - no delivery of non-oldowned civvies (or anything
else for that matter.)
* Fixed llook in commands/look.c
* Added NO_LCMS, NO_HCMS and NO_OIL options. When any of these options are
enabled, you don't need any of that type of material to build things.
If NO_HCMS is enabled, you don't need HCMS to build bridges, you need
- lcms. If both NO_HCMS and NO_LCMS are enabled, then you don't need
+ lcms. If both NO_HCMS and NO_LCMS are enabled, then you don't need
any materials to build a bridge.
* There is no mobility cost for assigning missions. But, there is also
no longer any benefit for being on a mission either.
* Che can now be lessened by making happiness. If you have more happiness
than your conquered populace, they don't fight as hard or recruit as
much. If you have less than them, they fight harder and recruit more.
- It's not much though - it ranges from 2.0 in your favor to only 0.8
+ It's not much though - it ranges from 2.0 in your favor to only 0.8
against you (whereas it was always 1.0 before.) So, it definitely
favors the attackers to make lots of happy now.
* Bridgeheads can only be built on coasts.
scaled by unit tech factor.
.fi
.s1
-In addition, if you are pin-bombing a land unit or a ship, when
+In addition, if you are pin-bombing a land unit or a ship, when
you make your bombing run, the specific unit/ship you are bombing
gets to fire flak at you again. This number of guns firing flak
in these cases does NOT saturate.
To find out the required amounts of materials, mobility, and money
use the "show sect build" command.
.s1
-Also, defensive infrastructure is not always improvable. See the version
+Also, defensive infrastructure is not always improvable. See the version
info to see if the DEFENSE_INFRA option is enabled or not. If it is not
enabled, the defense infrastructure of the sector is always the same
as the efficiency of the sector. If it is enabled, you must improve your
considered to be militia instead of military, and are less important.
.s1
The way that military are incorporated into units are that the mil are
-loadable commodities of the unit. The offensive or defensive
+loadable commodities of the unit. The offensive or defensive
.s1
Commands for land units are generally similar to those of planes/ships, and
-will usually start with 'l'.
+will usually start with 'l'.
.s1
.L "Land unit characteristics"
.s1
range of your planes and control how far away they'll intercept, you can
change the reaction radius for land units with \*Qlrange\*U. Units with a base reaction
radius of 0, or those whose radius you have set to 0, will not react.
-When built, the unit will have as its reaction radius set to zero.
+When built, the unit will have as its reaction radius set to zero.
.s1
.L Cargo
.s1
.s1
.L "Land unit statistics"
.s1
-Each land unit has certain vital statistics which show how it will
+Each land unit has certain vital statistics which show how it will
operate. These are obtainable from the show command:
.s1
.EX show land statistics
Spy is the other side of the equation, i.e. how well can the unit find things?
A unit with a low spy won't be very good at locating other units, and won't
be able to report much when it encounters them in battle. A high-spy unit
-will be able to use the \*Qllookout\*U command with more chance of success, and
+will be able to use the \*Qllookout\*U command with more chance of success, and
will be able to more accurately report information about the units it runs
into in battle. (See info \*QAttacking\*U for information about intelligence
reports) Units with radar capacity also use their spy value to determine how
sectors. The attack value of your forces is the combined attack values of all
attacking land units, plus the number of mil coming in from adjacent sectors.
.s1
-The defense value is equal to the mil in the defending sector, plus
+The defense value is equal to the mil in the defending sector, plus
the defense values of any defending units in the sector, as well as any that
react and move there.
.s1
Lots of land.
A whole hell of a lot of land.
You should try to expand your country from the very beginning.
-From there, you'll meet your neighbors who are doubtlessly
+From there, you'll meet your neighbors who are doubtlessly
doing the same thing you're doing.
Expanding wildly.
Now comes the first of a series of decisions you have to make.
(later dropping to 10%, 5%, or even none at all!),
and a few schools, research, parks, etc.
to fill up some of the other space.
-The most important thing to have is a good transportation system
+The most important thing to have is a good transportation system
in the form of your highways.
Anywhere from 20-40% of your country should be highways.
You'll find them infinitely useful
in moving food to a starving sector,
taking people to a new settlement,
-or transporting troops to a local revolution, highways are vital!
+or transporting troops to a local revolution, highways are vital!
.s1
Another important consideration is \*Qdo you want really want to win?\*U
This implies the idea of competing
Form a cartel with other small nations
and try to run over a big country.
As in real life, the possibilities are endless!
-Look at the Middle East, they're having fun, right?
+Look at the Middle East, they're having fun, right?
.s1
This is just a game, and from this point on,
you don't have to worry about watching over your nation too closely.
And give a threshold for each of your sectors as prompted.
.s1
Now at each update,
-Empire will move food to and from your warehouse
+Empire will move food to and from your warehouse
in an attempt to satisfy all your threshold requirements.
If for example a certain sector
has more than its allotted threshold of a certain product
try to put 45 iron on your lcm factory and take all lcm's
(except for one)
off your lcm plant
-(possibly to be used somewhere else).
+(possibly to be used somewhere else).
.s1
Note: the order in which this happens is predictable,
but not always desirable.
will attempt to keep 400 units of food in 4,0
by importing or exporting as necessary.
.s1
-.EX thresh oil 4,0 100
+.EX thresh oil 4,0 100
This command is the same as above,
but will instead attempt to keep 100 units of oil.
.s1
Okay, I have written this document with YOU in mind!
Welcome to the University of California at Berkeley's Empire!
(From now on called UCB Empire).
-There are a whole bunch of changes in the game
+There are a whole bunch of changes in the game
since we last played, so I need to bring you up to date.
.s1
Our OLD EMPIRE game was Version 1.2 -
In the OLD game -
you simply dug up ORE and sent it to the Shell, Defense, etc.
factory to have it processed into something else
-(make guns, shells, etc).
+(make guns, shells, etc).
.s1
But in the NEW game - sectors are a lot more complex.
For one thing curtain sectors CAN'T even PRODUCE
Other sectors can produce normally,
even though your TECH level is still 0.
Keep in mind that you CAN DESIGNATE the ABOVE sectors -
-but they won't produce until you reach the desired TECH LEVEL.
+but they won't produce until you reach the desired TECH LEVEL.
.s1
Also, it takes more \*QMaterials\*U
to make 1 Unit of a finished product.
.s1
BTU's are generated by your country's capital.
The more efficient your capital, the more BTU's that are generated.
-The number of BTU's also depend on the game's settings.. See the
+The number of BTU's also depend on the game's settings.. See the
output of the 'version' command for an estimate of BTU generation speeds.
However, you may have a maximum of 512 BTU's at any one time.
And once your BTU's reach zero, you may not issue any commands
added many configurable options in the KSU distribution, Thomas
Ruschak added land units and missions in 1992-1993 and released the
"Chainsaw" server, and Ken Stevens rewrote much of the server code in
-1995 and released the "Empire2" server, and Steve McClure and the Wolfpack
+1995 and released the "Empire2" server, and Steve McClure and the Wolfpack
made lots
of other changes and released the "Empire4" server in August of 1996.
.in
.LV Expert
.sp
.s1
-If the RES_POP option is in use,
+If the RES_POP option is in use,
the research level of a country determines the maximum number of civilians
and uw's
that can live in a sector. For ordinary sectors, the maximum is:
Capitals are typically better at defending against attack than other
sectors, except fortresses.
.s1
-PARK - Parks are provided solely for the convenience of the
+PARK - Parks are provided solely for the convenience of the
people.
-Parks require construction materials to provide maintenance
+Parks require construction materials to provide maintenance
services and
add to a nation's \*Qhappiness\*U level.
.s1
.s1
BANK - Banks are used for smelting and storing gold bars.
They include a smelter to refine gold dust into gold bars.
-While the bars are stored in the bank the busy little bankers
+While the bars are stored in the bank the busy little bankers
invest them and return a profit on their use.
Banks are of the Fort Knox variety; they are more impervious to shelling
than most other sectors, and military in them fight harder
Agribusiness sectors produce much more food than other sectors.
.s1
OIL - Oil fields produce oil by pumping it out of the ground.
-.s1
+.s1
REFINERY - Refineries produce petroleum by processing oil.
.s1
LIGHT - Light manufacturing plants produce light construction materials
expects input in the form:
.EX VERB ARG1 ARG2 ...
VERB is any one of the Empire commands on the \*Qcommand list\*U
-(what you see when you type \*Qlist\*U-- e.g.
+(what you see when you type \*Qlist\*U-- e.g.
\*Qmap\*U, \*Qmove\*U, \*Qinfo\*U, etc).
.s1
The number of ARGs varies from command to command.
Note that \*Qhix\*U, \*Qhiy\*U, and \*Q?cond\*U are all optional.
Also, the entire \*Qlox:hix,loy:hiy\*U section may be replaced
by either \*Q#\*U, \*Q#0\*U, \*Q#1\*U, \*Q#2\*U,
-or \*Q#3\*U, ... which refer to
+or \*Q#3\*U, ... which refer to
\*Qrealm\*Us which you can define.
(See \*Qinfo realm\*U.)
Note that \*Q#\*U and \*Q#0\*U are equivalent. Also \*Q*\*U refers to
.s1
Also note that captured civilians only pay 1/4 the normal taxes. They
like to hide money until they are all finally agree to become naturalized
-citizens of their new government.
+citizens of their new government.
.SA "Updates, Nations"
difference between your tech level and the minimum tech.
.fi
.s1
-Note that if the TECH_POP option is enabled, technology costs
+Note that if the TECH_POP option is enabled, technology costs
proportionately more $$$ to make as your civilian population grows
past 50,000 civilians.
.s1
For example, if you sail the ship 10 sectors from the harbor where it was
built and scuttle it in a harbor there, you would get 125% of the money you
paid for it, or $2188. If you sailed it 15 sectors to a harbor and scuttled it,
-you would get 153%, or $2678.
+you would get 153%, or $2678.
.s1
Use the \*Qpayoff\*U command to see how much the trade ship would pay
were it scuttled in a harbour at its present location.
to the old owner while your units are stuck in it.
.s1
Note that che are finicky. If you manage to lose a sector fighting them,
-they do unpredictable things.
-They may all come out of hiding to join the
+they do unpredictable things.
+They may all come out of hiding to join the
military. A few may stay in hiding while the majority come out to join
the military. Who knows what else they may do.
.s1
Note that some ships will have the
semi-lander flag, which allows them to land 25% of their troops.
.s1
-If you have land units with the 'assault' ability
+If you have land units with the 'assault' ability
aboard the ship assaulting, you will be asked if
you wish them to join in the assault as well.
Assaulting units pay one update's worth of mobility, except for marine
.s1
Bmap differs from map in that it reflects everything you've learned
about the world. If, for example, you navigate near a sector and find
-out that it is as sea, it will show up on your bmap as sea, even if it
+out that it is as sea, it will show up on your bmap as sea, even if it
doesn't show up on your map.
.s1
When you get new information, it will overwrite the designation you put in
.LV Expert
.SY "bestpath <SECTS> <SECTS>"
.s1
-The bestpath command shows you the best path from any sector
+The bestpath command shows you the best path from any sector
to any sector. You must own both sectors.
.s1
The path shown by bestpath is the cheapest
.s1
Bmap differs from map in that it reflects everything you've learned
about the world. If, for example, you navigate near a sector and find
-out that it is sea, it will show up on your bmap as sea, even if it
+out that it is sea, it will show up on your bmap as sea, even if it
doesn't show up on your map.
.s1
Note that bmap shows the \*QLAST KNOWN INFORMATION\*U you have about
You can also give the number of a ship, and bmap will give you a small
bmap centered on the location of that ship, provided you own it.
.s1
-If you use lbmap, you can get a bmap around a land unit.
+If you use lbmap, you can get a bmap around a land unit.
If you use pbmap, you can get a bmap around a plane.
If you use sbmap, you can get a bmap around a ship.
If you use nbmap, you can get a bmap around a nuke.
To board ship #16 from ship #93 you might type:
.EX board 16
.s1
-The program will ask from which ship or sector you wish to board,
+The program will ask from which ship or sector you wish to board,
(you may only board from one ship at a time), how many troops to board
with, and which land units (having "assault" capability) to board with.
.s1
must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
-Route is a normal empire path specification. You may also give a
+Route is a normal empire path specification. You may also give a
destination sector on the command line, or at any time while giving
the route, and empire will use the best path from the current sector
to the desired destination sector.
any flak guns which your enemy has stationed there.
What's more, any enemy ship in the target sector will also
shoot at each of your bombers before any attacks are performed.
-Any enemy land units with the 'flak' ability will also fire at
+Any enemy land units with the 'flak' ability will also fire at
all your planes at this time.
.s1
A well-equipped fleet of battleships in a heavily-defended harbor
can be very risky to attack, even though hitting ships in harbor is
like shooting fish in a barrel.
.s1
-When bombing ships/planes/units, entering a '~' character will cause a
+When bombing ships/planes/units, entering a '~' character will cause a
particular plane not to bomb. Other planes on the mission will still
be asked for their targets.
.s1
.s1
When you pin-bomb a land unit, it will fire flak at the plane bombing it,
unless
-it has an AA fire rating of 0.
+it has an AA fire rating of 0.
.s1
In the case of pinpoint bombing, see \*Qinfo Hitchance\*U for the formula
determining whether a plane hits its target.
put full crews on your newly built
ships and leave them in harbor until they reach 100%.
.s1
-The work required to add a point of efficiency to a ship is
+The work required to add a point of efficiency to a ship is
.s1
.NF
(20 + (lcm_to_build + 2 * hcm_to_build))/100
A small crew on a large ship
may not be able to make any repairs at all.
(Moral: keep your ships fully crewed in anticipation of future damage.)
-Repairs at sea do not use any lcms or hcms, but may not push the
+Repairs at sea do not use any lcms or hcms, but may not push the
efficiency of a ship over 80%.
.s1
AIRFIELD SECTORS & BUILDING PLANES
it has reached 40% efficiency. Planes below 10% efficiency are
destroyed.
.s1
-The work required to add a point of efficiency to a plane is
+The work required to add a point of efficiency to a plane is
.s1
.NF
(20 + (lcm_to_build + 2 * hcm_to_build))/100
Planes will also gain efficiency in non-airport sectors, but at only 1/3rd
the normal rate.
.s1
-Planes on carriers will also gain
+Planes on carriers will also gain
efficiency. The amount of work available is based on the carrier's crew,
and the rate is the same as a non-airport sector.
Repairs at sea do not use any materials, but may not push the
In order to build a land unit, you must have 10% of the items
listed by \*Qshow\*U available at the time of building. The land unit will
appear at 10% efficiency (a unit of less than 10% efficiency is
-dead). Then,
+dead). Then,
each update, the unit will grow in efficiency, and use up more
of the required goods until it reaches 100%.
.s1
-The work required to add a point of efficiency to a land unit is
+The work required to add a point of efficiency to a land unit is
.s1
.NF
(20 + (lcm_to_build + 2 * hcm_to_build))/100
.LV Basic
.SY "cargo [<SHIP/FLEET> | <SECTS>]"
.SY "lcargo [<UNIT/ARMY> | <SECTS>]"
-The cargo command lists the commodities on board your ships
+The cargo command lists the commodities on board your ships
in readable format. The lcargo command does the same for land units.
.s1
The <SHIP/FLEET>, <UNIT/ARMY>, and <SECTS> arguments are
Galexis (#2) destroyer #35 @-3, 11
.FI
.s1
-Note that subs will NOT show up on coastwatch, unless they are in a
+Note that subs will NOT show up on coastwatch, unless they are in a
sector you own.
.s1
.SA "skywatch, lookout, Sector-types, radar, Ships, Detection"
After the program has collected any necessary information
it will list each sector where civilians are converted.
.s1
-Note: you must have enough military in the sectors to force the
+Note: you must have enough military in the sectors to force the
populace to become uncompensated workers -- about 10%. Land units
count toward this at a value equal to the number of mil required
to build them. Security units are even more efficient, counting for
.NA cutoff "List delivery thresholds"
.LV Expert
.SY "cutoff <SECTS>"
-The cutoff report provides information about the various
+The cutoff report provides information about the various
delivery cutoff levels in some or all of the sectors that
you occupy.
.s1
Will list all lcm delivery specifications. (Sectors with no delivery
threshold or direction will not be listed).
.s1
-The census and commodity reports will indicate deliveries by the
+The census and commodity reports will indicate deliveries by the
same characters used to specify them in this command.
.s1
If, during an update, the destination sector is not owned by you,
.s1
.L "Finding sectors with not dist point set"
.s1
-If you want to find sectors with no distribution point set, use the
+If you want to find sectors with no distribution point set, use the
xdist and ydist selectors:
.s1
.EX level # ?xdist=xloc&ydist=yloc
<COMMODITY> is the name of a commodity which is to be carried along
on all of the planes which have a transport capacity.
.s1
-Route is a normal empire path specification. You may also give a
+Route is a normal empire path specification. You may also give a
destination sector on the command line, or at any time while giving
the route, and empire will use the best path from the current sector
to the desired destination sector.
.LV Expert
.SY "dump <SECTS> [<fields>]"
The dump command displays all information on
-some or all of the sectors you occupy.
+some or all of the sectors you occupy.
dump is a combination of census, commodity, cutoff and level.
Each sector's information is printed on one very long line.
Fields are separated by a single space.
on all of the planes which have a transport capacity.
If nothing is specified, then nothing will be carried.
.s1
-Route is a normal empire path specification. You may also give a
+Route is a normal empire path specification. You may also give a
destination sector on the command line, or at any time while giving
the route, and empire will use the best path from the current sector
to the desired destination sector.
.s1
In the case of non-marine tactical missiles, if there are any HOSTILE
abm's within range of the target sector, then two of them will fire in
-an attempt to intercept the incoming missile.
+an attempt to intercept the incoming missile.
.s1
Similarly, two AT_WAR a-sat's will attempt to intercept any satellites
you attempt to launch within their range. Also, if the sector you are
they will get a telegram informing them of the positioning of the
satellite. See below for details of a satellite's orbit path.
.s1
-When launching missiles, there is a
+When launching missiles, there is a
% chance equal to (5 + 100 - efficiency) * (1 - techfactor) that the
missile will blow up on
the launching pad instead of launching.
.s1
Bmap differs from map in that it reflects everything you've learned
about the world. If, for example, you navigate near a sector and find
-out that it is sea, it will show up on your bmap as sea, even if it
+out that it is sea, it will show up on your bmap as sea, even if it
doesn't show up on your map.
.s1
Note that bmap shows the \*QLAST KNOWN INFORMATION\*U you have about
You can also give the number of a ship, and bmap will give you a small
bmap centered on the location of that ship, provided you own it.
.s1
-If you use lbmap, you can get a bmap around a land unit.
+If you use lbmap, you can get a bmap around a land unit.
If you use pbmap, you can get a bmap around a plane.
If you use sbmap, you can get a bmap around a ship.
If you use nbmap, you can get a bmap around a nuke.
.LV Basic
.SY "cargo [<SHIP/FLEET> | <SECTS>]"
.SY "lcargo [<UNIT/ARMY> | <SECTS>]"
-The cargo command lists the commodities on board your ships
+The cargo command lists the commodities on board your ships
in readable format. The lcargo command does the same for land units.
.s1
The <SHIP/FLEET>, <UNIT/ARMY>, and <SECTS> arguments are
.LV Expert
.SY "ldump <UNITS> [<fields>]"
The ldump command displays all information on
-some or all of your land units.
+some or all of your land units.
ldump is a combination of land, lcargo, and lstat.
Each ship's information is printed on one very long line.
Fields are separated by a single space.
.NA level "List distribution thresholds"
.LV Basic
.SY "level <SECTS>"
-The level report provides information about the various
+The level report provides information about the various
distribution thresholds in some or all of the sectors that
you occupy.
.s1
.SY "lload land <UNITS> <UNITS>"
The load command carries out the loading of units.
Commodities (like guns, civs, food) can be loaded onto any unit capable
-of carrying them (to see what cargos a unit can carry, use the show command).
+of carrying them (to see what cargos a unit can carry, use the show command).
.s1
Some land units can carry extra-light
planes (typically these are SAM's)
.EX load food 3 -100
.s1
will cause unit 3 to load or unload food so that it has 100.
-If it had 120 food, 20 would be unloaded. If it had 50 food,
+If it had 120 food, 20 would be unloaded. If it had 50 food,
50 would be loaded.
.s1
.SY "lload plane <UNITS> <PLANES>"
If you use nmap, you can get a map that shows new sector designations
instead of old sector designations of your own country.
.s1
-If you use lmap, you can get a map around a land unit.
+If you use lmap, you can get a map around a land unit.
If you use pmap, you can get a map around a plane.
If you use smap, you can get a map around a ship.
If you use nmap, you can get a map around a nuke.
.SY "load plane <SHIPS> <PLANES>"
.SY "load land <SHIPS> <UNITS>"
The load command carries out the loading of ships.
-Commodities (like guns, civs, food) can be loaded onto any ship.
+Commodities (like guns, civs, food) can be loaded onto any ship.
Missiles can be loaded onto nuke subs
and planes can be loaded onto carriers.
Land units may be loaded onto many ships.
.s1
The ship(s) must be in a harbor and
the harbor must be at least 2% efficient.
-.s1
+.s1
.SY "load <COMMODITY> <SHIPS> <AMOUNT>"
In the first form,
the amount argument specifies the amount of the given commodity
.EX load food 3 -100
.s1
will cause ship 3 to load or unload food so that it has 100.
-If it had 120 food, 20 would be unloaded. If it had 50 food,
+If it had 120 food, 20 would be unloaded. If it had 50 food,
50 would be loaded.
.s1
.SY "load plane <SHIPS> <PLANES>"
-In the second form,
+In the second form,
where you say \*Qplane\*U instead of say \*Qciv\*U planes are
loaded onto ships. Multiple planes may be given. Some
may not be loaded, if there is not enough room.
.s1
.SY "load land <SHIPS> <UNITS>"
-In the third form,
+In the third form,
where you say \*Qland\*U instead of say \*Qciv\*U, a unit
is loaded onto a ship. Multiple units may be given. Some may
not be loaded, if there is not enough room. (Note that planes on
.s1
If you are loading things onto FRIENDLY ships, you need to type the
numbers of the ships, fleets or realms
-will not work. I.e. if you do "load f s 999", it'll load 999 food onto
+will not work. I.e. if you do "load f s 999", it'll load 999 food onto
all your ships in fleet s. If you do "load 1/2/3/4 999 f", it'll try to
load food onto ships 1, 2, 3, and 4, regardless of whether they're yours
or they belong to a friendly trading partner.
.s1
If you load something onto a friendly nation's ship, it becomes
his and he gets a telegram. If you load a unit, he gets any planes it
-may be carrying.
+may be carrying.
.s1
If you unload a plane or unit in a friendly nation's harbor, it
becomes his. If you unload a unit, he gets any planes it may be carrying.
timestamp functionality becomes important.
.s1
While the lost command does not take any arguments, it does
-take the standard syntax for selecting information.
+take the standard syntax for selecting information.
(see \*Qinfo Selector\*U).
.s1
A typical usage might be:
.NA lrange "Edit the reaction range of a unit"
.LV Expert
.SY "lrange <UNITS> <reaction-radius>"
-The \*Qlrange\*U command is used to limit the maximum reaction radius of
+The \*Qlrange\*U command is used to limit the maximum reaction radius of
land units. This can be useful in restricting the area which a unit will
attempt to defend. (see info attack for details of the reaction process)
.s1
.LV Expert
.SY "retreat [<SHIP/FLEET> | <SECTS>] [<PATH>] [<CONDITIONS>]"
.SY "lretreat [<UNIT/ARMY> | <SECTS>] [<PATH>] [<CONDITIONS>]"
-The retreat command allows you to examine or modify the retreat
+The retreat command allows you to examine or modify the retreat
paths and conditions of your ships or units. The following description
is for ships. Land units are exactly the same, except of course that
some of the retreat conditions (being sonared, depth charged, etc) don't apply.
.s1
.L Overview
.s1
-A player may give retreat orders for a ship or a fleet. Retreat
+A player may give retreat orders for a ship or a fleet. Retreat
orders include a set of conditions that determine when the fleet/ship
will retreat, and a path that the fleet/ship will follow. When a condition
is met for a particular ship, the \*Qas flt?\*U field is checked. If it
is Yes, then every ship in that fleet with fleet retreat orders retreats
-along the specified path. If it is no, then the retreat orders apply to
+along the specified path. If it is no, then the retreat orders apply to
that ship only, and only that ship retreats.
.s1
When a ship is added to a fleet, it is given the retreat orders of that
If you use nmap, you can get a map that shows new sector designations
instead of old sector designations of your own country.
.s1
-If you use lmap, you can get a map around a land unit.
+If you use lmap, you can get a map around a land unit.
If you use pmap, you can get a map around a plane.
If you use smap, you can get a map around a ship.
If you use nmap, you can get a map around a nuke.
This would make the unit interdict anything passing within 2 sectors of
4,0, provided it was also within 5 sectors (the unit's range) of 0,0.
.s1
-The op-sector/op-range concept allows you to restrict a unit's area of
+The op-sector/op-range concept allows you to restrict a unit's area of
interest to a small, important area, or just let it shoot at anything within
range.
.s1
A unit stays on its mission until you cancel it, OR the unit acts. Any type
of action not a part of a mission
is sufficient, so marching, navigating, transporting, flying, reconing,
-bombing, mining, paratrooping, being attacked, being
-paratrooped on, retreating, etc, will all cause a unit to lose its
+bombing, mining, paratrooping, being attacked, being
+paratrooped on, retreating, etc, will all cause a unit to lose its
mission status, but the unit could bomb/shell/etc AS PART OF A MISSION, and
still retain its mission status.
Also, land units with a reserve
.s1
Damage done is divided amongst all units/ships/commodities moving. For
example, if 6 ships were moving, and the interdiction mission did 18 points of
-damage, each ship would take 3.
+damage, each ship would take 3.
.s1
Note that only ships with sonar and ASW planes can interdict subs. Also, the
units may or may not detect the subs, so it's kind of random. The sub also
.s1
Note also that forts will fire at enemy ships coming within
range. You don't have to set anything for this, it
-happens automatically. (Forts firing at enemy ships naving happens before
-ships/planes/units interdicting ships, so if the enemy is using an area a
+happens automatically. (Forts firing at enemy ships naving happens before
+ships/planes/units interdicting ships, so if the enemy is using an area a
lot, a fort will hurt him without costing you mob from planes)
.s1
SUPPORT MISSIONS (planes only)
would try to intercept over any of them.
.s1
When a plane enters a sector, any planes with air defense missions that are
-at war with the owner of the plane will fly there to fight it.
+at war with the owner of the plane will fly there to fight it.
The air defense planes
-encounter normal interception along the way (but do \*QNOT\*U trigger
+encounter normal interception along the way (but do \*QNOT\*U trigger
more air defense missions, but \*QMAY\*U be intercepted normally).
Once the air defense planes get to the sector,
they fight the plane. Then, if the owner of the sector
.s1
.L "Unhappy civilians"
.s1
-Also, when moving unhappy civilians (work percentage less than 100%),
+Also, when moving unhappy civilians (work percentage less than 100%),
unhappiness is contagious. The work percentage of the
destination sector is computed by averaging the incoming civ's happiness
with the happiness of the civs already there. For example, say you move
.s1
Bmap differs from map in that it reflects everything you've learned
about the world. If, for example, you navigate near a sector and find
-out that it is sea, it will show up on your bmap as sea, even if it
+out that it is sea, it will show up on your bmap as sea, even if it
doesn't show up on your map.
.s1
Note that bmap shows the \*QLAST KNOWN INFORMATION\*U you have about
You can also give the number of a ship, and bmap will give you a small
bmap centered on the location of that ship, provided you own it.
.s1
-If you use lbmap, you can get a bmap around a land unit.
+If you use lbmap, you can get a bmap around a land unit.
If you use pbmap, you can get a bmap around a plane.
If you use sbmap, you can get a bmap around a ship.
If you use nbmap, you can get a bmap around a nuke.
.LV Expert
.SY "ndump <SECTS>"
The ndump command displays all information on
-some or all of the sectors you occupy.
+some or all of the sectors you occupy.
Each nuke's information is printed on one very long line.
Fields are separated by a single space.
.s1
If you use nmap, you can get a map that shows new sector designations
instead of old sector designations of your own country.
.s1
-If you use lmap, you can get a map around a land unit.
+If you use lmap, you can get a map around a land unit.
If you use pmap, you can get a map around a plane.
If you use smap, you can get a map around a ship.
If you use nmap, you can get a map around a nuke.
.TH Command ORDER
.NA order "Order a ship to auto-navigate"
.LV Expert
-.SY "order <SHIP/FLEET> [c|r|s|d|l]
+.SY "order <SHIP/FLEET> [c|r|s|d|l]
You use the \*Qorder\*U command to give sailing orders to ships.
At each update, ships sailing under orders \*Qautonavigate\*U toward a
specific destination sector. Telegrams notify you of arrivals.
ONLY merchant ship may be given orders, but in order to move during the
update a ship must have at least one crew (which may be civilian or military,
but not an uncompensated worker). Merchant ships are those that
-have 0 for their firing range and gun limit values.
+have 0 for their firing range and gun limit values.
.s1
Note that your ships sailing on orders will be interdicted just as if
you were navigating them by hand.
.EX order <SHIP/FLEET> s Suspend Orders
.s1
If you want to keep orders but don't want the ship
-to move during the update use the suspend option.
+to move during the update use the suspend option.
A quick look at \*Qsorder\*U
will display the eta time as suspended.
As long as a ship is suspended it will be unable to move
-during the update.
+during the update.
.s1
.EX order <SHIP/FLEET> r Resume Orders
Resume will allow ships that have a suspended order to move
-again.
+again.
.s1
-.EX order <SHIP/FLEET> d <dest1> [dest2|scuttle|-] Declare Orders
+.EX order <SHIP/FLEET> d <dest1> [dest2|scuttle|-] Declare Orders
.s1
To declare an order you have 3 options.
.NF
.s1
.EX order <SHIP/FLEET> l <hold> <start/end> <COMM> <amount>
.s1
-Set cargo Levels.
+Set cargo Levels.
.NF
Example: Cargo ship #109 is at your harbor in sector 10,0.
You have agreed to trade 200 lcm and 100 hcm to your friend and
.FI
.s1
AutoNav Features.
-.s1
+.s1
Whenever a ship is autoloading cargo, it will always wait until it loads
-to capacity. If a ship does not load fully it will not move!!!
+to capacity. If a ship does not load fully it will not move!!!
Remember 'ships need food!!' unless the NOFOOD option is enabled.
Set one of your cargo holds to load food or your ship will starve at sea.
When unloading cargo, the ship will unload all goods
listed in the cargo holds ONLY! It will not unload any extra good
-manually placed on the ship.
+manually placed on the ship.
.s1
If you are dealing with civilians 1 will be left in either the
sector or the harbor depending if your loading or unloading.
In either case when you arrive at the other harbor all but 1 civ
will be dumped into the harbor. Be careful if you set civilians
-as one of your cargo levels.
-.s1
+as one of your cargo levels.
+.s1
You can set any commodity in the game to be loaded on the ship.
However if you tell a ship to load a commodity it can not hold it
will be ignored. Example: If you tell a battleship to load
-Lcm, and of course it does not have that capability, see 'show ship
+Lcm, and of course it does not have that capability, see 'show ship
capability' that level will be ignored at the update.
-Planes and Units are not commodities so they can not be loaded this way.
-.s1
+Planes and Units are not commodities so they can not be loaded this way.
+.s1
At update time, the most direct path from the ship to destination
is calculated. Each ship is then autonavigated along that path to
the best of its mobility. The path is calculated from what the player
knows of the world (what you can see using the \*Qbmap\*U command).
Open sea, bridges, harbors, and unexplored regions of the world
are considered to be navigable. Your friend's harbors and bridges
-may be uses as long as the harbor >= 2% and the bridge >= 60%.
+may be uses as long as the harbor >= 2% and the bridge >= 60%.
Your ships will also try to avoid any mines you have declared on your
bmap. 'x' or 'X' characters. Should your ship hit a mine the ship
will stop moving and its orders suspended. You bmap will also be updated
-with a 'x' marking the sector for you.
-.s1
+with a 'x' marking the sector for you.
+.s1
If a ship sails in range of enemy forts they will be fired upon.
Setting your ship to autonavigate into an area with good fort
cover could result in many ships getting sunk fast.
-However you could put an invasion fleet off someone's coast in a hurry.
-.s1
+However you could put an invasion fleet off someone's coast in a hurry.
+.s1
If the ship has a 'sweep' flag
ships will try and sweep any mines if any are present as they move.
.s1
The autonav code will try and use as much mobility as possible and this
is all done before mobility is gained from the update.
After an update has completed
-your ship will have mobility so it can be moved by hand if needed.
+your ship will have mobility so it can be moved by hand if needed.
.s1
Ships with capability fish or oil can be setup to \*Qload\*U
from the sea sector.
must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
-Route is a normal empire path specification. You may also give a
+Route is a normal empire path specification. You may also give a
destination sector on the command line, or at any time while giving
the route, and empire will use the best path from the current sector
to the desired destination sector.
.s1
Bmap differs from map in that it reflects everything you've learned
about the world. If, for example, you navigate near a sector and find
-out that it is sea, it will show up on your bmap as sea, even if it
+out that it is sea, it will show up on your bmap as sea, even if it
doesn't show up on your map.
.s1
Note that bmap shows the \*QLAST KNOWN INFORMATION\*U you have about
You can also give the number of a ship, and bmap will give you a small
bmap centered on the location of that ship, provided you own it.
.s1
-If you use lbmap, you can get a bmap around a land unit.
+If you use lbmap, you can get a bmap around a land unit.
If you use pbmap, you can get a bmap around a plane.
If you use sbmap, you can get a bmap around a ship.
If you use nbmap, you can get a bmap around a nuke.
.LV Expert
.SY "pdump <PLANES> [<fields>]"
The pdump command displays all information on
-some or all of your planes.
+some or all of your planes.
pdump is a combination of plane and pstat.
Each plane's information is printed on one very long line.
Fields are separated by a single space.
If you use nmap, you can get a map that shows new sector designations
instead of old sector designations of your own country.
.s1
-If you use lmap, you can get a map around a land unit.
+If you use lmap, you can get a map around a land unit.
If you use pmap, you can get a map around a plane.
If you use smap, you can get a map around a ship.
If you use nmap, you can get a map around a nuke.
power factor = ((power factor) * (research factor))
.FI
.s1
-The research factor is either 1, if RES_POP is not being used, or 1+(max
+The research factor is either 1, if RES_POP is not being used, or 1+(max
pop in a sector)/10000, if it is being used.
.s1
.SA "census, nation, Communication, Nations, Diplomacy"
1003 destroyer 2 [1-s:40] , ( )
.FI
This report reads.
-Cargo Ship #6 will sail to its starting sector, displayed
-in the sorder, and load cargo hold 1 with 50 shells and cargo hold 2 with 500
+Cargo Ship #6 will sail to its starting sector, displayed
+in the sorder, and load cargo hold 1 with 50 shells and cargo hold 2 with 500
light construction materials. Then sail to the ending sector, again
-displayed in the sorder command, unload the cargo and load cargo hold
+displayed in the sorder command, unload the cargo and load cargo hold
1 with 50 guns.
-.s1
+.s1
.SA "order, sorder, bmap, navigate, ship, Ships, Autonav, Autofish"
by other countries and by the game,
(e.g. when you make a sale or are attacked).
.sp
-After reading all your telegrams you may delete them by
+After reading all your telegrams you may delete them by
specifying \*Qyes\*U or not by specifying \*Qno\*U as an argument.
If an argument is not supplied then you will be prompted
to either answer \*Qyes\*U or \*Qno\*U to delete the telegrams.
must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
-Route is a normal empire path specification. You may also give a
+Route is a normal empire path specification. You may also give a
destination sector on the command line, or at any time while giving
the route, and empire will use the best path from the current sector
to the desired destination sector.
is first detected (which may not be the sector the sub is in, as plane
sonar has a range dependent on acc, and a chance of finding a sub of
((100-acc)-(4-sub visib)*10))+((100-effic)/5) percent.
-The sub being sonared may detect the sonar ping.
+The sub being sonared may detect the sonar ping.
.s1
Note that a plane must be at least 40% efficient before it can leave
the ground.
.LV Expert
.SY "retreat [<SHIP/FLEET> | <SECTS>] [<PATH>] [<CONDITIONS>]"
.SY "lretreat [<UNIT/ARMY> | <SECTS>] [<PATH>] [<CONDITIONS>]"
-The retreat command allows you to examine or modify the retreat
+The retreat command allows you to examine or modify the retreat
paths and conditions of your ships or units. The following description
is for ships. Land units are exactly the same, except of course that
some of the retreat conditions (being sonared, depth charged, etc) don't apply.
.s1
.L Overview
.s1
-A player may give retreat orders for a ship or a fleet. Retreat
+A player may give retreat orders for a ship or a fleet. Retreat
orders include a set of conditions that determine when the fleet/ship
will retreat, and a path that the fleet/ship will follow. When a condition
is met for a particular ship, the \*Qas flt?\*U field is checked. If it
is Yes, then every ship in that fleet with fleet retreat orders retreats
-along the specified path. If it is no, then the retreat orders apply to
+along the specified path. If it is no, then the retreat orders apply to
that ship only, and only that ship retreats.
.s1
When a ship is added to a fleet, it is given the retreat orders of the
\*Qsail\*U, with the \*Q-\*U parameter, causes the sailing path
for the ships specified to be removed.
.s1
-The PATH is a normal empire path specification. You may *not* give a
+The PATH is a normal empire path specification. You may *not* give a
destination sector on the command line, or at any time while giving
the route. Use the \*Qorder\*U command if you wish this functionality.
.s1
.s1
Bmap differs from map in that it reflects everything you've learned
about the world. If, for example, you navigate near a sector and find
-out that it is sea, it will show up on your bmap as sea, even if it
+out that it is sea, it will show up on your bmap as sea, even if it
doesn't show up on your map.
.s1
Note that bmap shows the \*QLAST KNOWN INFORMATION\*U you have about
You can also give the number of a ship, and bmap will give you a small
bmap centered on the location of that ship, provided you own it.
.s1
-If you use lbmap, you can get a bmap around a land unit.
+If you use lbmap, you can get a bmap around a land unit.
If you use pbmap, you can get a bmap around a plane.
If you use sbmap, you can get a bmap around a ship.
If you use nbmap, you can get a bmap around a nuke.
.LV Expert
.SY "sdump <SHIPS> [<fields>]"
The sdump command displays all information on
-some or all of your ships.
+some or all of your ships.
sdump is a combination of ship, cargo, and sstat.
Each ship's information is printed on one very long line.
Fields are separated by a single space.
.s1
The loan must be in arrears. The holder of the note will recieve
the value of the loan plus one periods worth of interest from your
-treasury. The player who owes the money on the loan will be notified
+treasury. The player who owes the money on the loan will be notified
of the switch. After the loan is transfered you may collect on it as
normal.
.sp
the mcost used to determine the mobility cost of moving trains through the
sector. If the rail eff is 0, trains cannot move through this sector.
.L "defense eff"
-the defense efficiency of the sector.
+the defense efficiency of the sector.
.L "defense fact"
the defense factor of the sector. This is how well the sector defends.
All sectors start at 1, and improve (see "improve") from there to the maximum
If you use nmap, you can get a map that shows new sector designations
instead of old sector designations of your own country.
.s1
-If you use lmap, you can get a map around a land unit.
+If you use lmap, you can get a map around a land unit.
If you use pmap, you can get a map around a plane.
If you use smap, you can get a map around a ship.
If you use nmap, you can get a map around a nuke.
which are at sea. Furthermore, there must be a straight line of water
between the detector and the detected (sonar doesn't work around corners).
.s1
-In the current implementation, sonar works similar to
+In the current implementation, sonar works similar to
lookout. The major difference is that a submarines cannot use
lookout to sight ships. Likewise, submarines cannot be sighted
by ships via lookout.
it is above 9, you will also be told the owner of the sub. Note that
type and owner will always be shown for Friendly subs.
.s1
-Planes with the ASW ability can use
+Planes with the ASW ability can use
sonar while on recon missions. See info recon for more details.
.s1
.SA "coastwatch, Ship-types, Sector-types, radar, recon, Ships, Detection"
20,2. It needs to move 17 sectors and will arrive at 20,2 in 2 updates.
When it arrives order will be cleared since only one destination
order was given to it.
-.s1
+.s1
.SA "order, qorder, bmap, navigate, ship, Ships, Autonav, Autofish"
.s1
The sectors denoted by <SECTS>
are those from which you are spying,
-(see \*Qinfo syntax\*U for format).
+(see \*Qinfo syntax\*U for format).
Note: you can only spy from sectors that have military or land units in them.
.s1
Note that the number of BTU's consumed
marched there, allied planes that have been landed there, spy units that have
marched there and non-allied units that have been trapped there.
.s1
-Note that spy units are not always seen. There is a 10-100% chance of a spy
+Note that spy units are not always seen. There is a 10-100% chance of a spy
unit being seen by the spy command. See "info Spies" for more information.
.s1
.L NOTE
10 * ((tech+50)/(tech+200) sectors.
.s1
In addition there must be a valid supply path to the source. A supply path
-is a path of sectors owned by the owner of the unit that leads to the
+is a path of sectors owned by the owner of the unit that leads to the
supply source. (Note that the path may be of any length.. only the supply
source itself must be within supply range.. this is to make the coding
simpler, and may change in the future) The best path (in terms of mobility
must have a ship there. It must not be more than
four sectors away from any of the planes selected for the mission.
.s1
-Route is a normal empire path specification. You may also give a
+Route is a normal empire path specification. You may also give a
destination sector on the command line, or at any time while giving
the route, and empire will use the best path from the current sector
to the desired destination sector.
is first detected (which may not be the sector the sub is in, as plane
sonar has a range dependent on acc, and a chance of finding a sub of
((100-acc)-(4-sub visib)*10))+((100-effic)/5) percent.
-The sub being sonared may detect the sonar ping.
+The sub being sonared may detect the sonar ping.
.s1
Planes with the sweep ability will
automatically attempt to sweep mines in sea or harbor sectors they overfly.
sectors that have been assigned the territory number \*Q27\*U.
.s1
In this sense it is essentially an extended \*Qrealm\*U.
-However, you are not limited to rectangular regions and you have
+However, you are not limited to rectangular regions and you have
99 values to choose from.
.s1
There are four independent territory fields terr, terr1, terr2, terr3
The wire command is used to read the announcements sent you by other countries.
.sp
After reading all your announcements you may mark them
-as being read by
+as being read by
specifying \*Qyes\*U or not by specifying \*Qno\*U as an argument.
If an argument is not supplied then you will be prompted
to either answer \*Qyes\*U or \*Qno\*U to marking announcements
my $n = 0;
while ($data !~ /^\//) {
($_, $data) = split(/\n/, $data, 2);
- my @fld = split(/ /);
+ my @fld = split(/ /);
&$store_record($tuid, $meta, $name, $n, \@fld, $timestamp);
$n++;
}
-#
+#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
+#
# ---
-#
+#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
-#
+#
# ---
-#
+#
# @configure_input@
# Makefile.in: Makefile template for configure
-#
+#
# Known contributors to this file:
# Markus Armbruster, 2005-2006
-#
+#
CC = @CC@
CFLAGS = @CFLAGS@ @CPPFLAGS@ @DEFS@ -I.
-#
+#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
+#
# ---
-#
+#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
-#
+#
# ---
-#
+#
# configure.ac: Autoconf input file
-#
+#
# Known contributors to this file:
# Markus Armbruster, 2005
-#
+#
# Process this file with autoconf to produce a configure script.
# Autoconf makes checking for and programming around assorted ancient
* ---
*
* expect.c: Read from the socket, expecting to see a particular code.
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
* Markus Armbruster, 2007
* ---
*
* host.c: make stream connection to empire
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1998
*
* @configure_input@
* ipglob.c.in: IP globals.
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2005
*/
* ---
*
* linebuf.c: Simple line buffer
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* linebuf.h: Simple line buffer
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* login.c: Log into an empire server
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1998
* ---
*
* main.c: client main function
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998
* ---
*
* misc.h: Misc client definitions
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
*/
* ---
*
* play.c: Playing the game
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
* Ron Koenderink, 2007
{
assert(!oaction);
assert(action);
-
+
if (signal == SIGPIPE)
assert(action->sa_handler == SIG_IGN);
else {
return -1;
}
WSACloseEvent(handles[num_handles - 1]);
-
+
if (num_handles == 3 && result == WAIT_OBJECT_0) {
errno = EINTR;
return -1;
* ---
*
* ringbuf.c: Simple ring buffer
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* ringbuf.h: Simple ring buffer
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* secure.c: Check redir etc. to protect against tampering deity
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* secure.h: Check redir etc. to protect against tampering deity
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* servercmd.c: Change the state depending on the command from the server.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1998
* ---
*
* sysdep_w32.c: system dependent functions for WIN32 environments
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
w32_socket(int family, int sock_type, int protocol)
{
SOCKET result;
-
+
result = socket(family, sock_type, protocol);
if (result == INVALID_SOCKET) {
errno = WSAGetLastError();
w32_connect(int sock, struct sockaddr *addr, int addrlen)
{
int result;
-
+
result = connect(sock, addr, addrlen);
if (result == SOCKET_ERROR) {
errno = WSAGetLastError();
w32_close_socket(int fd)
{
int result;
-
+
result = closesocket(fd);
if (result == SOCKET_ERROR)
errno = WSAGetLastError();
* ---
*
* sysdep_w32.h: system dependent support for WIN32 environments
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
w32_socket((family), (sock_type), (protocol))
#define connect(sock, addr, addrlen) \
w32_connect((sock), (addr), (addrlen))
-
+
#define pclose _pclose
#define popen _popen
#define snprintf _snprintf
* ---
*
* termlib.c: Various termlib stuff
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998
0 1 2 3
0 0 0 0 0
- 1 0 0 0 0
+ 1 0 0 0 0
Y 2 0 0 2 0
3 0 0 0 0
it says, "Take the one that moves you closer to the destination".
Fourth, all of the information we need about a sector (its mobility
-cost, who owns it, etc.) is stored in the sector file on disk. This
+cost, who owns it, etc.) is stored in the sector file on disk. This
means that the getsect() function to get it off disk will do a read(),
which is VERY expensive. Because of the weak lower bound, A* ends up
checking lots of sectors, including sectors that it's seen before.
struct as_node **neighbor_nodes;
};
-/*
+/*
* Added these for caching of paths as we stumble across them
*/
* ---
*
* acce.c: Report rejection status of telegrams/treaties/annos/loans
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* add.c: Add a new country to the game
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* anti.c: Take action against che
- *
+ *
* Known contributors to this file:
* Pat Loney, 1992
* Steve McClure, 1997
* ---
*
* arm.c: Arm planes (missiles) with nuclear devices
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* ---
*
* army.c: Add units to an army
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* assa.c: Hit the beaches!
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1997
* ---
*
* atta.c: Attack another sector
- *
+ *
* Known contributors to this file:
* Dave Pare
* Ken Stevens, 1995
* ---
*
* bdes.c: Change bmap designations
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* best.c: Show the best path between two sectors
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* boar.c: Board an enemy ship
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* bomb.c: Fly bombing missions
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* ---
*
* brea.c: Break out of sanctuary
- *
+ *
* Known contributors to this file:
* Jeff Wallace, 1989
*/
* ---
*
* budg.c: Calculate production levels, prioritize
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1992
* Ville Virrankoski, 1995
*ships = *sbuild = *nsbuild = *smaint = 0;
*units = *lbuild = *nlbuild = *lmaint = 0;
*planes = *pbuild = *npbuild = *pmaint = 0;
-
+
np = getnatp(player->cnum);
bp = bp_alloc();
for (n = 0; NULL != (sp = getsectid(n)); n++) {
* ---
*
* buil.c: Build ships, nukes, bridges, planes, land units, bridge towers
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998-2000
* Markus Armbruster, 2004-2008
* ---
*
* buy.c: Buy commodities from other nations
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Pat Loney, 1992
* ---
*
* capi.c: Move your capital
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 2000
* ---
*
* carg.c: List cargo contents of a ship
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* cede.c: Give a sector to a neighbor
- *
+ *
* Known contributors to this file:
* Dave Pare
* Thomas Ruschak
* ---
*
* cens.c: Do a census report
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* chan.c: Change country/representative name
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* coas.c: Look at all the ships in the world
- *
+ *
* Known contributors to this file:
* Keith Muller, 1983
* Dave Pare, 1986 (rewrite)
* ---
*
* coll.c: Collet on a loan
- *
+ *
* Known contributors to this file:
* Pat Loney, 1992
* Steve McClure, 1996-2000
* ---
*
* comm.c: Do a commodity report
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* cons.c: Consider a loan or treaty
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* conv.c: Convert conquered populace into uw's
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* coun.c: Do a country roster
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* cuto.c: Do a delivery cutoff level report
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff, 1987
*/
* ---
*
* decl.c: Declare war, neutrality, alliance, hostile or friendly
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* deli.c: Set deliveries from a sector
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* demo.c: De-mobilize "n" military in a given sector
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* desi.c: Redesignate sectors
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998-2000
* Markus Armbruster, 2004-2008
* ---
*
* disa.c: Disable updates (deity)
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* dist.c: Name distribution sector for a given range of sectors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
- * Thomas Ruschak, 1993 (rewritten)
+ * Thomas Ruschak, 1993 (rewritten)
* Steve McClure, 1998
*/
* ---
*
* drop.c: Air-drop commodities
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* dump.c: Dump sector information
- *
+ *
* Known contributors to this file:
* Jeff Wallace, 1989
* Steve McClure, 1997 (added timestamping)
* ---
*
* echo.c: Just echo something
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* edit.c: Edit things (sectors, ships, planes, units, nukes, countries)
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff
* Chad Zabel, 1994
* ---
*
* enab.c: Enable the updates (deity)
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* enli.c: Enlist some military
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* expl.c: Take over unoccupied sectors
- *
+ *
* Known contributors to this file:
* Jeff Wallace, 1989
*/
* ---
*
* fina.c: Financial report on current status of loans to countries
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996
* ---
*
* flash.c: Flash a message to another player
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* flee.c: Add ships to a fleet
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* fly.c: fly a plane
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 2000
* ---
*
* foll.c: Set leader of a set of ships
- *
+ *
* Known contributors to this file:
* Robert Forsman
*/
* ---
*
* force.c: Force an update to occur (deity)
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Markus Armbruster, 2007
* ---
*
* fort.c: Increase the fortification value of land units
- *
+ *
* Known contributors to this file:
* Steve McClure, 1999
*/
* ---
*
* give.c: give stuff to countries (deity)
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff
* Steve McClure, 1997
* ---
*
* grin.c: Grind gold bars into dust
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2006
*/
* ---
*
* hard.c: Increases the silo protection of a given missile
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* head.c: Print headlines of the Empire News
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* improve.c: Improve the infrastructure of a sector
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996-2000
*/
* ---
*
* info.c: display an info page
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Mike Wise, 1997 - added apropos and case insensitivity
int nmatch = 0;
int width = 0;
char sep;
-
+
name = player->argp[1];
if (name) {
/*
}
if (!name || !*name)
name = "TOP";
-
+
snprintf(filename, sizeof(filename), "%s/%s", infodir, name);
fp = fopen(filename, "r");
if (fp == NULL) {
* ---
*
* land.c: List land units
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
*/
* ---
*
* laun.c: Launch missiles from land or sea
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
}
}
- if (plane.pln_effic < 40) {
+ if (plane.pln_effic < 40) {
pr("%s is damaged (%d%%)\n", prplane(&plane), plane.pln_effic);
continue;
}
* ---
*
* lboard.c: Board an enemy land unit (heavily borrowing from boar.c)
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
*/
* ---
*
* ldump.c: Dump land unit information
- *
+ *
* Known contributors to this file:
* John Yockey, 1997
* Steve McClure, 1998
* ---
*
* ledg.c: Get a report of the current ledger
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
*/
* ---
*
* leve.c: Do a distribution threshold level report
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff, 1987
*/
* ---
*
* load.c: load/unload goods from a sector onto a ship or land unit
- *
+ *
* Known contributors to this file:
* David Sharnoff, 1987
* Ken Stevens, 1995 (rewritten)
* ---
*
* look.c: Lookout from a ship or land unit
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2006-2007
*/
* ---
*
* lost.c: List lost items
- *
+ *
* Known contributors to this file:
* Steve McClure, 1997
*/
* ---
*
* lstat.c: Show the stats of your land units
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
*/
*
* lten.c: Transfer commodity from a ship to a land unit the ship is
* carrying
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Thomas Ruschak
* ---
*
* map.c: Display a map of sectors.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* ---
*
* marc.c: March units around
- *
+ *
* Known contributors to this file:
* Thomas Ruschak
* Ken Stevens, 1995 (rewrite)
* ---
*
* mark.c: Display report for commodities
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Pat Loney, 1992
* ---
*
* multifire.c: Fire at other sectors/ships
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
* Markus Armbruster, 2004-2008
* ---
*
* mine.c: Lay mines from ships or units
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* miss.c: set missions for ships/planes/units
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1992
* Steve McClure, 2000
buf)) == 0)
return RET_SYN;
-/*
+/*
* 'i' interdiction
* 's' support
* 'o' support attacks
* ---
*
* mobq.c: Set the sailing mobility quota for a ship
- *
+ *
* Known contributors to this file:
* Robert Forsman
*/
* ---
*
* mora.c: Edit morale of a land unit
- *
+ *
* Known contributors to this file:
* Jeff Bailey
*/
* ---
*
* move.c: Move commodities around
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* name.c: Name a ship
- *
+ *
* Known contributors to this file:
* Jeff Bailey
*/
* ---
*
* nati.c: List nation information
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* navi.c: Navigate ships and such
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995 (rewritten)
* Ron Koenderink, 2006-2007
else
skip = 0;
sprintf(prompt, "<%.1f:%.1f: %s> ", *maxmob,
- *minmob, xyas(leader->x, leader->y, player->cnum));
+ *minmob, xyas(leader->x, leader->y, player->cnum));
cp = getstring(prompt, buf);
/* Just in case any of our units were shelled while we were
* at the prompt, we call shp_nav() or lnd_mar() again.
* ---
*
* ndump.c: Dump nuke information
- *
+ *
* Known contributors to this file:
* John Yockey, 1997
* Steve McClure, 1998
* ---
*
* new.c: Create a new capital for a player
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* newe.c: Show new sector efficiency (projected)
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1993
*/
* ---
*
* news.c: Show current Empire news
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* nuke.c: Display a listing of your nuclear arsenal
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Markus Armbruster, 2006
* ---
*
* offe.c: Offer a loan or treaty
- *
+ *
* Known contributors to this file:
* Pat Loney, 1992
* Steve McClure, 1996
* ---
*
* orde.c: Turn on/off autonavigation
- *
+ *
* Known contributors to this file:
* Chad Zabel, 1994
* Steve McClure, 2000
* ORDER <ship> l[evel] <field> <start/end> <comm> <level>
*
* New syntax:
- * qorder <ship> display cargo levels
- * sorder <ship> display statistical info
+ * qorder <ship> display cargo levels
+ * sorder <ship> display statistical info
*/
int
break;
}
- /* to keep sub in range of our arrays
+ /* to keep sub in range of our arrays
subtract 1 so the new range is 0-(TMAX-1)
*/
sub = sub - 1;;
ship.shp_autonav |= AN_LOADING;
- /* swap variables, this keeps
+ /* swap variables, this keeps
the load_it() procedure happy. CZ
*/
tcord = ship.shp_destx[0];
* ---
*
* orig.c: Move your origin
- *
+ *
* Known contributors to this file:
* Shelley Louie, 1988
* Markus Armbruster, 2006
* ---
*
* para.c: Drop paratroopers onto a sector
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* ---
*
* path.c: Show empire distribution paths
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff, 1986
* (unknown rewrite), 1989
* ---
*
* payo.c: Calculate trade ship payoffs
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1992
*/
* ---
*
* pdump.c: Dump plane information
- *
+ *
* Known contributors to this file:
* John Yockey, 1997
* Steve McClure, 1998
* ---
*
* peek.c: Show hidden values report (deity)
- *
+ *
* Known contributors to this file:
* Jeff Wallace, 1989
* Pat Loney, 1998
* ---
*
* plan.c: Do a plane report
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 2000
* ---
*
* play.c: Who is logged on?
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* powe.c: Do a power report
- *
+ *
* Known contributors to this file:
* Dave Pare
* Ken Stevens, 1995
* ---
*
* prod.c: Calculate production levels
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff, 1987
* Steve McClure, 1997-2000
* ---
*
* pstat.c: Show the stats of your planes
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
*/
* ---
*
* rada.c: Do radar from a ship/unit/sector
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2006
*/
sprintf(prompt, "Radar from (%s # or sector(s)) : ", ef_nameof(type));
cp = getstarg(player->argp[1], prompt, buf);
-
+
if (cp == 0)
return RET_SYN;
switch (sarg_type(cp)) {
* ---
*
* rang.c: Edit range of plane/land unit
- *
+ *
* Known contributors to this file:
* Jeff Bailey
*/
* ---
*
* rea.c: Read telegrams
- *
+ *
* Known contributors to this file:
* Dave Pare
* Doug Hay, 1998
* ---
*
* real.c: Show or set a realm
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* reco.c: Fly a recon mission
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* reje.c: Refuse telegrams/annos/treaties/loans from countries
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* rela.c: Show relations with other countries
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* relo.c: Re-read (some) configuration files
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* repa.c: repay loan from a country
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* repo.c: Report on various levels (tech, research) of other nations
- *
+ *
* Known contributors to this file:
* Keith Muller, 1983
* Dave Pare, 1986 (rewrite)
* ---
*
* rese.c: Reset (lower) commodity prices
- *
+ *
* Known contributors to this file:
* Jeff Bailey
* Pat Loney, 1992
* ---
*
* reso.c: Display natural resources
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
* ---
*
* retr.c: Set retreat conditionals for ships and land units
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 2000
* ---
*
* rout.c: Show empire deliver routes
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* sabo.c: Spy terrorist bombing
- *
+ *
* Known contributors to this file:
* John Yockey, 2001
*/
* ---
*
* sail.c: Set sail path for leaders
- *
+ *
* Known contributors to this file:
* Robert Forsman
*/
* ---
*
* sate.c: Do satellite maps/reports.
- *
+ *
* Known contributors to this file:
* Edward M. Rynes Esq, 1988
* Ken Stevens, 1995
* ---
*
* scra.c: Scrap ships, planes or land units
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
* Markus Armbruster, 2004-2008
* ---
*
* scut.c: Scuttle ships, planes or land units
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* sdump.c: Dump ship information
- *
+ *
* Known contributors to this file:
* John Yockey, 1997
* Steve McClure, 1998
* ---
*
* sect.c: Show sectors in map-like format with conditionals.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* sell.c: Sell commodities to other nations.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Jeff Bailey
* ---
*
* set.c: Place units/ships/planes/nukes up for sale.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Pat Loney, 1992
* ---
*
* setres.c: Set resources of a sector
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff
* Karl Hagen
* ---
*
* setsect.c: Give resources to a country
- *
+ *
* Known contributors to this file:
* David Muir Sharnoff
* Steve McClure, 1998
* ---
*
* shar.c: share a bmap with a friend
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* shark.c: Transfer a loan by buying it out
- *
+ *
* Known contributors to this file:
* Pat Loney, 1992
* Steve McClure, 1996-2000
* ---
*
* shi.c: Show a list of your ships
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* shoo.c: Shoot some conquered populace or pigeons.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* show.c: Give info on empire objects, planes, boats, nukes, etc.
- *
+ *
* Known contributors to this file:
* Julian Onions, 1988
* Steve McClure, 1997
* ---
*
* shut.c: Shut down the server with a warning.
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Markus Armbruster, 2007-2008
* ---
*
* sinf.c: Do an infrastructure report
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
*/
* ---
*
* skyw.c: Look at satellites in the sky.
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* sona.c: Sonar from a sub (or other sonar-equipped ship)
- *
+ *
* Known contributors to this file:
* Jim Griffith, 1989
* Ken Stevens, 1995
}
}
-/*
+/*
* line_of_sight() - is there a "straight" all water path from (x,y) to (tx,ty)
* Ken & Irina Stevens, 1995
*/
* ---
*
* spy.c: Spy on your neighbors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998-2000
* ---
*
* sstat.c: Show the stats of your ships
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
*/
* ---
*
* stop.c: Stop a sector or unit from producing
- *
+ *
* Known contributors to this file:
- * Thomas Ruschak, 1992
+ * Thomas Ruschak, 1992
* Steve McClure, 1998
* Markus Armbruster, 2006-2008
*/
* ---
*
* stre.c: Calculate military strengths of sectors
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* star.c: Do a starvation report
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* supp.c: supply land units
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* surv.c: Show sector survey
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* swap.c: Swap two sectors on the map
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
*/
* ---
*
* tele.c: Send a telegram
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* tend.c: Transfer goodies from one ship to another.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Thomas Ruschak, 1992
* ---
*
* terr.c: Designate territory of sectors
- *
+ *
* Known contributors to this file:
* Edward M. Rynes Esq.
*/
* ---
*
* thre.c: Describe/set threshold for given commodity
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998
* ---
*
* togg.c: Set player flags
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996
* ---
*
* torp.c: Fire torpedoes at enemy ships
- *
+ *
* Known contributors to this file:
* Dave Pare
* Thomas Ruschak, 1992
* ---
*
* trad.c: Buy units/ships/planes/nukes from other nations.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Pat Loney, 1992
* ---
*
* tran.c: Transport nuclear devices and planes
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
* Markus Armbruster, 2006
* ---
*
* trea.c: Look at current treaties.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* turn.c: Turn the game on, off, or set the login message.
- *
+ *
* Known contributors to this file:
* Marc Olzheim, 2004
*/
* ---
*
* upda.c: Give the time of the next update
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* upgr.c: Upgrade tech of ships/planes/units
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996-2000
* ---
*
* vers.c: Print out the Empire version
- *
+ *
* Known contributors to this file:
* Dave Pare
* Jeff Bailey
* ---
*
* wing.c: Add planes to a wing
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* wipe.c: Clear all existing distribution thresholds
- *
+ *
* Known contributors to this file:
* Jim Griffith, 1989
*/
* ---
*
* work.c: Implementation of the work command
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2008
*/
* ---
*
* xdump.c: Extended dump
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* zdon.c: Update right now
- *
+ *
* Known contributors to this file:
* Doug Hay, 1990
* Markus Armbruster, 2007-2008
* ---
*
* bestpath.c: Find the best path between sectors
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998-2000
* Markus Armbruster, 2006
*/
-/*
+/*
* IMPORTANT: These routines are very selectively used in the server.
*
* "bestownedpath" is only used to determine paths for ships and planes.
- *
+ *
* Callers should not be calling these directly anymore. They should use
* the "BestShipPath", "BestAirPath", "BestLandPath" and "BestDistPath"
* functions. Note that those last two use the A* algorithms to find
* ---
*
* btu.c: Dealing with BTUs
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* cargo.c: Cargo lists
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2008
*/
* ---
*
* cnumb.c: Return country number give country name
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* conftab.c: Load game configuration files
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006-2008
*/
* ---
*
* ef_verify.c: Verify game configuration
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2005
* Markus Armbruster, 2006-2008
struct valstr val;
int ret_val = 0;
int flags = ef_flags(type);
-
+
if (flags & EFF_MEM)
- row_ref = ef_ptr(type, row);
+ row_ref = ef_ptr(type, row);
else {
- row_ref = malloc(empfile[type].size);
+ row_ref = malloc(empfile[type].size);
ef_read(type, row, row_ref);
}
}
}
} while (++j < n);
- }
+ }
if (!(flags & EFF_MEM))
free(row_ref);
return ret_val;
* ---
*
* emp_config.c: Allows config file to control server config. from a file
- *
+ *
* Known contributors to this file:
* Julian Onions, 1995
* Steve McClure, 1998-2000
* ---
*
* file.c: Operations on Empire tables (`files' for historical reasons)
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 2000
* ---
*
* filetable.c: Empire game data file descriptions.
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2005-2008
*/
* ---
*
* game.c: Game file access
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007-2008
*/
#include "server.h"
/*
- * Disable updates
+ * Disable updates
*/
void
game_ctrl_update(int enable)
* ---
*
* hap_fact.c: Happiness effect on che
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
*/
* ---
*
* hours.c: Game hours determination; is it legal to play now?
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Doug Hay, 1998
* ---
*
* mailbox.c: Return string containing telegram file
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* mapdist.c: Return the distance between two sectors
- *
+ *
* Known contributors to this file:
- *
+ *
*/
/*
* ---
*
* move.c: Misc. move routines
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006
*/
* ---
*
* nat.c: Misc. accesses on the nation file
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
* ---
*
* nsc.c: Empire selection global structures
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* nstreval.c: evaluate compiled values
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1997
*
* path.c: Empire/A* Interface code.
* Define AS_STATS for A* statistics.
- *
+ *
* Known contributors to this file:
* Phil Lapsley, 1991
* Dave Pare, 1991
* ---
*
* rdsched.c: Read update schedule
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007-2008
*/
* Read update schedule from file FNAME.
* Put the first N-1 updates after T0 into SCHED[] in ascending order,
* terminated with a zero.
- * Use ANCHOR as initial anchor for anchor-relative times.
+ * Use ANCHOR as initial anchor for anchor-relative times.
* Return 0 on success, -1 on failure.
*/
int
* ---
*
* res_pop.c: Get maximum pop of a sector
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* stmtch.c: Matching operations on structures and commands
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* tfact.c: return tech fact given multiplier
- *
+ *
* Known contributors to this file:
* Yannick Trembley
*/
* ---
*
* type.c: typename to array offset translation
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 2000
* ---
*
* wantupd.c: Check to se if an update is wanted and/or allowed.
- *
+ *
* Known contributors to this file:
* Doug Hay, 1990
*/
* ---
*
* xdump.c: Extended dumps
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* xundump.c: Load back xdump output
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2005
* Markus Armbruster, 2005-2008
* ---
*
* xy.c: x-y related conversion routines
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2004-2008
* ---
*
* io.c: Arrange for input and output on a file descriptor to be queued.
- *
+ *
* Known contributors to this file:
* Doug Hay, 1998
* Steve McClure, 1998
* ---
*
* lwp.c: Interface from Empire threads to LWP threads
- *
+ *
* Known contributors to this file:
* Sasha Mikheev
* Markus Armbruster, 2006-2007
* ---
*
* ntthread.c: Interface from Empire threads to Windows NT threads
- *
+ *
* Known contributors to this file:
* Doug Hay, 1998
* Steve McClure, 1998
static BOOL WINAPI
loc_Exit_Handler(DWORD fdwCtrlType)
{
- switch (fdwCtrlType) {
+ switch (fdwCtrlType) {
case CTRL_C_EVENT:
case CTRL_CLOSE_EVENT:
- case CTRL_BREAK_EVENT:
- case CTRL_LOGOFF_EVENT:
- case CTRL_SHUTDOWN_EVENT:
+ case CTRL_BREAK_EVENT:
+ case CTRL_LOGOFF_EVENT:
+ case CTRL_SHUTDOWN_EVENT:
empth_request_shutdown();
return TRUE;
default:
* ---
*
* posix.c: Thread-related code common to POSIX systems
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006
*/
* ---
*
* pthread.c: Interface from Empire threads to POSIX threads
- *
+ *
* Known contributors to this file:
* Sasha Mikheev
* Steve McClure, 1998
* ---
*
* chance.c: return 1 if "roll" is under the chance.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* disassoc.c: Boilerplate daemonization code
- *
+ *
* Known contributors to this file:
* Doug Hay, 1998
* Markus Armbruster, 2005
* ---
*
* fnameat.c: Interpret file names relative to a directory
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2008
*/
* ---
*
* fsize.c: BSD dependant file and block sizing routines
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Doug Hay, 1998
* ---
*
* ioqueue.c: Read and write i/o queues
- *
+ *
* Known contributors to this file:
- *
+ *
*/
/*
* ---
*
* log.c: Log an Empire error to a file
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2003-2008
* ---
*
* numstr.c: Turn a number into a word
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* parse.c: Parse an Empire command line
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* plur.c: Pluralize (is that a word?) something
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* queue.c: Various queue routines (for lists)
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* round.c: Round off functions
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* scthash.c: Create a hash function based on the sector x-y mod table size
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* tcp_listen.c: Create a socket and listen on it
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2005
*/
* ---
*
* constants.c: Global constants
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996
you can not get a precise number
without intensive simulation
(more than 3 digits). */
-double fallout_spread = 0.005; /* fraction of fallout that leaks into
+double fallout_spread = 0.005; /* fraction of fallout that leaks into
each surrounding sector */
/* end opt_FALLOUT */
*
* dir.c: Directional orientation descriptions. Must agree with defines
* in path.h
- *
+ *
* Known contributors to this file:
*/
* ---
*
* init.c: Initialize global unit arrays
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1997
* ---
*
* item.c: Item characteristics
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* land.c: Land unit characteristics
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1992
* Ken Stevens, 1995
* ---
*
* news.c: News item characteristics
- *
+ *
* Known contributors to this file:
- *
+ *
*/
/*
* ---
*
* nuke.c: Nuke characteristics
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* options.c: Options definitions
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
* Markus Armbruster, 2005-2006
* @configure_input@
* path.c.in: Path initializations needed outside of the file
* initialization tables
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2005-2008
*/
* ---
*
* plane.c: Plane characteristics
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Jeff Bailey
* ---
*
* product.c: Product information
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* sect.c: Sector designation characteristics
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Jeff Bailey
* ---
*
* ship.c: Ship characteristics
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Jeff Bailey
* ---
*
* symbol.c: Empire symbol tables
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006-2008
*/
* ---
*
* updtime.c: Scheduled update times
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
*
* ---
*
- * version.c:
- *
+ * version.c:
+ *
* Known contributors to this file:
* Markus Armbruster, 2006
*/
* ---
*
* arch.c: architecture-dependant process context code
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 1994-2000
* ---
*
* lwp.c: lightweight process creation, destruction and manipulation
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* lwpint.h: lwp internal structures
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
*/
* ---
*
* queue.c: queue manipulation routines
- *
+ *
* Known contributors to this file:
*
*/
* ---
*
* rwlock.c: Read-write locks
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
* Markus Armbruster, 2007
* ---
*
* sel.c: arrange to block on read/write file descriptors using lwp
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Markus Armbruster, 2007
static struct lwpQueue LwpDelayq;
/* The thread executing lwpSelect() */
-static struct lwpProc *LwpSelProc;
+static struct lwpProc *LwpSelProc;
void
lwpInitSelect(struct lwpProc *proc)
* ---
*
* sig.c: Wait for signals
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006-2007
*/
static sigset_t LwpSigCatched;
/*
- * LwpSigCatched changed since last
+ * LwpSigCatched changed since last
*/
static sig_atomic_t LwpSigCheck;
* ---
*
* status.c: Process and perhaps display status messages
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
*/
* ---
*
* accept.c: Keep track of people logged in
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Markus Armbruster, 2005-2008
* ---
*
* dispatch.c: Actually execute the command given
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 1998
* ---
*
* empdis.c: Empire dispatcher stuff
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 2000
* ---
*
* empmod.c: List all commands for Empire
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Jeff Bailey
* ---
*
* init_nats.c: Initialize country and nation file stuff
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 2000
* ---
*
* login.c: Allow the player to login
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 2000
* ---
*
* nat.c: Get nation stuff
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
*/
* ---
*
* player.c: Main command loop for a player
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
* Markus Armbruster, 2004-2008
* ---
*
* recvclient.c: Receive input from the client
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Markus Armbruster, 2006-2008
* ---
*
* aircombat.c: Deal with air to air combat
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Thomas Ruschak, 1992
* ---
*
* askyn.c: The oldest routines in the book... ask questions of the user
- *
+ *
* Known contributors to this file:
* Thomas Ruschak, 1993
* Doug Hay, 1998
* ---
*
* aswplnsubs.c: Various subroutines used for ASW planes
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2004
*/
}
s = malloc(sizeof(struct shiplist));
- if (s2 != NULL)
+ if (s2 != NULL)
s2->next = s;
else
*head = s;
* ---
*
* attsub.c: Attack subroutines
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996-2000
/*
* This is the combat object "type" based integrity check. It basically
- * splits along three divisions: ship/sector, attacker/defender,
+ * splits along three divisions: ship/sector, attacker/defender,
* first time/not first time.
*/
att_infect_units(dlist, def->plague);
/*
- * Fighting is slightly random. There is always that last little
+ * Fighting is slightly random. There is always that last little
* effort you see people put in. Or the stray bullet that takes out
* an officer and the rest go into chaos. Things like that.
* Thus, we have added a very slight random factor that will sometimes
/*
* sector_strength - Everyone starts at 1. You can get up to a max
* of d_dstr, depending on how much you build up the
- * defenses of the sector.
+ * defenses of the sector.
*/
double
*
* bigmap.c: Updates a player's sector map using sector offsets and
* simple overwrite rules.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* border.c: Create a border around a map
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* bridgefall.c: Knock a bridge down
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
* Markus Armbruster, 2004-2008
* ---
*
* bsanct.c: Break Sanctuary subroutines
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* caploss.c: Lose your capital (kiss of death)
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
* Markus Armbruster, 2007-2008
* ---
*
* check.c: Check a sector, plane, land unit, ship or nuke
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998
*/
* ---
*
* coastal.c: Routines to calculate the coastal flag
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2005
*/
* ---
*
* control.c: Military control functions
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* damage.c: Damage stuff.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1997
* ---
*
* detonate.c: Detonate a nuclear device in a sector.
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998-2000
*/
* ---
*
* disloan.c: Display a loan
- *
+ *
* Known contributors to this file:
* Pat Loney, 1992
* Steve McClure, 1996
* ---
*
* distrea.c: Display treaty information
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
*
* empobj.c: Common functions on struct empobj and
* union empobj_storage
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2006
* Markus Armbruster, 2006-2008
* ---
*
* fileinit.c: Initialize Empire tables for full server operations.
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2005
* Markus Armbruster, 2005-2008
* ---
*
* fortdef.c: Fort defends an area.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
/*
* ---
*
* getbit.c: Replaces old bitmap code
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
* ---
*
* getele.c: Read a telegram from a file or stdin and send it to a country
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* getstarg.c: Get a string argument (ask if not there)
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* getstring.c: get string, printing a prompt if there is one
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* journal.c: Log a journal of events to a file
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004-2008
* Ron Koenderink, 2008
time(&now);
fprintf(journal, "%.24s %10.10s ",
ctime(&now), empth_name(empth_self()));
-
+
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
va_end(ap);
* ---
*
* land.c: Land unit post-read and pre-write
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
* Markus Armbruster, 2004-2008
* ---
*
* landgun.c: Fire weapons
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006-2008
*/
* ---
*
* list.c: List ships, planes, units at a given x,y
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* lndsub.c: Land unit subroutines
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998-2000
else if (combat_mode == A_DEFEND) {
/*
* defending unit.. find a place to send it
- * strategy: look for the most-populated
+ * strategy: look for the most-populated
* adjacent sector that is owned by the unit
* owner. Charge mob..
*/
* ---
*
* lostsub.c: Subroutines for lost items
- *
+ *
* Known contributors to this file:
* Steve McClure, 1997
* Markus Armbruster, 2008
* ---
*
* maps.c: Map routines
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* mission.c: Mission subroutines for planes/ships/units
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996-2000
free(qp);
continue;
}
-
+
if (pcp->pl_flags & P_A) {
if (roll(100) > pln_identchance(pp, hardtarget, EF_SHIP)) {
emp_remque(qp);
* ---
*
* move.c: Move something somewhere.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* mslsub.c: Missile subroutine stuff
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996-2000
* ---
*
* mtch.c: Matching operations on structures and commands.
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2004
*/
* ---
*
* natarg.c: Return countr # given country name or country #
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006
*/
* ---
*
* nat.c: Nation subroutines
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2008
*/
* ---
*
* neigh.c: Return true if a neighbor
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* nreport.c: File a news report. Downgrade relations if things get hostile.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 1997
* ---
*
* nstr.c: compile and execute the item selections on sectors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1997
* ---
*
* nuke.c: Nuke post-read and pre-write data massage
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1996
* ---
*
* nxtitem.c: Get the next item from a list
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
* ---
*
* nxtsct.c: Select/get the next sector from a range of sectors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
* ---
*
* onearg.c: Get one argument, or ask if not there
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* path.c: Routines associated with paths, directions, etc.
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2005-2008
*/
* ---
*
* plane.c: Plane post-read and pre-write data massage
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1996
* ---
*
* plnsub.c: Plane subroutine stuff
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* planes.
*/
int
-could_be_on_ship(struct plnstr *pp, struct shpstr *sp,
+could_be_on_ship(struct plnstr *pp, struct shpstr *sp,
int n, int nch, int nxl, int nmsl)
{
struct plchrstr *pcp = &plchr[pp->pln_type];
* ---
*
* pr.c: Output to players
- *
+ *
* Known contributors to this file:
- * Dave Pare, 1986, 1989
+ * Dave Pare, 1986, 1989
* Steve McClure, 1998-2000
* Ron Koenderink, 2005
* Markus Armbruster, 2005-2008
* ---
*
* radmap.c: Do a radar map given an x,y location, effic, and other
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
rad[y][x] = (*mchr[(int)ship.shp_type].m_name) & ~0x20;
}
}
- /*
+ /*
* make the center of the display 0
* so ve et al can find it.
*/
* ---
*
* rej.c: Various relations setting routines
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
*/
* ---
*
* retreat.c: Retreat subroutines
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* sarg.c: Parse selection arguments
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2004-2008
if (end == str || (*end != 0 && !isspace(*end))
|| rlm < 0 || MAXNOR <= rlm)
return 0;
- } else
+ } else
rlm = 0;
getrealm(rlm, player->cnum, &realm);
rp->lx = realm.r_xl;
* ---
*
* satmap.c: Do a satellite map given an x,y location, effic and other
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
* ---
*
* sect.c: Sector pre-write and post-read data massage
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1996
* ---
*
* sectdamage.c: Damage a sector
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1996
* ---
*
* ship.c: Ship pre-write data massage
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1996
* ---
*
* show.c: General show routines
- *
+ *
* Known contributors to this file:
* Julian Onions, 1988
* Jeff Bailey, 1990
show_news(int tlev)
{
int i, j;
-
+
pr("id category good will\n");
pr(" messsages\n");
TIME_ZONE_INFORMATION tzi;
long time_offset;
struct tm *time;
-
+
time = localtime(&t);
n = strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", time);
* ---
*
* shpsub.c: Ship subroutine stuff
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996-2000
}
/*
- * shp_miss_defence
- * Check for incoming missiles with a P_MAR flag.
+ * shp_miss_defence
+ * Check for incoming missiles with a P_MAR flag.
* Return True=1 if the missile was shotdown.
* Or False=0
- *
+ *
* Chad Zabel, July 95
*/
* ---
*
* snxtitem.c: Arrange item selection using one of many criteria.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2008
* ---
*
* snxtsct.c: Arrange sector selection using either distance or area
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2006-2008
* ---
*
* supply.c: Supply subroutines
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* takeover.c: Take over from another country
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996-2000
* ---
*
* trdsub.c: Trade helper functions
- *
+ *
* Known contributors to this file:
* St Phil, 1989
* Pat Loney, 1992
* ---
*
* trechk.c: Check to see if an actor has violated a treaty.
- *
- * Known contributors to this file:
+ *
+ * Known contributors to this file:
* Steve McClure, 1998-1999
*/
* ---
*
* unitsub.c: Common subroutines for multiple type of units
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
* Markus Armbruster, 2008
* ---
*
* whatitem.c: Return pointer to item chr struct given an item name
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* wu.c: Write a telegram to a user from another
- *
+ *
* Known contributors to this file:
* Steve McClure, 2000
*/
}
/*
- * telegram_is_new counts new telegrams the same as read_telegrams in
+ * telegram_is_new counts new telegrams the same as read_telegrams in
* lib/commands/mail.c and lib/commands/rea.c
*/
* ---
*
* age.c: Age people
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* anno.c: Delete announcements older than ANNO_KEEP_DAYS
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Doug Hay, 1998
* ---
*
* bp.c: The `build pointer' (bp) map
- *
+ *
* Known contributors to this file:
* Ville Virrankoski, 1996
* Markus Armbruster, 2007
* ---
*
* deliver.c: Deliver commodities to neighboring sector
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* distribute.c: Do distribution to sectors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998
* ---
*
* finish.c: Finish the update
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Thomas Ruschak, 1993
* ---
*
* human.c: Food related functions
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996
* ---
*
* land.c: Do production for land units
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Thomas Ruschak, 1992
* ---
*
* main.c: World update main function
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 1996
* ---
*
* material.c: Tries to find materials for production
- *
+ *
* Known contributors to this file:
* Ville Virrankoski, 1996
* Markus Armbruster, 2007
* ---
*
* mobility.c: Add mobility to each of the items which accumulate mobility.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998-1999
* ---
*
* move_sat.c: Move a satellite to the next point in it's orbit.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* nat.c: Accumulate tech, edu, research and happiness.
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
* Steve McClure, 1997
* ---
*
* nav_ship.c: Navigate ships and such
- *
+ *
* Known contributors to this file:
* Chad Zabel, 1994
* Ken Stevens, 1995
}
/* new autonav code.
- *
+ *
* 1. Try and move to the next sector/harbor given by the player.
* 2. Once we reach a harbor try and load all cargo holds for that ship.
* 3. If the ship reaches its max levels set by the player try to use
* the ship gets sunk (forts,ect..), the ship hits a mine.
*
* Questions, bugs (fixes) , or new ideas should be directed at
- * Chad Zabel.
- * 6-1-94
+ * Chad Zabel.
+ * 6-1-94
* Modified to use shp_nav by Ken Stevens 1995
*/
int
* ---
*
* nav_util.c: Utilities for autonav and sail
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
#include "ship.h"
#include "update.h"
-/* load a specific ship given its
+/* load a specific ship given its
* location and what field to modify.
* new autonav code
- * Chad Zabel 6/1/94
+ * Chad Zabel 6/1/94
*/
int
load_it(struct shpstr *sp, struct sctstr *psect, int i)
}
-/* unload_it
+/* unload_it
* A guess alot of this looks like load_it but because of its location
* in the autonav code I had to split the 2 procedures up.
* unload_it dumps all the goods from the ship to the harbor.
* ONLY goods in the trade fields will be unloaded.
* new autonav code
- * Chad Zabel 6/1/94
+ * Chad Zabel 6/1/94
*/
void
unload_it(struct shpstr *sp)
* ---
*
* nxtitemp.c: Get next item from list
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
*/
* ---
*
* plague.c: Plague related functions
- *
+ *
* Known contributors to this file:
* Steve McClure, 1998-2000
*/
* ---
*
* plane.c: Do production for planes
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1998
* ---
*
* populace.c: Return workforce available
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
*/
* ---
*
* prepare.c: Perform prelimiary updates of sectors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Thomas Ruschak, 1992
* ---
*
* produce.c: Produce goodies
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* removewants.c: Remove the "I want an update" flag.
- *
+ *
* Known contributors to this file:
- *
+ *
*/
#include <config.h>
* ---
*
* revolt.c: Have disloyal populace revolt!
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1997-2000
* ---
*
* sail.c: Sail ships during the update
- *
+ *
* Known contributors to this file:
* Doug Hay
* Robert Forsman
* ---
*
* sect.c: Do production for sectors
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996
} else
vec = sp->sct_item;
- /* If everybody is dead, the sector reverts to unowned.
+ /* If everybody is dead, the sector reverts to unowned.
* This is also checked at the end of the production in
* they all starved or were plagued off.
*/
* ---
*
* ship.c: Do production for ships
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996
* ---
*
* arpa/inet.h: POSIX networking for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
* ---
*
* netdb.h: POSIX networking for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
* ---
*
* netinet/in.h: POSIX networking for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
* ---
*
* posixfile.c: POSIX equivalents for file operations
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
* ---
*
* posixio.c: POSIX IO emulation layer for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
* Markus Armbruster, 2007-2008
{
SOCKET handle;
int new_fd;
-
+
if ((new_fd = get_fd()) < 0)
return -1;
if (type == FDMAP_IO_SOCKET) {
result = WSAIoctl(handle, FIONBIO, NULL, 0,&nonblocking,
sizeof (nonblocking), &bytes_returned, NULL, NULL);
-
+
if(result < 0) {
errno = WSAGetLastError();
return -1;
* ---
*
* service.c: Windows services support
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2004
*/
schSCManager = OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
if (schSCManager == NULL) {
- fprintf(stderr, "install_service failed to open Service Control Manager\n");
+ fprintf(stderr, "install_service failed to open Service Control Manager\n");
return EXIT_FAILURE;
}
NULL, /* database service dependency */
NULL, /* LocalSystem account */
NULL); /* no password */
-
+
if (schService == NULL) {
fprintf(stderr, "install_service failed to create service %s\n", service_name);
return EXIT_FAILURE;
schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (schSCManager == NULL) {
- fprintf(stderr, "remove_service failed to open Service Control Manager\n");
+ fprintf(stderr, "remove_service failed to open Service Control Manager\n");
return EXIT_FAILURE;
}
}
if (CloseServiceHandle(hService) == 0) {
- fprintf(stderr, "remove_service failed to close service %s\n", service_name);
+ fprintf(stderr, "remove_service failed to close service %s\n", service_name);
return EXIT_FAILURE;
} else {
- printf("Service %s removed.\n", service_name);
+ printf("Service %s removed.\n", service_name);
return EXIT_SUCCESS;
}
}
-static SERVICE_STATUS service_status;
+static SERVICE_STATUS service_status;
static SERVICE_STATUS_HANDLE service_status_handle;
static void WINAPI
-service_ctrl_handler(DWORD Opcode)
-{
- switch(Opcode) {
- case SERVICE_CONTROL_PAUSE:
+service_ctrl_handler(DWORD Opcode)
+{
+ switch(Opcode) {
+ case SERVICE_CONTROL_PAUSE:
service_status.dwCurrentState = SERVICE_PAUSED;
logerror("Pausing the service not supported");
- break;
-
- case SERVICE_CONTROL_CONTINUE:
+ break;
+
+ case SERVICE_CONTROL_CONTINUE:
logerror("Continuing the service not supported");
- service_status.dwCurrentState = SERVICE_RUNNING;
- break;
-
+ service_status.dwCurrentState = SERVICE_RUNNING;
+ break;
+
case SERVICE_CONTROL_STOP:
logerror("Service stopping");
empth_request_shutdown();
- return;
-
- case SERVICE_CONTROL_INTERROGATE:
+ return;
+
+ case SERVICE_CONTROL_INTERROGATE:
/* Fall through to send current status. */
- break;
-
- default:
- logerror("Unrecognized opcode %ld in ServiceCtrlHandler",
- Opcode);
- }
-
+ break;
+
+ default:
+ logerror("Unrecognized opcode %ld in ServiceCtrlHandler",
+ Opcode);
+ }
+
/* Send current status. */
if (!SetServiceStatus (service_status_handle, &service_status))
- logerror("SetServiceStatus error %ld",GetLastError());
- return;
-}
+ logerror("SetServiceStatus error %ld",GetLastError());
+ return;
+}
void WINAPI
service_main(DWORD argc, LPTSTR *argv)
{
int sig;
-
- service_status.dwServiceType = SERVICE_WIN32;
- service_status.dwCurrentState = SERVICE_START_PENDING;
- service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
- service_status.dwWin32ExitCode = 0;
- service_status.dwServiceSpecificExitCode = 0;
- service_status.dwCheckPoint = 0;
- service_status.dwWaitHint = 0;
-
+
+ service_status.dwServiceType = SERVICE_WIN32;
+ service_status.dwCurrentState = SERVICE_START_PENDING;
+ service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
+ service_status.dwWin32ExitCode = 0;
+ service_status.dwServiceSpecificExitCode = 0;
+ service_status.dwCheckPoint = 0;
+ service_status.dwWaitHint = 0;
+
service_status_handle = RegisterServiceCtrlHandler(
DEFAULT_SERVICE_NAME, service_ctrl_handler);
-
- if (service_status_handle == (SERVICE_STATUS_HANDLE)0) {
+
+ if (service_status_handle == (SERVICE_STATUS_HANDLE)0) {
logerror("RegisterServiceCtrlHandler failed %lu\n", GetLastError());
finish_server();
return;
}
-
+
start_server(0);
-
+
/* Initialization complete - report running status. */
- service_status.dwCurrentState = SERVICE_RUNNING;
- service_status.dwCheckPoint = 0;
- service_status.dwWaitHint = 0;
-
- if (!SetServiceStatus (service_status_handle, &service_status)) {
+ service_status.dwCurrentState = SERVICE_RUNNING;
+ service_status.dwCheckPoint = 0;
+ service_status.dwWaitHint = 0;
+
+ if (!SetServiceStatus (service_status_handle, &service_status)) {
logerror("SetServiceStatus error %ld\n", GetLastError());
}
stop_service(void)
{
logerror("Service stopped");
- service_status.dwWin32ExitCode = 0;
- service_status.dwCurrentState = SERVICE_STOPPED;
- service_status.dwCheckPoint = 0;
- service_status.dwWaitHint = 0;
+ service_status.dwWin32ExitCode = 0;
+ service_status.dwCurrentState = SERVICE_STOPPED;
+ service_status.dwCheckPoint = 0;
+ service_status.dwWaitHint = 0;
- if (!SetServiceStatus (service_status_handle, &service_status))
+ if (!SetServiceStatus (service_status_handle, &service_status))
logerror("Error while stopping service SetServiceStatus"
- " error %ld", GetLastError());
+ " error %ld", GetLastError());
}
* ---
*
* sys/socket.h: POSIX socket emulation for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
* ---
*
* sys/uio.h: POSIX emulation for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
* ---
*
* unistd.h: POSIX emulation for WIN32
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
*
* w32misc.h: POSIX emulation for WIN32
* Stuff that can not be put in the equivalent include files
- *
+ *
* Known contributors to this file:
* Ron Koenderink, 2007
*/
*)
echo "Removing existing server.log and journal.log"
- if [ -f "../var/empire/server.log" ]
+ if [ -f "../var/empire/server.log" ]
then
rm "../var/empire/server.log"
fi
- if [ -f "../var/empire/journal.log" ]
+ if [ -f "../var/empire/journal.log" ]
then
rm "../var/empire/journal.log"
fi
echo "Removing existing schedule"
- if [ -f "../etc/empire/schedule" ]
+ if [ -f "../etc/empire/schedule" ]
then
>../etc/empire/schedule
fi
}
echo "Done (newcap_script / empire)."
echo ""
-
+
echo "TODO: Replace this with a real test script."
echo "Just do some rudimentary testing for now."
echo ""
runfeed 8 << EOF
cen *
map #
-read y
+read y
exp c 0,0 50 gyyygh
des -7,-3 )
lost *
runfeed 8 << EOF
cen *
map #
-read y
+read y
lost *
EOF
echo "Run an update"
echo "Done (kill)."
cd "${BOXDIR}/${WORKDIR}/emp4/var/empire" || err "Could not cd to ${BOXDIR}/${WORKDIR}/emp4/var/empire"
echo "-- Start Server Log --"
- cat server.log
+ cat server.log
echo "-- End of Server Log --"
echo "-- Start Journal Log --"
- cat journal.log
+ cat journal.log
echo "-- End of Journal Log --"
echo "Server stopped"
;;
+++ b/src/lib/common/file.c
@@ -384,7 +384,7 @@ do_write(struct empfile *ep, void *buf, int id, int count)
return -1;
-
+
if (ep->flags & EFF_TYPED) {
- now = ep->flags & EFF_NOTIME ? (time_t)-1 : time(NULL);
+ now = ep->flags & EFF_NOTIME ? (time_t)-1 : (time_t)100;
--- a/src/lib/commands/lost.c
+++ b/src/lib/commands/lost.c
@@ -51,7 +51,7 @@ lost(void)
-
+
prdate();
nlost = 0;
- time(&now);
@@ -68,6 +68,13 @@
static void upr_player(struct player *pl, int id, char *buf);
static void outid(struct player *pl, int n);
-
+
+/* Hack for nightlybuild */
+char *
+ctime(const time_t *clock)
- pr_id(player, C_PROMPT, "%d %d\n", min, btu);
+ pr_id(player, C_PROMPT, "0 640\n"); /* Hack for nightlybuild */
}
-
+
/*
-char *pre_update_hook = "";
+char *pre_update_hook = "echo pre_update_hook executed here";
int max_idle = 15; /* session dies after max_idle minutes idle */
-
+
int sect_mob_max = 127; /* sector mobility limits */
* ---
*
* idle.c: Stamps out idle players. Runs at low priority
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
*/
* ---
*
* main.c: Empire Server main, startup and shutdown
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 1996, 1998
* ---
*
* marketup.c: Market updater thread
- *
+ *
* Known contributors to this file:
* Steve McClure, 1996
* Markus Armbruster, 2007
* ---
*
* shutdown.c: Shuts down server. Runs at low priority.
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Markus Armbruster, 2007-2008
* ---
*
* update.c: Update scheduler
- *
+ *
* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 1996
run_hook(char *cmd, char *name)
{
int status;
-
+
fflush(NULL);
-
+
status = system(cmd);
if (status == 0)
; /* successful exit */
* ---
*
* empdump.c: Export/import Empire game state
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2008
*/
* ---
*
* empsched.c: Show the update schedule
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2007
*/
* ---
*
* fairland.c: Create a nice, new world
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1998
* ---
*
* files.c: Create all the misc files
- *
+ *
* Known contributors to this file:
* Thomas Ruschak
* Ken Stevens, 1995
* ---
*
* pconfig.c: Print the empire configuration
- *
+ *
* Known contributors to this file:
* Julian Onions
*/