Skip to content

Commit

Permalink
Codechange: We are heading to 15
Browse files Browse the repository at this point in the history
  • Loading branch information
rubidium42 authored and telk5093 committed Feb 19, 2024
1 parent af5c384 commit f9a8d40
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(NOT BINARY_NAME)
endif()

project(${BINARY_NAME}
VERSION 14.0
VERSION 15.0
LANGUAGES CXX
)

Expand Down
1 change: 1 addition & 0 deletions bin/ai/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set(AI_COMPAT_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.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)
Expand Down
2 changes: 2 additions & 0 deletions bin/ai/compat_14.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.
*/

AILog.Info("14 API compatibility in effect.");
6 changes: 6 additions & 0 deletions bin/ai/compat_15.nut
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
1 change: 1 addition & 0 deletions bin/game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(GS_COMPAT_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.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)
Expand Down
2 changes: 2 additions & 0 deletions bin/game/compat_14.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.
*/

GSLog.Info("14 API compatibility in effect.");
6 changes: 6 additions & 0 deletions bin/game/compat_15.nut
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
2 changes: 1 addition & 1 deletion regression/regression/info.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 "14"; }
function GetAPIVersion() { return "15"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
function UseAsRandomAI() { return false; }
Expand Down
2 changes: 1 addition & 1 deletion regression/stationlist/info.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 "14"; }
function GetAPIVersion() { return "15"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "StationList"; }
function UseAsRandomAI() { return false; }
Expand Down
2 changes: 1 addition & 1 deletion src/ai/ai_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
static bool CheckAPIVersion(const std::string &api_version)
{
static const std::set<std::string> 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" };
static const std::set<std::string> 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", "15" };
return versions.find(api_version) != versions.end();
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/game_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
static bool CheckAPIVersion(const std::string &api_version)
{
static const std::set<std::string> versions = { "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14" };
static const std::set<std::string> versions = { "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15" };
return versions.find(api_version) != versions.end();
}

Expand Down
2 changes: 1 addition & 1 deletion src/saveload/saveload.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ enum SaveLoadVersion : uint16_t {
SLV_MAX_LOAN_FOR_COMPANY, ///< 330 PR#11224 Separate max loan for each company.
SLV_DEPOT_UNBUNCHING, ///< 331 PR#11945 Allow unbunching shared order vehicles at a depot.
SLV_AI_LOCAL_CONFIG, ///< 332 PR#12003 Config of running AI is stored inside Company.
SLV_SCRIPT_RANDOMIZER, ///< 333 PR#12063 Save script randomizers.
SLV_SCRIPT_RANDOMIZER, ///< 333 PR#12063 v14.0 Save script randomizers.

SL_MAX_VERSION, ///< Highest possible saveload version
};
Expand Down
4 changes: 3 additions & 1 deletion src/script/api/ai_changelog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
* \b 14.0
* \b 15.0
*
* This version is not yet released. The following changes are not set in stone yet.
*
* \b 14.0
*
* API additions:
* \li AITimeMode
* \li AITown::ROAD_LAYOUT_RANDOM
Expand Down
4 changes: 3 additions & 1 deletion src/script/api/game_changelog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
* \b 14.0
* \b 15.0
*
* This version is not yet released. The following changes are not set in stone yet.
*
* \b 14.0
*
* API additions:
* \li GSIndustry::GetConstructionDate
* \li GSAsyncMode
Expand Down

0 comments on commit f9a8d40

Please sign in to comment.