Getting shaders working with lua.

This commit is contained in:
2026-03-28 21:50:59 -05:00
parent cbb68a399d
commit dbb7e9f53c
49 changed files with 305 additions and 114 deletions

View File

@@ -0,0 +1,80 @@
/**
* 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);