PageCollection
A class in Root.Township, Alta.Pages.
Asset listing the pages a kind of book can hold, in order. Looked up by hash; a Book uses one to know its pages.
- Listed in Items, inventory and logic
- Inherits or implements
HashedGeneralValue<PageCollection> - Derived types
PageCollection,PageCollection.Create - Nested types
Create - Attributes
HashedPath,TypeConverter - Documented in Arguments and results
Constructors
| Member | What it is |
|---|---|
PageCollection() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private bool canRemovePagesFrom | Backing field for CanRemovePagesFrom. |
private FlairSettings flairs | Backing field for Flairs. |
private int[] initialPages | Indexes into pageBases for the pages the collection starts with. |
private bool isHidingMaxCount | Backing field for IsHidingMaxCount. |
private Object[] pageBases | Page bases (IPageBasis objects) in the collection; a page's index is its position here. |
private int preferredProvider | Provider index passed to CreatePage when generating a page. |
Properties
| Member | What it is |
|---|---|
bool CanRemovePagesFrom { get; } | If false, pulling a page out of the book makes a duplicate and leaves the page in. |
FlairSettings Flairs { get; } | Decoration settings for books with this collection. |
IEnumerable<Object> InitialPages { get; } | Pages every world starts with already unlocked. |
bool IsHidingMaxCount { get; } | If true, the book's counter shows only pages found, not found out of total. |
Object[] PageBases { get; } | The page assets in order. |
int PreferredProvider { get; } | Provider id used when creating page data. |
int Size { get; } | Number of pages in the collection. |
Methods
| Member | What it is |
|---|---|
PageData GeneratePage(int index) | Creates the page data for the page at an index, with the preferred provider. |
int IndexOf(Object pageObject) | Position of a page asset in the collection, or -1. |
Used in
Members of other types that take, return or hold a PageCollection:
ProgressCommandModule.FillBook, SpawnCommandModule.PageCollectionInfo.op_Implicit, SpawnCommandModule.Pages.DropPackage, SpawnCommandModule.Pages.SpawnFull, Book.collection, Book.Collection, Book.SetCollection, BookRestrictor.collection, BookRestrictorSaveData.collection, BookSaveData.collection, BookSpawner.collections.