2013-05-25 00:51:02 +02:00
|
|
|
/*
|
|
|
|
Minetest
|
|
|
|
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser 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.
|
|
|
|
*/
|
|
|
|
|
2013-08-11 04:09:45 +02:00
|
|
|
#ifndef SCRIPTING_GAME_H_
|
|
|
|
#define SCRIPTING_GAME_H_
|
2013-05-25 00:51:02 +02:00
|
|
|
|
|
|
|
#include "cpp_api/s_base.h"
|
2013-08-11 04:09:45 +02:00
|
|
|
#include "cpp_api/s_entity.h"
|
2013-05-25 00:51:02 +02:00
|
|
|
#include "cpp_api/s_env.h"
|
|
|
|
#include "cpp_api/s_inventory.h"
|
2013-08-11 04:09:45 +02:00
|
|
|
#include "cpp_api/s_node.h"
|
|
|
|
#include "cpp_api/s_player.h"
|
|
|
|
#include "cpp_api/s_server.h"
|
2013-05-25 00:51:02 +02:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
2013-08-11 04:09:45 +02:00
|
|
|
/* Scripting <-> Game Interface */
|
2013-05-25 00:51:02 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2013-08-11 04:09:45 +02:00
|
|
|
class GameScripting
|
2013-05-25 00:51:02 +02:00
|
|
|
: virtual public ScriptApiBase,
|
2013-08-11 04:09:45 +02:00
|
|
|
public ScriptApiDetached,
|
|
|
|
public ScriptApiEntity,
|
2013-05-25 00:51:02 +02:00
|
|
|
public ScriptApiEnv,
|
|
|
|
public ScriptApiNode,
|
2013-08-11 04:09:45 +02:00
|
|
|
public ScriptApiPlayer,
|
|
|
|
public ScriptApiServer
|
2013-05-25 00:51:02 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-08-11 04:09:45 +02:00
|
|
|
GameScripting(Server* server);
|
2013-05-25 00:51:02 +02:00
|
|
|
|
2013-08-11 04:09:45 +02:00
|
|
|
// use ScriptApiBase::loadMod() to load mods
|
2013-05-25 00:51:02 +02:00
|
|
|
|
|
|
|
private:
|
2013-08-11 04:09:45 +02:00
|
|
|
void InitializeModApi(lua_State *L, int top);
|
2013-05-25 00:51:02 +02:00
|
|
|
};
|
|
|
|
|
2013-08-11 04:09:45 +02:00
|
|
|
#endif /* SCRIPTING_GAME_H_ */
|