lua/wrappers/game/lua_body_part.cpp
/**
	 * Creates a new body part instance with the given name.
	 * This name is used to identify the part when it is attached to a character.
	 * @param string name The body part name.
	 * @param string ["unknown_part"] type The body part type.
	 */
Creates a new body part instance with the given name.
This name is used to identify the part when it is attached to a character.
@param string name The body part name.
@param string ["unknown_part"] type The body part type.
Creates a new body part instance with the given name . This name is used to identify the part when it is attached to a character . @param string name The body part name . @param string [ " unknown_part " ] type The body part type .
int BodyPart_ctor(lua_State *lua)
	{
		if (lua_isstr(lua, 1))
		{
			const char *partName = lua_tostring(lua, 1);
			BodyPartType::PartType type = BodyPartType::UNKNOWN_PART;
			if (lua_isstr(lua, 2))
			{
				type = BodyPartType::getBodyPartType(lua_tostring(lua, 2));
			}
			BodyPart *part = new BodyPart(partName, type);
			wrapRefObject<BodyPart>(lua, part);
			return 1;
		}
		return LuaState::expectedArgs(lua, "@new", "string partName, string [\"unknown_part\"] type");
	}
int BodyPart_ctor ( lua_State * lua ) { if ( lua_isstr ( lua , 1 ) ) { const char * partName = lua_tostring ( lua , 1 ) ; BodyPartType :: PartType type = BodyPartType :: UNKNOWN_PART ; if ( lua_isstr ( lua , 2 ) ) { type = BodyPartType :: getBodyPartType ( lua_tostring ( lua , 2 ) ) ; } BodyPart * part = new BodyPart ( partName , type ) ; wrapRefObject < BodyPart > ( lua , part ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " \" \" " ) ; }
Creates a new body part instance with the given name.
Creates a new body part instance with the given name .