ship_gui.c
changeset 3948 a09379beffd5
parent 3887 ece644bbf459
child 3961 9868b766fda7
equal deleted inserted replaced
3947:e0c77288dd56 3948:a09379beffd5
   302 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
   302 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
   303 {
   303 {
   304 	const Vehicle* v;
   304 	const Vehicle* v;
   305 	if (!success) return;
   305 	if (!success) return;
   306 
   306 
   307 	v = GetVehicle(_new_ship_id);
   307 	v = GetVehicle(_new_vehicle_id);
   308 	if (v->tile == _backup_orders_tile) {
   308 	if (v->tile == _backup_orders_tile) {
   309 		_backup_orders_tile = 0;
   309 		_backup_orders_tile = 0;
   310 		RestoreVehicleOrders(v, _backup_orders_data);
   310 		RestoreVehicleOrders(v, _backup_orders_data);
   311 	}
   311 	}
   312 	ShowShipViewWindow(v);
   312 	ShowShipViewWindow(v);
   313 }
   313 }
   314 
   314 
   315 void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
   315 void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
   316 {
   316 {
   317 	if (success) ShowShipViewWindow(GetVehicle(_new_ship_id));
   317 	if (success) ShowShipViewWindow(GetVehicle(_new_vehicle_id));
   318 }
   318 }
   319 
   319 
   320 static void NewShipWndProc(Window *w, WindowEvent *e)
   320 static void NewShipWndProc(Window *w, WindowEvent *e)
   321 {
   321 {
   322 	switch (e->event) {
   322 	switch (e->event) {