Fix group add/remove/rename not updating template replacement GUI in MP

This commit is contained in:
Jonathan G Rennison
2020-09-19 11:58:44 +01:00
parent 2ea3a7d6f4
commit a36e77c269
2 changed files with 3 additions and 1 deletions

View File

@@ -342,6 +342,7 @@ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type);
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
}
return CommandCost();
@@ -401,6 +402,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
InvalidateWindowData(WC_COMPANY_COLOUR, _current_company, vt);
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
}
return CommandCost();
@@ -471,6 +473,7 @@ CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
InvalidateWindowData(WC_REPLACE_VEHICLE, g->vehicle_type, 1);
InvalidateWindowData(GetWindowClassForVehicleType(g->vehicle_type), VehicleListIdentifier(VL_GROUP_LIST, g->vehicle_type, _current_company).Pack());
InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type);
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
}
return CommandCost();