lua/wrappers/game/lua_body_part.cpp
/**
	 * Sets if this body part should be used as a weapon.
	 *
	 * @param boolean is_weapon_body Sets if this is a weapon body part.
	 * @returns am.body_part This.
	 */
Sets if this body part should be used as a weapon.
@param boolean is_weapon_body Sets if this is a weapon body part.
Sets if this body part should be used as a weapon . @param boolean is_weapon_body Sets if this is a weapon body part .
int BodyPart_weapon_part(lua_State *lua)
	{
		BodyPart *part = castUData<BodyPart>(lua, 1);
		if (part)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushboolean(lua, part->isWeaponPart());
				return 1;
			}
			else if (lua_isbool(lua, 2))
			{
				part->setWeaponPart(lua_tobool(lua, 2));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "weapon_part", "bool isWeapon");
		}
		return LuaState::expectedContext(lua, "weapon_part", "am.body_part");
	}
int BodyPart_weapon_part ( lua_State * lua ) { BodyPart * part = castUData < BodyPart > ( lua , 1 ) ; if ( part ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushboolean ( lua , part -> isWeaponPart ( ) ) ; return 1 ; } else if ( lua_isbool ( lua , 2 ) ) { part -> setWeaponPart ( lua_tobool ( lua , 2 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets if this body part should be used as a weapon.
Sets if this body part should be used as a weapon .