]> git.pond.sub.org Git - empserver/commit
update: Reorder feeding, tax & plague for consistency
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Jul 2016 08:04:34 +0000 (10:04 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:16 +0000 (20:09 +0200)
commit43a0a4a451e31cd8ca02e2ca573abd9b7fde9536
tree72f311d9f57fcbcd6306514073442db6d0f4fdec
parent2fea2a7cb897f2beb08a6fd02cf70eca79236bf3
update: Reorder feeding, tax & plague for consistency

People in sectors get plagued, then taxed or paid, then fed.  People
on ships and land units get paid, then fed, then plagued.  Sectors
were messed up when Empire 3 made the update code work for budget.

Change sectors back to how they worked before Empire 3: move do_feed()
from produce_sect() to prepare_sects(), and delay do_plague() until
after do_feed().  People in sectors now get taxed, paid and fed even
when they die of the plague, just like they do on ships and land
units.

Because do_plague() now runs after populace(), the latter's handling
of people dying off doesn't cover plague anymore.  Delay it to the
very end of prepare_sects().

Additionally, move feeding and plaguing from upd_ship(), upd_land() to
prep_ship(), prep_land(), for consistency with sectors.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
14 files changed:
include/update.h
info/Update-sequence.t
src/lib/update/land.c
src/lib/update/plague.c
src/lib/update/populace.c
src/lib/update/prepare.c
src/lib/update/sect.c
src/lib/update/ship.c
tests/smoke/04/01-1
tests/smoke/15/08-8
tests/smoke/final.xdump
tests/smoke/journal.log
tests/update/final.xdump
tests/update/journal.log