Skip to content
Open
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
1 change: 1 addition & 0 deletions MultiplayerExtensions/Environment/MpexAvatarNameTag.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using HMUI;
using BeatSaber.AvatarCore;
using MultiplayerCore.Players;
using MultiplayerExtensions.Players;
using MultiplayerExtensions.Utilities;
Expand Down
8 changes: 4 additions & 4 deletions MultiplayerExtensions/Environment/MpexPlayerTableCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class MpexPlayerTableCell : IInitializable, IDisposable, IAffinity

internal MpexPlayerTableCell(
ServerPlayerListViewController playerListView,
NetworkPlayerEntitlementChecker entitlementChecker,
MpEntitlementChecker entitlementChecker,
ILobbyPlayersDataModel playersDataModel,
IMenuRpcManager menuRpcManager)
{
Expand All @@ -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<AdditionalContentModel.EntitlementStatus> getLevelEntitlementTask, Image ____localPlayerBackgroundImage)
public void SetDataPrefix(IConnectedPlayer connectedPlayer, ILobbyPlayerData playerData, bool hasKickPermissions, bool allowSelection, Task<EntitlementsStatus> 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<AdditionalContentModel.EntitlementStatus> getLevelEntitlementTask, Image ____localPlayerBackgroundImage)
public void SetDataPostfix(IConnectedPlayer connectedPlayer, ILobbyPlayerData playerData, bool hasKickPermissions, bool allowSelection, Task<EntitlementsStatus> getLevelEntitlementTask, Image ____localPlayerBackgroundImage)
{
____localPlayerBackgroundImage.enabled = true;
string? hostSelectedLevel = _playersDataModel[_playersDataModel.partyOwnerId].beatmapLevel?.beatmapLevel?.levelID;
Expand Down
38 changes: 30 additions & 8 deletions MultiplayerExtensions/MultiplayerExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>MultiplayerExtensions</AssemblyName>
<AssemblyVersion>1.0.3</AssemblyVersion>
<AssemblyVersion>1.0.4</AssemblyVersion>
<TargetFramework>net472</TargetFramework>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
Expand All @@ -17,8 +17,10 @@
<Nullable>enable</Nullable>
<VersionType>Unofficial</VersionType>
<CommitHash>local</CommitHash>
<GitBranch></GitBranch>
<GitModified></GitModified>
<GitBranch>
</GitBranch>
<GitModified>
</GitModified>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>false</Optimize>
Expand All @@ -40,6 +42,21 @@
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BeatSaber.AvatarCore" Publicize="true">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.AvatarCore.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BGLib.AppFlow" Publicize="true">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BGLib.UnityExtension">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BGNet">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGNet.dll</HintPath>
<Private>False</Private>
Expand Down Expand Up @@ -71,6 +88,11 @@
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Networking">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Networking.dll</HintPath>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Polyglot">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Polyglot.dll</HintPath>
<Private>False</Private>
Expand All @@ -84,7 +106,7 @@
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Main">
<Reference Include="Main" Publicize="true">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll</HintPath>
<Private>False</Private>
</Reference>
Expand Down Expand Up @@ -203,14 +225,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="BeatSaberModdingTools.Tasks">
<Version>1.3.2</Version>
<Version>1.4.3</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" />
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.2" PrivateAssets="all" />
<!-- Publicize directly when referencing -->
<Reference Include="$(BeatSaberDir)\Plugins\MultiplayerCore.dll" Publicize="true" />
</ItemGroup>
Expand All @@ -237,4 +259,4 @@
</PropertyGroup>
<Message Text="Version $(InformationalVersion)" Importance="high" />
</Target>
</Project>
</Project>
7 changes: 4 additions & 3 deletions MultiplayerExtensions/Patches/AvatarPoseRestrictionPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HarmonyLib;
using BeatSaber.AvatarCore;
using HarmonyLib;
using UnityEngine;

namespace MultiplayerExtensions.Patches
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions MultiplayerExtensions/UI/MpexSettingsViewController.bsml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<horizontal anchor-min-y='1' bg='panel-top' pad-left='10' pad-right='10' horizontal-fit='PreferredSize'>
</horizontal>
<settings-container>
<toggle-setting value='hide-player-platforms' apply-on-change='true' text='Hide Player Platforms' hover-hint="Hides other player's platforms in game." bind-value='true'/>
<toggle-setting value='hide-player-lights' apply-on-change='true' text='Hide Player Lights' hover-hint="Hides other player's platform lights in game." bind-value='true'/>
<toggle-setting value='hide-player-objects' apply-on-change='true' text='Hide Player Objects' hover-hint="Hides other player's notes and walls in game." bind-value='true'/>
<toggle-setting value='hide-player-platforms' apply-on-change='true' text='Hide Player Platforms' hover-hint="Hides other players' platforms in game." bind-value='true'/>
<toggle-setting value='hide-player-lights' apply-on-change='true' text='Hide Player Lights' hover-hint="Hides other players' platform lights in game." bind-value='true'/>
<toggle-setting value='hide-player-objects' apply-on-change='true' text='Hide Player Objects' hover-hint="Hides other players' notes, bombs and walls in game." bind-value='true'/>
<toggle-setting value='miss-lighting' apply-on-change='true' text='Miss Lighting' hover-hint="Turns a player's platform red when they miss a note." bind-value='true'/>
<toggle-setting id='personal-miss-lighting-toggle' value='personal-miss-lighting-only' apply-on-change='true' text='Personal Only Miss Lighting' hover-hint="Makes miss lighting only apply to your platform." bind-value='true'/>
</settings-container>
Expand Down
4 changes: 2 additions & 2 deletions MultiplayerExtensions/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down