Changeset - r12791:42003b18ddb9
[Not reviewed]
master
0 1 0
yexo - 15 years ago 2009-08-26 16:30:24
yexo@openttd.org
(svn r17289) -Fix (r17214): for AIs it's STATION_INVALID, not INVALID_STATION
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
bin/ai/compat_0.7.nut
Show inline comments
 
@@ -39,11 +39,11 @@ AISubsidy.SourceIsTown <- function(subsi
 
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.INVALID_STATION;
 
	if (!AISubsidy.IsValidSubsidy(subsidy_id)) return AIBaseStation.STATION_INVALID;
 

	
 
	if (AISubsidy.IsAwarded(subsidy_id)) {
 
		AILog.Error("AISubsidy::GetSource returned INVALID_STATION due to internal changes in the Subsidy logic.");
 
		return AIBaseStation.INVALID_STATION;
 
		AILog.Error("AISubsidy::GetSource returned STATION_INVALID due to internal changes in the Subsidy logic.");
 
		return AIBaseStation.STATION_INVALID;
 
	}
 

	
 
	return AISubsidy.GetSourceIndex(subsidy_id);
 
@@ -60,11 +60,11 @@ AISubsidy.DestinationIsTown <- function(
 
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.INVALID_STATION;
 
	if (!AISubsidy.IsValidSubsidy(subsidy_id)) return AIBaseStation.STATION_INVALID;
 

	
 
	if (AISubsidy.IsAwarded(subsidy_id)) {
 
		AILog.Error("AISubsidy::GetDestination returned INVALID_STATION due to internal changes in the Subsidy logic.");
 
		return AIBaseStation.INVALID_STATION;
 
		AILog.Error("AISubsidy::GetDestination returned STATION_INVALID due to internal changes in the Subsidy logic.");
 
		return AIBaseStation.STATION_INVALID;
 
	}
 

	
 
	return AISubsidy.GetDestinationIndex(subsidy_id);
0 comments (0 inline, 0 general)