lua/wrappers/game/lua_item.cpp
/**
	 * Remove a new body type from this item that it can be equipped to.
	 * If the body type is not on the item, this function will be ignored.
	 * 
	 * @param string part_type The name of the body part.
	 * @returns am.item This
	 */
Remove a new body type from this item that it can be equipped to.
If the body type is not on the item, this function will be ignored.

@param string part_type The name of the body part.
Remove a new body type from this item that it can be equipped to . If the body type is not on the item this function will be ignored . @param string part_type The name of the body part .
int Item_remove_body_type(lua_State *lua)
	{
		Item *item = castUData<Item>(lua, 1);
		if (item)
		{
			if (lua_isstr(lua, 2))
			{
				BodyPartType::PartType type = BodyPartType::getBodyPartType(lua_tostring(lua, 2));
				if (type != BodyPartType::MAX_BODY_TYPE_LENGTH)
				{
					item->removeBodyPartType(type);
					lua_first(lua);
				}
				std::stringstream ss;
				ss << "Unknown body part type '" << lua_tostring(lua, 2) << '\'';
				LuaState::warning(lua, ss.str().c_str());
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "remove_body_type", "string body_type");
		}
		return LuaState::expectedContext(lua, "remove_body_type", "am.item");
	}
int Item_remove_body_type ( lua_State * lua ) { Item * item = castUData < Item > ( lua , 1 ) ; if ( item ) { if ( lua_isstr ( lua , 2 ) ) { BodyPartType :: PartType type = BodyPartType :: getBodyPartType ( lua_tostring ( lua , 2 ) ) ; if ( type != BodyPartType :: MAX_BODY_TYPE_LENGTH ) { item -> removeBodyPartType ( type ) ; lua_first ( lua ) ; } std :: stringstream ss ; ss << " " << lua_tostring ( lua , 2 ) << ' \' ' ; LuaState :: warning ( lua , ss . str ( ) . c_str ( ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Remove a new body type from this item that it can be equipped to.
Remove a new body type from this item that it can be equipped to .