(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;
|
||||
|
@@ -125,7 +125,7 @@ void ScriptInstance::Continue()
|
||||
|
||||
void ScriptInstance::Died()
|
||||
{
|
||||
DEBUG(ai, 0, "The script died unexpectedly.");
|
||||
DEBUG(script, 0, "The script died unexpectedly.");
|
||||
this->is_dead = true;
|
||||
|
||||
if (this->instance != NULL) this->engine->ReleaseObject(this->instance);
|
||||
|
@@ -116,7 +116,7 @@ void ScriptScanner::RegisterScript(ScriptInfo *info)
|
||||
|
||||
/* Check if GetShortName follows the rules */
|
||||
if (strlen(info->GetShortName()) != 4) {
|
||||
DEBUG(ai, 0, "The script '%s' returned a string from GetShortName() which is not four characaters. Unable to load the script.", info->GetName());
|
||||
DEBUG(script, 0, "The script '%s' returned a string from GetShortName() which is not four characaters. Unable to load the script.", info->GetName());
|
||||
delete info;
|
||||
return;
|
||||
}
|
||||
@@ -133,10 +133,10 @@ void ScriptScanner::RegisterScript(ScriptInfo *info)
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG(ai, 1, "Registering two scripts with the same name and version");
|
||||
DEBUG(ai, 1, " 1: %s", this->info_list[script_name]->GetMainScript());
|
||||
DEBUG(ai, 1, " 2: %s", info->GetMainScript());
|
||||
DEBUG(ai, 1, "The first is taking precedence.");
|
||||
DEBUG(script, 1, "Registering two scripts with the same name and version");
|
||||
DEBUG(script, 1, " 1: %s", this->info_list[script_name]->GetMainScript());
|
||||
DEBUG(script, 1, " 2: %s", info->GetMainScript());
|
||||
DEBUG(script, 1, "The first is taking precedence.");
|
||||
|
||||
delete info;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user