Compare commits
5 Commits
v4.0.4
...
9e7fb4d443
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e7fb4d443 | |||
| 6ab8c38109 | |||
| 9a5d149241 | |||
|
|
f193d8a805 | ||
|
|
00960eb3f7 |
@@ -13,7 +13,7 @@ public static class AddFriendButton
|
|||||||
Name = "Add Friend",
|
Name = "Add Friend",
|
||||||
GetText = player => "加好友",
|
GetText = player => "加好友",
|
||||||
Condition = player =>
|
Condition = player =>
|
||||||
!PlayerManager.IsLocalPlayer(PlayerManager.LocalPlayer)
|
!PlayerManager.IsLocalPlayer(player)
|
||||||
&& !player.IsFriend,
|
&& !player.IsFriend,
|
||||||
OnClick = player =>
|
OnClick = player =>
|
||||||
{
|
{
|
||||||
|
|||||||
22
Patches/DistanceFilterPatch.cs
Normal file
22
Patches/DistanceFilterPatch.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using System.Reflection.Emit;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using HarmonyLib;
|
||||||
|
using stick.plugins.playermanager;
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(MatchmakingHandler), "OnRandomServerJoinFailed")]
|
||||||
|
class DistanceFilterPatch
|
||||||
|
{
|
||||||
|
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
|
||||||
|
{
|
||||||
|
return new CodeMatcher(instructions)
|
||||||
|
.MatchForward(false,
|
||||||
|
new CodeMatch(OpCodes.Ldc_I4_1),
|
||||||
|
new CodeMatch(OpCodes.Stloc_0)
|
||||||
|
)
|
||||||
|
.SetInstruction(
|
||||||
|
new CodeInstruction(OpCodes.Ldsfld,
|
||||||
|
AccessTools.Field(typeof(PlayerManager), nameof(PlayerManager.lobbyDistanceFilter))))
|
||||||
|
.InstructionEnumeration();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -293,6 +293,8 @@ public class PlayerManager : BaseUnityPlugin
|
|||||||
}
|
}
|
||||||
Harmony.CreateAndPatchAll(typeof(ApplyBlacklist));
|
Harmony.CreateAndPatchAll(typeof(ApplyBlacklist));
|
||||||
Harmony.CreateAndPatchAll(typeof(ListenForChange));
|
Harmony.CreateAndPatchAll(typeof(ListenForChange));
|
||||||
|
Harmony.CreateAndPatchAll(typeof(MutePatch));
|
||||||
|
Harmony.CreateAndPatchAll(typeof(DistanceFilterPatch));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -19,6 +19,14 @@
|
|||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
|
### v4.0.6
|
||||||
|
1. 大厅搜索范围按钮现在可同步修改快速匹配的搜索范围
|
||||||
|
2. 修复了禁音功能 *难道他真的是猪??*
|
||||||
|
|
||||||
|
### v4.0.5
|
||||||
|
|
||||||
|
1. 修复了加好友按钮始终不显示的问题 *难道他真的是猪??*
|
||||||
|
|
||||||
### v4.0.4
|
### v4.0.4
|
||||||
|
|
||||||
1. 房间列表现在在房间内也显示,但是点击无效
|
1. 房间列表现在在房间内也显示,但是点击无效
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net35</TargetFramework>
|
<TargetFramework>net35</TargetFramework>
|
||||||
<AssemblyName>stick.plugins.playermanager</AssemblyName>
|
<AssemblyName>stick.plugins.playermanager</AssemblyName>
|
||||||
<Product>PlayerManager</Product>
|
<Product>PlayerManager</Product>
|
||||||
<Version>4.0.4</Version>
|
<Version>4.0.6</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources>
|
||||||
|
|||||||
Reference in New Issue
Block a user