MiX Rack Kit 1.0.7

What it does
Hangs a whole kit preset on a weapon rack: weapons with their skin and loaded ammo, and clothing
and backpacks on racks that have slots for them. Each item goes into the first free slot that
fits; items the rack cannot hold are skipped.
Presets live in data/MixRackKit/kits.json. Four sample kits ship with it (cyber_knight, wizard,
templar, shadow_walkers). They use Steam Workshop skin ids; the plugin does not check who owns them.
A player who owns a rack, or has building rights where it stands, can turn it into a display with
/rackkit here <preset>. Players can look at a display but cannot take items from it or swap their
own weapon onto it, unload or change its ammo, or get its items by destroying or picking up the
rack, and it is refilled from its preset every RefillMinutes. Staff get a normal,
takeable fill instead.
The game only mounts an item on a rack when a player is on the server. With nobody online, a
refill clears the display racks and mounts nothing until the next refill with a player online.

Install
Drop plugins/MixRackKit.cs into carbon/plugins (Carbon) or oxide/plugins (Oxide).
Copy the data/MixRackKit folder into carbon/data (or oxide/data). Without kits.json the plugin
loads with no kits and prints a warning; it does not create a default file.

Commands
/rackkit                  Short help. Anyone.
/rackkit list             Kit ids and labels. Anyone.
/rackkit here <preset>    Fill the rack you look at (within 6 m) as a display. Anyone who owns the
                          rack or has building rights there, on an empty rack or one of their
                          displays; staff get a takeable fill on any rack.
/rackkit fill <preset>    Clear and fill the weapon racks in the building of the rack you look at
                          (or just that rack when it stands outside a building). Display racks
                          are left alone. mixrackkit.admin or server admin.
/rackkit reload           Re-read kits.json. mixrackkit.admin or server admin.
rackkit.list              Console: kit ids, labels and item counts. Server console, RCON or admin.
rackkit.reload            Console: re-read kits.json and rebuild display protection.
rackkit.fill <preset> <netId> [netId...]
                          Console: fill the racks with those net ids and protect them until the
                          next reload. They are not refilled.

Permissions
mixrackkit.admin  /rackkit fill and /rackkit reload; take from or swap onto display racks.
                  Server admins can use the commands without it, but need it to take from displays.

Config highlights
File: carbon/configs/MixRackKit.json
Enabled               true   Master switch.
RefillMinutes         5      Minutes between refills of display racks (at least 1). A refillMinutes
                             value in kits.json replaces this one.
ProtectDisplayRacks   true   Items on display racks cannot be taken. protectDisplayRacks: true in
                             kits.json turns it on whatever the config says.
BlockSwapOnProtected  true   Also refuse swapping a weapon onto a display rack.

kits.json format
"kits": { "<id>": { "label": "...", "items": [ { "shortname": "rifle.ak", "skinId": 0,
"label": "...", "amount": 1, "ammo": "ammo.rifle", "ammoAmount": 30 } ] } }
Run rackkit.reload (or /rackkit reload) after editing it.

Tested
Tested alone on Carbon 2.0.259.0 with Rust build 25454815 on 2026-09-28; runs without the rest of the MiX Server Pack.

Feedback
Questions, bugs and ideas: MixMods Discord, discord.gg/MZCdmvFrQ, message B1.

Licence
Free to run and change on your own servers. See LICENCE.txt.
