equal
deleted
inserted
replaced
1243 static bool CheckSubsidised(Station *from, Station *to, CargoID cargo_type) |
1243 static bool CheckSubsidised(Station *from, Station *to, CargoID cargo_type) |
1244 { |
1244 { |
1245 Subsidy *s; |
1245 Subsidy *s; |
1246 TileIndex xy; |
1246 TileIndex xy; |
1247 Pair pair; |
1247 Pair pair; |
1248 Player *p; |
|
1249 |
1248 |
1250 /* check if there is an already existing subsidy that applies to us */ |
1249 /* check if there is an already existing subsidy that applies to us */ |
1251 for (s = _subsidies; s != endof(_subsidies); s++) { |
1250 for (s = _subsidies; s != endof(_subsidies); s++) { |
1252 if (s->cargo_type == cargo_type && |
1251 if (s->cargo_type == cargo_type && |
1253 s->age >= 12 && |
1252 s->age >= 12 && |
1289 s->from = from->index; |
1288 s->from = from->index; |
1290 s->to = to->index; |
1289 s->to = to->index; |
1291 |
1290 |
1292 /* Add a news item */ |
1291 /* Add a news item */ |
1293 pair = SetupSubsidyDecodeParam(s, 0); |
1292 pair = SetupSubsidyDecodeParam(s, 0); |
1294 InjectDParam(2); |
1293 InjectDParam(1); |
1295 |
1294 |
1296 p = GetPlayer(_current_player); |
1295 SetDParam(0, _current_player); |
1297 SetDParam(0, p->index); |
|
1298 AddNewsItem( |
1296 AddNewsItem( |
1299 STR_2031_SERVICE_SUBSIDY_AWARDED + _opt.diff.subsidy_multiplier, |
1297 STR_2031_SERVICE_SUBSIDY_AWARDED + _opt.diff.subsidy_multiplier, |
1300 NEWS_FLAGS(NM_NORMAL, NF_TILE, NT_SUBSIDIES, 0), |
1298 NEWS_FLAGS(NM_NORMAL, NF_TILE, NT_SUBSIDIES, 0), |
1301 pair.a, pair.b |
1299 pair.a, pair.b |
1302 ); |
1300 ); |