API
Functions and classes available in the Lua API
|
#include <002d.h>
Public Member Functions | |
cLuaWindow (cWindow::WindowType a_WindowType, int a_SlotsX, int a_SlotsY, const AString &a_Title) | |
Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size. | |
cItemGrid & | GetContents (void) |
Returns the internal representation of the contents that are manipulated by Lua. | |
virtual | ~cLuaWindow () |
![]() | |
const cItem * | GetSlot (cPlayer &a_Player, int a_SlotNum) const |
Returns the item at the specified slot for the specified player. Returns NULL if invalid SlotNum requested. | |
char | GetWindowID (void) const |
const AString & | GetWindowTitle () const |
int | GetWindowType (void) const |
bool | IsSlotInPlayerHotbar (int a_SlotNum) const |
Returns true if the specified slot is in the Player Hotbar slotarea. | |
bool | IsSlotInPlayerInventory (int a_SlotNum) const |
Returns true if the specified slot is in the Player Main Inventory or Hotbar slotareas. Note that returns false for Armor. | |
bool | IsSlotInPlayerMainInventory (int a_SlotNum) const |
Returns true if the specified slot is in the Player Main Inventory slotarea. | |
void | SetSlot (cPlayer &a_Player, int a_SlotNum, const cItem &a_Item) |
Sets the item to the specified slot for the specified player. | |
void | SetWindowTitle (const AString &a_WindowTitle) |
Additional Inherited Members | |
![]() | |
enum | WindowType { Inventory = -1, Chest = 0, Workbench = 1, Furnace = 2, DropSpenser = 3, Enchantment = 4, Brewery = 5, NPCTrade = 6, Beacon = 7, Anvil = 8, Hopper = 9 } |
A window that has been created by a Lua plugin and is handled entirely by that plugin
This object needs extra care with its lifetime management:
cLuaWindow::cLuaWindow | ( | cWindow::WindowType | a_WindowType, |
int | a_SlotsX, | ||
int | a_SlotsY, | ||
const AString & | a_Title | ||
) |
Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size.
|
virtual |
|
inline |
Returns the internal representation of the contents that are manipulated by Lua.