(SCT_BLD_WORK, SHP_BLD_WORK, PLN_BLD_WORK, LND_BLD_WORK,
NUK_BLD_WORK): New, to encapsulate the formula in one place. (SCT_MINEFF): New. Use it instead of literal 20. (buil): Use CANT_HAPPEN() for internal error. (build_ship, build_land, build_bridge, build_nuke, build_plane, build_tower): Simplify avail calculation. (lupgr, supgr, pupgr): Charge 15% of total build avail instead of an undocumented amount computed from build lcm and hcm. (build_ship, build_land, build_bridge, build_nuke, build_plane, build_tower, lupgr, supgr, pupgr): Fix reporting of required avail when there's not enough. Closes #942823. (lupgr, supgr, pupgr): Code printed cost rounded down, but required and charged unrounded cost. Confusing. Round cost down, like the build command. Closes #942811. (UPGR_COST, UPGR_EFF, lupgr, supgr, pupgr): New UPGR_COST, UPGR_COST replace literal values. (show_bridge, show_tower): Don't claim bridge building requires `workers' (whatever that is), since it doesn't.
This commit is contained in:
parent
3d5e881ae4
commit
17494e74d1
14 changed files with 128 additions and 155 deletions
|
@ -46,12 +46,6 @@
|
|||
|
||||
/* bit masks for the autonav mode flags */
|
||||
|
||||
/*
|
||||
#define AN_SAILDIR 1
|
||||
#define AN_AUTONAV 2
|
||||
#define AN_STANDBY 4
|
||||
#define AN_LOADING 8
|
||||
*/
|
||||
#define AN_SAILDIR bit(1)
|
||||
#define AN_AUTONAV bit(2)
|
||||
#define AN_STANDBY bit(3)
|
||||
|
@ -212,6 +206,9 @@ struct mlist {
|
|||
#define SHP_FIR(b, t) (t ? (b * (logx((double)t, (double)60.0) < 1.0 ? 1.0 : \
|
||||
logx((double)t, (double)60.0))) : b)
|
||||
|
||||
/* Work required for building 100% */
|
||||
#define SHP_BLD_WORK(lcm, hcm) (20 + (lcm) + 2 * (hcm))
|
||||
|
||||
/* return codes from shp_check_nav */
|
||||
#define CN_NAVIGABLE (0)
|
||||
#define CN_LANDLOCKED (1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue