empserver/src/lib/commands
Markus Armbruster 0d139ee1d1 Update lost file from prewrite callbacks
Losses of sectors, ships, planes, land units and nukes are tracked in
the lost file.  To keep it current, makelost() and makenotlost() were
called whenever one of these changed owners.  Cumbersome and
error-prone.  In fact, the lost file was never perfectly accurate.

Detect the ownership change in the prewrite callback and call
makelost() / makenotlost() from there.  Remove lost file updates from
where they're no longer needed: right before a put.  takeover() is a
bit more involved: it doesn't put the sectors, but all callers do,
except for guerrilla().  So remove the lost file update from
takeover(), but add it to guerrilla().

This takes care of lost file update for all ownership changes that go
through ef_write().  It can't take care of any missing updates for
changes that don't go through it.
2008-09-08 21:26:42 -04:00
..
acce.c Update copyright notice 2008-01-19 10:15:37 +01:00
add.c Fix add of for status arguments active, god, delete 2008-04-06 09:18:56 +02:00
anti.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
arm.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
army.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
assa.c Fix some argument prompts to end in one space 2008-05-10 18:52:29 +02:00
atta.c Update copyright notice 2008-01-19 10:15:37 +01:00
bdes.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
best.c Simplify best() and torp() 2008-07-25 08:16:38 -04:00
boar.c Update copyright notice 2008-01-19 10:15:37 +01:00
bomb.c Make ship_bomb() friendlier 2008-08-02 21:25:31 -04:00
brea.c Update copyright notice 2008-01-19 10:15:37 +01:00
budg.c Update copyright notice 2008-01-19 10:15:37 +01:00
buil.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
buy.c Update copyright notice 2008-01-19 10:15:37 +01:00
capi.c Update copyright notice 2008-01-19 10:15:37 +01:00
carg.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
cede.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
cens.c Update copyright notice 2008-01-19 10:15:37 +01:00
chan.c Include system headers before ours 2008-03-14 20:25:11 +01:00
coas.c Update copyright notice 2008-01-19 10:15:37 +01:00
coll.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
comm.c Update copyright notice 2008-01-19 10:15:37 +01:00
cons.c Get rid of RET_SYS, just use RET_FAIL 2008-08-03 11:34:00 -04:00
conv.c Don't permit convert to spend more money than available 2008-08-09 08:38:07 -04:00
coun.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
cuto.c Update copyright notice 2008-01-19 10:15:37 +01:00
decl.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
deli.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
demo.c Don't permit demobilize to spend more money than available 2008-08-09 08:34:00 -04:00
desi.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
disa.c Update copyright notice 2008-01-19 10:15:37 +01:00
dist.c Fix distribute aborting at prompt for second argument 2008-07-21 07:50:13 -04:00
drop.c New get_planes(), factored out of plane flying commands 2008-07-26 15:01:45 -04:00
dump.c Update copyright notice 2008-01-19 10:15:37 +01:00
echo.c Update copyright notice 2008-01-19 10:15:37 +01:00
edit.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
enab.c Update copyright notice 2008-01-19 10:15:37 +01:00
enli.c Update copyright notice 2008-01-19 10:15:37 +01:00
expl.c Validate explore's third argument earlier 2008-07-21 08:13:40 -04:00
fina.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
flash.c Update copyright notice 2008-01-19 10:15:37 +01:00
flee.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
fly.c Update known contributors comments 2008-08-03 08:04:08 -04:00
foll.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
forc.c Update copyright notice 2008-01-19 10:15:37 +01:00
fort.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
give.c Update copyright notice 2008-01-19 10:15:37 +01:00
grin.c Update copyright notice 2008-01-19 10:15:37 +01:00
hard.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
head.c Check subscript of rpt[] 2008-03-14 20:25:08 +01:00
improve.c Fix improve not to spend more money than available 2008-08-09 08:40:04 -04:00
info.c Get rid of RET_SYS, just use RET_FAIL 2008-08-03 11:34:00 -04:00
land.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
laun.c Fix satellite coordinates screwup in launch 2008-08-26 21:42:32 -04:00
lboard.c Update copyright notice 2008-01-19 10:15:37 +01:00
ldump.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
ledg.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
leve.c Update copyright notice 2008-01-19 10:15:37 +01:00
load.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
look.c Fix size of sector bitmap in do_look() and draw_map() 2008-08-26 21:42:32 -04:00
lost.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
lstat.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
lten.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
map.c Update copyright notice 2008-01-19 10:15:37 +01:00
marc.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
mark.c Update copyright notice 2008-01-19 10:15:37 +01:00
mfir.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
mine.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
miss.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
mobq.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
mora.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
move.c Don't revert sectors without military to old owner 2008-09-05 07:39:02 -04:00
name.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
nati.c Clean up ugly line break 2008-02-26 21:07:58 +01:00
navi.c Remove some useless code from nav_map() 2008-08-19 08:54:04 -04:00
ndump.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
new.c Make newcap's second argument mandatory 2008-03-26 22:10:29 +01:00
newe.c Update copyright notice 2008-01-19 10:15:37 +01:00
news.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
nuke.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
offe.c Get rid of RET_SYS, just use RET_FAIL 2008-08-03 11:34:00 -04:00
orde.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
orig.c Fix origin and zdone for invalid country argument 2008-07-21 08:13:40 -04:00
para.c New get_planes(), factored out of plane flying commands 2008-07-26 15:01:45 -04:00
path.c Simplify routech[] 2008-08-27 21:30:56 -04:00
payo.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
pboa.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
pdump.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
peek.c Update copyright notice 2008-01-19 10:15:37 +01:00
plan.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
play.c Update copyright notice 2008-01-19 10:15:37 +01:00
powe.c Update known contributors comments 2008-08-03 08:04:08 -04:00
prod.c Fix production command not to limit level production to 999 2008-08-09 09:03:03 -04:00
pstat.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
rada.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
rang.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
rea.c Update copyright notice 2008-01-19 10:15:37 +01:00
real.c Rework code dealing with struct range fixing many bugs 2008-08-20 07:40:32 -04:00
reco.c New get_planes(), factored out of plane flying commands 2008-07-26 15:01:45 -04:00
reje.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
rela.c Update copyright notice 2008-01-19 10:15:37 +01:00
relo.c Get rid of RET_SYS, just use RET_FAIL 2008-08-03 11:34:00 -04:00
repa.c Get rid of RET_SYS, just use RET_FAIL 2008-08-03 11:34:00 -04:00
repo.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
rese.c Update copyright notice 2008-01-19 10:15:37 +01:00
reso.c Remove some useless commented out code 2008-06-06 21:25:28 +02:00
retr.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
rout.c Simplify routech[] 2008-08-27 21:30:56 -04:00
sabo.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
sail.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
sate.c Distinguish between planes "in orbit" and "launched" 2008-03-26 22:09:09 +01:00
scra.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
scut.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
sdump.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
sect.c Update copyright notice 2008-01-19 10:15:37 +01:00
sell.c No need to assign uid after ef_blank() 2008-03-26 22:13:21 +01:00
set.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
setres.c Update copyright notice 2008-01-19 10:15:37 +01:00
setsect.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
shar.c Update copyright notice 2008-01-19 10:15:37 +01:00
shark.c Update copyright notice 2008-01-19 10:15:37 +01:00
shi.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
shoo.c Update copyright notice 2008-01-19 10:15:37 +01:00
show.c New show product 2008-07-28 07:51:49 -04:00
shut.c Update known contributors comments 2008-08-03 08:04:08 -04:00
sinf.c Update copyright notice 2008-01-19 10:15:37 +01:00
skyw.c Distinguish between planes "in orbit" and "launched" 2008-03-26 22:09:09 +01:00
sona.c Use MAPWIDTH() to allocate map buffers 2008-09-03 20:43:12 -04:00
spy.c Fix spy to reliably avoid spying same sector more than once 2008-08-26 21:42:32 -04:00
sstat.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
stop.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
stre.c Update copyright notice 2008-01-19 10:15:37 +01:00
strv.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
supp.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
surv.c Avoid cryptic message when survey's first argument is empty 2008-07-21 08:13:40 -04:00
swap.c Add sequence numbers to game state 2008-05-17 22:50:30 +02:00
tele.c Fail announce, pray, telegram and turn on aborted telegrams 2008-08-09 12:10:06 -04:00
tend.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
terr.c Update copyright notice 2008-01-19 10:15:37 +01:00
thre.c Fix recently changed command failures to use BTUs 2008-08-09 12:09:50 -04:00
togg.c Update copyright notice 2008-01-19 10:15:37 +01:00
torp.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
trad.c Update lost file from prewrite callbacks 2008-09-08 21:26:42 -04:00
tran.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
trea.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
turn.c Fail announce, pray, telegram and turn on aborted telegrams 2008-08-09 12:10:06 -04:00
upda.c Update copyright notice 2008-01-19 10:15:37 +01:00
upgr.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
vers.c Update known contributors comments 2008-05-18 10:59:04 +02:00
wing.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
wipe.c Update copyright notice 2008-01-19 10:15:37 +01:00
work.c Fix work not to claim an engineer worked when it didn't 2008-08-09 08:40:04 -04:00
xdump.c Fix extra prompt after abort due to misuse of snxtitem() 2008-07-26 21:36:37 -04:00
zdon.c Update known contributors comments 2008-08-03 08:04:08 -04:00