Açıklama Yok

PJ568 6e9c225b43 【更改】移除限制提示仅保留按钮置灰 1 ay önce
.githooks a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
.github a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
docs 6e9c225b43 【更改】移除限制提示仅保留按钮置灰 1 ay önce
scripts a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
src 6e9c225b43 【更改】移除限制提示仅保留按钮置灰 1 ay önce
tests 6e9c225b43 【更改】移除限制提示仅保留按钮置灰 1 ay önce
.gitignore a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
Directory.Build.props a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
LICENSE a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
OneShot.slnx a90919d554 【初始】搭建 OneShot 插件骨架 1 ay önce
README.md 6e9c225b43 【更改】移除限制提示仅保留按钮置灰 1 ay önce

README.md

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

OneShot

让《Single Player Tushonka》客户端在本次会话里只能进一次战局的 SPT 客户端插件。

进入过一次战局(含藏身处)后,本插件会在本次 SPT 运行期间阻止你再开始新的战局;重启 SPT 即重置。适合“一把定输赢”或限制单次游玩时长的场景。

功能

  • 会话级限制:以“本次 SPT 进程”为单位,进入过一次战局或藏身处后不再允许开始新战局。
  • 可开关:在配置中随时启用/关闭限制。
  • 可重置:无需重启,在配置里勾选一次性重置项即可清除“已进过局”标记。

机制

  • 会话级:标记只存于内存,SPT 进程结束后自然消失,重启即恢复。
  • 触发条件:成功进入过至少一次战局或藏身处(判定钩子见 docs/principle.md)。
  • 被禁入口:在已有标记时,主菜单的“开始战局”与“重连”入口会被置灰、不可点击,不显示提示(仅前端限制,见“已知限制”);藏身处入口不受限,仍可进入。

安装

  1. 下载 Releases 中的 OneShot-v{版本}.zip。
  2. 解压到游戏根目录,使 dll 位于 BepInEx/plugins/OneShot/OneShot.dll。
  3. 启动游戏。

构建

# 指定游戏根目录(未设置时回退到本机 Lutris 前缀默认路径)
export SPT_DIR="/path/to/Escape from Tarkov"
dotnet build src/OneShot.Plugin/OneShot.Plugin.csproj -c Release -p:DeployToGame=false

纯逻辑单元测试:

dotnet test tests/OneShot.Tests/OneShot.Tests.csproj -c Release

配置

游戏内按 F12(SPT 默认;可在其配置中改键)打开 BepInEx ConfigurationManager,找到 OneShot 分区:

配置项 默认 说明
启用限制 / Enable Restriction 开 总开关;关闭后不再阻止开始新战局。
重置已进局标记 / Reset Entered Flag 关 勾选以清除“已进过局”标记,触发后自动取消勾选。

已知限制

  • 仅前端限制,可被绕过:本插件在客户端 UI/流程层拦截,无法阻止直接构造网络请求或绕过客户端的行为。
  • 会话级:标记不落盘,进程结束后清除;这不是持久化或反作弊机制。

许可证

MIT

===============================================================

OneShot

An SPT client plugin that lets you enter only one raid per Single Player Tushonka session.

Once a raid (or the hideout) has been entered, the plugin blocks starting another raid for the rest of this SPT run; restarting SPT resets it. Useful for "one life" or single-session play.

Features

  • Session-scoped: the flag lives in memory for the SPT process; entering a raid or the hideout blocks further raid starts until restart.
  • Toggleable: enable/disable the restriction from config at any time.
  • Resettable: clear the "entered" flag from a one-shot config item without restarting.

How it works

  • Session-scoped: the flag is in-memory only and disappears when the SPT process ends.
  • Trigger: at least one raid or hideout entry has succeeded (hook points in docs/principle.md).
  • Blocked entry: once flagged, the main-menu "Play" and "Reconnect" entries are greyed out and unclickable, with no tooltip (client-side only, see limitations); the hideout entry stays available.

Installation

  1. Download OneShot-v{version}.zip from Releases.
  2. Extract it into the game root so the dll lands at BepInEx/plugins/OneShot/OneShot.dll.
  3. Launch the game.

Build

# Point at the game root (falls back to the local Lutris prefix by default)
export SPT_DIR="/path/to/Escape from Tarkov"
dotnet build src/OneShot.Plugin/OneShot.Plugin.csproj -c Release -p:DeployToGame=false

Pure-logic unit tests:

dotnet test tests/OneShot.Tests/OneShot.Tests.csproj -c Release

Configuration

Press F12 in game (the SPT default; rebindable in its config) to open BepInEx ConfigurationManager, then find the OneShot section:

Option Default Description
启用限制 / Enable Restriction On Master switch; when off, starting a new raid is no longer blocked.
重置已进局标记 / Reset Entered Flag Off Check to clear the "entered" flag; it unchecks itself afterwards.

Known limitations

  • Client-side only and bypassable: the plugin intercepts at the client UI/flow layer and cannot stop crafted network requests or other bypasses.
  • Session-scoped: the flag is not persisted and is cleared when the process ends; this is not a persistence or anti-cheat mechanism.

License

MIT

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%