(svn r23652) -Fix: don't include/document ScriptText for AIs. It is not usable

This commit is contained in:
truebrain 2011-12-21 15:06:00 +00:00
parent 5988659eea
commit ac306fc138
4 changed files with 5 additions and 35 deletions

View File

@ -26,6 +26,9 @@
#include "ai_info.hpp"
#include "ai_instance.hpp"
/* Manually include the Text glue. */
#include "../script/api/template/template_text.hpp.sq"
/* Convert all AI related classes to Squirrel data.
* Note: this line is a marker in squirrel_export.sh. Do not change! */
#include "../script/api/ai/ai_accounting.hpp.sq"
@ -69,7 +72,6 @@
#include "../script/api/ai/ai_subsidy.hpp.sq"
#include "../script/api/ai/ai_subsidylist.hpp.sq"
#include "../script/api/ai/ai_testmode.hpp.sq"
#include "../script/api/ai/ai_text.hpp.sq"
#include "../script/api/ai/ai_tile.hpp.sq"
#include "../script/api/ai/ai_tilelist.hpp.sq"
#include "../script/api/ai/ai_town.hpp.sq"
@ -172,7 +174,6 @@ void AIInstance::RegisterAPI()
SQAISubsidy_Register(this->engine);
SQAISubsidyList_Register(this->engine);
SQAITestMode_Register(this->engine);
SQAIText_Register(this->engine);
SQAITile_Register(this->engine);
SQAITileList_Register(this->engine);
SQAITileList_IndustryAccepting_Register(this->engine);

View File

@ -1,31 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* 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/>.
*/
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
#include "../script_text.hpp"
#include "../template/template_text.hpp.sq"
template <> const char *GetClassName<ScriptText, ST_AI>() { return "AIText"; }
void SQAIText_Register(Squirrel *engine)
{
DefSQClass<ScriptText, ST_AI> SQAIText("AIText");
SQAIText.PreRegister(engine);
SQAIText.AddSQAdvancedConstructor(engine);
SQAIText.DefSQConst(engine, ScriptText::SCRIPT_TEXT_MAX_PARAMETERS, "SCRIPT_TEXT_MAX_PARAMETERS");
SQAIText.DefSQAdvancedMethod(engine, &ScriptText::_set, "_set");
SQAIText.DefSQAdvancedMethod(engine, &ScriptText::SetParam, "SetParam");
SQAIText.DefSQAdvancedMethod(engine, &ScriptText::AddParam, "AddParam");
SQAIText.PostRegister(engine);
}

View File

@ -65,7 +65,7 @@ private:
* can directly give those arguments to the ScriptText constructor, like this:
* \code local text = ScriptText(ScriptText.STR_NEWS, 1); \endcode
*
* @api ai game
* @api game
*/
class ScriptText : public Text , public ZeroedMemoryAllocator {
public:

View File

@ -106,7 +106,7 @@ functions=``
echo "
{ }
/.hpp.sq/ { next }
/.hpp.sq/ { if (match(\$0, \"template\")) print \$0; next }
/SQ${apiuc}Controller_Register/ { print \$0; next }
/SQ${apiuc}.*_Register/ { next }