Skip to content

Commit

Permalink
* (***ADDB***) Add "Show hidden loot in Checklist" to the Loot Tab. T…
Browse files Browse the repository at this point in the history
…he checklist doesn't show loot which wasn't seen yet.
  • Loading branch information
xADDBx committed Dec 18, 2024
1 parent ea0c5da commit d5cc474
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ToyBox/Classes/MainUI/EnhancedUI/LootHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
using UnityModManagerNet;

namespace ToyBox {
public static class LootHelper {
Expand Down Expand Up @@ -80,8 +81,8 @@ public static IEnumerable<LootWrapper> GetMassLootFromCurrentArea() {
.Concat(Game.Instance.State.AllUnits.Select(i => i.GetOptional<InteractionLootPart>())).NotNull();
var source = TempList.Get<InteractionLootPart>();
foreach (var interactionLootPart in interactionLootParts)
if (interactionLootPart.Owner.IsRevealed && interactionLootPart.Loot.HasLoot &&
(interactionLootPart.LootViewed ||
if ((interactionLootPart.Owner.IsRevealed || Main.Settings.toggleShowHiddenLoot) && interactionLootPart.Loot.HasLoot &&
(interactionLootPart.LootViewed || Main.Settings.toggleShowHiddenLoot ||
(interactionLootPart.View is DroppedLoot && !(bool)(EntityPart)interactionLootPart.Owner
.GetOptional<DroppedLoot.EntityPartBreathOfMoney>()) ||
(bool)(UnityEngine.Object)interactionLootPart.View.GetComponent<SkinnedMeshRenderer>()))
Expand Down Expand Up @@ -112,6 +113,7 @@ public static void OpenMassLoot() {
contextVM.LootVM.Value = lootVM;

//EventBus.RaiseEvent((Action<ILootInterractionHandler>)(e => e.HandleZoneLootInterraction(null)));
UnityModManager.UI.Instance.ToggleWindow(false);
}
public static void OpenPlayerChest() {
// Access to LootContextVM
Expand Down
5 changes: 5 additions & 0 deletions ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ public static void OnGUI() {
if (Game.Instance.CurrentlyLoadedArea == null) return;
var isEmpty = true;
HStack("Loot Checklist".localize(), 1,
() => {
Toggle("Show hidden loot in Checklist".localize(), ref Settings.toggleShowHiddenLoot, 400.width());
150.space();
Label(RichText.Green("Also lists containers that are still hidden.".localize()));
},
() => {
var areaName = "";
if (Main.IsInGame) {
Expand Down
1 change: 1 addition & 0 deletions ToyBox/Classes/Models/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ internal PerSaveSettings perSave {
public RarityType minRarityToColor = 0;
public bool toggleMassLootEverything = false;
public bool toggleLootAliveUnits = false;
public bool toggleShowHiddenLoot = false;
public bool toggleLootChecklistFilterBlueprint = false;
public bool toggleLootChecklistFilterDescription = false;
public RarityType lootChecklistFilterRarity = RarityType.None;
Expand Down
3 changes: 2 additions & 1 deletion ToyBox/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ Here is a summarized list of features. This list only includes a part of the fea


### ToyBox Rogue - Ver 1.7.7 built for Rogue Trader 1.3.0.57
* (***jonHinkerton***) Add Button (allows binding to hotkey) to open faction trade vendor window from anywhere.
* (***ADDB***) Add "Show hidden loot in Checklist" to the Loot Tab. The checklist doesn't show loot which wasn't seen yet.
* (***ADDB***) Patch Tool fixes:
* Fix Patch Tool for types implementing IList<T>
* Fix Patch Tool possible stack overflow in DeepCopy
* (***jonHinkerton***) Add Button (allows binding to hotkey) to open faction trade vendor window from anywhere.

### ToyBox Rogue - Ver 1.7.6 built for Rogue Trader 1.2.1.26
* (***ADDB***) Fix Patch Tool not being able to modify top level primitives.
Expand Down

0 comments on commit d5cc474

Please sign in to comment.