Skip to content

Commit 0c3e6bf

Browse files
committed
Some tweaks
1 parent e22c685 commit 0c3e6bf

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ internal sealed class CaseInsensitiveCustomGenerics : Monkey<CaseInsensitiveCust
2323

2424
protected override bool OnLoaded()
2525
{
26-
return false;
27-
2826
if (!Enabled)
2927
return true;
3028

CommunityBugFixCollection/CommunityBugFixCollection.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageId>CommunityBugFixCollection</PackageId>
1212
<Title>Community Bug-Fix Collection</Title>
1313
<Authors>Banane9; Nytra; art0007i; LeCloutPanda; goat; __Choco__; LJ; 989onan</Authors>
14-
<Version>0.8.1-beta</Version>
14+
<Version>0.8.2-beta</Version>
1515
<Description>This MonkeyLoader mod for Resonite that fixes various small Resonite-issues that are still open.</Description>
1616
<PackageReadmeFile>README.md</PackageReadmeFile>
1717
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>

CommunityBugFixCollection/CopySyncMemberToClipboardAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ protected override Task Handle(InspectorMemberActionsMenuItemsGenerationEvent ev
2929
// Context Menu is local user only anyways, no need to use local action button
3030
menuItem.Button.LocalPressed += (button, _) =>
3131
{
32-
button.World.InputInterface.Clipboard.SetText(field.BoxedValue.ToString());
33-
button.World.LocalUser.CloseContextMenu(eventData.MemberActions);
32+
button.World.InputInterface.Clipboard?.SetText(field.BoxedValue.ToString()!);
33+
button.World.LocalUser.CloseContextMenu(eventData.Summoner);
3434
};
3535

3636
return Task.CompletedTask;

CommunityBugFixCollection/ImportMultipleAudioFiles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private static async Task ImportAudioAsync(IEnumerable<string> files, World worl
5454

5555
await default(ToBackground);
5656

57-
Uri uri;
57+
Uri? uri;
5858
if (File.Exists(file))
5959
uri = await world.Engine.LocalDB.ImportLocalAssetAsync(file, LocalDB.ImportLocation.Original);
6060
else if (!Uri.TryCreate(file, UriKind.Absolute, out uri))

CommunityBugFixCollection/LocalizedByteFormatting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace CommunityBugFixCollection
1818
[HarmonyPatchCategory(nameof(LocalizedByteFormatting))]
1919
internal sealed class LocalizedByteFormatting : ResoniteAsyncEventHandlerMonkey<LocalizedByteFormatting, LocaleLoadingEvent>, IConfiguredMonkey<BugFixOptions>
2020
{
21-
private static readonly ConditionalWeakTable<StorageUsageStatus, CultureInfo> _lastCultureByStorageStatus = new();
21+
private static readonly ConditionalWeakTable<StorageUsageStatus, CultureInfo> _lastCultureByStorageStatus = [];
2222

2323
public override IEnumerable<string> Authors { get; } = [.. Contributors.Banane9, .. Contributors.LJ];
2424

CommunityBugFixCollection/PauseAnimatorUpdates.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace CommunityBugFixCollection
1111
[HarmonyPatch(typeof(Animator), nameof(Animator.OnCommonUpdate))]
1212
internal sealed class PauseAnimatorUpdates : ResoniteBugFixMonkey<PauseAnimatorUpdates>
1313
{
14-
private static readonly ConditionalWeakTable<Animator, Box<float>> _lastPositionByAnimator = new();
14+
private static readonly ConditionalWeakTable<Animator, Box<float>> _lastPositionByAnimator = [];
1515

1616
public override IEnumerable<string> Authors { get; } = [.. Contributors.Banane9, .. Contributors.Onan];
1717

CommunityBugFixCollection/SteamVRFocusResolutionScale.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ public static bool Prefix(bool hasFocus)
2626
_lastInputFocus = hasFocus;
2727
return true;
2828
}
29+
30+
private static bool Prepare()
31+
=> AccessTools.TypeByName("Valve.VR.SteamVR_Render") is not null;
2932
}
3033
}

0 commit comments

Comments
 (0)