(svn r23386) -Fix: debug script related events to 'script' (removes 'ai')
This commit is contained in:
@@ -445,7 +445,7 @@ int32 ScriptList::Begin()
|
||||
int32 ScriptList::Next()
|
||||
{
|
||||
if (this->initialized == false) {
|
||||
DEBUG(ai, 0, "Next() is invalid as Begin() is never called");
|
||||
DEBUG(script, 0, "Next() is invalid as Begin() is never called");
|
||||
return 0;
|
||||
}
|
||||
return this->sorter->Next();
|
||||
@@ -459,7 +459,7 @@ bool ScriptList::IsEmpty()
|
||||
bool ScriptList::IsEnd()
|
||||
{
|
||||
if (this->initialized == false) {
|
||||
DEBUG(ai, 0, "IsEnd() is invalid as Begin() is never called");
|
||||
DEBUG(script, 0, "IsEnd() is invalid as Begin() is never called");
|
||||
return true;
|
||||
}
|
||||
return this->sorter->IsEnd();
|
||||
|
@@ -74,7 +74,7 @@
|
||||
}
|
||||
|
||||
/* Also still print to debug window */
|
||||
DEBUG(ai, level, "[%d] [%c] %s", (uint)_current_company, logc, log->lines[log->pos]);
|
||||
DEBUG(script, level, "[%d] [%c] %s", (uint)_current_company, logc, log->lines[log->pos]);
|
||||
InvalidateWindowData(WC_AI_DEBUG, 0, _current_company);
|
||||
}
|
||||
|
||||
|
@@ -557,7 +557,7 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance)
|
||||
/* Make sure we don't go into an infinite loop */
|
||||
int retry = ScriptObject::GetCallbackVariable(3) - 1;
|
||||
if (retry < 0) {
|
||||
DEBUG(ai, 0, "Possible infinite loop in SetOrderFlags() detected");
|
||||
DEBUG(script, 0, "Possible infinite loop in SetOrderFlags() detected");
|
||||
return false;
|
||||
}
|
||||
ScriptObject::SetCallbackVariable(3, retry);
|
||||
|
@@ -51,7 +51,7 @@
|
||||
/* static */ int32 ScriptStation::GetCoverageRadius(ScriptStation::StationType station_type)
|
||||
{
|
||||
if (station_type == STATION_AIRPORT) {
|
||||
DEBUG(ai, 0, "GetCoverageRadius(): coverage radius of airports needs to be requested via ScriptAirport::GetAirportCoverageRadius(), as it requires AirportType");
|
||||
DEBUG(script, 0, "GetCoverageRadius(): coverage radius of airports needs to be requested via ScriptAirport::GetAirportCoverageRadius(), as it requires AirportType");
|
||||
return -1;
|
||||
}
|
||||
if (!HasExactlyOneBit(station_type)) return -1;
|
||||
|
Reference in New Issue
Block a user