1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 02:42:42 +01:00

Codechange: use AdviceType over StringID to remove vehicle advice news

This commit is contained in:
Rubidium
2025-01-07 21:34:19 +01:00
committed by rubidium42
parent 0437701ebe
commit 08d84b2f4a
9 changed files with 48 additions and 34 deletions

View File

@@ -2064,7 +2064,7 @@ static void AircraftHandleDestTooFar(Aircraft *v, bool too_far)
if (v->owner == _local_company) {
/* Post a news message. */
SetDParam(0, v->index);
AddVehicleAdviceNewsItem(STR_NEWS_AIRCRAFT_DEST_TOO_FAR, v->index);
AddVehicleAdviceNewsItem(AdviceType::AircraftDestinationTooFar, STR_NEWS_AIRCRAFT_DEST_TOO_FAR, v->index);
}
}
return;
@@ -2074,7 +2074,7 @@ static void AircraftHandleDestTooFar(Aircraft *v, bool too_far)
/* Not too far anymore, clear flag and message. */
ClrBit(v->flags, VAF_DEST_TOO_FAR);
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
DeleteVehicleNews(v->index, STR_NEWS_AIRCRAFT_DEST_TOO_FAR);
DeleteVehicleNews(v->index, AdviceType::AircraftDestinationTooFar);
}
}