(svn r3588) - Refit: Use only one global to return the refit capacity rather than one per vehicle type.

This commit is contained in:
peter1138 2006-02-11 09:24:51 +00:00
parent 1097ec2b62
commit 6f5f3101b6
6 changed files with 5 additions and 6 deletions

View File

@ -498,7 +498,7 @@ int32 CmdRefitAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
pass /= 4;
break;
}
_aircraft_refit_capacity = pass;
_returned_refit_capacity = pass;
cost = 0;
if (IS_HUMAN_PLAYER(v->owner) && new_cid != v->cargo_type) {

View File

@ -249,7 +249,7 @@ static void AircraftRefitWndProc(Window *w, WindowEvent *e)
if (!CmdFailed(cost)) {
SetDParam(2, cost);
SetDParam(0, _cargoc.names_long[WP(w,refit_d).cargo]);
SetDParam(1, _aircraft_refit_capacity);
SetDParam(1, _returned_refit_capacity);
DrawString(1, 147, STR_A041_NEW_CAPACITY_COST_OF_REFIT, 0);
}
}

View File

@ -1728,7 +1728,7 @@ int32 CmdRefitRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
} while ( (v=v->next) != NULL );
_returned_refit_amount = num;
_returned_refit_capacity = num;
return cost;
}

View File

@ -819,7 +819,7 @@ static void RailVehicleRefitWndProc(Window *w, WindowEvent *e)
if (!CmdFailed(cost)) {
SetDParam(2, cost);
SetDParam(0, _cargoc.names_long[WP(w,refit_d).cargo]);
SetDParam(1, _returned_refit_amount);
SetDParam(1, _returned_refit_capacity);
DrawString(1, 137, STR_9840_NEW_CAPACITY_COST_OF_REFIT, 0);
}
}

View File

@ -293,7 +293,6 @@ VARDEF TileIndex _terraform_err_tile;
VARDEF TileIndex _build_tunnel_endtile;
VARDEF bool _generating_world;
VARDEF int _new_town_size;
VARDEF uint _returned_refit_amount;
// Deals with the type of the savegame, independent of extension
typedef struct {

View File

@ -418,7 +418,7 @@ VARDEF VehicleID _new_aircraft_id;
VARDEF VehicleID _new_ship_id;
VARDEF VehicleID _new_roadveh_id;
VARDEF VehicleID _new_vehicle_id;
VARDEF uint16 _aircraft_refit_capacity;
VARDEF uint16 _returned_refit_capacity;
VARDEF byte _cmd_build_rail_veh_score;
#define INVALID_VEHICLE 0xFFFF