Преглед на файлове

【新增】扩展 SVT-40 与 AVT-40 跨枪配件兼容

PPSh-41 枪管槽新增 SVT-40 / AVT-40 共用的 7.62x54R 625mm 枪管;SVT-40 625mm 枪管的照门槽新增 TKPD 导轨防尘盖,且该防尘盖与 SVT-40 / AVT-40 枪本体双向互斥;SVT-40 标准枪口装置的准星槽新增 MDR BLK LBL ALX 16 / 20 脚架。

枪口准星槽挂在标准枪口装置而非枪管上,故注入目标为标准枪口装置,一处即覆盖 SVT-40 与 AVT-40。
PJ568 преди 1 месец
родител
ревизия
9a52f62da7
променени са 7 файла, в които са добавени 126 реда и са изтрити 27 реда
  1. 2 2
      README.md
  2. 3 3
      WeaponCrossModding.csproj
  3. 4 4
      docs/compatibility.md
  4. 8 4
      docs/features.md
  5. 8 8
      docs/verification.md
  6. 40 4
      src/Mod.cs
  7. 61 2
      tests/WeaponCrossModding.Tests/ModTests.cs

+ 2 - 2
README.md

@@ -16,7 +16,7 @@
 | CR 50DS 前准星槽与战术设备槽 | PPSh-41 枪管与枪托槽 |
 | CR 50DS 前准星槽与战术设备槽 | PPSh-41 枪管与枪托槽 |
 | --- | --- |
 | --- | --- |
 | ![Chiappa 犀牛 50DS 左轮手枪](assets/50DS.webp) | ![PPSh-41 冲锋枪](assets/PPSh.webp) |
 | ![Chiappa 犀牛 50DS 左轮手枪](assets/50DS.webp) | ![PPSh-41 冲锋枪](assets/PPSh.webp) |
-| 前准星槽装瞄具基座;战术设备槽装 RK 系列前握把。 | 枪管槽装莫辛纳甘、M700、ORSIS T-5000M 或 SKS / OP-SKS 枪管(并挂三轨);枪托槽装 M14ALCS (MOD-0) 枪托与 Zveno 缓冲管转接器;上机匣槽装 TAPCO Intrafuse 或 Fab Defence UAS SKS 枪身套件;SKS / OP-SKS 照门固定环的照门槽可装 TKPD 导轨防尘盖;730mm 莫辛枪管的准星槽可装 MDR BLK LBL ALX 脚架(16 / 20),AA-12 457mm 枪管的导轨槽可装 M60 脚架,MP-18 与 Marlin MXLR 的枪托槽可装 KS-23 金属枪托;此外 RPD 520mm 枪管的枪口装置槽可装 AKM PBS-1 消音器。 |
+| 前准星槽装瞄具基座;战术设备槽装 RK 系列前握把。 | 枪管槽装莫辛纳甘、M700、ORSIS T-5000M、SKS / OP-SKS 或 SVT-40 625mm 枪管(并挂三轨);枪托槽装 M14ALCS (MOD-0) 枪托与 Zveno 缓冲管转接器;上机匣槽装 TAPCO Intrafuse 或 Fab Defence UAS SKS 枪身套件;SKS / OP-SKS 照门固定环与 SVT-40 625mm 枪管的照门槽可装 TKPD 导轨防尘盖(该防尘盖与 SKS / OP-SKS / SVT-40 / AVT-40 枪本体互斥);730mm 莫辛枪管与 SVT-40 标准枪口装置的准星槽可装 MDR BLK LBL ALX 脚架(16 / 20),AA-12 457mm 枪管的导轨槽可装 M60 脚架,MP-18 与 Marlin MXLR 的枪托槽可装 KS-23 金属枪托;此外 RPD 520mm 枪管的枪口装置槽可装 AKM PBS-1 消音器。 |
 
 
 ## 文档
 ## 文档
 
 
@@ -54,7 +54,7 @@ All injections are idempotent: an id already present is never added twice.
 | CR 50DS front sight and tactical slots | PPSh-41 barrel and stock slots |
 | CR 50DS front sight and tactical slots | PPSh-41 barrel and stock slots |
 | --- | --- |
 | --- | --- |
 | ![Chiappa Rhino 50DS revolver](assets/50DS.webp) | ![PPSh-41 SMG](assets/PPSh.webp) |
 | ![Chiappa Rhino 50DS revolver](assets/50DS.webp) | ![PPSh-41 SMG](assets/PPSh.webp) |
-| The front sight slot takes a scope base; the tactical slot takes an RK-series foregrip. | The barrel slot takes a Mosin, M700, ORSIS T-5000M or SKS / OP-SKS barrel (with the tri-rail mounted on it); the stock slot takes the M14ALCS (MOD-0) buttstock and the Zveno buffer tube adapter; the upper receiver slot takes a TAPCO Intrafuse or Fab Defence UAS SKS chassis kit; the SKS / OP-SKS rear sight blocks' sight slot takes the TKPD railed dust cover; the 730 mm Mosin barrel's front sight slot takes an MDR BLK LBL ALX bipod (16 / 20), the AA-12 457 mm barrel's rail slot takes an M60 bipod, and the MP-18 and Marlin MXLR stock slots take a KS-23 metal stock; additionally, the RPD 520 mm barrel's muzzle device slot takes an AKM PBS-1 suppressor. |
+| The front sight slot takes a scope base; the tactical slot takes an RK-series foregrip. | The barrel slot takes a Mosin, M700, ORSIS T-5000M, SKS / OP-SKS or SVT-40 625 mm barrel (with the tri-rail mounted on it); the stock slot takes the M14ALCS (MOD-0) buttstock and the Zveno buffer tube adapter; the upper receiver slot takes a TAPCO Intrafuse or Fab Defence UAS SKS chassis kit; the SKS / OP-SKS rear sight blocks' and the SVT-40 625 mm barrel's sight slot take the TKPD railed dust cover (which is incompatible with the SKS / OP-SKS / SVT-40 / AVT-40 weapons); the 730 mm Mosin barrel's and the SVT-40 standard muzzle's front sight slots take an MDR BLK LBL ALX bipod (16 / 20), the AA-12 457 mm barrel's rail slot takes an M60 bipod, and the MP-18 and Marlin MXLR stock slots take a KS-23 metal stock; additionally, the RPD 520 mm barrel's muzzle device slot takes an AKM PBS-1 suppressor. |
 
 
 ## Documentation
 ## Documentation
 
 

+ 3 - 3
WeaponCrossModding.csproj

@@ -13,9 +13,9 @@
       钉到 4.1.2 是当前最稳的策略;服务端校验 mod 编译引用的 SPTarkov.Server.Core
       钉到 4.1.2 是当前最稳的策略;服务端校验 mod 编译引用的 SPTarkov.Server.Core
       AssemblyVersion,使用 4.1.2 编译的 mod 可被 4.1.5 宿主加载。
       AssemblyVersion,使用 4.1.2 编译的 mod 可被 4.1.5 宿主加载。
     -->
     -->
-    <Version>0.4.0</Version>
-    <AssemblyVersion>0.4.0.0</AssemblyVersion>
-    <FileVersion>0.4.0.0</FileVersion>
+    <Version>0.5.0</Version>
+    <AssemblyVersion>0.5.0.0</AssemblyVersion>
+    <FileVersion>0.5.0.0</FileVersion>
     <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
     <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
   </PropertyGroup>
   </PropertyGroup>
 
 

