From 5d6104692499751904968b0753e68bb168cef91f Mon Sep 17 00:00:00 2001 From: "Vinyl Da.i'gyu-Kazotetsu" Date: Mon, 13 May 2024 23:40:59 -0700 Subject: [PATCH 1/2] Update for Beat Saber 1.34.2 --- .../Environment/MpexAvatarNameTag.cs | 1 + .../Environment/MpexPlayerTableCell.cs | 8 ++-- .../MultiplayerExtensions.csproj | 38 +++++++++++++++---- .../Patches/AvatarPoseRestrictionPatch.cs | 7 ++-- MultiplayerExtensions/manifest.json | 4 +- 5 files changed, 41 insertions(+), 17 deletions(-) diff --git a/MultiplayerExtensions/Environment/MpexAvatarNameTag.cs b/MultiplayerExtensions/Environment/MpexAvatarNameTag.cs index 8abf348..ad7c667 100644 --- a/MultiplayerExtensions/Environment/MpexAvatarNameTag.cs +++ b/MultiplayerExtensions/Environment/MpexAvatarNameTag.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using HMUI; +using BeatSaber.AvatarCore; using MultiplayerCore.Players; using MultiplayerExtensions.Players; using MultiplayerExtensions.Utilities; diff --git a/MultiplayerExtensions/Environment/MpexPlayerTableCell.cs b/MultiplayerExtensions/Environment/MpexPlayerTableCell.cs index d006367..6a688d3 100644 --- a/MultiplayerExtensions/Environment/MpexPlayerTableCell.cs +++ b/MultiplayerExtensions/Environment/MpexPlayerTableCell.cs @@ -25,7 +25,7 @@ public class MpexPlayerTableCell : IInitializable, IDisposable, IAffinity internal MpexPlayerTableCell( ServerPlayerListViewController playerListView, - NetworkPlayerEntitlementChecker entitlementChecker, + MpEntitlementChecker entitlementChecker, ILobbyPlayersDataModel playersDataModel, IMenuRpcManager menuRpcManager) { @@ -47,15 +47,15 @@ public void Dispose() [AffinityPrefix] [AffinityPatch(typeof(GameServerPlayerTableCell), nameof(GameServerPlayerTableCell.SetData))] - public void SetDataPrefix(IConnectedPlayer connectedPlayer, ILobbyPlayerData playerData, bool hasKickPermissions, bool allowSelection, Task getLevelEntitlementTask, Image ____localPlayerBackgroundImage) + public void SetDataPrefix(IConnectedPlayer connectedPlayer, ILobbyPlayerData playerData, bool hasKickPermissions, bool allowSelection, Task getLevelEntitlementTask, Image ____localPlayerBackgroundImage) { if (getLevelEntitlementTask != null) - getLevelEntitlementTask = Task.FromResult(AdditionalContentModel.EntitlementStatus.Owned); + getLevelEntitlementTask = Task.FromResult(EntitlementsStatus.Ok); } [AffinityPostfix] [AffinityPatch(typeof(GameServerPlayerTableCell), nameof(GameServerPlayerTableCell.SetData))] - public void SetDataPostfix(IConnectedPlayer connectedPlayer, ILobbyPlayerData playerData, bool hasKickPermissions, bool allowSelection, Task getLevelEntitlementTask, Image ____localPlayerBackgroundImage) + public void SetDataPostfix(IConnectedPlayer connectedPlayer, ILobbyPlayerData playerData, bool hasKickPermissions, bool allowSelection, Task getLevelEntitlementTask, Image ____localPlayerBackgroundImage) { ____localPlayerBackgroundImage.enabled = true; string? hostSelectedLevel = _playersDataModel[_playersDataModel.partyOwnerId].beatmapLevel?.beatmapLevel?.levelID; diff --git a/MultiplayerExtensions/MultiplayerExtensions.csproj b/MultiplayerExtensions/MultiplayerExtensions.csproj index c69176f..929e3c8 100644 --- a/MultiplayerExtensions/MultiplayerExtensions.csproj +++ b/MultiplayerExtensions/MultiplayerExtensions.csproj @@ -4,7 +4,7 @@ Library Properties MultiplayerExtensions - 1.0.3 + 1.0.4 net472 true portable @@ -17,8 +17,10 @@ enable Unofficial local - - + + + + false @@ -40,6 +42,21 @@ False False + + $(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.AvatarCore.dll + False + False + + + $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll + False + False + + + $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll + False + False + $(BeatSaberDir)\Beat Saber_Data\Managed\BGNet.dll False @@ -71,6 +88,11 @@ False False + + $(BeatSaberDir)\Beat Saber_Data\Managed\Networking.dll + False + False + $(BeatSaberDir)\Beat Saber_Data\Managed\Polyglot.dll False @@ -84,7 +106,7 @@ False False - + $(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll False @@ -203,14 +225,14 @@ - 1.3.2 + 1.4.3 runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + @@ -237,4 +259,4 @@ - + \ No newline at end of file diff --git a/MultiplayerExtensions/Patches/AvatarPoseRestrictionPatch.cs b/MultiplayerExtensions/Patches/AvatarPoseRestrictionPatch.cs index 625b835..0c1e0ca 100644 --- a/MultiplayerExtensions/Patches/AvatarPoseRestrictionPatch.cs +++ b/MultiplayerExtensions/Patches/AvatarPoseRestrictionPatch.cs @@ -1,4 +1,5 @@ -using HarmonyLib; +using BeatSaber.AvatarCore; +using HarmonyLib; using UnityEngine; namespace MultiplayerExtensions.Patches @@ -7,8 +8,8 @@ namespace MultiplayerExtensions.Patches public class AvatarPoseRestrictionPatch { [HarmonyPrefix] - [HarmonyPatch(typeof(AvatarPoseRestrictions), nameof(AvatarPoseRestrictions.HandleAvatarPoseControllerPositionsWillBeSet))] - private static bool DisableAvatarRestrictions(AvatarPoseRestrictions __instance, Vector3 headPosition, Vector3 leftHandPosition, Vector3 rightHandPosition, out Vector3 newHeadPosition, out Vector3 newLeftHandPosition, out Vector3 newRightHandPosition) + [HarmonyPatch(typeof(LimitAvatarPoseRestriction), nameof(LimitAvatarPoseRestriction.RestrictPose))] + private static bool DisableAvatarRestrictions(LimitAvatarPoseRestriction __instance, Vector3 headPosition, Vector3 leftHandPosition, Vector3 rightHandPosition, out Vector3 newHeadPosition, out Vector3 newLeftHandPosition, out Vector3 newRightHandPosition) { newHeadPosition = headPosition; newLeftHandPosition = leftHandPosition; diff --git a/MultiplayerExtensions/manifest.json b/MultiplayerExtensions/manifest.json index ea54257..653ab99 100644 --- a/MultiplayerExtensions/manifest.json +++ b/MultiplayerExtensions/manifest.json @@ -3,9 +3,9 @@ "id": "MultiplayerExtensions", "name": "MultiplayerExtensions", "author": "Goobwabber", - "version": "1.0.3", + "version": "1.0.4", "description": "Expands the functionality of Beat Saber Multiplayer.", - "gameVersion": "1.24.0", + "gameVersion": "1.34.2", "dependsOn": { "BSIPA": "^4.1.4", "BeatSaberMarkupLanguage": "^1.5.1", From 179b8dc7c24e020124d4766fd5a68f51c94fe387 Mon Sep 17 00:00:00 2001 From: "Vinyl Da.i'gyu-Kazotetsu" Date: Tue, 14 May 2024 10:26:49 -0700 Subject: [PATCH 2/2] Update grammar in UI strings --- MultiplayerExtensions/UI/MpexSettingsViewController.bsml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MultiplayerExtensions/UI/MpexSettingsViewController.bsml b/MultiplayerExtensions/UI/MpexSettingsViewController.bsml index f5770d6..2af0cc4 100644 --- a/MultiplayerExtensions/UI/MpexSettingsViewController.bsml +++ b/MultiplayerExtensions/UI/MpexSettingsViewController.bsml @@ -2,9 +2,9 @@ - - - + + +