lua/wrappers/game/lua_item.cpp
/**
	 * Returns the set of all the body part types that this
	 * item can be equipped on to.
	 *
	 * @returns table A set of all the body part types.
	 */
Returns the set of all the body part types that this
item can be equipped on to.

@returns table A set of all the body part types.
Returns the set of all the body part types that this item can be equipped on to . @returns table A set of all the body part types .
int Item_get_body_types(lua_State *lua)
	{
		Item *item = castUData<Item>(lua, 1);
		if (item)
		{
			lua_newtable(lua);
			const BodyPartType::TypeList &list = item->getBodyPartTypeList();
			for (size_t i = 0; i < list.size(); i++)
			{
				lua_pushstring(lua, BodyPartType::getBodyPartName(list[i]));
				lua_pushboolean(lua, true);
				lua_settable(lua, -3);
			}
			return 1;
		}
		return LuaState::expectedContext(lua, "get_body_types", "am.item");
	}
int Item_get_body_types ( lua_State * lua ) { Item * item = castUData < Item > ( lua , 1 ) ; if ( item ) { lua_newtable ( lua ) ; const BodyPartType :: TypeList & list = item -> getBodyPartTypeList ( ) ; for ( size_t i = 0 ; i < list . size ( ) ; i ++ ) { lua_pushstring ( lua , BodyPartType :: getBodyPartName ( list [ i ] ) ) ; lua_pushboolean ( lua , true ) ; lua_settable ( lua , -3 ) ; } return 1 ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Returns the set of all the body part types that this
 item can be equipped on to.
Returns the set of all the body part types that this item can be equipped on to .