Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MiniMapMod/MiniMapPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ private void ScanStaticTypes()
if (token is null)
{
Log.LogDebug($"No {nameof(PurchaseInteraction)} component on {nameof(ChestBehavior)}. GameObject.name = {chest.gameObject.name}");
return true;
return false;
}

return token.Contains("CHEST") && token != "LUNAR_CHEST_CONTEXT" && token.Contains("STEALTH") == false;
Expand Down Expand Up @@ -301,7 +301,7 @@ private void ScanStaticTypes()
});

// duplicators
RegisterMonobehaviorType<PurchaseInteraction>(InteractableKind.Printer, dynamicObject: false,
RegisterMonobehaviorType<PurchaseInteraction>(InteractableKind.Printer, dynamicObject: false,
selector: shop => shop?.contextToken?.Contains("DUPLICATOR") ?? false);

// barrels
Expand Down Expand Up @@ -378,7 +378,7 @@ private void RegisterMonobehaviorType<T>(InteractableKind kind, Func<T, bool> Ac

Log.LogDebug($"Selected {selected.Count()} {kind}s");

RegisterMonobehaviours(found, kind, ActiveChecker, dynamicObject);
RegisterMonobehaviours(selected, kind, ActiveChecker, dynamicObject);
}

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion MiniMapMod/Minimap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void SetRotation(Quaternion rotation)

public RectTransform CreateIcon(InteractableKind type, Vector3 minimapPosition, ISpriteManager spriteManager)
{
Sprite sprite = null;
Sprite sprite;

try
{
Expand All @@ -84,6 +84,8 @@ public RectTransform CreateIcon(InteractableKind type, Vector3 minimapPosition,
{
Log.LogError($"Failed to get sprite for type {type}");
Log.LogError(e.Message);

return null;
}

GameObject icon = CreateIcon(type, sprite);
Expand Down