+ 4 - 4
docs/compatibility.md

@@ -11,9 +11,9 @@
   - 这些物品作为**白名单新增项**时,插件只追加 id,不要求其存在,因此无论该模组是否安装都能正常加载。
   - 这些物品作为**白名单新增项**时,插件只追加 id,不要求其存在,因此无论该模组是否安装都能正常加载。
   - 这些物品作为**冲突目标**时(HUXWRX 消音器),若其尚未注入,插件仅记 `Debug` 并跳过;由于 PPSh-41 防尘盖一侧的冲突记录仍会建立,互斥关系依旧成立,并避免了对第三方模组加载顺序的依赖。
   - 这些物品作为**冲突目标**时(HUXWRX 消音器),若其尚未注入,插件仅记 `Debug` 并跳过;由于 PPSh-41 防尘盖一侧的冲突记录仍会建立,互斥关系依旧成立,并避免了对第三方模组加载顺序的依赖。
   - Marlin MXLR 杠杆步枪由该模组注入,且本插件将其用作**槽位宿主**(区别于仅作白名单新增项的其它 WTT 物品);若其未在本插件运行前注入,对应条目会记 `not found in Items` 警告并跳过。
   - Marlin MXLR 杠杆步枪由该模组注入,且本插件将其用作**槽位宿主**(区别于仅作白名单新增项的其它 WTT 物品);若其未在本插件运行前注入,对应条目会记 `not found in Items` 警告并跳过。
-- **原版物品**:RPD 520mm 枪管、M700 全部 4 种枪管、ORSIS T-5000M 660mm 枪管、SKS 与 OP-SKS 的 520mm 枪管、TAPCO Intrafuse SKS 枪身套件、Fab Defence UAS SKS 枪身套件及其枪托槽配件(TAPCO Intrafuse 缓冲管、Fab Defence UAS 折叠枪托)、SKS / OP-SKS 照门固定环、SKS / OP-SKS 枪本体、PPSh-41 71 发弹鼓,以及 AKM PBS-1 7.62x39 消音器均为原版物品,不依赖 `WTT-ContentBackport`。
+- **原版物品**:RPD 520mm 枪管、M700 全部 4 种枪管、ORSIS T-5000M 660mm 枪管、SKS 与 OP-SKS 的 520mm 枪管、TAPCO Intrafuse SKS 枪身套件、Fab Defence UAS SKS 枪身套件及其枪托槽配件(TAPCO Intrafuse 缓冲管、Fab Defence UAS 折叠枪托)、SKS / OP-SKS 照门固定环、SKS / OP-SKS / SVT-40 / AVT-40 枪本体与 SVT-40 625mm 枪管、PPSh-41 71 发弹鼓,以及 AKM PBS-1 7.62x39 消音器均为原版物品,不依赖 `WTT-ContentBackport`。
 - **PPSh-41 上机匣槽**:`mod_reciever` 槽同时承载 PPSh-41 防尘盖、TAPCO Intrafuse SKS 与 Fab Defence UAS SKS 枪身套件,共用同一槽位,因此彼此天然二选一。
 - **PPSh-41 上机匣槽**:`mod_reciever` 槽同时承载 PPSh-41 防尘盖、TAPCO Intrafuse SKS 与 Fab Defence UAS SKS 枪身套件,共用同一槽位,因此彼此天然二选一。
-- **新增互斥**:两个 SKS 枪身套件与除 KS-23 金属枪托之外的全部 PPSh-41 枪托(含原装木制枪托与 Zveno 缓冲管转接器)互不兼容;两个 SKS 枪身套件与 PPSh-41 的 71 发弹鼓互不兼容;KS-23 金属枪托与两个 SKS 枪身套件枪托槽可装的配件互不兼容;TKPD 导轨防尘盖与 SKS / OP-SKS 枪本体互不兼容。
+- **新增互斥**:两个 SKS 枪身套件与除 KS-23 金属枪托之外的全部 PPSh-41 枪托(含原装木制枪托与 Zveno 缓冲管转接器)互不兼容;两个 SKS 枪身套件与 PPSh-41 的 71 发弹鼓互不兼容;KS-23 金属枪托与两个 SKS 枪身套件枪托槽可装的配件互不兼容;TKPD 导轨防尘盖与 SKS / OP-SKS / SVT-40 / AVT-40 枪本体互不兼容。
 - 插件只改写物品数据库,不注册 Harmony patch,也不与客户端插件争抢运行时方法。
 - 插件只改写物品数据库,不注册 Harmony patch,也不与客户端插件争抢运行时方法。
 
 
 ## 已知限制
 ## 已知限制
@@ -48,9 +48,9 @@
   - When these items are **whitelist additions**, the plugin only appends their ids and does not require them to exist, so it loads fine whether or not that mod is installed.
   - When these items are **whitelist additions**, the plugin only appends their ids and does not require them to exist, so it loads fine whether or not that mod is installed.
   - When these items are **conflict targets** (the HUXWRX suppressors), if they are not yet injected the plugin only logs `Debug` and skips; because the PPSh-41 dust cover side still records the conflict, the exclusion still holds, avoiding any dependency on third-party load order.
   - When these items are **conflict targets** (the HUXWRX suppressors), if they are not yet injected the plugin only logs `Debug` and skips; because the PPSh-41 dust cover side still records the conflict, the exclusion still holds, avoiding any dependency on third-party load order.
   - The Marlin MXLR lever-action rifle is injected by that mod, and this plugin uses it as a **slot owner** (unlike other WTT items that are only whitelist additions); if it is not injected before this plugin runs, the affected entry logs a `not found in Items` warning and is skipped.
   - The Marlin MXLR lever-action rifle is injected by that mod, and this plugin uses it as a **slot owner** (unlike other WTT items that are only whitelist additions); if it is not injected before this plugin runs, the affected entry logs a `not found in Items` warning and is skipped.
-- **Vanilla items**: the RPD 520 mm barrel, all four M700 barrels, the ORSIS T-5000M 660 mm barrel, the SKS and OP-SKS 520 mm barrels, the TAPCO Intrafuse SKS chassis kit, the Fab Defence UAS SKS chassis kit and their stock-slot parts (TAPCO Intrafuse buffer tube, Fab Defence UAS folding stock), the SKS / OP-SKS rear sight blocks, the SKS / OP-SKS weapons, the PPSh-41 71-round drum magazine, and the AKM PBS-1 7.62x39 suppressor are all vanilla items and do not depend on `WTT-ContentBackport`.
+- **Vanilla items**: the RPD 520 mm barrel, all four M700 barrels, the ORSIS T-5000M 660 mm barrel, the SKS and OP-SKS 520 mm barrels, the TAPCO Intrafuse SKS chassis kit, the Fab Defence UAS SKS chassis kit and their stock-slot parts (TAPCO Intrafuse buffer tube, Fab Defence UAS folding stock), the SKS / OP-SKS rear sight blocks, the SKS / OP-SKS / SVT-40 / AVT-40 weapons and the SVT-40 625 mm barrel, the PPSh-41 71-round drum magazine, and the AKM PBS-1 7.62x39 suppressor are all vanilla items and do not depend on `WTT-ContentBackport`.
 - **PPSh-41 upper receiver slot**: the `mod_reciever` slot carries the PPSh-41 dust cover, the TAPCO Intrafuse SKS and the Fab Defence UAS SKS chassis kits; since they share the same slot, they are inherently an either/or choice.
 - **PPSh-41 upper receiver slot**: the `mod_reciever` slot carries the PPSh-41 dust cover, the TAPCO Intrafuse SKS and the Fab Defence UAS SKS chassis kits; since they share the same slot, they are inherently an either/or choice.
