

White Knuckle BepInEx Common Library — Shared utilities for huoyan1231's White Knuckle mods
White Knuckle BepInEx 公共组件库 — huoyan1231 系列 White Knuckle Mod 的共享工具库
WK_huoyan1231COMLib is a shared BepInEx library (plugin) used by huoyan1231's White Knuckle mods.
It provides common utilities that multiple mods can share, avoiding code duplication.
Ported and extended from WKUnlimitedTrinkets:
CL_Leaderboard.WK_Leaderboard_Core.disableLeaderboards = trueM_Gamemode.Finish) to prevent state leaking into subsequent runs.Other mods can use the LeaderboardManager static class:
// Disable leaderboards for this run (call from your StartFreshGamemode patch)
LeaderboardManager.DisableForThisRun("your.mod.guid");
// Re-enable your request (will only restore if all other mods also cleared)
LeaderboardManager.TryRestore("your.mod.guid");
// Check if the current Trinket selection exceeds vanilla budget
bool exceeded = LeaderboardManager.IsTrinketBudgetExceeded(trinketNamesList);
WK_huoyan1231COMLib.dll in:<Game Root>/BepInEx/plugins/
A config file will be generated in BepInEx/config/ after first run:
huoyan1231.whiteknuckle.comlib.cfg
| Setting | Default | Description |
|---|---|---|
EnableLeaderboardManagement |
true |
Set to false to disable all leaderboard management patches |
| Mod | Purpose |
|---|---|
WKUnlimitedTrinkets |
Leaderboard logic was ported from here |
WK_huoyan1231COMLib 是一个 BepInEx 共享库插件,供 huoyan1231 的 White Knuckle 系列 Mod 使用。
它提供多个 Mod 可复用的公共工具,避免重复实现相同逻辑。
从 WKUnlimitedTrinkets 移植并扩展:
CL_Leaderboard.WK_Leaderboard_Core.disableLeaderboards 设为 trueM_Gamemode.Finish)后完全重置排行榜状态,防止污染后续局其他 Mod 可使用 LeaderboardManager 静态类:
// 禁用排行榜(在你的 StartFreshGamemode Patch 中调用)
LeaderboardManager.DisableForThisRun("your.mod.guid");
// 撤销你的禁用请求(只有所有 Mod 都撤销后才真正恢复)
LeaderboardManager.TryRestore("your.mod.guid");
// 检查当前 Trinket 组合是否超出原版预算
bool exceeded = LeaderboardManager.IsTrinketBudgetExceeded(trinketNamesList);
WK_huoyan1231COMLib.dll 放入:<游戏根目录>/BepInEx/plugins/
首次运行后会在 BepInEx/config/ 生成配置文件:
huoyan1231.whiteknuckle.comlib.cfg
| 配置项 | 默认值 | 说明 |
|---|---|---|
EnableLeaderboardManagement |
true |
设为 false 可禁用所有排行榜管理补丁 |
Requires .NET SDK (>= 6.0) / 需要 .NET SDK (>= 6.0)
dotnet build WK_huoyan1231COMLib.csproj -c Release
Output / 输出:bin/Release/net471/WK_huoyan1231COMLib.dll
The leaderboard management logic is ported from WKUnlimitedTrinkets and extended to support multiple mod coordination.
排行榜管理逻辑从 WKUnlimitedTrinkets 移植而来,并扩展为支持多 Mod 协调的公共接口。
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
本项目采用 GNU 通用公共许可证第三版 (GPL-3.0) 授权。
See LICENSE file for full text. / 完整许可证文本见 LICENSE 文件。
This code was generated with assistance from AI (WorkBuddy).
本代码在 AI(WorkBuddy)辅助下生成。所有代码经项目维护者审查。