(empfile, teldir, motdfil, downfil, disablefil, telfil, annfil)
(banfil, authfil, timestampfil): Make file names relative to DATADIR. (main): emp_server and files change to the data directory. fairland has to write newcap_script to the initial current directory, so it keeps it and makes file names relative to DATADIR absolute. (fixup_files): Nothing to do, remove. This fixes the following bug: fixup_files() formed file names by appending ep->name instead of the base name of ep->file to datadir. Thus, fixup_files() changed file names even when datadir had the compiled-in value. When emp_config() couldn't open econfig, it failed to call fixup_files(), and different file names got used. Note that with this revision the file names revert to the names used before fixup_files() was introduced. Closes #1146080. (print_config): Printing file names as comments is not really useful, remove. (otherfiles, ofiles): Unused, remove. (emp_config, main): Previously, pconfig had to call emp_config() even when it didn't want to read econfig, just to run fixup_files(). This is no longer necessary. Simplify.
This commit is contained in:
parent
1583d0c6a2
commit
29da4b6cf4
8 changed files with 49 additions and 92 deletions
|
@ -53,49 +53,49 @@
|
|||
#include "commodity.h"
|
||||
|
||||
struct empfile empfile[] = {
|
||||
{"sect", EMPDIR "/data/sector", EFF_XY | EFF_OWNER,
|
||||
{"sect", "sector", EFF_XY | EFF_OWNER,
|
||||
0, sizeof(struct sctstr), 0, 0, 0, offsetof(struct sctstr, sct_item),
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"ship", EMPDIR "/data/ship", EFF_XY | EFF_OWNER | EFF_GROUP,
|
||||
{"ship", "ship", EFF_XY | EFF_OWNER | EFF_GROUP,
|
||||
0, sizeof(struct shpstr), 0, 0, 0, offsetof(struct shpstr, shp_item),
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"plane", EMPDIR "/data/plane", EFF_XY | EFF_OWNER | EFF_GROUP,
|
||||
{"plane", "plane", EFF_XY | EFF_OWNER | EFF_GROUP,
|
||||
0, sizeof(struct plnstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"land", EMPDIR "/data/land", EFF_XY | EFF_OWNER | EFF_GROUP,
|
||||
{"land", "land", EFF_XY | EFF_OWNER | EFF_GROUP,
|
||||
0, sizeof(struct lndstr), 0, 0, 0, offsetof(struct lndstr, lnd_item),
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"nuke", EMPDIR "/data/nuke", EFF_XY | EFF_OWNER,
|
||||
{"nuke", "nuke", EFF_XY | EFF_OWNER,
|
||||
0, sizeof(struct nukstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"news", EMPDIR "/data/news", 0,
|
||||
{"news", "news", 0,
|
||||
0, sizeof(struct nwsstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"treaty", EMPDIR "/data/treaty", 0,
|
||||
{"treaty", "treaty", 0,
|
||||
0, sizeof(struct trtstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"trade", EMPDIR "/data/trade", 0,
|
||||
{"trade", "trade", 0,
|
||||
0, sizeof(struct trdstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"pow", EMPDIR "/data/power", 0,
|
||||
{"pow", "power", 0,
|
||||
0, sizeof(struct powstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"nat", EMPDIR "/data/nation", 0,
|
||||
{"nat", "nation", 0,
|
||||
0, sizeof(struct natstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"loan", EMPDIR "/data/loan", 0,
|
||||
{"loan", "loan", 0,
|
||||
0, sizeof(struct lonstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"map", EMPDIR "/data/map", 0,
|
||||
{"map", "map", 0,
|
||||
0, DEF_WORLD_X * DEF_WORLD_Y / 2, 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"bmap", EMPDIR "/data/bmap", 0,
|
||||
{"bmap", "bmap", 0,
|
||||
0, DEF_WORLD_X * DEF_WORLD_Y / 2, 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"commodity", EMPDIR "/data/commodity", 0,
|
||||
{"commodity", "commodity", 0,
|
||||
0, sizeof(struct comstr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0},
|
||||
{"lost", EMPDIR "/data/lostitems", 0, 0,
|
||||
{"lost", "lostitems", 0, 0,
|
||||
sizeof(struct loststr), 0, 0, 0, 0,
|
||||
-1, -1, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue