//  Read this object from message-in
        internal override bool Read(BinaryReader binaryReader, EndPoint senderEndPoint, int gameVersion)
        {
            if (base.Read(binaryReader, senderEndPoint, gameVersion) == false) return NetworkError();

            //  Armor Type
            MyMwcObjectBuilder_SmallShip_Armor_TypesEnum? armorType = MyMwcMessageIn.ReadObjectBuilderSmallShipArmorTypesEnumEx(binaryReader, senderEndPoint);
            if (armorType == null) return NetworkError();
            ArmorType = armorType.Value;
            MyMwcLog.IfNetVerbose_AddToLog("ArmorType: " + ArmorType);

            return true;
        }
예제 #2
0
        //  Read this object from message-in
        internal override bool Read(BinaryReader binaryReader, EndPoint senderEndPoint, int gameVersion)
        {
            if (base.Read(binaryReader, senderEndPoint, gameVersion) == false)
            {
                return(NetworkError());
            }

            //  Armor Type
            MyMwcObjectBuilder_SmallShip_Armor_TypesEnum?armorType = MyMwcMessageIn.ReadObjectBuilderSmallShipArmorTypesEnumEx(binaryReader, senderEndPoint);

            if (armorType == null)
            {
                return(NetworkError());
            }
            ArmorType = armorType.Value;
            MyMwcLog.IfNetVerbose_AddToLog("ArmorType: " + ArmorType);

            return(true);
        }
예제 #3
0
 internal override void SetObjectBuilderIdInternal(int?objectBuilderId)
 {
     ArmorType = (MyMwcObjectBuilder_SmallShip_Armor_TypesEnum)Convert.ToUInt16(objectBuilderId);
 }
예제 #4
0
 public MyMwcObjectBuilder_SmallShip_Armor(MyMwcObjectBuilder_SmallShip_Armor_TypesEnum armorType)
 {
     ArmorType = armorType;
 }
 internal override void SetObjectBuilderIdInternal(int? objectBuilderId)
 {
     ArmorType = (MyMwcObjectBuilder_SmallShip_Armor_TypesEnum)Convert.ToUInt16(objectBuilderId);
 }
 public MyMwcObjectBuilder_SmallShip_Armor(MyMwcObjectBuilder_SmallShip_Armor_TypesEnum armorType)
 {
     ArmorType = armorType;
 }
 public static MySmallShipArmorTypeProperties GetProperties(MyMwcObjectBuilder_SmallShip_Armor_TypesEnum armorType)
 {
     return ArmorProperties[(int)armorType];
 }
예제 #8
0
 public static void WriteObjectBuilderSmallShipArmorTypesEnum(MyMwcObjectBuilder_SmallShip_Armor_TypesEnum val, BinaryWriter binaryWriter)
 {
     binaryWriter.Write((ushort)val);
 }
 public static MySmallShipArmorTypeProperties GetProperties(MyMwcObjectBuilder_SmallShip_Armor_TypesEnum armorType)
 {
     return(ArmorProperties[(int)armorType]);
 }