(svn r22713) -Feature: [NewGRF] Per vehicle custom cargo ageing period.

This commit is contained in:
michi_cc
2011-08-03 20:55:08 +00:00
parent 442b92ff33
commit 08b7981f37
17 changed files with 74 additions and 16 deletions

View File

@@ -966,6 +966,10 @@ static ChangeInfoResult RailVehicleChangeInfo(uint engine, int numinfo, int prop
ei->base_intro = buf->ReadDWord();
break;
case PROP_TRAIN_CARGO_AGE_PERIOD: // 0x2B Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
@@ -1108,6 +1112,10 @@ static ChangeInfoResult RoadVehicleChangeInfo(uint engine, int numinfo, int prop
}
break;
case PROP_ROADVEH_CARGO_AGE_PERIOD: // 0x22 Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
@@ -1238,6 +1246,10 @@ static ChangeInfoResult ShipVehicleChangeInfo(uint engine, int numinfo, int prop
}
break;
case PROP_SHIP_CARGO_AGE_PERIOD: // 0x1D Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
@@ -1352,6 +1364,10 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int
AlterVehicleListOrder(e->index, buf->ReadExtendedByte());
break;
case PROP_AIRCRAFT_CARGO_AGE_PERIOD: // 0x1C Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;