neweff production work: Fix crash for sea sector

The work required for building sea sectors is zero in sect.config.
When a deity runs neweff or production on a sea sector, e.g. with
"neweff *", buildeff() divides by zero.  Same when a player or deity
runs work with an engineer in a sea sector.  Broken in commit
2ffd7b948 "config: Make work to build sectors configurable", v4.4.0

Fix buildeff() to avoid the division.  Change the required work to 100
in sect.config for good measure.

Cover deity use of neweff and production in tests/update.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2021-01-15 07:47:59 +01:00
parent 223add6a92
commit 5f3c64c062
6 changed files with 1109 additions and 6 deletions

View file

@ -2,6 +2,7 @@ budget
| Note: f1#100 not actually built (plague kills off mil)
| TODO is it accurate?
neweff * ?newd#-
| TODO is it accurate?
production *
| TODO is it accurate?
starvation