summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/ai/compat_0.7.nut24
-rw-r--r--bin/ai/compat_0.8.nut7
2 files changed, 19 insertions, 12 deletions
diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut
index 377044326..1702f7963 100644
--- a/bin/ai/compat_0.7.nut
+++ b/bin/ai/compat_0.7.nut
@@ -1,8 +1,19 @@
/* $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 <http://www.gnu.org/licenses/>.
+ */
+
+AILog.Info("0.7 API compatability in effect:");
+AILog.Info(" - AITown::GetLastMonthProduction's behaviour has slightly changed.");
+AILog.Info(" - AISubsidy::GetDestination returns STATION_INVALID for awarded subsidies.");
+AILog.Info(" - AISubsidy::GetSource returns STATION_INVALID for awarded subsidies.");
+
AISign.GetMaxSignID <- function()
{
- AILog.Warning("AISign::GetMaxSignID is deprecated and will be removed soon, please use AISignList instead.");
local list = AISignList();
local max_id = 0;
foreach (id, d in list) {
@@ -13,7 +24,6 @@ AISign.GetMaxSignID <- function()
AITile.GetHeight <- function(tile)
{
- AILog.Warning("AITile::GetHeight is deprecated and will be removed soon, please use GetMinHeight/GetMaxHeight/GetCornerHeight instead.");
if (!AIMap.IsValidTile(tile)) return -1;
return AITile.GetCornerHeight(tile, AITile.CORNER_N);
@@ -21,8 +31,6 @@ AITile.GetHeight <- function(tile)
AIOrder.ChangeOrder <- function(vehicle_id, order_position, order_flags)
{
- AILog.Warning("AIOrder::ChangeOrder is deprecated and will be removed soon, please use AIOrder::SetOrderFlags instead.")
-
return AIOrder.SetOrderFlags(vehicle_id, order_position, order_flags);
}
@@ -30,7 +38,6 @@ AIWaypoint.WAYPOINT_INVALID <- 0xFFFF;
AISubsidy.SourceIsTown <- function(subsidy_id)
{
- AILog.Warning("AISubsidy::SourceIsTown is deprecated and will be removed soon, please use AISubsidy::GetSourceType instead.");
if (!AISubsidy.IsValidSubsidy(subsidy_id) || AISubsidy.IsAwarded(subsidy_id)) return false;
return AISubsidy.GetSourceType(subsidy_id) == AISubsidy.SPT_TOWN;
@@ -38,11 +45,9 @@ AISubsidy.SourceIsTown <- function(subsidy_id)
AISubsidy.GetSource <- function(subsidy_id)
{
- AILog.Warning("AISubsidy::GetSource is deprecated and will be removed soon, please use AISubsidy::GetSourceIndex instead.");
if (!AISubsidy.IsValidSubsidy(subsidy_id)) return AIBaseStation.STATION_INVALID;
if (AISubsidy.IsAwarded(subsidy_id)) {
- AILog.Error("AISubsidy::GetSource returned STATION_INVALID due to internal changes in the Subsidy logic.");
return AIBaseStation.STATION_INVALID;
}
@@ -51,7 +56,6 @@ AISubsidy.GetSource <- function(subsidy_id)
AISubsidy.DestinationIsTown <- function(subsidy_id)
{
- AILog.Warning("AISubsidy::DestinationIsTown is deprecated and will be removed soon, please use AISubsidy::GetDestinationType instead.");
if (!AISubsidy.IsValidSubsidy(subsidy_id) || AISubsidy.IsAwarded(subsidy_id)) return false;
return AISubsidy.GetDestinationType(subsidy_id) == AISubsidy.SPT_TOWN;
@@ -59,11 +63,9 @@ AISubsidy.DestinationIsTown <- function(subsidy_id)
AISubsidy.GetDestination <- function(subsidy_id)
{
- AILog.Warning("AISubsidy::GetDestination is deprecated and will be removed soon, please use AISubsidy::GetDestinationIndex instead.");
if (!AISubsidy.IsValidSubsidy(subsidy_id)) return AIBaseStation.STATION_INVALID;
if (AISubsidy.IsAwarded(subsidy_id)) {
- AILog.Error("AISubsidy::GetDestination returned STATION_INVALID due to internal changes in the Subsidy logic.");
return AIBaseStation.STATION_INVALID;
}
@@ -72,7 +74,5 @@ AISubsidy.GetDestination <- function(subsidy_id)
AITown.GetMaxProduction <- function(town_id, cargo_id)
{
- AILog.Warning("AITown::GetMaxProduction is deprecated and will be removed soon, please use AITown::GetLastMonthProduction instead.");
- AILog.Warning("Also note that behaviour of AITown::GetLastMonthProduction has slightly changed.");
return AITown.GetLastMonthProduction(town_id, cargo_id);
}
diff --git a/bin/ai/compat_0.8.nut b/bin/ai/compat_0.8.nut
index a0749a0c2..fe985b90d 100644
--- a/bin/ai/compat_0.8.nut
+++ b/bin/ai/compat_0.8.nut
@@ -1 +1,8 @@
/* $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 <http://www.gnu.org/licenses/>.
+ */