Mercurial > hg > openttd
comparison src/economy.cpp @ 13092:d755cf7553ef draft
(svn r17592) -Fix [FS#3212](r17436): force all cargo being accepted when industry tiles accept it but industry itself doesn't
author | smatz <smatz@openttd.org> |
---|---|
date | Sun, 20 Sep 2009 18:52:12 +0000 |
parents | 559dafab3ecb |
children | cbc7f8fe50ee |
comparison
equal
deleted
inserted
replaced
13091:5cdcbb26b38c | 13092:d755cf7553ef |
---|---|
930 if (cs->town_effect == TE_WATER) st->town->new_act_water += num_pieces; | 930 if (cs->town_effect == TE_WATER) st->town->new_act_water += num_pieces; |
931 | 931 |
932 /* Give the goods to the industry. */ | 932 /* Give the goods to the industry. */ |
933 uint accepted = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == ST_INDUSTRY ? src : INVALID_INDUSTRY); | 933 uint accepted = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == ST_INDUSTRY ? src : INVALID_INDUSTRY); |
934 | 934 |
935 /* If there are non-industries around accepting the cargo, accept it all */ | 935 /* If this cargo type is always accepted, accept all */ |
936 if (HasBit(st->always_accepted, cargo_type)) accepted = num_pieces; | 936 if (HasBit(st->always_accepted, cargo_type)) accepted = num_pieces; |
937 | 937 |
938 /* Determine profit */ | 938 /* Determine profit */ |
939 Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type); | 939 Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type); |
940 | 940 |