(prod): Add material limit for resource depletion to prod()
that is in place in the normal update sequence.
This commit is contained in:
parent
f7898f41e0
commit
27fe2e7be6
1 changed files with 4 additions and 0 deletions
|
@ -225,6 +225,10 @@ prod(void)
|
|||
* workforce?
|
||||
*/
|
||||
max = (int)(work * p_e / (double)unit_work + 0.5);
|
||||
if (pp->p_nrdep != 0 && vtype != I_NONE) {
|
||||
if (*resource * 100 < pp->p_nrdep * max)
|
||||
max = *resource * 100 / pp->p_nrdep;
|
||||
}
|
||||
act = min(used, max);
|
||||
|
||||
real = dmin(999.0, (double)act * prodeff);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue