empserver/tests/navi-march
Markus Armbruster 5e54219606 sect: Fix revert to deity and "no civilians" corner cases
We maintain a few sector invariants in sct_prewrite().  Since the
update bypasses sct_prewrite(), it needs to maintain them itself.  The
two should be consistent.

When a deserted sector reverts to the deity, sct_prewrite() clears
owner and mobility.  It neglects to clear the old owner, unlike
populace().  Harmless, but fix it anyway for consistency.  Visible in
tests/navi-march/final.xdump.

Work percentage, loyalty and old owner apply to civilians.  When there
are none, sct_prewrite() sets work percentage to 100 and old owner to
owner.  It neglects to clear loyalty, unlike populace().  Loyalty
persists until populace() clears it.  Most of the time, this doesn't
matter, as moving civilians into a sector without civilians ignores
the sector's loyalty.  However, airlifted and unloaded civilians adopt
the sector's loyalty (bug#49 and bug#255).

Fix sct_prewrite() to clear loyalty for consistency, and to mitigate
these bugs.

Note that populace() may not always clear loyalty right away.  This
will be fixed in the next commit.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2017-08-06 19:59:57 +02:00
..
01-navigate-1 tests/navi-march: Cover abort at movement prompt 2015-12-05 13:19:39 +01:00
02-march-1 tests/navi-march: Cover abort at movement prompt 2015-12-05 13:19:39 +01:00
99-POGO tests: Wean off deprecated retreat syntax 2015-03-02 08:20:49 +01:00
final.xdump sect: Fix revert to deity and "no civilians" corner cases 2017-08-06 19:59:57 +02:00
journal.log tests/navi-march: Cover abort at movement prompt 2015-12-05 13:19:39 +01:00
server.log navigate march: Fix abort not to wipe out concurrent updates 2015-12-05 13:19:39 +01:00
setup-POGO tests/navi-march: Cover running out of mobility completely 2015-12-05 12:51:07 +01:00