public static void ProcessTransform(Transform transform, GameObject WhoBy, bool RefreshHierarchy = false) { if (Librarian.library.TransformToBookShelves.Count == 0) { Librarian.library.TraverseHierarchy(); RefreshHierarchy = true; } Librarian.Library.LibraryBookShelf BookShelf; if (Librarian.TransformToBookShelf.ContainsKey(transform)) { BookShelf = Librarian.TransformToBookShelf[transform]; } else { BookShelf = Librarian.Library.LibraryBookShelf.PartialGenerateLibraryBookShelf(transform); } BookShelf.PopulateBookShelf(); SendBookShelfToClient(BookShelf, WhoBy); if (RefreshHierarchy) { LibraryNetMessage.Send(Librarian.library, WhoBy); } }
public static void RequestSendBookshelf(ulong BookshelfID, bool IsNewbookBookshelf, GameObject WhoBy) { if (Librarian.IDToBookShelf.ContainsKey(BookshelfID)) { var Bookshelf = Librarian.IDToBookShelf[BookshelfID]; if (IsNewbookBookshelf) { if (Bookshelf.Shelf == null) { Logger.LogError("Bookshelf has been destroyed > " + BookshelfID, Category.VariableViewer); Librarian.library.TraverseHierarchy(); LibraryNetMessage.Send(Librarian.library, WhoBy); return; } if (Bookshelf.IsPartiallyGenerated) { Bookshelf.PopulateBookShelf(); } SubBookshelfNetMessage.Send(Bookshelf, WhoBy); } else { SubBookshelfNetMessage.Send(Bookshelf, WhoBy); } } else { Logger.LogError("Bookshelf ID has not been generated BookshelfID > " + BookshelfID, Category.VariableViewer); } }
public static void RequestHierarchy(GameObject WhoBy) { Librarian.library.TraverseHierarchy(); LibraryNetMessage.Send(Librarian.library, WhoBy); }