//  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());
            }

            //  Tool Type
            MyMwcObjectBuilder_SmallShip_Tool_TypesEnum?toolType = MyMwcMessageIn.ReadObjectBuilderSmallShipToolTypesEnumEx(binaryReader, senderEndPoint);

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

            return(true);
        }
 internal override void SetObjectBuilderIdInternal(int?objectBuilderId)
 {
     ToolType = (MyMwcObjectBuilder_SmallShip_Tool_TypesEnum)Convert.ToUInt16(objectBuilderId);
 }
 public MyMwcObjectBuilder_SmallShip_Tool(MyMwcObjectBuilder_SmallShip_Tool_TypesEnum toolType)
 {
     ToolType = toolType;
 }
        //  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();

            //  Tool Type
            MyMwcObjectBuilder_SmallShip_Tool_TypesEnum? toolType = MyMwcMessageIn.ReadObjectBuilderSmallShipToolTypesEnumEx(binaryReader, senderEndPoint);
            if (toolType == null) return NetworkError();
            ToolType = toolType.Value;
            MyMwcLog.IfNetVerbose_AddToLog("ToolType: " + ToolType);

            return true;
        }
 internal override void SetObjectBuilderIdInternal(int? objectBuilderId)
 {
     ToolType = (MyMwcObjectBuilder_SmallShip_Tool_TypesEnum)Convert.ToUInt16(objectBuilderId);
 }
 public MyMwcObjectBuilder_SmallShip_Tool(MyMwcObjectBuilder_SmallShip_Tool_TypesEnum toolType)
 {
     ToolType = toolType;
 }
Пример #7
0
 public static void WriteObjectBuilderSmallShipToolTypesEnum(MyMwcObjectBuilder_SmallShip_Tool_TypesEnum val, BinaryWriter binaryWriter)
 {
     binaryWriter.Write((ushort)val);
 }