Files
dusk/src/duskrpg/script/module/item/moduleitem.h

81 lines
1.9 KiB
C

/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "script/scriptcontext.h"
/**
* Register item functions to the given script context.
*
* @param context The script context to register item functions to.
*/
void moduleItem(scriptcontext_t *context);
/**
* Script binding for checking if an item exists in an inventory.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventoryItemExists(lua_State *L);
/**
* Script binding for adding an item to an inventory.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventorySet(lua_State *L);
/**
* Script binding for setting the quantity of an item in an inventory.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventoryAdd(lua_State *L);
/**
* Script binding for removing an item from an inventory.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventoryRemove(lua_State *L);
/**
* Script binding for getting the count of an item in an inventory.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventoryGetCount(lua_State *L);
/**
* Script binding for checking if an inventory is full.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventoryIsFull(lua_State *L);
/**
* Script binding for checking if an item stack in an inventory is full.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventoryItemFull(lua_State *L);
/**
* Script binding for sorting an inventory.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleInventorySort(lua_State *L);