2009-05-06 15:06:33 +01:00
|
|
|
// Cyphesis Online RPG Server and AI Engine
|
|
|
|
|
// Copyright (C) 2009 Alistair Riddoch
|
|
|
|
|
//
|
|
|
|
|
// This program 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; either version 2 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program 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 this program; if not, write to the Free Software Foundation,
|
|
|
|
|
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
|
|
|
2011-02-15 09:30:46 +00:00
|
|
|
#ifdef NDEBUG
|
|
|
|
|
#undef NDEBUG
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
#define DEBUG
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-12-15 23:09:38 +00:00
|
|
|
#include <Python.h>
|
2018-10-27 13:13:45 +02:00
|
|
|
#include <server/ExternalMindsManager.h>
|
2011-12-15 23:09:38 +00:00
|
|
|
|
2009-05-06 15:06:33 +01:00
|
|
|
#include "PropertyCoverage.h"
|
|
|
|
|
|
2018-11-03 16:43:33 +01:00
|
|
|
#include "rules/simulation/MindProperty.h"
|
2018-10-31 21:38:35 +01:00
|
|
|
#include "rules/ai/MindFactory.h"
|
2009-05-06 15:06:33 +01:00
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
2018-10-27 13:13:45 +02:00
|
|
|
ExternalMindsManager mindsManager;
|
2009-05-06 15:06:33 +01:00
|
|
|
MindProperty * ap = new MindProperty;
|
|
|
|
|
|
2013-01-08 00:19:23 +00:00
|
|
|
PropertyChecker<MindProperty> pc(ap);
|
2009-05-06 15:06:33 +01:00
|
|
|
|
|
|
|
|
// Coverage is complete, but it wouldn't hurt to add some bad data here.
|
|
|
|
|
|
|
|
|
|
pc.basicCoverage();
|
|
|
|
|
|
|
|
|
|
// The is no code in operations.cpp to execute, but we need coverage.
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2010-04-08 23:57:49 +01:00
|
|
|
|
|
|
|
|
// stubs
|
|
|
|
|
|
2012-09-06 13:48:40 +01:00
|
|
|
#include "TestWorld.h"
|
2018-10-31 21:38:35 +01:00
|
|
|
#include "rules/ai/BaseMind.h"
|
2018-11-03 16:43:33 +01:00
|
|
|
#include "rules/python/PythonScriptFactory.h"
|
2011-12-15 23:09:38 +00:00
|
|
|
|
2015-05-23 16:47:45 +02:00
|
|
|
#include "stubs/server/stubExternalMindsManager.h"
|
|
|
|
|
#include "stubs/server/stubExternalMindsConnection.h"
|
|
|
|
|
|
2010-04-08 23:57:49 +01:00
|
|
|
namespace Atlas { namespace Objects { namespace Operation {
|
|
|
|
|
int SETUP_NO = -1;
|
|
|
|
|
} } }
|
|
|
|
|
|
2018-11-03 16:43:33 +01:00
|
|
|
#include "stubs/rules/python/stubPythonClass.h"
|
2011-12-15 23:09:38 +00:00
|
|
|
|
|
|
|
|
MindKit::MindKit() : m_scriptFactory(0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MindKit::~MindKit()
|
|
|
|
|
{
|
|
|
|
|
}
|
2010-04-08 23:57:49 +01:00
|
|
|
|
2011-12-15 23:09:38 +00:00
|
|
|
template<>
|
|
|
|
|
PythonScriptFactory<BaseMind>::PythonScriptFactory(const std::string & package,
|
|
|
|
|
const std::string & type) :
|
|
|
|
|
PythonClass(package,
|
2018-07-24 21:18:50 +02:00
|
|
|
type)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2011-12-15 23:09:38 +00:00
|
|
|
template <class T>
|
|
|
|
|
int PythonScriptFactory<T>::setup()
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
const std::string & PythonScriptFactory<T>::package() const
|
|
|
|
|
{
|
|
|
|
|
return m_package;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
int PythonScriptFactory<T>::addScript(T * entity) const
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
int PythonScriptFactory<T>::refreshClass()
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template class PythonScriptFactory<BaseMind>;
|
|
|
|
|
|
|
|
|
|
int GetScriptDetails(const Atlas::Message::MapType & script,
|
|
|
|
|
const std::string & class_name,
|
|
|
|
|
const std::string & context,
|
|
|
|
|
std::string & script_package,
|
|
|
|
|
std::string & script_class)
|
2010-04-08 23:57:49 +01:00
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|