diff options
author | rubidium <rubidium@openttd.org> | 2007-07-05 05:41:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-05 05:41:56 +0000 |
commit | 86c14c239fe10062fa83f4ee5902dfec510cd1ff (patch) | |
tree | 8f43488078024be2576c0659efafbe7b95adb002 /src/economy.cpp | |
parent | 9bc6a1cc8e463d37bad7e9140276079fc59a02ca (diff) | |
download | openttd-86c14c239fe10062fa83f4ee5902dfec510cd1ff.tar.xz |
(svn r10442) -Codechange: implement the industry production callback.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 06e37742c..cd7f57a92 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -35,6 +35,7 @@ #include "newgrf_engine.h" #include "newgrf_sound.h" #include "newgrf_callbacks.h" +#include "newgrf_industries.h" #include "unmovable.h" #include "date.h" #include "cargotype.h" @@ -1239,7 +1240,7 @@ 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)) {} ///< @todo Perform some magic + if (HASBIT(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL)) IndustryProductionCallback(ind, 0); } 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); |