public override void PostDestroy(DestroyMode mode, Map previousMap) { base.PostDestroy(mode, previousMap); if (taleRef != null) { taleRef.ReferenceDestroyed(); taleRef = null; } }
public void Clear() { authorNameInt = null; titleInt = null; if (taleRef != null) { taleRef.ReferenceDestroyed(); taleRef = null; } }
public void InitializeBook() { //Log.Message("Initialize book"); if (taleRef != null) { taleRef.ReferenceDestroyed(); taleRef = null; } taleRef = TaleBookReference.Taleless; //Log.Message("Generating title"); titleInt = GenerateTitle(); //Log.Message("Title: " + titleInt); }
protected override void FillTab() { Rect rect = new Rect(0f, 0f, WinSize.x, WinSize.y).ContractedBy(10f); Text.Font = GameFont.Medium; Widgets.Label(rect, SelectedCompBook.Title); if (cachedImageSource != SelectedCompBook || cachedTaleRef != SelectedCompBook.TaleRef) { cachedImageDescription = SelectedCompBook.GenerateImageDescription(); cachedImageSource = SelectedCompBook; cachedTaleRef = SelectedCompBook.TaleRef; } Rect rect2 = rect; rect2.yMin += 35f; Text.Font = GameFont.Small; Widgets.Label(rect2, cachedImageDescription); }