فهرست منبع

【新增】让 UAS SKS 枪身套件下导轨兼容 AK-100 聚合物护木全部前握把

PJ568 1 ماه پیش
والد
کامیت
ca9475372c
5فایلهای تغییر یافته به همراه59 افزوده شده و 8 حذف شده
  1. 3 3
      WeaponCrossModding.csproj
  2. 2 0
      docs/compatibility.md
  3. 2 2
      docs/features.md
  4. 45 2
      src/Mod.cs
  5. 7 1
      tests/WeaponCrossModding.Tests/ModTests.cs

+ 3 - 3
WeaponCrossModding.csproj

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

+ 2 - 0
docs/compatibility.md

@@ -14,6 +14,7 @@
 - **原版物品**: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 枪管、SVDS 照门固定环、SVDS 枪本体与 SVDS 枪管、PPSh-41 71 发弹鼓,以及 AKM PBS-1 7.62x39 消音器均为原版物品,不依赖 `WTT-ContentBackport`。
 - **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 / SVT-40 / AVT-40 / SVDS 枪本体互不兼容;SVDS 照门固定环护木槽可装的莫辛 200mm、M700 全部 4 种与 ORSIS T-5000M 枪管与 SVDS 枪本体互不兼容;SVDS 枪管与自身互不兼容(防止重复安装);SVDS 照门固定环与 PPSh-41 防尘盖、TAPCO Intrafuse SKS 枪身套件互不兼容;SVDS 照门固定环护木槽可装的 3 种原版 SVDS 护木与 PPSh-41 枪本体互不兼容;SVDS 照门固定环护木槽可装的 SVT-40 / AVT-40 625mm 枪管与 SVDS 枪本体互不兼容;TKPD 导轨防尘盖与自身互不兼容(防止重复安装);MDR BLK LBL ALX 20 脚架与自身互不兼容(防止重复安装);5 种 SKS 导气管防尘盖与 UltiMAK M1-B AK 导气管套件彼此之间(含与自身)互不兼容,使一把武器上最多只能装一个。
+- **新增兼容**:Fab Defence UAS SKS 枪身套件的下导轨(`mod_tactical_002`)新增兼容 AK-100 系列聚合物护木可安装的全部 33 种前握把(含 Zenit RK 系列、BCM MOD.3、KAC、ASh-12、Tactical Dynamics 镂空、TangoDown Stubby BGV-MK46K 三色、Fortis Shift 等)。
 - 插件只改写物品数据库,不注册 Harmony patch,也不与客户端插件争抢运行时方法。
 
 ## 已知限制
@@ -51,6 +52,7 @@
 - **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 SVDS rear sight block, the SVDS weapon and the SVDS 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.
 - **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, AVT-40 and SVDS weapons; the Mosin 200 mm, all four M700 and the ORSIS T-5000M barrels accepted by the SVDS rear sight block's handguard slot are incompatible with the SVDS weapon; the SVDS barrel is incompatible with itself (to prevent duplicate mounting); the SVDS rear sight block is incompatible with the PPSh-41 dust cover and with the TAPCO Intrafuse SKS chassis kit; the 3 vanilla SVDS handguards accepted by the SVDS rear sight block's handguard slot are incompatible with the PPSh-41 weapon itself; the SVT-40 / AVT-40 625 mm barrel accepted by that handguard slot is incompatible with the SVDS weapon; the TKPD railed dust cover is incompatible with itself (to prevent duplicate mounting); the MDR BLK LBL ALX 20 bipod is incompatible with itself (to prevent duplicate mounting); the 5 SKS gas-tube covers and the UltiMAK M1-B AK gas tube kit are mutually incompatible with each other (including with themselves), so at most one can be installed on a weapon.
+- **New compatibility**: the Fab Defence UAS SKS chassis kit's lower rail (`mod_tactical_002`) now accepts all 33 foregrips compatible with the AK-100 series polymer handguards (Zenit RK series, BCM MOD.3, KAC, ASh-12, Tactical Dynamics skeletonized, TangoDown Stubby BGV-MK46K in three colors, Fortis Shift, and 25 others).
 - The plugin only rewrites the item database. It registers no Harmony patch and never contends with client plugins for runtime methods.
 
 ## Known Limitations

+ 2 - 2
docs/features.md

@@ -27,7 +27,7 @@
 - Aim Sports“三轨”的第一个战术配件槽(`mod_tactical_000`):新增 13 款前握把(Zenit RK 系列、镂空型、垂直型、BCM MOD.3、TangoDown Stubby BGV-MK46K;不含 KeyMod / M-LOK 型)、SV-98 隔热带与 Fortis Shift 战术前握把。
 - Aim Sports“三轨”的第二个战术配件槽(`mod_tactical_001`):新增 SV-98 隔热带。
 - UZI StormWerkz 护木底轨的 `mod_tactical` 槽:新增 Zenit RK 系列前握把。
