summaryrefslogtreecommitdiff
path: root/src/script/common/c_content.h
diff options
context:
space:
mode:
authorbigfoot547 <bigfoot547@users.noreply.github.com>2017-05-21 07:40:55 -0500
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-05-21 14:40:55 +0200
commitdfa0c15ce045705f05487d623dc7beca6c945b4b (patch)
tree20f8e1beed4524f4f92e5a6af52c7b01eb8ef7ac /src/script/common/c_content.h
parentae483f1bd00625216bb0a35370f0cc4568ad7893 (diff)
downloadminetest-dfa0c15ce045705f05487d623dc7beca6c945b4b.tar.gz
minetest-dfa0c15ce045705f05487d623dc7beca6c945b4b.tar.bz2
minetest-dfa0c15ce045705f05487d623dc7beca6c945b4b.zip
[CSM] Add function to get the definition of items (#5732)
Add node def and item def documentation. Please be ready for merge!
Diffstat (limited to 'src/script/common/c_content.h')
-rw-r--r--src/script/common/c_content.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h
index 28d8b1e8c..9b8796297 100644
--- a/src/script/common/c_content.h
+++ b/src/script/common/c_content.h
@@ -39,6 +39,7 @@ extern "C" {
#include "util/string.h"
#include "itemgroup.h"
#include "itemdef.h"
+#include "c_types.h"
namespace Json { class Value; }
@@ -64,8 +65,20 @@ class Schematic;
ContentFeatures read_content_features (lua_State *L, int index);
+void push_content_features (lua_State *L,
+ const ContentFeatures &c);
+
+void push_nodebox (lua_State *L,
+ const NodeBox &box);
+void push_box (lua_State *L,
+ const std::vector<aabb3f> &box);
+
+void push_palette (lua_State *L,
+ const std::vector<video::SColor> *palette);
+
TileDef read_tiledef (lua_State *L, int index,
u8 drawtype);
+
void read_soundspec (lua_State *L, int index,
SimpleSoundSpec &spec);
NodeBox read_nodebox (lua_State *L, int index);
@@ -90,6 +103,9 @@ void read_item_definition (lua_State *L, int index, const ItemDefinition &defaul
ItemDefinition &def);
void push_item_definition (lua_State *L,
const ItemDefinition &i);
+void push_item_definition_full (lua_State *L,
+ const ItemDefinition &i);
+
void read_object_properties (lua_State *L, int index,
ObjectProperties *prop,
IItemDefManager *idef);
@@ -147,6 +163,8 @@ std::vector<ItemStack> read_items (lua_State *L,
void read_soundspec (lua_State *L,
int index,
SimpleSoundSpec &spec);
+void push_soundspec (lua_State *L,
+ const SimpleSoundSpec &spec);
bool string_to_enum (const EnumString *spec,
int &result,