diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2011-10-08 11:19:44 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-10-15 00:10:22 +0200 |
commit | 1e6b7a30b7232dce7b8240441bed04912e06f666 (patch) | |
tree | b5aa2d893c2bee4268a3cfc8172dc6ae7ea6ce09 /src/scripting/luautil.h | |
parent | 9cd09f012ff7c01fbd51b972f9b716cfc8246b2c (diff) | |
download | manaserv-1e6b7a30b7232dce7b8240441bed04912e06f666.tar.gz manaserv-1e6b7a30b7232dce7b8240441bed04912e06f666.tar.bz2 manaserv-1e6b7a30b7232dce7b8240441bed04912e06f666.tar.xz manaserv-1e6b7a30b7232dce7b8240441bed04912e06f666.zip |
Added script bindings for reading map objects
map_get_objects([string filter]): returns all object of the current map optionally filtered by type.
map_get_object_property(handle object, string key): returns the value of the property of the object.
map_get_object_bounds(handle object): returns x, y, width, height of an object.
map_get_object_name(handle object): returns name of an object.
map_get_object_type(handle object): returns type of an object.
Mantis-issue: 397
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/scripting/luautil.h')
-rw-r--r-- | src/scripting/luautil.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scripting/luautil.h b/src/scripting/luautil.h index c55b04b7..82bb78cf 100644 --- a/src/scripting/luautil.h +++ b/src/scripting/luautil.h @@ -31,6 +31,8 @@ extern "C" { #include <set> #include <vector> +#include "game-server/map.h" + class Being; class NPC; class Character; @@ -52,8 +54,9 @@ Being *getBeing(lua_State *s, int p); Useful for templates.*/ void push(lua_State *s, int val); void push(lua_State *s, const std::string &val); -void push(lua_State *s, Thing* val); +void push(lua_State *s, Thing *val); void push(lua_State *s, double val); +void push(lua_State *s, MapObject *val); /* Pushes an STL LIST */ |