2021-12-03 20:49:27 +00:00
|
|
|
/*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file newgrf_extension.h NewGRF extension support. */
|
|
|
|
|
|
|
|
#ifndef NEWGRF_EXTENSION_H
|
|
|
|
#define NEWGRF_EXTENSION_H
|
|
|
|
|
|
|
|
enum Action0RemapPropertyIds {
|
|
|
|
A0RPI_UNKNOWN_IGNORE = 0x200,
|
|
|
|
A0RPI_UNKNOWN_ERROR,
|
2023-02-19 23:13:23 +00:00
|
|
|
A0RPI_ID_EXTENSION,
|
2021-12-03 20:49:27 +00:00
|
|
|
|
|
|
|
A0RPI_STATION_MIN_BRIDGE_HEIGHT,
|
|
|
|
A0RPI_STATION_DISALLOWED_BRIDGE_PILLARS,
|
|
|
|
A0RPI_BRIDGE_MENU_ICON,
|
|
|
|
A0RPI_BRIDGE_PILLAR_FLAGS,
|
|
|
|
A0RPI_BRIDGE_AVAILABILITY_FLAGS,
|
|
|
|
A0RPI_RAILTYPE_ENABLE_PROGRAMMABLE_SIGNALS,
|
|
|
|
A0RPI_RAILTYPE_ENABLE_NO_ENTRY_SIGNALS,
|
|
|
|
A0RPI_RAILTYPE_ENABLE_RESTRICTED_SIGNALS,
|
|
|
|
A0RPI_RAILTYPE_DISABLE_REALISTIC_BRAKING,
|
|
|
|
A0RPI_RAILTYPE_ENABLE_SIGNAL_RECOLOUR,
|
|
|
|
A0RPI_RAILTYPE_EXTRA_ASPECTS,
|
|
|
|
A0RPI_ROADTYPE_EXTRA_FLAGS,
|
2023-02-19 14:29:52 +00:00
|
|
|
A0RPI_ROADTYPE_COLLISION_MODE,
|
2021-12-03 20:49:27 +00:00
|
|
|
A0RPI_GLOBALVAR_EXTRA_STATION_NAMES,
|
2022-04-18 18:28:30 +00:00
|
|
|
A0RPI_GLOBALVAR_EXTRA_STATION_NAMES_PROBABILITY,
|
2022-01-28 23:31:38 +00:00
|
|
|
A0RPI_GLOBALVAR_LIGHTHOUSE_GENERATE_AMOUNT,
|
|
|
|
A0RPI_GLOBALVAR_TRANSMITTER_GENERATE_AMOUNT,
|
2022-12-12 22:03:07 +00:00
|
|
|
A0RPI_GLOBALVAR_ALLOW_ROCKS_DESERT,
|
2021-12-03 20:49:27 +00:00
|
|
|
A0RPI_SIGNALS_ENABLE_PROGRAMMABLE_SIGNALS,
|
|
|
|
A0RPI_SIGNALS_ENABLE_NO_ENTRY_SIGNALS,
|
|
|
|
A0RPI_SIGNALS_ENABLE_RESTRICTED_SIGNALS,
|
|
|
|
A0RPI_SIGNALS_ENABLE_SIGNAL_RECOLOUR,
|
|
|
|
A0RPI_SIGNALS_EXTRA_ASPECTS,
|
2022-06-18 22:37:35 +00:00
|
|
|
A0RPI_SIGNALS_NO_DEFAULT_STYLE,
|
|
|
|
A0RPI_SIGNALS_DEFINE_STYLE,
|
|
|
|
A0RPI_SIGNALS_STYLE_NAME,
|
2022-06-19 00:55:38 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_NO_ASPECT_INCREASE,
|
2022-06-19 03:15:27 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_ALWAYS_RESERVE_THROUGH,
|
2022-06-19 11:46:56 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_LOOKAHEAD_EXTRA_ASPECTS,
|
2022-06-25 00:29:08 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_LOOKAHEAD_SINGLE_SIGNAL_ONLY,
|
2022-06-19 16:43:46 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_SEMAPHORE_ENABLED,
|
|
|
|
A0RPI_SIGNALS_STYLE_ELECTRIC_ENABLED,
|
2022-06-22 22:45:44 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_OPPOSITE_SIDE,
|
2022-06-27 17:51:26 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_COMBINED_NORMAL_SHUNT,
|
2022-06-30 20:20:43 +00:00
|
|
|
A0RPI_SIGNALS_STYLE_REALISTIC_BRAKING_ONLY,
|
2021-12-04 21:45:33 +00:00
|
|
|
A0RPI_OBJECT_USE_LAND_GROUND,
|
2021-12-05 18:05:58 +00:00
|
|
|
A0RPI_OBJECT_EDGE_FOUNDATION_MODE,
|
2021-12-05 21:32:57 +00:00
|
|
|
A0RPI_OBJECT_FLOOD_RESISTANT,
|
2022-02-07 01:16:45 +00:00
|
|
|
A0RPI_OBJECT_VIEWPORT_MAP_TYPE,
|
|
|
|
A0RPI_OBJECT_VIEWPORT_MAP_SUBTYPE,
|
2022-02-09 02:11:55 +00:00
|
|
|
A0RPI_ROADSTOP_CLASS_ID,
|
|
|
|
A0RPI_ROADSTOP_STOP_TYPE,
|
|
|
|
A0RPI_ROADSTOP_STOP_NAME,
|
|
|
|
A0RPI_ROADSTOP_CLASS_NAME,
|
|
|
|
A0RPI_ROADSTOP_DRAW_MODE,
|
|
|
|
A0RPI_ROADSTOP_TRIGGER_CARGOES,
|
2022-02-15 00:22:18 +00:00
|
|
|
A0RPI_ROADSTOP_ANIMATION_INFO,
|
|
|
|
A0RPI_ROADSTOP_ANIMATION_SPEED,
|
|
|
|
A0RPI_ROADSTOP_ANIMATION_TRIGGERS,
|
|
|
|
A0RPI_ROADSTOP_CALLBACK_MASK,
|
|
|
|
A0RPI_ROADSTOP_GENERAL_FLAGS,
|
2022-02-15 18:21:32 +00:00
|
|
|
A0RPI_ROADSTOP_MIN_BRIDGE_HEIGHT,
|
|
|
|
A0RPI_ROADSTOP_DISALLOWED_BRIDGE_PILLARS,
|
2022-02-24 21:13:46 +00:00
|
|
|
A0RPI_ROADSTOP_COST_MULTIPLIERS,
|
2023-02-05 17:40:14 +00:00
|
|
|
A0RPI_ROADSTOP_HEIGHT,
|
2022-06-13 01:53:27 +00:00
|
|
|
A0RPI_NEWLANDSCAPE_ENABLE_RECOLOUR,
|
2022-12-12 23:00:49 +00:00
|
|
|
A0RPI_NEWLANDSCAPE_ENABLE_DRAW_SNOWY_ROCKS,
|
2021-12-03 20:49:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-01-24 01:17:35 +00:00
|
|
|
enum Action2VariableRemapIds {
|
2022-01-24 01:18:35 +00:00
|
|
|
A2VRI_OBJECT_FOUNDATION_SLOPE = 0x100,
|
|
|
|
A2VRI_OBJECT_FOUNDATION_SLOPE_CHANGE,
|
2022-05-26 20:31:20 +00:00
|
|
|
A2VRI_VEHICLE_CURRENT_SPEED_SCALED,
|
2023-02-12 12:14:48 +00:00
|
|
|
A2VRI_ROADSTOP_INFO_NEARBY_TILES_V2,
|
2022-06-12 08:00:31 +00:00
|
|
|
A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO,
|
2022-06-15 18:03:13 +00:00
|
|
|
A2VRI_RAILTYPE_SIGNAL_CONTEXT,
|
2023-02-19 20:22:40 +00:00
|
|
|
A2VRI_RAILTYPE_SIGNAL_SIDE,
|
2023-04-04 19:29:22 +00:00
|
|
|
A2VRI_RAILTYPE_SIGNAL_VERTICAL_CLEARANCE,
|
2022-06-12 08:00:31 +00:00
|
|
|
A2VRI_SIGNALS_SIGNAL_RESTRICTION_INFO,
|
2022-06-15 18:03:13 +00:00
|
|
|
A2VRI_SIGNALS_SIGNAL_CONTEXT,
|
2022-06-18 22:37:35 +00:00
|
|
|
A2VRI_SIGNALS_SIGNAL_STYLE,
|
2023-02-19 20:22:40 +00:00
|
|
|
A2VRI_SIGNALS_SIGNAL_SIDE,
|
2023-04-04 19:29:22 +00:00
|
|
|
A2VRI_SIGNALS_SIGNAL_VERTICAL_CLEARANCE,
|
2023-03-11 02:01:53 +00:00
|
|
|
A2VRI_TOWNS_HOUSE_COUNT,
|
|
|
|
A2VRI_TOWNS_POPULATION,
|
2023-04-13 19:53:11 +00:00
|
|
|
A2VRI_TOWNS_ZONE_0,
|
|
|
|
A2VRI_TOWNS_ZONE_1,
|
|
|
|
A2VRI_TOWNS_ZONE_2,
|
|
|
|
A2VRI_TOWNS_ZONE_3,
|
|
|
|
A2VRI_TOWNS_ZONE_4,
|
2023-04-13 20:19:53 +00:00
|
|
|
A2VRI_TOWNS_XY,
|
2022-01-24 01:17:35 +00:00
|
|
|
};
|
|
|
|
|
2023-02-12 21:50:52 +00:00
|
|
|
enum GRFFeatureTestObservationFlag : uint8 {
|
2023-02-12 21:56:08 +00:00
|
|
|
GFTOF_MORE_OBJECTS_PER_GRF = 0,
|
2023-03-05 14:40:02 +00:00
|
|
|
GFTOF_MORE_ACTION2_IDS,
|
2023-03-11 02:24:50 +00:00
|
|
|
GFTOF_TOWN_ZONE_CALLBACK,
|
2023-03-14 17:57:30 +00:00
|
|
|
GFTOF_MORE_VARACTION2_TYPES,
|
2023-03-15 22:36:27 +00:00
|
|
|
GFTOF_MULTI_PART_SHIPS,
|
2023-02-12 21:56:08 +00:00
|
|
|
|
2023-02-12 21:50:52 +00:00
|
|
|
GFTOF_INVALID = 0xFF,
|
|
|
|
};
|
|
|
|
|
2021-12-03 20:49:27 +00:00
|
|
|
/** Action14 feature definition */
|
|
|
|
struct GRFFeatureInfo {
|
|
|
|
const char *name; // nullptr indicates the end of the list
|
|
|
|
uint16 version;
|
2023-02-12 21:50:52 +00:00
|
|
|
GRFFeatureTestObservationFlag observation_flag;
|
2021-12-03 20:49:27 +00:00
|
|
|
|
|
|
|
/** Create empty object used to identify the end of a list. */
|
|
|
|
GRFFeatureInfo() :
|
|
|
|
name(nullptr),
|
2023-02-12 21:50:52 +00:00
|
|
|
version(0),
|
|
|
|
observation_flag(GFTOF_INVALID)
|
2021-12-03 20:49:27 +00:00
|
|
|
{}
|
|
|
|
|
2023-02-12 21:50:52 +00:00
|
|
|
GRFFeatureInfo(const char *name, uint16 version, GRFFeatureTestObservationFlag observation_flag = GFTOF_INVALID) :
|
2021-12-03 20:49:27 +00:00
|
|
|
name(name),
|
2023-02-12 21:50:52 +00:00
|
|
|
version(version),
|
|
|
|
observation_flag(observation_flag)
|
2021-12-03 20:49:27 +00:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|