private void MoveToKnownObjects() { lock (ORPHANS) { if (ORPHANS.Count > 0) { foreach (PrimToCreate orphan in ORPHANS) { Exporting.AddMoveTo(orphan.SimPosition); } return; } } foreach (PrimToCreate parent in parents) { Exporting.AddMoveTo(parent.SimPosition); } }
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); }