TBTR: Enable autorenew when template replacement active

This commit is contained in:
Jonathan G Rennison
2018-01-30 18:57:51 +00:00
parent 64d9f88802
commit 4a9df57665
3 changed files with 39 additions and 17 deletions

View File

@@ -4300,6 +4300,8 @@ CommandCost CmdTemplateReplaceVehicle(TileIndex tile, DoCommandFlag flags, uint3
}
EngineID eid = tv->engine_type;
_new_vehicle_id = p1;
CommandCost buy(EXPENSES_NEW_VEHICLES);
CommandCost move_cost(EXPENSES_NEW_VEHICLES);
CommandCost tmp_result(EXPENSES_NEW_VEHICLES);
@@ -4474,5 +4476,7 @@ CommandCost CmdTemplateReplaceVehicle(TileIndex tile, DoCommandFlag flags, uint3
/* Redraw main gui for changed statistics */
SetWindowClassesDirty(WC_TEMPLATEGUI_MAIN);
_new_vehicle_id = new_chain->index;
return buy;
}