Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
l_craft.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include <string>
8#include <vector>
9
10#include "lua_api/l_base.h"
11
13
14class ModApiCraft : public ModApiBase {
15private:
16 static int l_register_craft(lua_State *L);
17 static int l_get_craft_recipe(lua_State *L);
18 static int l_get_all_craft_recipes(lua_State *L);
19 static int l_get_craft_result(lua_State *L);
20 static int l_clear_craft(lua_State *L);
21
22 static bool readCraftReplacements(lua_State *L, int index,
23 CraftReplacements &replacements);
24 static bool readCraftRecipeShapeless(lua_State *L, int index,
25 std::vector<std::string> &recipe);
26 static bool readCraftRecipeShaped(lua_State *L, int index,
27 int &width, std::vector<std::string> &recipe);
28
29 static struct EnumString es_CraftMethod[];
30
31public:
32 static void Initialize(lua_State *L, int top);
33 static void InitializeAsync(lua_State *L, int top);
34};
Definition l_base.h:28
Definition l_craft.h:14
static int l_get_craft_result(lua_State *L)
Definition l_craft.cpp:356
static void Initialize(lua_State *L, int top)
Definition l_craft.cpp:505
static bool readCraftRecipeShaped(lua_State *L, int index, int &width, std::vector< std::string > &recipe)
Definition l_craft.cpp:23
static int l_clear_craft(lua_State *L)
Definition l_craft.cpp:268
static bool readCraftReplacements(lua_State *L, int index, CraftReplacements &replacements)
Definition l_craft.cpp:86
static bool readCraftRecipeShapeless(lua_State *L, int index, std::vector< std::string > &recipe)
Definition l_craft.cpp:64
static void InitializeAsync(lua_State *L, int top)
Definition l_craft.cpp:514
static int l_get_craft_recipe(lua_State *L)
Definition l_craft.cpp:470
static int l_register_craft(lua_State *L)
Definition l_craft.cpp:117
static int l_get_all_craft_recipes(lua_State *L)
Definition l_craft.cpp:492
static struct EnumString es_CraftMethod[]
Definition l_craft.h:14
Definition craftdef.h:103
Definition c_types.h:16