empserver/include
Markus Armbruster e852d458f9 tests: New test-suite-only command __cmd
Adding or removing a command to/from a test has unfortunate effects:

* Before the previous commit: if the command consumes pseudorandom
  numbers, all subsequent users of pseudorandom numbers get different
  ones.  This has always been a major headache.

* Since the previous commit: all subsequent users of pseudorandom
  numbers get different ones whether the command consumes any or not.
  That's even worse.

* If the command uses BTUs, subsequent prompts are changed.  Not
  nearly as bad as the above, but still annoying.

Create a new command __cmd to allow compensating for adding/removing
commands for tests.  Throw in the ability to compensate treasury
changes for good measure.  Three arguments: command count, BTU use,
money use.

Usage example: say you add a convert command to a test, and it uses 3
BTUs and $15.  Then you compensate by adding "__cmd added 1 3 15"
right after it.

The command must not be available unless running_test_suite is on, of
course.  Make it require the new player command capability TESTING,
and give that to all players when running_test_suite is on.

The command is intentionally not documented in info.  Switch
running_test_suite off for info-test, to hide it (and any future
TESTING commands) from info-test.

Suppress the command counter increment for TESTING commands, so they
can be used without upsetting pseudorandom numbers

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-01-19 10:16:24 +01:00
..
actofgod.h Update copyright notice 2014-01-02 14:33:48 +01:00
budg.h Update copyright notice 2014-01-02 14:33:48 +01:00
chance.h Fix PRNG seeding to resist guessing 2013-05-08 06:55:21 +02:00
com.h Update copyright notice 2014-01-02 14:33:48 +01:00
combat.h Update copyright notice 2014-01-02 14:33:48 +01:00
commands.h Update copyright notice 2014-01-02 14:33:48 +01:00
commodity.h Update copyright notice 2014-01-02 14:33:48 +01:00
damage.h Update copyright notice 2014-01-02 14:33:48 +01:00
distribute.h Update copyright notice 2014-01-02 14:33:48 +01:00
econfig-spec.h econfig: New key running_test_suite, for use by tests 2014-01-19 10:09:17 +01:00
empio.h Update copyright notice 2014-01-02 14:33:48 +01:00
empobj.h Update copyright notice 2014-01-02 14:33:48 +01:00
empthread.h Update copyright notice 2014-01-02 14:33:48 +01:00
file.h Update copyright notice 2014-01-02 14:33:48 +01:00
game.h Update copyright notice 2014-01-02 14:33:48 +01:00
ioqueue.h Update copyright notice 2014-01-02 14:33:48 +01:00
item.h Update copyright notice 2014-01-02 14:33:48 +01:00
journal.h Update copyright notice 2014-01-02 14:33:48 +01:00
land.h Update copyright notice 2014-01-02 14:33:48 +01:00
loan.h Update copyright notice 2014-01-02 14:33:48 +01:00
lost.h Update copyright notice 2014-01-02 14:33:48 +01:00
lwp.h Update copyright notice 2014-01-02 14:33:48 +01:00
map.h Update copyright notice 2014-01-02 14:33:48 +01:00
match.h Update copyright notice 2014-01-02 14:33:48 +01:00
misc.h Update copyright notice 2014-01-02 14:33:48 +01:00
mission.h Update copyright notice 2014-01-02 14:33:48 +01:00
nat.h Update copyright notice 2014-01-02 14:33:48 +01:00
news.h Update copyright notice 2014-01-02 14:33:48 +01:00
nsc.h Update copyright notice 2014-01-02 14:33:48 +01:00
nuke.h Update copyright notice 2014-01-02 14:33:48 +01:00
optlist.h Update copyright notice 2014-01-02 14:33:48 +01:00
path.h Update copyright notice 2014-01-02 14:33:48 +01:00
plague.h Update copyright notice 2014-01-02 14:33:48 +01:00
plane.h Update copyright notice 2014-01-02 14:33:48 +01:00
player.h tests: New test-suite-only command __cmd 2014-01-19 10:16:24 +01:00
power.h Update copyright notice 2014-01-02 14:33:48 +01:00
product.h Update copyright notice 2014-01-02 14:33:48 +01:00
proto.h Update copyright notice 2014-01-02 14:33:48 +01:00
prototypes.h Update copyright notice 2014-01-02 14:33:48 +01:00
queue.h Update copyright notice 2014-01-02 14:33:48 +01:00
retreat.h Update copyright notice 2014-01-02 14:33:48 +01:00
sect.h Update copyright notice 2014-01-02 14:33:48 +01:00
server.h Update copyright notice 2014-01-02 14:33:48 +01:00
service.h Update copyright notice 2014-01-02 14:33:48 +01:00
ship.h Update copyright notice 2014-01-02 14:33:48 +01:00
tel.h Update copyright notice 2014-01-02 14:33:48 +01:00
testing.h tests: New test-suite-only command __cmd 2014-01-19 10:16:24 +01:00
trade.h Update copyright notice 2014-01-02 14:33:48 +01:00
treaty.h Update copyright notice 2014-01-02 14:33:48 +01:00
types.h Update copyright notice 2014-01-02 14:33:48 +01:00
unit.h Update copyright notice 2014-01-02 14:33:48 +01:00
update.h Update copyright notice 2014-01-02 14:33:48 +01:00
version.h Update copyright notice 2014-01-02 14:33:48 +01:00
xdump.h Update copyright notice 2014-01-02 14:33:48 +01:00
xy.h Update copyright notice 2014-01-02 14:33:48 +01:00