lua/wrappers/game/lua_character.cpp
/**
	 * Equips an item to the character on the given body part.
	 *
	 * @param am.item item The item to equip, it cannot be nil.
	 * @param string part_name The body part to equip the item to.
	 * @returns boolean True if the item was successfully equipped,
	 * false can mean that there was already an item equipped, 
	 * or 'part_name' was not an attached body part.
	 */
Equips an item to the character on the given body part.
@param am.item item The item to equip, it cannot be nil.
@param string part_name The body part to equip the item to.
@returns boolean True if the item was successfully equipped,
false can mean that there was already an item equipped,
or 'part_name' was not an attached body part.
Equips an item to the character on the given body part . @param am . item item The item to equip it cannot be nil . @param string part_name The body part to equip the item to . @returns boolean True if the item was successfully equipped false can mean that there was already an item equipped or ' part_name ' was not an attached body part .
int Character_equip_item(lua_State *lua)
	{
		Character *obj = castUData<Character>(lua, 1);
		if (obj)
		{
			Item *item = castUData<Item>(lua, 2);
			if (lua_isstr(lua, 3))
			{
				lua_pushboolean(lua, obj->equipItem(item, lua_tostring(lua, 3)));
				return 1;
			}
			else
			{
				BodyPart *part = castUData<BodyPart>(lua, 3);
				if (part)
				{
					lua_pushboolean(lua, obj->equipItem(item, part->getName()));
					return 1;
				}
			}
			return LuaState::expectedArgs(lua, "equip_item", 2, "am.item item, string part_name", "am.item item, am.body_part part");
		}
		return LuaState::expectedContext(lua, "equip_item", "am.character");
	}
int Character_equip_item ( lua_State * lua ) { Character * obj = castUData < Character > ( lua , 1 ) ; if ( obj ) { Item * item = castUData < Item > ( lua , 2 ) ; if ( lua_isstr ( lua , 3 ) ) { lua_pushboolean ( lua , obj -> equipItem ( item , lua_tostring ( lua , 3 ) ) ) ; return 1 ; } else { BodyPart * part = castUData < BodyPart > ( lua , 3 ) ; if ( part ) { lua_pushboolean ( lua , obj -> equipItem ( item , part -> getName ( ) ) ) ; return 1 ; } } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Equips an item to the character on the given body part.
Equips an item to the character on the given body part .