int grin(void);
int hard(void);
int head(void);
-int hidd(void);
int improve(void);
int info(void);
int land(void);
int payo(void);
int pboa(void);
int pdump(void);
+int peek(void);
int plan(void);
int play(void);
int powe(void);
+++ /dev/null
-.TH Command HIDDEN
-.NA hidden "Display some deity-only statistics for sectors"
-.LV Expert
-.SY "hidden <SECTS>"
-.SA "Deity"
--- /dev/null
+.TH Command PEEK
+.NA peek "Display some deity-only statistics for sectors"
+.LV Expert
+.SY "peek <SECTS>"
+.SA "Deity"
.NA setsector "Change stats of a sector"
.LV Expert
.SY "setsector <TYPE> <SECTS> <NUM>"
-You can change anything that appears in dump or hidden (I think).
-.SA "give, setresource, edit, Deity"
+You can change anything that appears in dump or peek (I think).
+.SA "give, setresource, edit, dump, peek, Deity"
coas.o coll.o comm.o cons.o conv.o coun.o cuto.o decl.o deli.o demo.o \
desi.o disa.o dist.o drop.o dump.o echo.o edit.o enab.o enli.o \
expl.o fina.o flash.o flee.o fly.o foll.o forc.o fort.o fuel.o give.o \
- grin.o hard.o head.o hidd.o improve.o info.o land.o laun.o lboard.o \
- ldump.o ledg.o leve.o load.o look.o lost.o lstat.o lten.o map.o \
- marc.o mark.o mfir.o mine.o miss.o mobq.o mobu.o mora.o move.o \
- name.o nati.o navi.o ndump.o new.o newe.o news.o nuke.o offe.o offs.o \
- orde.o orig.o para.o path.o payo.o pboa.o pdump.o plan.o play.o \
+ grin.o hard.o head.o improve.o info.o land.o laun.o lboard.o ldump.o \
+ ledg.o leve.o load.o look.o lost.o lstat.o lten.o map.o marc.o mark.o \
+ mfir.o mine.o miss.o mobq.o mobu.o mora.o move.o name.o nati.o navi.o \
+ ndump.o new.o newe.o news.o nuke.o offe.o offs.o orde.o orig.o para.o \
+ path.o payo.o pboa.o peek.o pdump.o plan.o play.o \
powe.o prod.o pstat.o rada.o rang.o rea.o real.o reco.o reje.o rela.o \
repa.o repo.o rese.o reso.o retr.o rout.o sabo.o sail.o sate.o scra.o \
scut.o sdump.o sect.o sell.o set.o setres.o setsect.o shar.o shark.o \
deli.obj demo.obj desi.obj disa.obj dist.obj drop.obj \
dump.obj echo.obj edit.obj enab.obj enli.obj expl.obj fina.obj \
flash.obj flee.obj fly.obj foll.obj forc.obj fort.obj fuel.obj \
- give.obj grin.obj hard.obj head.obj hidd.obj improve.obj info.obj \
+ give.obj grin.obj hard.obj head.obj improve.obj info.obj \
land.obj laun.obj lboard.obj ldump.obj ledg.obj leve.obj load.obj \
look.obj lost.obj lstat.obj lten.obj map.obj marc.obj mark.obj \
mfir.obj mine.obj miss.obj mobq.obj mobu.obj mora.obj move.obj \
- name.obj nati.obj navi.obj ndump.obj new.obj newe.obj \
- news.obj nuke.obj offe.obj offs.obj orde.obj orig.obj para.obj \
- path.obj payo.obj pboa.obj pdump.obj plan.obj play.obj powe.obj \
+ name.obj nati.obj navi.obj ndump.obj new.obj newe.obj news.obj \
+ nuke.obj offe.obj offs.obj orde.obj orig.obj para.obj path.obj \
+ payo.obj pboa.obj pdump.obj peek.obj plan.obj play.obj powe.obj \
prod.obj pstat.obj rada.obj rang.obj rea.obj real.obj reco.obj \
reje.obj rela.obj repa.obj repo.obj rese.obj reso.obj retr.obj \
rout.obj sabo.obj sail.obj sate.obj scra.obj scut.obj sdump.obj \
+++ /dev/null
-/*
- * Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2005, 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 the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- * related information and legal notices. It is expected that any future
- * projects/authors will amend these files as needed.
- *
- * ---
- *
- * hidd.c: Do a hidden values report (deity)
- *
- * Known contributors to this file:
- * Jeff Wallace, 1989
- * Pat Loney, 1998
- * Steve McClure, 1998
- */
-
-#include "misc.h"
-#include "player.h"
-#include "sect.h"
-#include "xy.h"
-#include "nsc.h"
-#include "nat.h"
-#include "commands.h"
-
-int
-hidd(void)
-{
- struct sctstr sect;
- int nsect;
- struct nstr_sect nstr;
-
- if (!snxtsct(&nstr, player->argp[1]))
- return RET_SYN;
- prdate();
- nsect = 0;
- while (nxtsct(&nstr, §)) {
- if (!player->owner)
- continue;
- if (nsect++ == 0) {
- if (player->god)
- pr(" ");
- pr("HIDDEN VALUES old che------- plague----\n");
- if (player->god)
- pr("own ");
- pr(" sect eff own loyal cnum value stage time mines\n");
- }
- if (player->god)
- pr("%3d ", sect.sct_own);
- prxy("%4d,%-4d", nstr.x, nstr.y, player->cnum);
- pr(" %c %3d%% %3d %3d %3d %3d %3d %3d %3d",
- dchr[sect.sct_type].d_mnem, sect.sct_effic,
- sect.sct_oldown, sect.sct_loyal,
- sect.sct_che_target, sect.sct_che,
- sect.sct_pstage, sect.sct_ptime, sect.sct_mines);
- pr("\n");
- }
- if (nsect == 0) {
- if (player->argp[1])
- pr("%s: No sector(s)\n", player->argp[1]);
- else
- pr("%s: No sector(s)\n", "");
- return RET_FAIL;
- } else
- pr("%d sector%s\n", nsect, splur(nsect));
- return 0;
-}
--- /dev/null
+/*
+ * Empire - A multi-player, client/server Internet based war game.
+ * Copyright (C) 1986-2005, 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 the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
+ * related information and legal notices. It is expected that any future
+ * projects/authors will amend these files as needed.
+ *
+ * ---
+ *
+ * peek.c: Show hidden values report (deity)
+ *
+ * Known contributors to this file:
+ * Jeff Wallace, 1989
+ * Pat Loney, 1998
+ * Steve McClure, 1998
+ */
+
+#include "misc.h"
+#include "player.h"
+#include "sect.h"
+#include "xy.h"
+#include "nsc.h"
+#include "nat.h"
+#include "commands.h"
+#include "version.h" /* need to OBSOLETE hidden command */
+
+int
+peek(void)
+{
+ struct sctstr sect;
+ int nsect;
+ struct nstr_sect nstr;
+
+#if EMP_VERS_MINOR == 2 && EMP_VERS_PATCH <= 22
+ /*
+ * OBSOLETE
+ * Can be removed once hidden command is removed from empmod.c
+ */
+ if (player->argp[0][0] == 'h')
+ pr("The hidden command has been renamed to peek, use peek in the future\n");
+#endif
+ if (!snxtsct(&nstr, player->argp[1]))
+ return RET_SYN;
+ prdate();
+ nsect = 0;
+ while (nxtsct(&nstr, §)) {
+ if (!player->owner)
+ continue;
+ if (nsect++ == 0) {
+ if (player->god)
+ pr(" ");
+ pr("HIDDEN VALUES old che------- plague----\n");
+ if (player->god)
+ pr("own ");
+ pr(" sect eff own loyal cnum value stage time mines\n");
+ }
+ if (player->god)
+ pr("%3d ", sect.sct_own);
+ prxy("%4d,%-4d", nstr.x, nstr.y, player->cnum);
+ pr(" %c %3d%% %3d %3d %3d %3d %3d %3d %3d",
+ dchr[sect.sct_type].d_mnem, sect.sct_effic,
+ sect.sct_oldown, sect.sct_loyal,
+ sect.sct_che_target, sect.sct_che,
+ sect.sct_pstage, sect.sct_ptime, sect.sct_mines);
+ pr("\n");
+ }
+ if (nsect == 0) {
+ if (player->argp[1])
+ pr("%s: No sector(s)\n", player->argp[1]);
+ else
+ pr("%s: No sector(s)\n", "");
+ return RET_FAIL;
+ } else
+ pr("%d sector%s\n", nsect, splur(nsect));
+ return 0;
+}
#include "nat.h"
#include "file.h"
#include "commands.h"
+#include "version.h" /* need to OBSOLETE hidden command */
+
struct cmndstr player_coms[] = {
/* command form cost addr permit */
{"harden <PLANES> <NUM>", 2, hard, C_MOD, NORM + MONEY + CAP},
{"help <topic>", 0, info, 0, VIS},
{"headlines [days]", 0, head, C_MOD, VIS},
- {"hidden <SECTS>", 0, hidd, 0, GOD},
+#if EMP_VERS_MINOR == 2 && EMP_VERS_PATCH <= 22
+ /*
+ * OBSOLETE
+ * once hidden command is removed, also remove the hidden code in peek.c
+ */
+ {"hidden <SECTS>", 0, peek, 0, GOD},
+#endif
{"improve <road|rail|defense> <SECTS> <NUM>", 1, improve, C_MOD,
NORM + MONEY + CAP},
{"info <topic>", 0, info, 0, VIS},
{"pbmap <SECTS|UNIT> [s|l|p|r|t|*|h]", 0, map, C_MOD, NORM},
{"pboard <PLANES>", 3, pboa, C_MOD, NORM + MONEY + CAP},
{"pdump <PLANES> [<fields>]", 0, pdump, 0, NORM},
+ {"peek <SECTS>", 0, peek, 0, GOD},
{"plane <SECTS>", 0, plan, 0, NORM},
{"players", 0, play, 0, VIS},
{"pmap <SECTS|UNIT> [s|l|p|*|h]", 0, map, C_MOD, NORM},