diff options
author | rubidium <rubidium@openttd.org> | 2009-09-14 12:22:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-14 12:22:57 +0000 |
commit | 64bafcbe182ef539a31ffed9bd1f19ca0f7ae62a (patch) | |
tree | 9684bfe8873532713641d2c70fb5315f60104565 /src/economy.cpp | |
parent | d96333b7c3ad8a1cb940f51f5ce510393158a479 (diff) | |
download | openttd-64bafcbe182ef539a31ffed9bd1f19ca0f7ae62a.tar.xz |
(svn r17534) -Codechange: unify the naming of callback masks/flags
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 680727735..cca81413a 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -883,7 +883,7 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n if (cargo_index >= lengthof(ind->accepts_cargo)) continue; /* Check if industry temporarily refuses acceptance */ - if (HasBit(indspec->callback_flags, CBM_IND_REFUSE_CARGO)) { + if (HasBit(indspec->callback_mask, CBM_IND_REFUSE_CARGO)) { uint16 res = GetIndustryCallback(CBID_INDUSTRY_REFUSE_CARGO, 0, GetReverseCargoTranslation(cargo_type, indspec->grf_prop.grffile), ind, ind->type, ind->xy); if (res == 0) continue; } @@ -957,7 +957,7 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti static void TriggerIndustryProduction(Industry *i) { const IndustrySpec *indspec = GetIndustrySpec(i->type); - uint16 callback = indspec->callback_flags; + uint16 callback = indspec->callback_mask; i->was_cargo_delivered = true; i->last_cargo_accepted_at = _date; @@ -1144,7 +1144,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) /* The default loadamount for mail is 1/4 of the load amount for passengers */ if (v->type == VEH_AIRCRAFT && !Aircraft::From(v)->IsNormalAircraft()) load_amount = (load_amount + 3) / 4; - if (_settings_game.order.gradual_loading && HasBit(EngInfo(v->engine_type)->callbackmask, CBM_VEHICLE_LOAD_AMOUNT)) { + if (_settings_game.order.gradual_loading && HasBit(EngInfo(v->engine_type)->callback_mask, CBM_VEHICLE_LOAD_AMOUNT)) { uint16 cb_load_amount = GetVehicleCallback(CBID_VEHICLE_LOAD_AMOUNT, 0, 0, v->engine_type, v); if (cb_load_amount != CALLBACK_FAILED && GB(cb_load_amount, 0, 8) != 0) load_amount = GB(cb_load_amount, 0, 8); } |