-- Fab Defence UAS SKS 枪身套件的下导轨(`mod_tactical_002`):新增 MDR BLK LBL ALX 20 脚架(由 `WTT-ContentBackport` 注入)。
+- Fab Defence UAS SKS 枪身套件的下导轨(`mod_tactical_002`):新增 MDR BLK LBL ALX 20 脚架(由 `WTT-ContentBackport` 注入)与 AK-100 系列聚合物护木兼容的全部前握把(含 Zenit RK 系列、BCM MOD.3、KAC、ASh-12、Tactical Dynamics 镂空、TangoDown Stubby BGV-MK46K 三色、Fortis Shift 等 33 种)。
 - UltiMAK M1-B AK 导气管套件的战术配件槽(`mod_tactical_000`):新增 MDR BLK LBL ALX 20 脚架(由 `WTT-ContentBackport` 注入)。
 - CR 50DS 的 `mod_tactical` 战术设备槽:新增 Zenit RK 系列前握把、KAC MWS 脚架转接器与 BT10 V8 Atlas 折叠脚架。
 - M14 SAGE International M14ALCS (MOD-0) 枪托的 `mod_pistol_grip` 握把位:新增 AR-15 Tactical Dynamics 镂空手枪式握把、Tyrant Designs MOD Chevron AR-15 镂空手枪式握把(黑 / 黄 / 红)与 AS VAL Rotor 43 手枪式握把附缓冲管转接器。
@@ -81,7 +81,7 @@
 - First tactical slot (`mod_tactical_000`) of the Aim Sports tri-rail: adds 13 foregrips (Zenit RK series, skeletonized, vertical, BCM MOD.3, TangoDown Stubby BGV-MK46K; excluding KeyMod / M-LOK types), the SV-98 heat ribbon and the Fortis Shift tactical foregrip.
 - Second tactical slot (`mod_tactical_001`) of the Aim Sports tri-rail: adds the SV-98 heat ribbon.
 - `mod_tactical` slot of the UZI StormWerkz lower handguard rail: adds the Zenit RK series foregrips.
-- Lower rail (`mod_tactical_002`) of the Fab Defence UAS SKS chassis kit: adds the MDR BLK LBL ALX 20 bipod (injected by `WTT-ContentBackport`).
+- Lower rail (`mod_tactical_002`) of the Fab Defence UAS SKS chassis kit: adds the MDR BLK LBL ALX 20 bipod (injected by `WTT-ContentBackport`) and all foregrips compatible with the AK-100 series polymer handguards (Zenit RK series, BCM MOD.3, KAC, ASh-12, Tactical Dynamics skeletonized, TangoDown Stubby BGV-MK46K in three colors, Fortis Shift, and 25 others, 33 total).
 - Tactical slot (`mod_tactical_000`) of the UltiMAK M1-B AK gas tube kit: adds the MDR BLK LBL ALX 20 bipod (injected by `WTT-ContentBackport`).
 - `mod_tactical` slot of the CR 50DS: adds the Zenit RK series foregrips, the KAC MWS bipod adapter and the BT10 V8 Atlas folding bipod.
 - `mod_pistol_grip` slot of the M14 SAGE International M14ALCS (MOD-0) buttstock: adds the AR-15 Tactical Dynamics skeletonized pistol grip, the Tyrant Designs MOD Chevron AR-15 skeletonized pistol grips (black / yellow / red) and the AS VAL Rotor 43 pistol grip with buffer tube adapter.

+ 45 - 2
src/Mod.cs

