(svn r23355) -Codechange: rename all AI* to Script* (Rubidium)

This commit is contained in:
truebrain
2011-11-29 23:15:35 +00:00
parent afdb67a353
commit 98103121d4
175 changed files with 4048 additions and 4034 deletions

View File

@@ -7,7 +7,7 @@
* 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/>.
*/
/** @file script_testmode.cpp Implementation of AITestMode. */
/** @file script_testmode.cpp Implementation of ScriptTestMode. */
#include "../../stdafx.h"
#include "script_testmode.hpp"
@@ -15,25 +15,25 @@
#include "../../company_func.h"
#include "../../ai/ai_instance.hpp"
bool AITestMode::ModeProc()
bool ScriptTestMode::ModeProc()
{
/* In test mode we only return 'false', telling the DoCommand it
* should stop after testing the command and return with that result. */
return false;
}
AITestMode::AITestMode()
ScriptTestMode::ScriptTestMode()
{
this->last_mode = this->GetDoCommandMode();
this->last_instance = this->GetDoCommandModeInstance();
this->SetDoCommandMode(&AITestMode::ModeProc, this);
this->SetDoCommandMode(&ScriptTestMode::ModeProc, this);
}
AITestMode::~AITestMode()
ScriptTestMode::~ScriptTestMode()
{
if (this->GetDoCommandModeInstance() != this) {
/* Ignore this error if the AI already died. */
if (!AIObject::GetActiveInstance()->IsDead()) {
if (!ScriptObject::GetActiveInstance()->IsDead()) {
throw AI_FatalError("AITestmode object was removed while it was not the latest AI*Mode object created.");
}
}