From 150f05dc15be37517af70c73dfa4c18869a55e62 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 1 Jan 2023 22:52:23 +0100 Subject: [PATCH] Change: Heading for 14 now. (#10302) --- CMakeLists.txt | 2 +- bin/ai/CMakeLists.txt | 2 ++ bin/ai/compat_13.nut | 2 ++ bin/ai/compat_14.nut | 6 ++++++ bin/game/CMakeLists.txt | 2 ++ bin/game/compat_13.nut | 2 ++ bin/game/compat_14.nut | 6 ++++++ regression/regression/info.nut | 2 +- regression/stationlist/info.nut | 2 +- src/ai/ai_info.cpp | 2 +- src/game/game_info.cpp | 2 +- src/saveload/saveload.h | 2 +- src/script/api/ai_changelog.hpp | 4 +++- src/script/api/game_changelog.hpp | 4 +++- 14 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 bin/ai/compat_14.nut create mode 100644 bin/game/compat_14.nut diff --git a/CMakeLists.txt b/CMakeLists.txt index 911ebbad40..29549d8634 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ if(NOT BINARY_NAME) endif() project(${BINARY_NAME} - VERSION 13.0 + VERSION 14.0 ) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) diff --git a/bin/ai/CMakeLists.txt b/bin/ai/CMakeLists.txt index 9417004fce..7fb23cada3 100644 --- a/bin/ai/CMakeLists.txt +++ b/bin/ai/CMakeLists.txt @@ -13,6 +13,8 @@ set(AI_COMPAT_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut ${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut + ${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut + ${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut ) foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES) diff --git a/bin/ai/compat_13.nut b/bin/ai/compat_13.nut index 3081fb58e8..5f808e38a0 100644 --- a/bin/ai/compat_13.nut +++ b/bin/ai/compat_13.nut @@ -4,3 +4,5 @@ * 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 . */ + +AILog.Info("13 API compatibility in effect."); diff --git a/bin/ai/compat_14.nut b/bin/ai/compat_14.nut new file mode 100644 index 0000000000..3081fb58e8 --- /dev/null +++ b/bin/ai/compat_14.nut @@ -0,0 +1,6 @@ +/* + * 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 . + */ diff --git a/bin/game/CMakeLists.txt b/bin/game/CMakeLists.txt index 55a992be32..0b48e97857 100644 --- a/bin/game/CMakeLists.txt +++ b/bin/game/CMakeLists.txt @@ -10,6 +10,8 @@ set(GS_COMPAT_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut ${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut + ${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut + ${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut ) foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES) diff --git a/bin/game/compat_13.nut b/bin/game/compat_13.nut index 3081fb58e8..0ee9faf2bd 100644 --- a/bin/game/compat_13.nut +++ b/bin/game/compat_13.nut @@ -4,3 +4,5 @@ * 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 . */ + +GSLog.Info("13 API compatibility in effect."); diff --git a/bin/game/compat_14.nut b/bin/game/compat_14.nut new file mode 100644 index 0000000000..3081fb58e8 --- /dev/null +++ b/bin/game/compat_14.nut @@ -0,0 +1,6 @@ +/* + * 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 . + */ diff --git a/regression/regression/info.nut b/regression/regression/info.nut index 8799d98628..9c775eede5 100644 --- a/regression/regression/info.nut +++ b/regression/regression/info.nut @@ -4,7 +4,7 @@ class Regression extends AIInfo { 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 GetVersion() { return 1; } - function GetAPIVersion() { return "13"; } + function GetAPIVersion() { return "14"; } function GetDate() { return "2007-03-18"; } function CreateInstance() { return "Regression"; } function UseAsRandomAI() { return false; } diff --git a/regression/stationlist/info.nut b/regression/stationlist/info.nut index 099a7d12ec..f3a1684876 100644 --- a/regression/stationlist/info.nut +++ b/regression/stationlist/info.nut @@ -4,7 +4,7 @@ class StationList extends AIInfo { 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 GetVersion() { return 1; } - function GetAPIVersion() { return "13"; } + function GetAPIVersion() { return "14"; } function GetDate() { return "2007-03-18"; } function CreateInstance() { return "StationList"; } function UseAsRandomAI() { return false; } diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index fcd1b5a1a9..b8bc1fb83d 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -25,7 +25,7 @@ */ static bool CheckAPIVersion(const char *api_version) { - static const std::set versions = { "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" }; + static const std::set versions = { "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" }; return versions.find(api_version) != versions.end(); } diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp index 5f7ba259b6..4d28cf8c7a 100644 --- a/src/game/game_info.cpp +++ b/src/game/game_info.cpp @@ -23,7 +23,7 @@ */ static bool CheckAPIVersion(const char *api_version) { - static const std::set versions = { "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13" }; + static const std::set versions = { "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14" }; return versions.find(api_version) != versions.end(); } diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 16352cc749..bd57fb727f 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -342,7 +342,7 @@ enum SaveLoadVersion : uint16 { SLV_REPAIR_OBJECT_DOCKING_TILES, ///< 299 PR#9594 v12.0 Fixing issue with docking tiles overlapping objects. SLV_U64_TICK_COUNTER, ///< 300 PR#10035 Make _tick_counter 64bit to avoid wrapping. SLV_LAST_LOADING_TICK, ///< 301 PR#9693 Store tick of last loading for vehicles. - SLV_MULTITRACK_LEVEL_CROSSINGS, ///< 302 PR#9931 Multi-track level crossings. + SLV_MULTITRACK_LEVEL_CROSSINGS, ///< 302 PR#9931 v13.0 Multi-track level crossings. SL_MAX_VERSION, ///< Highest possible saveload version }; diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 6479393760..e69408926f 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -13,10 +13,12 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * - * \b 13.0 + * \b 14.0 * * This version is not yet released. The following changes are not set in stone yet. * + * \b 13.0 + * * API additions: * \li AICargo::GetWeight * \li AIIndustryType::ResolveNewGRFID diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp index 69773edeeb..1512a6ea7c 100644 --- a/src/script/api/game_changelog.hpp +++ b/src/script/api/game_changelog.hpp @@ -13,10 +13,12 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * - * \b 13.0 + * \b 14.0 * * This version is not yet released. The following changes are not set in stone yet. * + * \b 13.0 + * * API additions: * \li GSCargo::GetWeight * \li GSIndustryType::ResolveNewGRFID