7 Commits

Author SHA1 Message Date
Yue-bin
ab960fc38b chore(PlayerManager): 更新版本号至4.0.7
All checks were successful
Publish Release / build (push) Successful in 1m38s
- 将项目版本从4.0.6升级到4.0.7
- 保持其他配置不变
2026-06-19 20:41:59 +08:00
Yue-bin
a40a605c37 docs(readme): 添加作者信息并更新v4.0.7版本日志
- 添加项目作者信息到README文档
- 新增v4.0.7版本更新内容
- 包含大厅列表按钮点击状态标识功能说明
- 优化LocalPlayer初始化逻辑相关说明
2026-06-19 20:41:47 +08:00
Yue-bin
b19f906216 fix(PlayerManagerGUI): 修复大厅加入逻辑中的条件判断错误
修改了玩家管理GUI中大厅加入的条件判断逻辑,将内部的条件判断移到外部,
确保只有当不在大厅内时才能加入新的大厅,修复了可能的重复加入问题。

adhd???
2026-06-19 20:30:37 +08:00
Yue-bin
3ecb7fb78b fix(PlayerManager): 修复本地玩家初始化逻辑
当SteamManager已初始化但LocalPlayer为空时才创建新的LocalPlayer实例,
避免重复初始化问题。
2026-06-19 20:25:15 +08:00
Yue-bin
4e8931caba feat(gui): 添加已访问大厅的视觉标识功能
添加了ButtonPressed样式用于标识已进入过的大厅,
使用户能够直观区分未访问和已访问的大厅。

在PlayerManager中新增enteredLobbyList集合来跟踪已访问的大厅,
并在界面中根据访问状态显示不同的按钮颜色。
2026-06-19 20:24:29 +08:00
Yue-bin
3adcdc46ba Merge branch 'master' of 172.16.29.13:Stick_Mods/stick.plugins.playermanager
All checks were successful
Publish Release / build (push) Successful in 31s
2026-06-11 02:13:25 +08:00
Yue-bin
b6edc70594 chore(ci): 为.NET构建流程添加代理配置
在Gitea工作流中添加HTTP/HTTPS代理环境变量配置,
以解决网络访问问题并提高依赖包恢复速度。
2026-06-11 02:13:09 +08:00
6 changed files with 35 additions and 3 deletions

View File

@@ -21,6 +21,11 @@ jobs:
- name: Restore dependencies
run: dotnet restore
# 直接加代理得了
env:
http_proxy: "http://172.17.0.1:7890"
https_proxy: "http://172.17.0.1:7890"
no_proxy: "localhost,127.0.0.1,*.lan"
- name: Build
run: dotnet build --no-restore --configuration Release

View File

@@ -15,6 +15,9 @@ public static class GUIStyles
/// <summary>普通按钮样式fontSize=22, richText=false</summary>
public static GUIStyle Button;
/// <summary>被按过的按钮样式用于标识已经进入过的房间fontSize=22</summary>
public static GUIStyle ButtonPressed;
/// <summary>黄色按钮样式(已记录玩家)</summary>
public static GUIStyle YellowButton;
@@ -35,6 +38,8 @@ public static class GUIStyles
Label = new GUIStyle(GUI.skin.label) { fontSize = 22 };
Button = new GUIStyle(GUI.skin.button) { fontSize = 22, richText = false };
ButtonPressed = new GUIStyle(GUI.skin.button) { fontSize = 22, richText = false };
ButtonPressed.normal.textColor = Color.grey;
YellowButton = new GUIStyle(GUI.skin.button) { fontSize = 22, richText = false };
YellowButton.normal.textColor = Color.yellow;

View File

@@ -190,15 +190,21 @@ public static class PlayerManagerGUI
for (int i = 0; i < PlayerManager.lobbyDataList.Count; i++)
{
CSteamID lobbyId = PlayerManager.lobbyDataList[i];
var style = PlayerManager.enteredLobbyList.Contains(lobbyId) ? GUIStyles.ButtonPressed : GUIStyles.Button;
if (GUI.Button(
new Rect(Cursor.OffsetX, Cursor.LineHeight * i, 500f, 40f),
$"{lobbyId} 人数{SteamMatchmaking.GetNumLobbyMembers(lobbyId)}",
GUIStyles.Button
style
))
{
// 在大厅中则不加入
if (!PlayerManager.MatchmakingHandler.IsInsideLobby)
{
// 记录一下加入过的状态
PlayerManager.enteredLobbyList.Add(lobbyId);
PlayerManager.JoinSpecificServer(lobbyId);
}
}
}

View File

@@ -102,6 +102,11 @@ public class PlayerManager : BaseUnityPlugin
/// </summary>
public static List<CSteamID> lobbyDataList = [];
/// <summary>
/// 进入过的大厅列表
/// </summary>
public static HashSet<CSteamID> enteredLobbyList = [];
/// <summary>
/// 大厅距离过滤设置
/// </summary>
@@ -195,7 +200,7 @@ public class PlayerManager : BaseUnityPlugin
private void Update()
{
HandleInput();
if (SteamManager.Initialized)
if (SteamManager.Initialized && LocalPlayer is null)
{
LocalPlayer = new(SteamUser.GetSteamID());
}
@@ -434,6 +439,7 @@ public class PlayerManager : BaseUnityPlugin
{
Debug.Log("大厅列表请求完成: " + result.m_nLobbiesMatching + " 个大厅");
lobbyDataList = [];
enteredLobbyList = [];
uint lobbyCount = result.m_nLobbiesMatching;
for (uint i = 0; i < lobbyCount; i++)

View File

@@ -17,9 +17,19 @@
- 静音单个玩家
- 一键加好友
## 作者
老狼老狼几点钟、Moncak、z7572
## 更新日志
### v4.0.7
1. 现在点击大厅列表中的按钮进入大厅会在列表中将该大厅用灰色样式标识,标记已进入过
2. 现在不会在每帧都初始化一遍LocalPlayer *难道他真的是猪??*
### v4.0.6
1. 大厅搜索范围按钮现在可同步修改快速匹配的搜索范围
2. 修复了禁音功能 *难道他真的是猪??*

View File

@@ -4,7 +4,7 @@
<TargetFramework>net35</TargetFramework>
<AssemblyName>stick.plugins.playermanager</AssemblyName>
<Product>PlayerManager</Product>
<Version>4.0.6</Version>
<Version>4.0.7</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>