Skip to content

Commit 667af0f

Browse files
committed
1 parent 5845fed commit 667af0f

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

CommunityBugFixCollection/CommunityBugFixCollection.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@
4444
<PackageReference Include="Resonite.Elements.Quantity" Version="1.2.2" />
4545
<PackageReference Include="Resonite.FrooxEngine" Version="2024.11.21.479" />
4646
<PackageReference Include="Resonite.ProtoFluxBindings" Version="2024.13.19.479" />
47+
<PackageReference Include="Resonite.SkyFrost.Base" Version="2.1.0" />
48+
<PackageReference Include="Resonite.SkyFrost.Base.Models" Version="2.1.0" />
4749
</ItemGroup>
4850
</Project>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using FrooxEngine;
2+
using HarmonyLib;
3+
using MonkeyLoader.Resonite;
4+
using SkyFrost.Base;
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Text;
8+
9+
namespace CommunityBugFixCollection
10+
{
11+
[HarmonyPatchCategory(nameof(HighlightHomeWorldInInventory))]
12+
[HarmonyPatch(typeof(InventoryBrowser), nameof(InventoryBrowser.ProcessItem))]
13+
internal sealed class HighlightHomeWorldInInventory : ResoniteMonkey<HighlightHomeWorldInInventory>
14+
{
15+
public override bool CanBeDisabled => true;
16+
17+
private static void Postfix(InventoryBrowser __instance, InventoryItemUI item)
18+
{
19+
if (InventoryBrowser.ClassifyItem(item) != InventoryBrowser.SpecialItemType.World
20+
|| __instance.GetItemWorldUri(item) != __instance.Engine.Cloud.Profile.GetCurrentFavorite(FavoriteEntity.Home))
21+
return;
22+
23+
item.NormalColor.Value = InventoryBrowser.FAVORITE_COLOR;
24+
item.SelectedColor.Value = InventoryBrowser.FAVORITE_COLOR.MulRGB(2f);
25+
}
26+
27+
private static bool Prepare() => Enabled;
28+
}
29+
}

0 commit comments

Comments
 (0)