(svn r24284) -Codechange: Remove NewsSubtypes and directly use NewsTypes and NewsFlag instead.
This commit is contained in:
@@ -218,9 +218,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v)
|
||||
v->age = 0;
|
||||
|
||||
SetDParam(0, GetStationIndex(v->tile));
|
||||
AddVehicleNewsItem(STR_NEWS_DISASTER_ZEPPELIN,
|
||||
NS_ACCIDENT,
|
||||
v->index); // Delete the news, when the zeppelin is gone
|
||||
AddVehicleNewsItem(STR_NEWS_DISASTER_ZEPPELIN, NT_ACCIDENT, v->index); // Delete the news, when the zeppelin is gone
|
||||
AI::NewEvent(GetTileOwner(v->tile), new ScriptEventDisasterZeppelinerCrashed(GetStationIndex(v->tile)));
|
||||
}
|
||||
}
|
||||
@@ -353,9 +351,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v)
|
||||
if (u->crashed_ctr == 0) {
|
||||
u->Crash();
|
||||
|
||||
AddVehicleNewsItem(STR_NEWS_DISASTER_SMALL_UFO,
|
||||
NS_ACCIDENT,
|
||||
u->index); // delete the news, when the roadvehicle is gone
|
||||
AddVehicleNewsItem(STR_NEWS_DISASTER_SMALL_UFO, NT_ACCIDENT, u->index); // delete the news, when the roadvehicle is gone
|
||||
|
||||
AI::NewEvent(u->owner, new ScriptEventVehicleCrashed(u->index, u->tile, ScriptEventVehicleCrashed::CRASH_RV_UFO));
|
||||
Game::NewEvent(new ScriptEventVehicleCrashed(u->index, u->tile, ScriptEventVehicleCrashed::CRASH_RV_UFO));
|
||||
@@ -434,7 +430,7 @@ static bool DisasterTick_Aircraft(DisasterVehicle *v, uint16 image_override, boo
|
||||
DestructIndustry(i);
|
||||
|
||||
SetDParam(0, i->town->index);
|
||||
AddIndustryNewsItem(news_message, NS_ACCIDENT, i->index); // delete the news, when the industry closes
|
||||
AddIndustryNewsItem(news_message, NT_ACCIDENT, i->index); // delete the news, when the industry closes
|
||||
SndPlayTileFx(SND_12_EXPLOSION, i->location.tile);
|
||||
}
|
||||
} else if (v->current_order.GetDestination() == 0) {
|
||||
@@ -530,7 +526,7 @@ static bool DisasterTick_Big_Ufo(DisasterVehicle *v)
|
||||
|
||||
Town *t = ClosestTownFromTile(v->dest_tile, UINT_MAX);
|
||||
SetDParam(0, t->index);
|
||||
AddTileNewsItem(STR_NEWS_DISASTER_BIG_UFO, NS_ACCIDENT, v->tile);
|
||||
AddTileNewsItem(STR_NEWS_DISASTER_BIG_UFO, NT_ACCIDENT, v->tile);
|
||||
|
||||
if (!Vehicle::CanAllocateItem(2)) {
|
||||
delete v;
|
||||
@@ -875,7 +871,7 @@ static void Disaster_CoalMine_Init()
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CAN_SUBSIDENCE) && --index < 0) {
|
||||
SetDParam(0, i->town->index);
|
||||
AddTileNewsItem(STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE, NS_ACCIDENT, i->location.tile + TileDiffXY(1, 1)); // keep the news, even when the mine closes
|
||||
AddTileNewsItem(STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE, NT_ACCIDENT, i->location.tile + TileDiffXY(1, 1)); // keep the news, even when the mine closes
|
||||
|
||||
{
|
||||
TileIndex tile = i->location.tile;
|
||||
|
Reference in New Issue
Block a user