Add: NewGRF support for 16-in-16-out industries

This commit is contained in:
Niels Martin Hansen
2018-07-26 19:29:54 +02:00
parent 8859381d30
commit e66cec8f86
14 changed files with 392 additions and 75 deletions

View File

@@ -3033,6 +3033,15 @@ bool AfterLoadGame()
i->accepts_cargo[ci] = CT_INVALID;
i->incoming_cargo_waiting[ci] = 0;
}
/* Make sure last_cargo_accepted_at is copied to elements for every valid input cargo.
* The loading routine should put the original singular value into the first array element. */
for (size_t ci = 0; ci < lengthof(i->accepts_cargo); ci++) {
if (i->accepts_cargo[ci] != CT_INVALID) {
i->last_cargo_accepted_at[ci] = i->last_cargo_accepted_at[0];
} else {
i->last_cargo_accepted_at[ci] = 0;
}
}
}
}