truelight@9450: /* $Id$ */ truelight@9450: truebrain@9833: /** @file ai_execmode.cpp Implementation of AIExecMode. */ truelight@9450: truelight@9450: #include "ai_execmode.hpp" truelight@9450: glx@9629: bool AIExecMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs) truelight@9450: { truelight@9450: /* In execution mode we only return 'true', telling the DoCommand it truelight@9450: * should continue with the real execution of the command. */ truelight@9450: return true; truelight@9450: } truelight@9450: truelight@9450: AIExecMode::AIExecMode() truelight@9450: { truelight@9473: this->last_mode = this->GetDoCommandMode(); truelight@9473: this->last_instance = this->GetDoCommandModeInstance(); truelight@9473: this->SetDoCommandMode(&AIExecMode::ModeProc, this); truelight@9450: } truelight@9450: truelight@9450: AIExecMode::~AIExecMode() truelight@9450: { truelight@9473: this->SetDoCommandMode(this->last_mode, this->last_instance); truelight@9450: }