-- **New exclusions**: the two SKS chassis kits are incompatible with every PPSh-41 stock except the KS-23 metal stock (including the PPSh wooden stock and the Zveno buffer tube adapter) and with the PPSh-41 71-round drum magazine; the KS-23 metal stock is incompatible with the parts accepted by the two SKS chassis kits' stock slots; the TKPD railed dust cover is incompatible with the SKS and OP-SKS weapons.
+- **New exclusions**: the two SKS chassis kits are incompatible with every PPSh-41 stock except the KS-23 metal stock (including the PPSh wooden stock and the Zveno buffer tube adapter) and with the PPSh-41 71-round drum magazine; the KS-23 metal stock is incompatible with the parts accepted by the two SKS chassis kits' stock slots; the TKPD railed dust cover is incompatible with the SKS, OP-SKS, SVT-40 and AVT-40 weapons.
 - The plugin only rewrites the item database. It registers no Harmony patch and never contends with client plugins for runtime methods.
 - The plugin only rewrites the item database. It registers no Harmony patch and never contends with client plugins for runtime methods.
 
 
 ## Known Limitations
 ## Known Limitations

+ 8 - 4
docs/features.md

@@ -8,12 +8,14 @@
 - CR 200DS、CR 50DS 的 `mod_sight_front` 前准星槽:新增 UZI StormWerkz 顶盖导轨与 MP-18 瞄具基座。
 - CR 200DS、CR 50DS 的 `mod_sight_front` 前准星槽:新增 UZI StormWerkz 顶盖导轨与 MP-18 瞄具基座。
 - Aim Sports“三轨”莫辛步枪导轨的 `mod_scope` 槽:新增 M14 SAGE International DCSB 瞄具基座。
 - Aim Sports“三轨”莫辛步枪导轨的 `mod_scope` 槽:新增 M14 SAGE International DCSB 瞄具基座。
 - SKS / OP-SKS 照门固定环的 `mod_sight_rear` 照门槽:新增 TKPD 导轨防尘盖。
 - SKS / OP-SKS 照门固定环的 `mod_sight_rear` 照门槽:新增 TKPD 导轨防尘盖。
+- SVT-40 625mm 枪管的 `mod_sight_rear` 照门槽:新增 TKPD 导轨防尘盖。
 
 
 ## 枪管与枪托
 ## 枪管与枪托
 
 
-- PPSh-41 冲锋枪的 `mod_barrel` 枪管槽:新增莫辛纳甘全部 4 种尺寸枪管(200mm 锯短、220mm 锯短螺纹、514mm 卡宾、730mm 标准)、M700 全部 4 种枪管(26 英寸、20 英寸螺纹、26 英寸不锈钢、20 英寸不锈钢螺纹)、ORSIS T-5000M 660mm 枪管与 SKS / OP-SKS 的 520mm 枪管。
+- PPSh-41 冲锋枪的 `mod_barrel` 枪管槽:新增莫辛纳甘全部 4 种尺寸枪管(200mm 锯短、220mm 锯短螺纹、514mm 卡宾、730mm 标准)、M700 全部 4 种枪管(26 英寸、20 英寸螺纹、26 英寸不锈钢、20 英寸不锈钢螺纹)、ORSIS T-5000M 660mm 枪管、SKS / OP-SKS 的 520mm 枪管与 SVT-40 / AVT-40 共用的 625mm 枪管。
 - PPSh-41 冲锋枪的 `mod_stock` 枪托槽:新增 Benelli M3 可伸缩枪托、PKM 木制枪托、Zenit PT-2 "Klassika" PK 机枪枪托、PKP 聚合物枪托、Ultima MP-155 塑料手枪式握把、KS-23 金属枪托、M14 SAGE International M14ALCS (MOD-0) 枪托与 Zveno PK 缓冲管转接器(由 `WTT-ContentBackport` 注入)。
 - PPSh-41 冲锋枪的 `mod_stock` 枪托槽:新增 Benelli M3 可伸缩枪托、PKM 木制枪托、Zenit PT-2 "Klassika" PK 机枪枪托、PKP 聚合物枪托、Ultima MP-155 塑料手枪式握把、KS-23 金属枪托、M14 SAGE International M14ALCS (MOD-0) 枪托与 Zveno PK 缓冲管转接器(由 `WTT-ContentBackport` 注入)。
 - 730mm 标准莫辛枪管的 `mod_sight_front` 前准星槽:新增 MDR BLK LBL ALX 脚架(16 与 20 型号,由 `WTT-ContentBackport` 注入;与莫辛准星共用同一槽位,二者互斥)。
 - 730mm 标准莫辛枪管的 `mod_sight_front` 前准星槽:新增 MDR BLK LBL ALX 脚架(16 与 20 型号,由 `WTT-ContentBackport` 注入;与莫辛准星共用同一槽位,二者互斥)。
+- SVT-40 标准枪口装置的 `mod_sight_front` 前准星槽:新增 MDR BLK LBL ALX 脚架(16 与 20 型号,由 `WTT-ContentBackport` 注入;与原准星共用同一槽位,二者互斥)。
 - RPD 520mm 枪管的 `mod_muzzle` 枪口装置槽:新增 AKM PBS-1 7.62x39 消音器。
 - RPD 520mm 枪管的 `mod_muzzle` 枪口装置槽:新增 AKM PBS-1 7.62x39 消音器。
 - AA-12 457mm 枪管的 `mod_mount` 导轨槽:新增 M60 脚架。
 - AA-12 457mm 枪管的 `mod_mount` 导轨槽:新增 M60 脚架。
 - MP-18 与 Marlin MXLR 的 `mod_stock` 枪托槽:新增 KS-23 金属枪托。
 - MP-18 与 Marlin MXLR 的 `mod_stock` 枪托槽:新增 KS-23 金属枪托。
@@ -33,7 +35,7 @@
 - PPSh-41 机匣槽的两个 SKS 枪身套件(TAPCO Intrafuse、Fab Defence UAS)与除 KS-23 金属枪托之外的全部 PPSh-41 枪托(原装 PPSh 木制枪托、Benelli M3 可伸缩枪托、PKM 木制枪托、Zenit PT-2、PKP 聚合物枪托、Ultima MP-155 握把、M14ALCS (MOD-0) 枪托、Zveno PK 缓冲管转接器)互不兼容。
 - PPSh-41 机匣槽的两个 SKS 枪身套件(TAPCO Intrafuse、Fab Defence UAS)与除 KS-23 金属枪托之外的全部 PPSh-41 枪托(原装 PPSh 木制枪托、Benelli M3 可伸缩枪托、PKM 木制枪托、Zenit PT-2、PKP 聚合物枪托、Ultima MP-155 握把、M14ALCS (MOD-0) 枪托、Zveno PK 缓冲管转接器)互不兼容。
 - 两个 SKS 枪身套件与 PPSh-41 的 71 发弹鼓互不兼容。
 - 两个 SKS 枪身套件与 PPSh-41 的 71 发弹鼓互不兼容。
 - KS-23 金属枪托与两个 SKS 枪身套件枪托槽可装的配件(TAPCO Intrafuse 缓冲管、Fab Defence UAS 折叠枪托)互不兼容。
 - KS-23 金属枪托与两个 SKS 枪身套件枪托槽可装的配件(TAPCO Intrafuse 缓冲管、Fab Defence UAS 折叠枪托)互不兼容。
