From dfa0c15ce045705f05487d623dc7beca6c945b4b Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Sun, 21 May 2017 07:40:55 -0500 Subject: [CSM] Add function to get the definition of items (#5732) Add node def and item def documentation. Please be ready for merge! --- src/script/common/c_content.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/script/common/c_content.h') 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 &box); + +void push_palette (lua_State *L, + const std::vector *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 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, -- cgit v1.2.3