Ejemplo n.º 1
0
 public void UnpackRTI()
 {
     if (TaskObjectCount < 1)
     {
         return;
     }
     if (!MissingRTI(OldID))
     {
         return;
     }
     if (RTIRequested)
     {
         return;
     }
     RTIRequested = true;
     lock (ExportCommand.fileWriterLock) File.WriteAllText(ExportCommand.dumpDir + OldID + ".0.rti", "requested");
     Exporting.AttemptMoveTo(SimPosition);
     lock (Importing.ExportHolder) Importing.ExportHolder.Add(OldID);
     Thread.Sleep(3000);
     if (!Exporting.PutItemToTaskInv(Client, OldLocalID, _rezed, "SimExportUnpackCopy"))
     {
         lock (ExportCommand.fileWriterLock)
         {
             string nomod = ExportCommand.dumpDir + OldID + ".rti_status";
             if (!File.Exists(nomod))
             {
                 File.WriteAllText(nomod, "nomod");
                 this.MustUseAgentCopy = true;
             }
         }
     }
     Thread.Sleep(3000);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Return false when the object is still in the world
        /// </summary>
        /// <param name="objID"></param>
        /// <returns></returns>
        public bool KillTaskObject(UUID objID, out bool inWorld)
        {
            Vector3 where;
            inWorld = Exporting.IsExisting(objID, out where);
            if (!inWorld)
            {
                return(true);
            }
            Exporting.AttemptMoveTo(where);
            Thread.Sleep(3000);
            SimObject O = WorldObjects.GetSimObjectFromUUID(objID);

            if (O == null)
            {
                return(false);
            }
            Exporting.KillInWorld(objID);
            return(true);
        }
Ejemplo n.º 3
0
        private void CountReady(ImportSettings settings)
        {
            Exporting.GiveStatus();
            int readyObjects          = 0;
            int readyObjectsForDelete = 0;
            int unreadyObjs           = 0;
            int unreadyObjsMustReRez  = 0;
            int requestedShort        = 0;

            foreach (var file in Directory.GetFiles(ExportCommand.dumpDir, "*.*.rti"))
            {
                if (!file.EndsWith("rti"))
                {
                    //rti_status
                    continue;
                }
                string rtiData  = File.ReadAllText(file);
                var    contents = rtiData.Split(',');
                if (contents.Length < 2)
                {
                    requestedShort++;
                    continue;
                }
                UUID objID, holderID;
                if (!UUID.TryParse(contents[0], out objID) || !UUID.TryParse(contents[1], out holderID))
                {
                    Failure("SHORT: " + file + " " + rtiData);
                    requestedShort++;
                    continue;
                }
                // var uuidstr = Path.GetFileName(file).Split('.');
                // var objNum = int.Parse(uuidstr[1]);
                string completeStr = ExportCommand.IsComplete(objID, false, true, settings);
                Vector3 where;
                bool inWorld = Exporting.IsExisting(objID, out where);
                if (string.IsNullOrEmpty(completeStr))
                {
                    readyObjects++;
                    if (inWorld)
                    {
                        Exporting.AttemptMoveTo(where);
                        Thread.Sleep(3000);
                        Exporting.KillInWorld(objID);
                        Importing.APrimToCreate(holderID);
                        readyObjectsForDelete++;
                    }
                    else
                    {
                        Importing.APrimToCreate(holderID);
                        Importing.APrimToCreate(objID);
                    }
                }
                else
                {
                    unreadyObjs++;
                    if (!inWorld)
                    {
                        unreadyObjsMustReRez++;
                        Failure("REREZ: " + completeStr + " " + rtiData);
                        Importing.APrimToCreate(holderID).MustUseAgentCopy = true;
                        File.Delete(ExportCommand.dumpDir + holderID + ".rti_status");
                        File.Delete(file);
                    }
                    else
                    {
                        MustExport.Add(objID);
                        MustExport.Add(holderID);
                        Importing.APrimToCreate(holderID);
                        Failure("RTIDATA: " + completeStr + " " + rtiData);
                        Exporting.AddMoveTo(where);
                    }
                }
            }
            Success("readyObjects = " + readyObjects);
            Success("readyObjectsForDelete = " + readyObjectsForDelete);
            Success("unreadyObjs = " + unreadyObjs);
            Success("unreadyObjsMustReRez = " + unreadyObjsMustReRez);
            Success("requestedShort = " + requestedShort);
        }