lua/wrappers/game/lua_character.cpp
/**
	 * Tells if a body part with the same name is attached to the character.
	 *
	 * @param string part_name The body part to check for.
	 * @returns boolean True if the body part is attached.
	 */
Tells if a body part with the same name is attached to the character.
@param string part_name The body part to check for.
@returns boolean True if the body part is attached.
Tells if a body part with the same name is attached to the character . @param string part_name The body part to check for . @returns boolean True if the body part is attached .
int Character_has_body_part(lua_State *lua)
	{
		Character *obj = castUData<Character>(lua, 1);
		if (obj)
		{
			if (lua_isstr(lua, 2))
			{
				lua_pushboolean(lua, obj->hasBodyPart(lua_tostring(lua, 2)));
				return 1;
			}
			BodyPart *part = castUData<BodyPart>(lua, 2);
			if (part)
			{
				lua_pushboolean(lua, obj->hasBodyPart(part));
				return 1;
			}
			return LuaState::expectedArgs(lua, "has_body_part", 2, "am.body_part part", "string part_name");
		}
		return LuaState::expectedContext(lua, "has_body_part", "am.character");
	}
int Character_has_body_part ( lua_State * lua ) { Character * obj = castUData < Character > ( lua , 1 ) ; if ( obj ) { if ( lua_isstr ( lua , 2 ) ) { lua_pushboolean ( lua , obj -> hasBodyPart ( lua_tostring ( lua , 2 ) ) ) ; return 1 ; } BodyPart * part = castUData < BodyPart > ( lua , 2 ) ; if ( part ) { lua_pushboolean ( lua , obj -> hasBodyPart ( part ) ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Tells if a body part with the same name is attached to the character.
Tells if a body part with the same name is attached to the character .