示例#1
0
        // remove a file from a vessel
        public static void RemoveFile(Vessel v, string subject_id, double amount)
        {
            if (!Cache.VesselInfo(v).is_valid)
            {
                return;
            }
            Drive drive = DB.Vessel(v).drive;

            drive.delete_file(subject_id, amount);
        }
示例#2
0
        public void DumpData(ScienceData data)
        {
            // get drive
            Drive drive = DB.Vessel(vessel).drive;

            // if not the preferred drive
            if (drive.location != part.flightID)
            {
                return;
            }

            // remove the data
            if (data.baseTransmitValue > float.Epsilon || data.transmitBonus > double.Epsilon)
            {
                drive.delete_file(data.subjectID, data.dataAmount);
            }
            else
            {
                drive.delete_sample(data.subjectID, data.dataAmount);
            }
        }