コード例 #1
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());
            }

            //  Blueprint type
            MyMwcObjectBuilder_Blueprint_TypesEnum?blueprintType = MyMwcMessageIn.ReadObjectBuilderBlueprintTypesEnumEx(binaryReader, senderEndPoint);

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

            return(true);
        }
コード例 #2
0
 private static List<IMyBuildingRequirement> GetBlueprintRequirements(MyMwcObjectBuilder_Blueprint_TypesEnum blueprintType)
 {
     try
     {
         return m_blueprintRequirementDependencies[(int)blueprintType];
     }
     catch
     {
         return null;                
     }
 }
コード例 #3
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();

            //  Blueprint type
            MyMwcObjectBuilder_Blueprint_TypesEnum? blueprintType = MyMwcMessageIn.ReadObjectBuilderBlueprintTypesEnumEx(binaryReader, senderEndPoint);
            if (blueprintType == null) return NetworkError();
            BlueprintType = blueprintType.Value;
            MyMwcLog.IfNetVerbose_AddToLog("BlueprintType: " + BlueprintType);

            return true;
        }
コード例 #4
0
 internal override void SetObjectBuilderIdInternal(int? objectBuilderId)
 {
     BlueprintType = (MyMwcObjectBuilder_Blueprint_TypesEnum)Convert.ToUInt16(objectBuilderId);
 }
コード例 #5
0
 public MyMwcObjectBuilder_Blueprint(MyMwcObjectBuilder_Blueprint_TypesEnum blueprintType)
 {
     BlueprintType = blueprintType;
 }
コード例 #6
0
 /// <summary>
 /// Creates new instance of blueprint's requirement
 /// </summary>
 /// <param name="blueprintType">Blueprint's type</param>        
 public MyBuildingRequirementBlueprint(MyMwcObjectBuilder_Blueprint_TypesEnum blueprintType)
 {
     BlueprintType = blueprintType;                        
 }
コード例 #7
0
 internal override void SetObjectBuilderIdInternal(int?objectBuilderId)
 {
     BlueprintType = (MyMwcObjectBuilder_Blueprint_TypesEnum)Convert.ToUInt16(objectBuilderId);
 }
コード例 #8
0
 public MyMwcObjectBuilder_Blueprint(MyMwcObjectBuilder_Blueprint_TypesEnum blueprintType)
 {
     BlueprintType = blueprintType;
 }
コード例 #9
0
 /// <summary>
 /// Creates new instance of blueprint's requirement
 /// </summary>
 /// <param name="blueprintType">Blueprint's type</param>
 public MyBuildingRequirementBlueprint(MyMwcObjectBuilder_Blueprint_TypesEnum blueprintType)
 {
     BlueprintType = blueprintType;
 }
コード例 #10
0
 public static void WriteObjectBuildeBlueprintTypesEnum(MyMwcObjectBuilder_Blueprint_TypesEnum val, BinaryWriter binaryWriter)
 {
     binaryWriter.Write((ushort)val);
 }