(ship_grow_scale, plane_grow_scale, land_grow_scale): Change from int
to float. This allows more control of the max. efficiency gain, and makes it similiar to ship_mob_scale etc. Closes #1025600.
This commit is contained in:
parent
44d59b5d17
commit
9f27f5b02a
6 changed files with 15 additions and 15 deletions
|
@ -177,7 +177,7 @@ EMPCFBOTH("buil_tower_bt", buil_tower_bt, double, NSC_DOUBLE, 0,
|
|||
EMPCF_COMMENT("\n\n### Land Units")
|
||||
EMPCFBOTH("land_mob_scale", land_mob_scale, float, NSC_FLOAT, 0,
|
||||
"Land unit mobility accumulation (land_mob_scale * ETUs per update)")
|
||||
EMPCFBOTH("land_grow_scale", land_grow_scale, int, NSC_INT, 0,
|
||||
EMPCFBOTH("land_grow_scale", land_grow_scale, float, NSC_FLOAT, 0,
|
||||
"How fast efficiency grows for land units each update (* ETUs)")
|
||||
EMPCFBOTH("land_mob_max", land_mob_max, int, NSC_INT, 0,
|
||||
"Maximum mobility for land units")
|
||||
|
@ -189,7 +189,7 @@ EMPCFBOTH("morale_base", morale_base, int, NSC_INT, KM_INTERNAL,
|
|||
EMPCF_COMMENT("\n\n### Planes")
|
||||
EMPCFBOTH("plane_mob_scale", plane_mob_scale, float, NSC_FLOAT, 0,
|
||||
"Plane mobility accumulation (plane_mob_scale * ETUs per update)")
|
||||
EMPCFBOTH("plane_grow_scale", plane_grow_scale, int, NSC_INT, 0,
|
||||
EMPCFBOTH("plane_grow_scale", plane_grow_scale, float, NSC_FLOAT, 0,
|
||||
"How fast efficiency grows for planes each update (* ETUs)")
|
||||
EMPCFBOTH("plane_mob_max", plane_mob_max, int, NSC_INT, 0,
|
||||
"Maximum mobility for planes")
|
||||
|
@ -199,7 +199,7 @@ EMPCFBOTH("money_plane", money_plane, double, NSC_DOUBLE, 0,
|
|||
EMPCF_COMMENT("\n\n### Ships")
|
||||
EMPCFBOTH("ship_mob_scale", ship_mob_scale, float, NSC_FLOAT, 0,
|
||||
"Ship mobility accumulation (ship_mob_scale * ETUs per update)")
|
||||
EMPCFBOTH("ship_grow_scale", ship_grow_scale, int, NSC_INT, 0,
|
||||
EMPCFBOTH("ship_grow_scale", ship_grow_scale, float, NSC_FLOAT, 0,
|
||||
"How fast efficiency grows for ships each update (* ETUs)")
|
||||
EMPCFBOTH("ship_mob_max", ship_mob_max, int, NSC_INT, 0,
|
||||
"Maximum mobility for ships")
|
||||
|
|
|
@ -133,9 +133,9 @@ vers(void)
|
|||
(int)(plane_mob_scale * (float)etu_per_update),
|
||||
(int)(land_mob_scale * (float)etu_per_update));
|
||||
pr("Max eff gain per update\t\t--\t%d\t%d\t%d\n",
|
||||
min(ship_grow_scale * etu_per_update, 100),
|
||||
min(plane_grow_scale * etu_per_update, 100),
|
||||
min(land_grow_scale * etu_per_update, 100));
|
||||
min((int)(ship_grow_scale * (float)etu_per_update), 100),
|
||||
min((int)(plane_grow_scale * (float)etu_per_update), 100),
|
||||
min((int)(land_grow_scale * (float)etu_per_update), 100));
|
||||
pr("\n");
|
||||
pr("Ships on autonavigation may use %i cargo holds per ship.\n", TMAX);
|
||||
if (opt_TRADESHIPS) {
|
||||
|
|
|
@ -107,9 +107,9 @@ int start_unit_type[START_UNITS] = { 0, 1 }; /* type of unit */
|
|||
/* opt_FUEL */
|
||||
int fuel_mult = 10; /* 1 fuel = 10 mob */
|
||||
|
||||
int land_grow_scale = 2; /* how fast eff grows for land units (xETUS) */
|
||||
int ship_grow_scale = 3; /* how fast eff grows for ships (xETUS) */
|
||||
int plane_grow_scale = 2; /* how fast eff grows for planes (xETUS) */
|
||||
float land_grow_scale = 2.0; /* how fast eff grows for land units (xETUS) */
|
||||
float ship_grow_scale = 3.0; /* how fast eff grows for ships (xETUS) */
|
||||
float plane_grow_scale = 2.0; /* how fast eff grows for planes (xETUS) */
|
||||
|
||||
double fgrate = 0.0012; /* food growth rate (dt * fert) */
|
||||
double fcrate = 0.0013; /* food cultivate rate (dt * workforce) */
|
||||
|
|
|
@ -269,8 +269,8 @@ landrepair(struct lndstr *land, struct natstr *np,
|
|||
delta = roundavg((double)avail / w_p_eff);
|
||||
if (delta <= 0)
|
||||
return 1;
|
||||
if (delta > etus * land_grow_scale)
|
||||
delta = etus * land_grow_scale;
|
||||
if (delta > (int)((float)etus * land_grow_scale))
|
||||
delta = (int)((float)etus * land_grow_scale);
|
||||
|
||||
/* delta is the max amount we can grow */
|
||||
|
||||
|
|
|
@ -182,8 +182,8 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
|
|||
delta = roundavg((double)avail / w_p_eff);
|
||||
if (delta <= 0)
|
||||
continue;
|
||||
if (delta > etus * plane_grow_scale)
|
||||
delta = etus * plane_grow_scale;
|
||||
if (delta > (int)((float)etus * plane_grow_scale))
|
||||
delta = (int)((float)etus * plane_grow_scale);
|
||||
if (delta > left)
|
||||
delta = left;
|
||||
|
||||
|
|
|
@ -333,8 +333,8 @@ shiprepair(struct shpstr *ship, struct natstr *np,
|
|||
delta = roundavg((double)avail / w_p_eff);
|
||||
if (delta <= 0)
|
||||
return 1;
|
||||
if (delta > etus * ship_grow_scale)
|
||||
delta = etus * ship_grow_scale;
|
||||
if (delta > (int)((float)etus * ship_grow_scale))
|
||||
delta = (int)((float)etus * ship_grow_scale);
|
||||
if (delta > left)
|
||||
delta = left;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue