(svn r10473) -Codechange: make the industry "window", the one that shows when you click on an industry, more flexible to allow easier integration with newindustries.

This commit is contained in:
rubidium
2007-07-08 00:25:05 +00:00
parent e51d9d4fbd
commit 8b54aab214
4 changed files with 90 additions and 29 deletions

View File

@@ -1242,7 +1242,11 @@ static void DeliverGoodsToIndustry(TileIndex xy, CargoID cargo_type, int num_pie
if (HASBIT(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HASBIT(callback, CBM_IND_PRODUCTION_256_TICKS)) {
best->incoming_cargo_waiting[accepted_cargo_index] = min(num_pieces + best->incoming_cargo_waiting[accepted_cargo_index], 0xFFFF);
if (HASBIT(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL)) IndustryProductionCallback(ind, 0);
if (HASBIT(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL)) {
IndustryProductionCallback(best, 0);
} else {
InvalidateWindow(WC_INDUSTRY_VIEW, best->index);
}
} else {
best->produced_cargo_waiting[0] = min(best->produced_cargo_waiting[0] + (num_pieces * indspec->input_cargo_multiplier[accepted_cargo_index][0] / 256), 0xFFFF);
best->produced_cargo_waiting[1] = min(best->produced_cargo_waiting[1] + (num_pieces * indspec->input_cargo_multiplier[accepted_cargo_index][1] / 256), 0xFFFF);