]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/common/c_content.h
[CSM] Add function to get the definition of items (#5732)
[dragonfireclient.git] / src / script / common / c_content.h
index 219c5eb7cbe105569cf36ab893d75b0130d73894..9b87962971dee5b732992efdca1d2b505e803a9e 100644 (file)
@@ -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,
@@ -164,7 +182,7 @@ bool               push_json_value           (lua_State *L,
 void               read_json_value           (lua_State *L, Json::Value &root,
                                               int index, u8 recursion = 0);
 
-void               push_pointed_thing        (lua_State *L, const PointedThing &pointed);
+void               push_pointed_thing        (lua_State *L, const PointedThing &pointed, bool csm = false);
 
 void               push_objectRef            (lua_State *L, const u16 id);