From f38ce48828f00b111d9dc9600f149363fd96e9bc Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 15 Mar 2012 19:46:10 +0100 Subject: [PATCH] Notes added by 'git notes copy' --- 0f8daed12875d4b4143a64fc6b075607538d5874 | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 0f8daed12875d4b4143a64fc6b075607538d5874 diff --git a/0f8daed12875d4b4143a64fc6b075607538d5874 b/0f8daed12875d4b4143a64fc6b075607538d5874 new file mode 100644 index 00000000..6f8ca87f --- /dev/null +++ b/0f8daed12875d4b4143a64fc6b075607538d5874 @@ -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.