From e261d8d9a0904ebc215c9551c6d8c0c9f34be4df Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 22 Sep 2009 19:28:57 +0000 Subject: (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. --- src/newgrf_properties.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/newgrf_properties.h (limited to 'src/newgrf_properties.h') diff --git a/src/newgrf_properties.h b/src/newgrf_properties.h new file mode 100644 index 000000000..7786faf89 --- /dev/null +++ b/src/newgrf_properties.h @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file newgrf_properties.h Properties of NewGRF Action 0. */ + +#ifndef NEWGRF_PROPERTIES_H +#define NEWGRF_PROPERTIES_H + +/** + * List of NewGRF properties used in Action 0 or Callback 0x36 (CBID_VEHICLE_MODIFY_PROPERTY). + * Names are formatted as PROP__ + * @todo Currently the list only contains properties which are used more than once in the code. I.e. they are available for callback 0x36. + */ +enum PropertyID { + PROP_TRAIN_SPEED = 0x09, ///< Max. speed: 1 unit = 1/1.6 mph = 1 km-ish/h + PROP_TRAIN_POWER = 0x0B, ///< Power in hp (if dualheaded: sum of both vehicles) + PROP_TRAIN_RUNNING_COST_FACTOR = 0x0D, ///< Yearly runningcost (if dualheaded: sum of both vehicles) + PROP_TRAIN_CARGO_CAPACITY = 0x14, ///< Capacity (if dualheaded: for each single vehicle) + PROP_TRAIN_WEIGHT = 0x16, ///< Weight in t (if dualheaded: for each single vehicle) + PROP_TRAIN_COST_FACTOR = 0x17, ///< Purchase cost (if dualheaded: sum of both vehicles) + PROP_TRAIN_TRACTIVE_EFFORT = 0x1F, ///< Tractive effort coefficient in 1/256 + PROP_TRAIN_USER_DATA = 0x25, ///< User defined data for vehicle variable 0x42 + + PROP_ROADVEH_CARGO_CAPACITY = 0x0F, ///< Capacity + PROP_ROADVEH_COST_FACTOR = 0x11, ///< Purchase cost + + PROP_SHIP_COST_FACTOR = 0x0A, ///< Purchase cost + PROP_SHIP_SPEED = 0x0B, ///< Max. speed: 1 unit = 1/3.2 mph = 0.5 km-ish/h + PROP_SHIP_CARGO_CAPACITY = 0x0D, ///< Capacity + PROP_SHIP_RUNNING_COST_FACTOR = 0x0F, ///< Yearly runningcost + + PROP_AIRCRAFT_COST_FACTOR = 0x0B, ///< Purchase cost + PROP_AIRCRAFT_SPEED = 0x0C, ///< Max. speed: 1 unit = 8 mph = 12.8 km-ish/h + PROP_AIRCRAFT_RUNNING_COST_FACTOR = 0x0E, ///< Yearly runningcost +}; + +#endif /* NEWGRF_PROPERTIES_H */ -- cgit v1.2.3-54-g00ecf