mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Codechange: We are heading to 16 (#14882)
This commit is contained in:
@@ -5,7 +5,7 @@ if(NOT BINARY_NAME)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(${BINARY_NAME}
|
project(${BINARY_NAME}
|
||||||
VERSION 15.0
|
VERSION 16.0
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ set(AI_COMPAT_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
|
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
|
||||||
|
|||||||
8
bin/ai/compat_15.nut
Normal file
8
bin/ai/compat_15.nut
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* 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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This file contains code to downgrade the API from 16 to 15. */
|
||||||
@@ -12,6 +12,7 @@ set(GS_COMPAT_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
|
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
|
||||||
|
|||||||
8
bin/game/compat_15.nut
Normal file
8
bin/game/compat_15.nut
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* 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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This file contains code to downgrade the API from 16 to 15. */
|
||||||
@@ -4,7 +4,7 @@ class Regression extends AIInfo {
|
|||||||
function GetShortName() { return "REGR"; }
|
function GetShortName() { return "REGR"; }
|
||||||
function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
|
function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
|
||||||
function GetVersion() { return 1; }
|
function GetVersion() { return 1; }
|
||||||
function GetAPIVersion() { return "15"; }
|
function GetAPIVersion() { return "16"; }
|
||||||
function GetDate() { return "2007-03-18"; }
|
function GetDate() { return "2007-03-18"; }
|
||||||
function CreateInstance() { return "Regression"; }
|
function CreateInstance() { return "Regression"; }
|
||||||
function UseAsRandomAI() { return false; }
|
function UseAsRandomAI() { return false; }
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class StationList extends AIInfo {
|
|||||||
function GetShortName() { return "REGS"; }
|
function GetShortName() { return "REGS"; }
|
||||||
function GetDescription() { return "This runs stationlist-tests on some commands. On the same map the result should always be the same."; }
|
function GetDescription() { return "This runs stationlist-tests on some commands. On the same map the result should always be the same."; }
|
||||||
function GetVersion() { return 1; }
|
function GetVersion() { return 1; }
|
||||||
function GetAPIVersion() { return "15"; }
|
function GetAPIVersion() { return "16"; }
|
||||||
function GetDate() { return "2007-03-18"; }
|
function GetDate() { return "2007-03-18"; }
|
||||||
function CreateInstance() { return "StationList"; }
|
function CreateInstance() { return "StationList"; }
|
||||||
function UseAsRandomAI() { return false; }
|
function UseAsRandomAI() { return false; }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
class AIInfo : public ScriptInfo {
|
class AIInfo : public ScriptInfo {
|
||||||
public:
|
public:
|
||||||
/* All valid AI API versions, in order. */
|
/* All valid AI API versions, in order. */
|
||||||
static constexpr std::string_view ApiVersions[]{ "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15" };
|
static constexpr std::string_view ApiVersions[]{ "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15", "16" };
|
||||||
|
|
||||||
AIInfo();
|
AIInfo();
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
class GameInfo : public ScriptInfo {
|
class GameInfo : public ScriptInfo {
|
||||||
public:
|
public:
|
||||||
/* All valid GameScript API versions, in order. */
|
/* All valid GameScript API versions, in order. */
|
||||||
static constexpr std::string_view ApiVersions[]{ "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15" };
|
static constexpr std::string_view ApiVersions[]{ "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15", "16" };
|
||||||
|
|
||||||
GameInfo();
|
GameInfo();
|
||||||
|
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ enum SaveLoadVersion : uint16_t {
|
|||||||
|
|
||||||
SLV_DOCKS_UNDER_BRIDGES, ///< 360 PR#14594 Allow docks under bridges.
|
SLV_DOCKS_UNDER_BRIDGES, ///< 360 PR#14594 Allow docks under bridges.
|
||||||
SLV_LOCKS_UNDER_BRIDGES, ///< 361 PR#14595 Allow locks under bridges.
|
SLV_LOCKS_UNDER_BRIDGES, ///< 361 PR#14595 Allow locks under bridges.
|
||||||
SLV_ENGINE_MULTI_RAILTYPE, ///< 362 PR#14357 Train engines can have multiple railtypes.
|
SLV_ENGINE_MULTI_RAILTYPE, ///< 362 PR#14357 v15.0 Train engines can have multiple railtypes.
|
||||||
|
|
||||||
SL_MAX_VERSION, ///< Highest possible saveload version
|
SL_MAX_VERSION, ///< Highest possible saveload version
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,10 +13,12 @@
|
|||||||
* functions may still be available if you return an older API version
|
* functions may still be available if you return an older API version
|
||||||
* in GetAPIVersion() in info.nut.
|
* in GetAPIVersion() in info.nut.
|
||||||
*
|
*
|
||||||
* \b 15.0
|
* \b 16.0
|
||||||
*
|
*
|
||||||
* This version is not yet released. The following changes are not set in stone yet.
|
* This version is not yet released. The following changes are not set in stone yet.
|
||||||
*
|
*
|
||||||
|
* \b 15.0
|
||||||
|
*
|
||||||
* API additions:
|
* API additions:
|
||||||
* \li AIEventVehicleCrashed::GetVictims
|
* \li AIEventVehicleCrashed::GetVictims
|
||||||
* \li AIEventVehicleCrashed::GetVehicleOwner
|
* \li AIEventVehicleCrashed::GetVehicleOwner
|
||||||
|
|||||||
@@ -13,10 +13,12 @@
|
|||||||
* functions may still be available if you return an older API version
|
* functions may still be available if you return an older API version
|
||||||
* in GetAPIVersion() in info.nut.
|
* in GetAPIVersion() in info.nut.
|
||||||
*
|
*
|
||||||
* \b 15.0
|
* \b 16.0
|
||||||
*
|
*
|
||||||
* This version is not yet released. The following changes are not set in stone yet.
|
* This version is not yet released. The following changes are not set in stone yet.
|
||||||
*
|
*
|
||||||
|
* \b 15.0
|
||||||
|
*
|
||||||
* API additions:
|
* API additions:
|
||||||
* \li GSEventVehicleCrashed::GetVictims
|
* \li GSEventVehicleCrashed::GetVictims
|
||||||
* \li GSEventVehicleCrashed::GetVehicleOwner
|
* \li GSEventVehicleCrashed::GetVehicleOwner
|
||||||
|
|||||||
Reference in New Issue
Block a user