@@ -190,6 +190,49 @@ public class WeaponCrossModdingPlugin(
     private const string Sv98HeatRibbonId = "56083eab4bdc2d26448b456a"; // SV-98 隔热带(anti-heat ribbon)
     private const string FortisShiftForegripId = "59f8a37386f7747af3328f06"; // Fortis Shift 战术前握把
 
+    // AK-100 系列聚合物护木(handguard_ak_izhmash_ak100_rail_plastic)的 mod_foregrip 槽兼容的全部前握把。
+    private static readonly string[] Ak100PolymerHandguardForegripIds =
+    [
+        // 垂直前握把
+        "5c7fc87d2e221644f31c0298", // BCM GUNFIGHTER MOD 3 vertical
+        "5cda9bcfd7f00c0c0b53e900", // ASh-12 vertical
+        "5c87ca002e221600114cb150", // KAC vertical
+        // Zenit RK 系列
+        "5c1bc4812e22164bef5cfde7", // RK-0
+        "5c1bc5612e221602b5429350", // RK-1
+        "5c1bc5af2e221602b412949b", // RK-2
+        "5c1bc5fb2e221602b1779b32", // RK-4
+        "5c1bc7432e221602b412949d", // RK-5
+        "5c1bc7752e221602b1779b34", // RK-6
+        // 镂空前握把
+        "5f6340d3ca442212f4047eb2", // Tactical Dynamics 镂空前握把
+        // TangoDown Stubby BGV-MK46K
+        "558032614bdc2de7118b4585", // (Black)
+        "58c157be86f77403c74b2bb6", // (FDE)
+        "58c157c886f774032749fb06", // (Stealth Grey)
+        // 其它前握把
+        "59f8a37386f7747af3328f06", // Fortis Shift 战术前握把
+        "619386379fb0c665d5490dbe",
+        "59fc48e086f77463b1118392",
+        "5fce0cf655375d18a253eff0",
+        "5cf4fb76d7f00c065703d3ac",
+        "5b057b4f5acfc4771e1bd3e9",
+        "5c791e872e2216001219c40a",
+        "591af28e86f77414a27a9e1d",
+        "5c1cd46f2e22164bef5cfedb",
+        // 较新增前握把(可能来自更新或模组)
+        "64806bdd26c80811d408d37a",
+        "64807a29e5ffe165600abc97",
+        "648067db042be0705c0b3009",
+        "65169d5b30425317755f8e25",
+        "655df24fdf80b12750626d0a",
+        "655dccfdbdcc6b5df71382b6",
+        "661e52e29c8b4dadef008577",
+        "661e53149c8b4dadef008579",
+        "661e52415be02310ed07a07a",
+        "661e52b5b099f32c28003586",
+    ];
+
     // M14 SAGE International M14ALCS (MOD-0) 枪托的握把位兼容的握把。
     private const string M14AlcsPistolGripSlotName = "mod_pistol_grip";
     private const string TacticalDynamicsSkeletonizedGripId = "5b07db875acfc40dc528a5f6"; // AR-15 Tactical Dynamics 镂空手枪式握把
@@ -464,8 +507,8 @@ public class WeaponCrossModdingPlugin(
             // Aim Sports“三轨”的瞄具槽:追加 M14 DCSB 瞄具基座。
             AddItemIdsToSlot(items, AimSportsTriRailId, AimSportsTriRailLabel, ScopeSlotName, M14DcsbMountId);
 
-            // Fab Defence UAS SKS 枪身套件的下导轨(mod_tactical_002):追加 MDR BLK LBL ALX 20 脚架。
-            AddItemIdsToSlot(items, FabDefenceUasSksId, FabDefenceUasSksLabel, FabDefenceUasLowerRailSlotName, AlxBipod20Id);
+            // Fab Defence UAS SKS 枪身套件的下导轨(mod_tactical_002):追加 MDR BLK LBL ALX 20 脚架与 AK-100 聚合物护木兼容的全部前握把。
+            AddItemIdsToSlot(items, FabDefenceUasSksId, FabDefenceUasSksLabel, FabDefenceUasLowerRailSlotName, [AlxBipod20Id, .. Ak100PolymerHandguardForegripIds]);
 
             // UltiMAK M1-B AK 导气管套件的战术配件槽(mod_tactical_000):追加 MDR BLK LBL ALX 20 脚架。
             AddItemIdsToSlot(items, UltimakM1BId, UltimakM1BLabel, UltimakM1BTacticalSlotName, AlxBipod20Id);

+ 7 - 1
tests/WeaponCrossModding.Tests/ModTests.cs

@@ -499,7 +499,13 @@ public class WeaponCrossModdingPluginTests
         Assert.Contains(new MongoId(Bt10AtlasBipodId), filter);
         Assert.Contains(new MongoId(AlxBipod20Id), filter);
         Assert.DoesNotContain(new MongoId(AlxBipod16Id), filter);
-        Assert.Equal(2, filter.Count);
+        // 2 个原有项目 (BT10 Atlas 脚架 + ALX 20 脚架) + 32 个 AK-100 聚合物护木兼容前握把
+        Assert.Equal(2 + 32, filter.Count);
+        // 验证部分 AK-100 前握把已注入
+        Assert.Contains(new MongoId("5c7fc87d2e221644f31c0298"), filter); // BCM GUNFIGHTER MOD 3 vertical
+        Assert.Contains(new MongoId("5c1bc4812e22164bef5cfde7"), filter); // Zenit RK-0
+        Assert.Contains(new MongoId("5f6340d3ca442212f4047eb2"), filter); // Tactical Dynamics 镂空前握把
+        Assert.Contains(new MongoId("558032614bdc2de7118b4585"), filter); // TangoDown Stubby BGV-MK46K (Black)
     }
 
     [Fact]