-- TKPD 导轨防尘盖与 SKS、OP-SKS 枪本体互不兼容。
+- TKPD 导轨防尘盖与 SKS、OP-SKS、SVT-40、AVT-40 枪本体互不兼容。
 
 
 ===============================================================
 ===============================================================
 
 
@@ -47,12 +49,14 @@
 - `mod_sight_front` slot of the CR 200DS and CR 50DS: adds the UZI StormWerkz top cover rail and the MP-18 scope base.
 - `mod_sight_front` slot of the CR 200DS and CR 50DS: adds the UZI StormWerkz top cover rail and the MP-18 scope base.
 - `mod_scope` slot of the Aim Sports tri-rail Mosin mount: adds the M14 SAGE International DCSB scope mount.
 - `mod_scope` slot of the Aim Sports tri-rail Mosin mount: adds the M14 SAGE International DCSB scope mount.
 - `mod_sight_rear` sight slot of the SKS / OP-SKS rear sight blocks: adds the TKPD railed dust cover.
 - `mod_sight_rear` sight slot of the SKS / OP-SKS rear sight blocks: adds the TKPD railed dust cover.
+- `mod_sight_rear` sight slot of the SVT-40 625 mm barrel: adds the TKPD railed dust cover.
 
 
 ## Barrels and stocks
 ## Barrels and stocks
 
 
-- `mod_barrel` slot of the PPSh-41: adds all four Mosin barrel lengths (200 mm sawn-off, 220 mm threaded sawn-off, 514 mm carbine, 730 mm standard), all four M700 barrel lengths (26-inch, 20-inch threaded, 26-inch stainless, 20-inch stainless threaded), the ORSIS T-5000M 660 mm barrel and the SKS / OP-SKS 520 mm barrels.
+- `mod_barrel` slot of the PPSh-41: adds all four Mosin barrel lengths (200 mm sawn-off, 220 mm threaded sawn-off, 514 mm carbine, 730 mm standard), all four M700 barrel lengths (26-inch, 20-inch threaded, 26-inch stainless, 20-inch stainless threaded), the ORSIS T-5000M 660 mm barrel, the SKS / OP-SKS 520 mm barrels and the 625 mm barrel shared by the SVT-40 / AVT-40.
 - `mod_stock` slot of the PPSh-41: adds the Benelli M3 telescopic stock, the PKM wooden stock, the Zenit PT-2 "Klassika" PK stock, the PKP polymer stock, the Ultima MP-155 plastic pistol grip, the KS-23 metal stock, the M14 SAGE International M14ALCS (MOD-0) buttstock and the Zveno PK buffer tube adapter (injected by `WTT-ContentBackport`).
 - `mod_stock` slot of the PPSh-41: adds the Benelli M3 telescopic stock, the PKM wooden stock, the Zenit PT-2 "Klassika" PK stock, the PKP polymer stock, the Ultima MP-155 plastic pistol grip, the KS-23 metal stock, the M14 SAGE International M14ALCS (MOD-0) buttstock and the Zveno PK buffer tube adapter (injected by `WTT-ContentBackport`).
 - `mod_sight_front` slot of the 730 mm standard Mosin barrel: adds the MDR BLK LBL ALX bipods (16 and 20 models, injected by `WTT-ContentBackport`; shared with the Mosin front sight, so the two are mutually exclusive).
 - `mod_sight_front` slot of the 730 mm standard Mosin barrel: adds the MDR BLK LBL ALX bipods (16 and 20 models, injected by `WTT-ContentBackport`; shared with the Mosin front sight, so the two are mutually exclusive).
+- `mod_sight_front` slot of the SVT-40 standard muzzle: adds the MDR BLK LBL ALX bipods (16 and 20 models, injected by `WTT-ContentBackport`; shared with the stock front sight, so the two are mutually exclusive).
 - `mod_muzzle` muzzle device slot of the RPD 520 mm barrel: adds the AKM PBS-1 7.62x39 suppressor.
 - `mod_muzzle` muzzle device slot of the RPD 520 mm barrel: adds the AKM PBS-1 7.62x39 suppressor.
 - `mod_mount` rail slot of the AA-12 457 mm barrel: adds the M60 bipod.
 - `mod_mount` rail slot of the AA-12 457 mm barrel: adds the M60 bipod.
 - `mod_stock` slot of the MP-18 and Marlin MXLR: adds the KS-23 metal stock.
 - `mod_stock` slot of the MP-18 and Marlin MXLR: adds the KS-23 metal stock.
@@ -72,4 +76,4 @@
 - The two SKS chassis kits in the PPSh-41 receiver slot (TAPCO Intrafuse, Fab Defence UAS) are incompatible with every PPSh-41 stock except the KS-23 metal stock (PPSh wooden stock, Benelli M3 telescopic stock, PKM wooden stock, Zenit PT-2, PKP polymer stock, Ultima MP-155 pistol grip, M14ALCS (MOD-0) buttstock, Zveno PK buffer tube adapter).
 - The two SKS chassis kits in the PPSh-41 receiver slot (TAPCO Intrafuse, Fab Defence UAS) are incompatible with every PPSh-41 stock except the KS-23 metal stock (PPSh wooden stock, Benelli M3 telescopic stock, PKM wooden stock, Zenit PT-2, PKP polymer stock, Ultima MP-155 pistol grip, M14ALCS (MOD-0) buttstock, Zveno PK buffer tube adapter).
 - The two SKS chassis kits are incompatible with the PPSh-41 71-round drum magazine.
 - The two SKS chassis kits are incompatible with the PPSh-41 71-round drum magazine.
 - The KS-23 metal stock is incompatible with the parts accepted by the two SKS chassis kits' stock slots (TAPCO Intrafuse buffer tube, Fab Defence UAS folding stock).
 - The KS-23 metal stock is incompatible with the parts accepted by the two SKS chassis kits' stock slots (TAPCO Intrafuse buffer tube, Fab Defence UAS folding stock).
-- The TKPD railed dust cover is incompatible with the SKS and OP-SKS weapons themselves.
+- The TKPD railed dust cover is incompatible with the SKS, OP-SKS, SVT-40 and AVT-40 weapons themselves.

+ 8 - 8
docs/verification.md

@@ -23,18 +23,18 @@
 3. 进入游戏,在武器改装界面检查目标组合是否可安装,例如:
 3. 进入游戏,在武器改装界面检查目标组合是否可安装,例如:
    - 在 UZI StormWerkz 顶盖导轨上安装 ELCAN SpecterDR 或 SIG Sauer BRAVO4;
    - 在 UZI StormWerkz 顶盖导轨上安装 ELCAN SpecterDR 或 SIG Sauer BRAVO4;
    - 在 CR 200DS / CR 50DS 前准星槽安装 StormWerkz 顶盖导轨或 MP-18 瞄具基座;
    - 在 CR 200DS / CR 50DS 前准星槽安装 StormWerkz 顶盖导轨或 MP-18 瞄具基座;
