# Magazine Check Interrupt – Mag Slam

A finalized fork of **Magazine Check Interrupt 1.0.2 by ozen** that adds one tactical action:

- During a detachable-magazine check, press **left mouse button** to rapidly finish the current check and return the same magazine to the weapon.
- The magazine may be full, partially loaded, or empty. The player decides when to stop checking.
- The slam click is blocked from becoming a queued gunshot until left mouse is released.
- Clicking in an open inventory does not request a slam.
- The original reload-interrupt behavior is retained.
- When compiled with Fika support, the slam request is replicated to observed players.

Mag Slam accelerates Tarkov's existing magazine-check return animation with a finalized staged speed curve. It automatically selects a timing profile for pistols, straight-in magazines, or recognized vanilla AK-style rock-and-lock weapons. It does not install a custom animation.

## Version

- Plugin version: `1.0.3`
- Release: `1.0.3`
- Intended baseline: SPT 4.0.13 / Magazine Check Interrupt 1.0.2 source
- Tested Fika baseline: Fika Plugin 2.3.9 / Fika Headless 1.4.15

## Final Mag Slam behavior

Mag Slam tuning is intentionally **frozen in code** and is not exposed in the F12 Configuration Manager.

### Straight-In

Used by default for M4/AR-pattern rifles and other magazines that travel mostly straight into the magwell.

- Exit: `1.8x`
- Insertion: `3.0x`
- Recovery: `1.4x`
- Insertion starts: `55%`
- Recovery starts: `72%`

### Pistol

Uses a gentler curve because pistol checks expose more hand and weapon rotation.

- Exit: `1.6x`
- Insertion: `2.4x`
- Recovery: `1.25x`
- Insertion starts: `55%`
- Recovery starts: `70%`

### Rock-and-Lock

Used for the included recognized vanilla AK-pattern weapon template IDs.

- Exit: `1.55x`
- Insertion: `2.2x`
- Recovery: `1.25x`
- Insertion starts: `52%`
- Recovery starts: `78%`

All profiles use a frozen transition smoothing value of `18`.

## F12 configuration

Only the **original Magazine Check Interrupt settings** remain configurable, including reload-window/key-conflict and slow-check behavior. Mag Slam itself has no F12 tuning controls in the final release.

Old beta Mag Slam entries may remain as unused text in an existing BepInEx `.cfg` file after upgrading. They are no longer bound or read by the plugin and do not affect behavior. Deleting the old config file will regenerate a clean one containing only currently supported settings.

## Build

1. Install the current .NET SDK.
2. Run `BuildAndInstall.cmd` to compile and install directly into a selected SPT folder.
3. Run `BuildRelease.cmd` to compile and create a release ZIP without installing.
4. The release script validates the SPT assemblies, detects Fika automatically, and creates:
   `Dist\MagazineCheckInterrupt-MagSlam-1.0.3.zip`

The selected SPT path is stored in `build-settings.json`. Delete that file to select another installation.

## Install manually

Remove the original `ozen-MagCheckInterrupt.dll` and `ozen-MagCheckInterrupt.Net.dll`, then copy the DLLs from the release ZIP into:

```text
BepInEx\plugins\
```

Do not run this fork beside the original mod. It intentionally keeps the original plugin GUID and DLL names so it acts as a replacement.

### Solo SPT

The builder produces and installs:

```text
ozen-MagCheckInterrupt.dll
```

### Fika

When `Fika.Core.dll` is detected, the builder produces and installs:

```text
ozen-MagCheckInterrupt.dll
ozen-MagCheckInterrupt.Net.dll
```

Use the same final build on the Fika host and every client.

## Final validation checklist

- M4/AR straight-in profile behaves with the finalized `1.8 / 3.0 / 1.4` curve.
- Pistol profile uses the gentler curve.
- Recognized vanilla AK-pattern weapons use RockAndLock timing.
- Full, partial, nearly empty, and empty magazines can all be slammed back in.
- Holding the slam click through completion does not fire the weapon; release and click again to fire.
- Inventory clicks do not request a slam.
- Normal Magazine Check Interrupt reload interruption still works.
- Fika host/client builds load with matching main/network DLLs.

## Attribution and license

Based on **Magazine Check Interrupt** by **ozen / ozen-m**. The original project is licensed under the MIT License. The original copyright and license are retained in `LICENSE`.

Mag Slam modifications prepared for Mark Palmer with ChatGPT.

## Weapon inspection trigger correction (1.0.3 build fix)

SPT 4.0.13 carries the LMB press used to interrupt normal weapon inspection into the newly-created idle firearm operation. This build fix suppresses that carried trigger and continues suppressing repeated LMB presses for the full visible weapon-inspection/return animation. Once the animation has fully returned to a stable state and LMB is released, the next fresh click fires normally.
