1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[CSM] Add function to get the definition of items (#5732)

Add node def and item def documentation.

Please be ready for merge!
This commit is contained in:
bigfoot547 2017-05-21 07:40:55 -05:00 committed by Loïc Blot
parent ae483f1bd0
commit dfa0c15ce0
5 changed files with 425 additions and 3 deletions

View 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,