-   - 在 PPSh-41 上安装莫辛纳甘、M700、ORSIS T-5000M 或 SKS / OP-SKS 520mm 枪管,安装 M14ALCS (MOD-0) 枪托,或安装 Zveno PK 缓冲管转接器;
+   - 在 PPSh-41 上安装莫辛纳甘、M700、ORSIS T-5000M、SKS / OP-SKS 520mm 或 SVT-40 625mm 枪管,安装 M14ALCS (MOD-0) 枪托,或安装 Zveno PK 缓冲管转接器;
    - 在 PPSh-41 的机匣槽安装 TAPCO Intrafuse SKS 枪身套件或 Fab Defence UAS SKS 枪身套件;
    - 在 PPSh-41 的机匣槽安装 TAPCO Intrafuse SKS 枪身套件或 Fab Defence UAS SKS 枪身套件;
-   - 在 SKS / OP-SKS 照门固定环的照门槽安装 TKPD 导轨防尘盖;
+   - 在 SKS / OP-SKS 照门固定环或 SVT-40 625mm 枪管的照门槽安装 TKPD 导轨防尘盖;
    - 在 RPD 520mm 枪管的枪口装置槽安装 AKM PBS-1 7.62x39 消音器;
    - 在 RPD 520mm 枪管的枪口装置槽安装 AKM PBS-1 7.62x39 消音器;
-   - 在 730mm 标准莫辛枪管的前准星槽安装 MDR BLK LBL ALX 脚架(16 或 20 型号);
+   - 在 730mm 标准莫辛枪管或 SVT-40 标准枪口装置的前准星槽安装 MDR BLK LBL ALX 脚架(16 或 20 型号);
    - 在 AA-12 457mm 枪管的导轨槽安装 M60 脚架;
    - 在 AA-12 457mm 枪管的导轨槽安装 M60 脚架;
    - 在 MP-18 或 Marlin MXLR 的枪托槽安装 KS-23 金属枪托;
    - 在 MP-18 或 Marlin MXLR 的枪托槽安装 KS-23 金属枪托;
    - 尝试同时安装 PPSh-41 防尘盖与 HUXWRX HX-QD 消音器,确认二者互斥;
    - 尝试同时安装 PPSh-41 防尘盖与 HUXWRX HX-QD 消音器,确认二者互斥;
    - 尝试在 PPSh-41 上同时安装 SKS 枪身套件与任一非 KS-23 枪托(含 Zveno 缓冲管转接器),确认二者互斥;
    - 尝试在 PPSh-41 上同时安装 SKS 枪身套件与任一非 KS-23 枪托(含 Zveno 缓冲管转接器),确认二者互斥;
    - 尝试在 PPSh-41 上同时安装 SKS 枪身套件与 71 发弹鼓,确认二者互斥;
    - 尝试在 PPSh-41 上同时安装 SKS 枪身套件与 71 发弹鼓,确认二者互斥;
    - 尝试在 PPSh-41 上同时安装 KS-23 金属枪托与 TAPCO Intrafuse 缓冲管 / Fab Defence UAS 折叠枪托,确认二者互斥;
    - 尝试在 PPSh-41 上同时安装 KS-23 金属枪托与 TAPCO Intrafuse 缓冲管 / Fab Defence UAS 折叠枪托,确认二者互斥;
-   - 尝试同时安装 TKPD 导轨防尘盖与 SKS / OP-SKS 枪本体,确认二者互斥。
+   - 尝试同时安装 TKPD 导轨防尘盖与 SKS / OP-SKS / SVT-40 / AVT-40 枪本体,确认二者互斥。
 4. 若修改了物品 id,重新运行单元测试确认夹具仍与代码一致。
 4. 若修改了物品 id,重新运行单元测试确认夹具仍与代码一致。
 
 
 ## 排查建议
 ## 排查建议
