Notes added by 'git notes copy'

This commit is contained in:
Markus Armbruster 2012-03-15 19:46:10 +01:00
parent 4167cdf351
commit f38ce48828

View file

@ -0,0 +1,32 @@
Treasury update can be lost on EOF and shutdown
Commands can accumulate cost in player->dolcost. status() charges the
accumulated cost. This is skipped when the command gets aborted by
the player signalling EOF, or by server shutdown, and after a quit
command. The latter is harmless, as quitting is always free.
EOF can happen when a command prompts for input.
shutdown can additionally happen when a command blocks on output. No
command that messes with dolcost blocks on output (all have C_MOD
set).
Commands build bridge, build tower, designate, and improve prompt for
input after adding to dolcost. This can be abused to build bridges,
towers and infrastructures free of charge. It can also be abused to
designate sectors for free, but the stock game's sector types are all
free anyway.
Command scuttle prompts for input after subtracting from dolcost. A
player can lose payment for tradeships when the command gets aborted
by EOF or shutdown at the "Are you sure you want to scuttle" prompt.
Similarly, a player can lose the gains from sacking a capital, for
instance at the attack command's "move in" prompts.
Commands build ship, build plane, build land, build nuke, change,
collect, consider accept, convert, demobilize, harden, repay, shark,
upgrade, and work, are believed not to prompt after messing with
dolcost.
Already broken in BSD Empire 1.1.