|
@@ -225,13 +225,13 @@ CommandCost CmdAddVehicleGroup(TileIndex
|
|
|
if (v->IsEngineCountable()) UpdateNumEngineGroup(v->engine_type, v->group_id, new_g);
|
|
|
v->group_id = new_g;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
/* Update the Replace Vehicle Windows */
|
|
|
InvalidateWindow(WC_REPLACE_VEHICLE, v->type);
|
|
|
SetWindowDirty(WC_REPLACE_VEHICLE, v->type);
|
|
|
InvalidateWindowData(GetWindowClassForVehicleType(v->type), (v->type << 11) | VLW_GROUP_LIST | _current_company);
|
|
|
}
|
|
|
|
|
|
return CommandCost();
|
|
|
}
|
|
|
|
|
@@ -359,13 +359,13 @@ void SetTrainGroupID(Train *v, GroupID n
|
|
|
if (u->IsEngineCountable()) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g);
|
|
|
|
|
|
u->group_id = new_g;
|
|
|
}
|
|
|
|
|
|
/* Update the Replace Vehicle Windows */
|
|
|
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_TRAIN);
|
|
|
SetWindowDirty(WC_REPLACE_VEHICLE, VEH_TRAIN);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Recalculates the groupID of a train. Should be called each time a vehicle is added
|
|
|
* to/removed from the chain,.
|
|
@@ -382,13 +382,13 @@ void UpdateTrainGroupID(Train *v)
|
|
|
if (u->IsEngineCountable()) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g);
|
|
|
|
|
|
u->group_id = new_g;
|
|
|
}
|
|
|
|
|
|
/* Update the Replace Vehicle Windows */
|
|
|
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_TRAIN);
|
|
|
SetWindowDirty(WC_REPLACE_VEHICLE, VEH_TRAIN);
|
|
|
}
|
|
|
|
|
|
uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e)
|
|
|
{
|
|
|
if (Group::IsValidID(id_g)) return Group::Get(id_g)->num_engines[id_e];
|
|
|
|