@@ -72,18 +72,18 @@ The slot names should cover `mod_scope`, `mod_sight_front`, `mod_sight_rear`, `m
 3. Enter the game and check the target combinations in the weapon modding screen, for example:
 3. Enter the game and check the target combinations in the weapon modding screen, for example:
    - mount the ELCAN SpecterDR or SIG Sauer BRAVO4 on the UZI StormWerkz top cover rail;
    - mount the ELCAN SpecterDR or SIG Sauer BRAVO4 on the UZI StormWerkz top cover rail;
    - mount the StormWerkz top cover rail or MP-18 scope base on the CR 200DS / CR 50DS front sight slot;
    - mount the StormWerkz top cover rail or MP-18 scope base on the CR 200DS / CR 50DS front sight slot;
-   - mount a Mosin, M700, ORSIS T-5000M or SKS / OP-SKS 520 mm barrel, mount the M14ALCS (MOD-0) buttstock, or mount the Zveno PK buffer tube adapter, on the PPSh-41;
+   - mount a Mosin, M700, ORSIS T-5000M, SKS / OP-SKS 520 mm or SVT-40 625 mm barrel, mount the M14ALCS (MOD-0) buttstock, or mount the Zveno PK buffer tube adapter, on the PPSh-41;
    - mount a TAPCO Intrafuse SKS chassis kit or a Fab Defence UAS SKS chassis kit in the PPSh-41 receiver slot;
    - mount a TAPCO Intrafuse SKS chassis kit or a Fab Defence UAS SKS chassis kit in the PPSh-41 receiver slot;
-   - mount the TKPD railed dust cover on the sight slot of the SKS / OP-SKS rear sight blocks;
+   - mount the TKPD railed dust cover on the sight slot of the SKS / OP-SKS rear sight blocks or the SVT-40 625 mm barrel;
    - mount an AKM PBS-1 7.62x39 suppressor on the muzzle device slot of the RPD 520 mm barrel;
    - mount an AKM PBS-1 7.62x39 suppressor on the muzzle device slot of the RPD 520 mm barrel;
-   - mount an MDR BLK LBL ALX bipod (16 or 20 model) on the front sight slot of the 730 mm standard Mosin barrel;
+   - mount an MDR BLK LBL ALX bipod (16 or 20 model) on the front sight slot of the 730 mm standard Mosin barrel or the SVT-40 standard muzzle;
    - mount an M60 bipod on the rail slot of the AA-12 457 mm barrel;
    - mount an M60 bipod on the rail slot of the AA-12 457 mm barrel;
    - mount a KS-23 metal stock on the stock slot of the MP-18 or Marlin MXLR;
    - mount a KS-23 metal stock on the stock slot of the MP-18 or Marlin MXLR;
    - try mounting the PPSh-41 dust cover and a HUXWRX HX-QD suppressor together and confirm they are mutually exclusive;
    - try mounting the PPSh-41 dust cover and a HUXWRX HX-QD suppressor together and confirm they are mutually exclusive;
    - try mounting an SKS chassis kit on the PPSh-41 together with any non-KS-23 stock (including the Zveno buffer tube adapter) and confirm they are mutually exclusive;
    - try mounting an SKS chassis kit on the PPSh-41 together with any non-KS-23 stock (including the Zveno buffer tube adapter) and confirm they are mutually exclusive;
    - try mounting an SKS chassis kit on the PPSh-41 together with the 71-round drum magazine and confirm they are mutually exclusive;
    - try mounting an SKS chassis kit on the PPSh-41 together with the 71-round drum magazine and confirm they are mutually exclusive;
    - try mounting the KS-23 metal stock together with the TAPCO Intrafuse buffer tube / Fab Defence UAS folding stock and confirm they are mutually exclusive;
    - try mounting the KS-23 metal stock together with the TAPCO Intrafuse buffer tube / Fab Defence UAS folding stock and confirm they are mutually exclusive;
-   - try mounting the TKPD railed dust cover together with the SKS / OP-SKS weapons and confirm they are mutually exclusive.
+   - try mounting the TKPD railed dust cover together with the SKS / OP-SKS / SVT-40 / AVT-40 weapons and confirm they are mutually exclusive.
 4. If you changed any item id, re-run the unit tests to confirm the fixtures still match the code.
 4. If you changed any item id, re-run the unit tests to confirm the fixtures still match the code.
 
 
 ## Troubleshooting
 ## Troubleshooting

+ 40 - 4
src/Mod.cs

@@ -44,7 +44,11 @@ namespace Pj568.WeaponCrossModding;
 ///  24. 让两个 SKS 枪身套件与 PPSh-41 的 71 发弹鼓互不兼容;
 ///  24. 让两个 SKS 枪身套件与 PPSh-41 的 71 发弹鼓互不兼容;
 ///  25. 让 KS-23 金属枪托与两个 SKS 枪身套件枪托槽可装的配件互不兼容;
 ///  25. 让 KS-23 金属枪托与两个 SKS 枪身套件枪托槽可装的配件互不兼容;
 ///  26. 让 SKS 与 OP-SKS 照门固定环的照门槽(mod_sight_rear)支持安装 TKPD 导轨防尘盖;
 ///  26. 让 SKS 与 OP-SKS 照门固定环的照门槽(mod_sight_rear)支持安装 TKPD 导轨防尘盖;
-///  27. 让 TKPD 导轨防尘盖与 SKS / OP-SKS 枪本体互不兼容。
+///  27. 让 TKPD 导轨防尘盖与 SKS / OP-SKS 枪本体互不兼容;
+///  28. 让 PPSh-41 冲锋枪的枪管槽支持安装 SVT-40 / AVT-40 共用的 7.62x54R 625mm 枪管;
+///  29. 让 SVT-40 625mm 枪管的照门槽(mod_sight_rear)支持安装 TKPD 导轨防尘盖;
+///  30. 让 TKPD 导轨防尘盖与 SVT-40 / AVT-40 枪本体双向互不兼容;
+///  31. 让 SVT-40 标准枪口装置的准星槽(mod_sight_front)支持安装 MDR BLK LBL ALX 脚架(16 与 20 型号)。
 ///
 ///
 /// 做法:往目标槽的 SlotFilter.Filter(HashSet&lt;MongoId&gt;)追加物品 id(幂等)。
 /// 做法:往目标槽的 SlotFilter.Filter(HashSet&lt;MongoId&gt;)追加物品 id(幂等)。
 /// </summary>
 /// </summary>
@@ -226,6 +230,16 @@ public class WeaponCrossModdingPlugin(
     private const string SksWeaponId = "574d967124597745970e7c94";
     private const string SksWeaponId = "574d967124597745970e7c94";
     private const string OpsksWeaponId = "587e02ff24597743df3deaeb";
     private const string OpsksWeaponId = "587e02ff24597743df3deaeb";
 
 
+    // SVT-40 7.62x54R 625mm 枪管(可安装于 PPSh-41 枪管槽;其 mod_sight_rear 照门槽承载 TKPD 导轨防尘盖)。
+    private const string Svt40Barrel625Id = "6410758c857473525b08bb77";
+
+    // SVT-40 与 AVT-40 枪本体(用于与 TKPD 导轨防尘盖建立互斥)。
+    private const string Svt40WeaponId = "643ea5b23db6f9f57107d9fd";
+    private const string Avt40WeaponId = "6410733d5dd49d77bd07847e";
+
+    // SVT-40 标准枪口装置(其 mod_sight_front 准星槽承载 MDR BLK LBL ALX 脚架;SVT-40 与 AVT-40 共用)。
+    private const string Svt40MuzzleStdId = "64119d1f2c6d6f921a0929f8";
+
     // PPSh-41 枪托槽可装的全部枪托(用于与 SKS 枪身套件建立双向互斥;不含 KS-23 金属枪托)。
     // PPSh-41 枪托槽可装的全部枪托(用于与 SKS 枪身套件建立双向互斥;不含 KS-23 金属枪托)。
     private static readonly (string Id, string Label)[] Ppsh41StockConflicts =
     private static readonly (string Id, string Label)[] Ppsh41StockConflicts =
     [
     [
@@ -267,6 +281,8 @@ public class WeaponCrossModdingPlugin(
     private const string SksRearSightBlockLabel = "SKS rear sight block";
     private const string SksRearSightBlockLabel = "SKS rear sight block";
     private const string OpsksRearSightBlockLabel = "OP-SKS rear sight block";
     private const string OpsksRearSightBlockLabel = "OP-SKS rear sight block";
     private const string TkpdRailedDustCoverLabel = "TKPD railed dust cover";
     private const string TkpdRailedDustCoverLabel = "TKPD railed dust cover";
+    private const string Svt40Barrel625Label = "SVT-40 625mm barrel";
+    private const string Svt40MuzzleStdLabel = "SVT-40 muzzle";
 
 
     public Task OnLoadAsync(CancellationToken cancellationToken)
     public Task OnLoadAsync(CancellationToken cancellationToken)
     {
     {
@@ -288,12 +304,12 @@ public class WeaponCrossModdingPlugin(
             // CR 50DS 战术设备槽:追加 Zenit RK 系列前握把、KAC MWS 脚架转接器与 BT10 V8 Atlas 折叠脚架。
             // CR 50DS 战术设备槽:追加 Zenit RK 系列前握把、KAC MWS 脚架转接器与 BT10 V8 Atlas 折叠脚架。
             AddItemIdsToSlot(items, Cr50DsId, Cr50DsLabel, TacticalSlotName, [.. ZenitRkForegripIds, KacMwsBipodAdapterId, Bt10AtlasBipodId]);
             AddItemIdsToSlot(items, Cr50DsId, Cr50DsLabel, TacticalSlotName, [.. ZenitRkForegripIds, KacMwsBipodAdapterId, Bt10AtlasBipodId]);
 
 
-            // PPSh-41 枪管槽:追加莫辛纳甘的全部尺寸枪管、M700 的全部 4 种枪管、ORSIS T-5000M 枪管
-            // 与 SKS / OP-SKS 的 520mm 枪管。
+            // PPSh-41 枪管槽:追加莫辛纳甘的全部尺寸枪管、M700 的全部 4 种枪管、ORSIS T-5000M 枪管、
+            // SKS / OP-SKS 的 520mm 枪管与 SVT-40 / AVT-40 共用的 7.62x54R 625mm 枪管。
             AddItemIdsToSlot(items, Ppsh41Id, Ppsh41Label, BarrelSlotName,
             AddItemIdsToSlot(items, Ppsh41Id, Ppsh41Label, BarrelSlotName,
                 MosinBarrel200Id, MosinBarrel220ThreadedId, MosinBarrel514Id, MosinBarrel730Id,
                 MosinBarrel200Id, MosinBarrel220ThreadedId, MosinBarrel514Id, MosinBarrel730Id,
                 M700Barrel660Id, M700Barrel508ThreadedId, M700BarrelStainless660Id, M700BarrelStainless508ThreadedId, T5000Barrel660Id,
                 M700Barrel660Id, M700Barrel508ThreadedId, M700BarrelStainless660Id, M700BarrelStainless508ThreadedId, T5000Barrel660Id,
-                SksBarrel520Id, OpsksBarrel520Id);
+                SksBarrel520Id, OpsksBarrel520Id, Svt40Barrel625Id);
 
 
             // PPSh-41 机匣槽(mod_reciever):追加 TAPCO Intrafuse 与 Fab Defence UAS SKS 枪身套件。
             // PPSh-41 机匣槽(mod_reciever):追加 TAPCO Intrafuse 与 Fab Defence UAS SKS 枪身套件。
             AddItemIdsToSlot(items, Ppsh41Id, Ppsh41Label, RecieverSlotName, TapcoIntrafuseSksId, FabDefenceUasSksId);
             AddItemIdsToSlot(items, Ppsh41Id, Ppsh41Label, RecieverSlotName, TapcoIntrafuseSksId, FabDefenceUasSksId);
@@ -301,6 +317,9 @@ public class WeaponCrossModdingPlugin(
             // 730mm 标准莫辛枪管的前准星槽:追加 MDR BLK LBL ALX 脚架(16 与 20 型号)。
             // 730mm 标准莫辛枪管的前准星槽:追加 MDR BLK LBL ALX 脚架(16 与 20 型号)。
             AddItemIdsToSlot(items, MosinBarrel730Id, MosinBarrel730Label, SightSlotName, AlxBipod16Id, AlxBipod20Id);
             AddItemIdsToSlot(items, MosinBarrel730Id, MosinBarrel730Label, SightSlotName, AlxBipod16Id, AlxBipod20Id);
 
 
+            // SVT-40 标准枪口装置的 mod_sight_front 前准星槽:追加 MDR BLK LBL ALX 脚架(16 与 20 型号)。
+            AddItemIdsToSlot(items, Svt40MuzzleStdId, Svt40MuzzleStdLabel, SightSlotName, AlxBipod16Id, AlxBipod20Id);
+
             // PPSh-41 枪托槽:追加 Benelli M3 可伸缩枪托、PKM / PKP 枪托、Ultima MP-155 握把、
             // PPSh-41 枪托槽:追加 Benelli M3 可伸缩枪托、PKM / PKP 枪托、Ultima MP-155 握把、
             // KS-23 金属枪托、M14 SAGE International M14ALCS (MOD-0) 枪托与 Zveno PK 缓冲管转接器。
             // KS-23 金属枪托、M14 SAGE International M14ALCS (MOD-0) 枪托与 Zveno PK 缓冲管转接器。
             AddItemIdsToSlot(items, Ppsh41Id, Ppsh41Label, StockSlotName, BenelliM3TelescopicStockId, PkmWoodenStockId, PkZenitPt2StockId, PkpPolymerStockId, UltimaMp155PistolGripId, Ks23MetalStockId, M14AlcsButtstockId, ZvenoBufferTubeId);
             AddItemIdsToSlot(items, Ppsh41Id, Ppsh41Label, StockSlotName, BenelliM3TelescopicStockId, PkmWoodenStockId, PkZenitPt2StockId, PkpPolymerStockId, UltimaMp155PistolGripId, Ks23MetalStockId, M14AlcsButtstockId, ZvenoBufferTubeId);
@@ -309,6 +328,9 @@ public class WeaponCrossModdingPlugin(
             AddItemIdsToSlot(items, SksRearSightBlockId, SksRearSightBlockLabel, SightRearSlotName, TkpdRailedDustCoverId);
             AddItemIdsToSlot(items, SksRearSightBlockId, SksRearSightBlockLabel, SightRearSlotName, TkpdRailedDustCoverId);
             AddItemIdsToSlot(items, OpsksRearSightBlockId, OpsksRearSightBlockLabel, SightRearSlotName, TkpdRailedDustCoverId);
             AddItemIdsToSlot(items, OpsksRearSightBlockId, OpsksRearSightBlockLabel, SightRearSlotName, TkpdRailedDustCoverId);
 
 
+            // SVT-40 625mm 枪管的 mod_sight_rear 照门槽:追加 TKPD 导轨防尘盖。
+            AddItemIdsToSlot(items, Svt40Barrel625Id, Svt40Barrel625Label, SightRearSlotName, TkpdRailedDustCoverId);
+
             // PPSh-41 防尘盖与 HUXWRX HX-QD 消音器互不兼容。
             // PPSh-41 防尘盖与 HUXWRX HX-QD 消音器互不兼容。
             AddDustCoverSuppressorConflict(items);
             AddDustCoverSuppressorConflict(items);
 
 
@@ -324,6 +346,9 @@ public class WeaponCrossModdingPlugin(
             // TKPD 导轨防尘盖与 SKS / OP-SKS 枪本体互不兼容。
             // TKPD 导轨防尘盖与 SKS / OP-SKS 枪本体互不兼容。
             AddDustCoverSksConflicts(items);
             AddDustCoverSksConflicts(items);
 
 
+            // TKPD 导轨防尘盖与 SVT-40 / AVT-40 枪本体双向互不兼容。
+            AddDustCoverSvtAvtConflicts(items);
+
             // Aim Sports“三轨”的第一个战术配件槽:追加多种前握把、SV-98 隔热带与 Fortis Shift 前握把。
             // Aim Sports“三轨”的第一个战术配件槽:追加多种前握把、SV-98 隔热带与 Fortis Shift 前握把。
             AddItemIdsToSlot(items, AimSportsTriRailId, AimSportsTriRailLabel, AimSportsTriRailTacticalSlotName, [.. AimSportsTriRailForegripIds, Sv98HeatRibbonId, FortisShiftForegripId]);
             AddItemIdsToSlot(items, AimSportsTriRailId, AimSportsTriRailLabel, AimSportsTriRailTacticalSlotName, [.. AimSportsTriRailForegripIds, Sv98HeatRibbonId, FortisShiftForegripId]);
 
 
@@ -466,6 +491,17 @@ public class WeaponCrossModdingPlugin(
         AddConflictingItems(items, OpsksWeaponId, "OP-SKS", TkpdRailedDustCoverId);
         AddConflictingItems(items, OpsksWeaponId, "OP-SKS", TkpdRailedDustCoverId);
     }
     }
 
 
+    /// <summary>
+    /// 让 TKPD 导轨防尘盖与 SVT-40 / AVT-40 枪本体双向互不兼容(幂等)。
+    /// SVT-40 / AVT-40 为原版物品;TKPD 导轨防尘盖由 WTT-ContentBackport 注入,若缺失则跳过。
+    /// </summary>
+    private void AddDustCoverSvtAvtConflicts(Dictionary<MongoId, TemplateItem> items)
+    {
+        AddConflictingItems(items, TkpdRailedDustCoverId, TkpdRailedDustCoverLabel, Svt40WeaponId, Avt40WeaponId);
+        AddConflictingItems(items, Svt40WeaponId, "SVT-40", TkpdRailedDustCoverId);
+        AddConflictingItems(items, Avt40WeaponId, "AVT-40", TkpdRailedDustCoverId);
+    }
+
     /// <summary>
     /// <summary>
     /// 往 <paramref name="ownerId"/> 的 ConflictingItems 追加 <paramref name="conflictIds"/>(幂等)。
     /// 往 <paramref name="ownerId"/> 的 ConflictingItems 追加 <paramref name="conflictIds"/>(幂等)。
     /// </summary>
     /// </summary>

+ 61 - 2
tests/WeaponCrossModding.Tests/ModTests.cs

@@ -74,6 +74,14 @@ public class WeaponCrossModdingPluginTests
     private const string SksWeaponId = "574d967124597745970e7c94";
     private const string SksWeaponId = "574d967124597745970e7c94";
     private const string OpsksWeaponId = "587e02ff24597743df3deaeb";
     private const string OpsksWeaponId = "587e02ff24597743df3deaeb";
 
 
+    private const string Svt40Barrel625Id = "6410758c857473525b08bb77";
+    private const string Svt40WeaponId = "643ea5b23db6f9f57107d9fd";
+    private const string Avt40WeaponId = "6410733d5dd49d77bd07847e";
+    private const string Svt40RearSightId = "64119d90dcf48d656f0aa275";
+
+    private const string Svt40MuzzleStdId = "64119d1f2c6d6f921a0929f8";
+    private const string Svt40FrontSightId = "64119d672c6d6f921a0929fb";
+
     private const string Ppsh41StockId = "5ea03e9400685063ec28bfa4";
     private const string Ppsh41StockId = "5ea03e9400685063ec28bfa4";
 
 
     private static readonly string[] Ppsh41StockCompatIds =
     private static readonly string[] Ppsh41StockCompatIds =
@@ -230,8 +238,9 @@ public class WeaponCrossModdingPluginTests
         Assert.Contains(new MongoId(T5000Barrel660Id), filter);
         Assert.Contains(new MongoId(T5000Barrel660Id), filter);
         Assert.Contains(new MongoId(SksBarrel520Id), filter);
         Assert.Contains(new MongoId(SksBarrel520Id), filter);
         Assert.Contains(new MongoId(OpsksBarrel520Id), filter);
         Assert.Contains(new MongoId(OpsksBarrel520Id), filter);
+        Assert.Contains(new MongoId(Svt40Barrel625Id), filter);
 
 
-        Assert.Equal(1 + MosinBarrelIds.Length + M700BarrelIds.Length + 1 + 2, filter.Count);
+        Assert.Equal(1 + MosinBarrelIds.Length + M700BarrelIds.Length + 1 + 2 + 1, filter.Count);
     }
     }
 
 
     [Fact]
     [Fact]
@@ -244,7 +253,7 @@ public class WeaponCrossModdingPluginTests
         await plugin.OnLoadAsync(CancellationToken.None);
         await plugin.OnLoadAsync(CancellationToken.None);
         await plugin.OnLoadAsync(CancellationToken.None);
         await plugin.OnLoadAsync(CancellationToken.None);
 
 
-        Assert.Equal(1 + MosinBarrelIds.Length + M700BarrelIds.Length + 1 + 2, FilterOf(ppsh, "mod_barrel").Count);
+        Assert.Equal(1 + MosinBarrelIds.Length + M700BarrelIds.Length + 1 + 2 + 1, FilterOf(ppsh, "mod_barrel").Count);
     }
     }
 
 
     [Fact]
     [Fact]
@@ -429,6 +438,21 @@ public class WeaponCrossModdingPluginTests
         Assert.Equal(3, filter.Count);
         Assert.Equal(3, filter.Count);
     }
     }
 
 
+    [Fact]
+    public async Task AddsAlxBipodsToSvt40MuzzleSightSlot()
+    {
+        var muzzle = ItemWithSlot("muzzle_svt40_toz_std_762x54r", "mod_sight_front", Svt40FrontSightId);
+        var items = new Dictionary<MongoId, TemplateItem> { [new MongoId(Svt40MuzzleStdId)] = muzzle };
+
+        await BuildPlugin(items).OnLoadAsync(CancellationToken.None);
+
+        var filter = FilterOf(muzzle, "mod_sight_front");
+        Assert.Contains(new MongoId(Svt40FrontSightId), filter);
+        Assert.Contains(new MongoId(AlxBipod16Id), filter);
+        Assert.Contains(new MongoId(AlxBipod20Id), filter);
+        Assert.Equal(3, filter.Count);
+    }
+
     [Fact]
     [Fact]
     public async Task AddsM14DcsbMountToTriRailScopeSlot()
     public async Task AddsM14DcsbMountToTriRailScopeSlot()
     {
     {
@@ -583,6 +607,41 @@ public class WeaponCrossModdingPluginTests
         Assert.Contains(new MongoId(TkpdRailedDustCoverId), opsks.Properties!.ConflictingItems!);
         Assert.Contains(new MongoId(TkpdRailedDustCoverId), opsks.Properties!.ConflictingItems!);
     }
     }
 
 
+    [Fact]
+    public async Task AddsTkpdDustCoverToSvt40BarrelSightSlot()
+    {
+        var barrel = ItemWithSlot("barrel_svt40_toz_625mm_762x54r", "mod_sight_rear", Svt40RearSightId);
+        var items = new Dictionary<MongoId, TemplateItem> { [new MongoId(Svt40Barrel625Id)] = barrel };
+
+        await BuildPlugin(items).OnLoadAsync(CancellationToken.None);
+
+        var filter = FilterOf(barrel, "mod_sight_rear");
+        Assert.Contains(new MongoId(Svt40RearSightId), filter);
+        Assert.Contains(new MongoId(TkpdRailedDustCoverId), filter);
+        Assert.Equal(2, filter.Count);
+    }
+
+    [Fact]
+    public async Task MakesTkpdDustCoverConflictWithSvtAndAvtWeapons()
+    {
+        var tkpdCover = ItemWithConflicts("TKPD railed dust cover");
+        var svt = ItemWithConflicts("SVT-40");
+        var avt = ItemWithConflicts("AVT-40");
+        var items = new Dictionary<MongoId, TemplateItem>
+        {
+            [new MongoId(TkpdRailedDustCoverId)] = tkpdCover,
+            [new MongoId(Svt40WeaponId)] = svt,
+            [new MongoId(Avt40WeaponId)] = avt,
+        };
+
+        await BuildPlugin(items).OnLoadAsync(CancellationToken.None);
+
+        Assert.Contains(new MongoId(Svt40WeaponId), tkpdCover.Properties!.ConflictingItems!);
+        Assert.Contains(new MongoId(Avt40WeaponId), tkpdCover.Properties!.ConflictingItems!);
+        Assert.Contains(new MongoId(TkpdRailedDustCoverId), svt.Properties!.ConflictingItems!);
+        Assert.Contains(new MongoId(TkpdRailedDustCoverId), avt.Properties!.ConflictingItems!);
+    }
+
     [Fact]
     [Fact]
     public async Task MakesSksChassisKitsConflictWithPpsh41Stocks()
     public async Task MakesSksChassisKitsConflictWithPpsh41Stocks()
     {
     {