lua/wrappers/game/lua_store.cpp
/**
	 * Returns an array of all the inventories in this store.
	 *
	 * @returns array All the inventories.
	 */
Returns an array of all the inventories in this store.
@returns array All the inventories.
Returns an array of all the inventories in this store . @returns array All the inventories .
int Store_default_inventory_size(lua_State *lua)
	{
		Store *store = castUData<Store>(lua, 1);
		if (store)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushinteger(lua, store->getDefaultInventorySizeWidth());
				lua_pushinteger(lua, store->getDefaultInventorySizeHeight());
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				int width = lua_tointeger(lua, 2);
				int height = lua_tointeger(lua, 3);
				if (width < 0 || height < 0)
				{
					LuaState::warning(lua, "Width and/or height cannot be less than zero.");
					lua_first(lua);
				}
				store->setDefaultInventorySize(width, height);
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "default_inventory_size", "integer width, integer height");
		}
		return LuaState::expectedContext(lua, "default_inventory_size", "am.store");
	}
int Store_default_inventory_size ( lua_State * lua ) { Store * store = castUData < Store > ( lua , 1 ) ; if ( store ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushinteger ( lua , store -> getDefaultInventorySizeWidth ( ) ) ; lua_pushinteger ( lua , store -> getDefaultInventorySizeHeight ( ) ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { int width = lua_tointeger ( lua , 2 ) ; int height = lua_tointeger ( lua , 3 ) ; if ( width < 0 || height < 0 ) { LuaState :: warning ( lua , " " ) ; lua_first ( lua ) ; } store -> setDefaultInventorySize ( width , height ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns an array of all the inventories in this store.
Returns an array of all the inventories in this store .