MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AddRemoveEngineFromAutoreplaceAndBuildWindows

Function AddRemoveEngineFromAutoreplaceAndBuildWindows

src/autoreplace_gui.cpp:68–72  ·  view source on GitHub ↗

* When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists * @param type The type of engine */

Source from the content-addressed store, hash-verified

66 * @param type The type of engine
67 */
68void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type)
69{
70 InvalidateWindowData(WC_REPLACE_VEHICLE, type, 0); // Update the autoreplace window
71 InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
72}
73
74static const StringID _start_replace_dropdown[] = {
75 STR_REPLACE_VEHICLES_NOW,

Callers 5

CalcEngineReliabilityFunction · 0.85
EnableEngineForCompanyFunction · 0.85
DisableEngineForCompanyFunction · 0.85
CmdSetVehicleVisibilityFunction · 0.85
NewVehicleAvailableFunction · 0.85

Calls 2

InvalidateWindowDataFunction · 0.70

Tested by

no test coverage detected