private void FillBestiarySpaceWithEntries() { if (_entryGrid != null && _entryGrid.Parent != null) { DeselectEntryButton(); _progressReport = GetUnlockProgress(); _entryGrid.FillBestiarySpaceWithEntries(); } }
private void FillBestiarySpaceWithEntries() { if (this._entryGrid == null || this._entryGrid.Parent == null) { return; } this.DeselectEntryButton(); this._progressReport = this.GetUnlockProgress(); this._entryGrid.FillBestiarySpaceWithEntries(); }
private void UpdateBestiaryContents() { this._filteringGrid.UpdateAvailability(); this._sortingText.SetText(this._sorter.GetDisplayName()); this._filteringText.SetText(this._filterer.GetDisplayName()); this.FilterEntries(); this.SortEntries(); this.FillBestiarySpaceWithEntries(); this._progressReport = this.GetUnlockProgress(); this._progressPercentText.SetText(this.GetCompletionPercentText()); this._unlocksProgressBar.FillPercent = this.GetProgressPercent(); }
public static void WoodDiscount(Chest shop) { BestiaryUnlockProgressReport bestiaryProgressReport = Main.GetBestiaryProgressReport(); float discount = 1f - (bestiaryProgressReport.CompletionPercent / 2f); //50% discount at 100% bestiary for (int i = 0; i < 40; i++) { int?originalPrice = shop.item[i].shopCustomPrice == null ? shop.item[i].value : shop.item[i].shopCustomPrice; shop.item[i].shopCustomPrice = (int)((float)originalPrice * discount); } }
public BestiaryUnlockProgressReport GetUnlockProgress() { float num = 0f; int num2 = 0; List <BestiaryEntry> originalEntriesList = _originalEntriesList; for (int i = 0; i < originalEntriesList.Count; i++) { int num3 = ((originalEntriesList[i].UIInfoProvider.GetEntryUICollectionInfo().UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0) ? 1 : 0); num2++; num += (float)num3; } BestiaryUnlockProgressReport result = default(BestiaryUnlockProgressReport); result.EntriesTotal = num2; result.CompletionAmountTotal = num; return(result); }