Add: armor plates support with new database tables and loadout functionality

fix: only required mods are applied to guns for weight management.
This commit is contained in:
serversdwn
2026-02-24 16:08:58 +00:00
parent 84768ae587
commit 9d572f5d15
7 changed files with 471 additions and 126 deletions

21
migration_add_plates.sql Normal file
View File

@@ -0,0 +1,21 @@
-- Migration: add armor plates support
-- Run: sqlite3 tarkov.db < migration_add_plates.sql
PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS armor_open_slots (
carrier_id TEXT NOT NULL REFERENCES gear_items(id) ON DELETE CASCADE,
slot_nameid TEXT NOT NULL,
zones TEXT,
PRIMARY KEY (carrier_id, slot_nameid)
);
CREATE TABLE IF NOT EXISTS armor_slot_plates (
carrier_id TEXT NOT NULL,
slot_nameid TEXT NOT NULL,
plate_id TEXT NOT NULL REFERENCES gear_items(id) ON DELETE CASCADE,
PRIMARY KEY (carrier_id, slot_nameid, plate_id),
FOREIGN KEY (carrier_id, slot_nameid) REFERENCES armor_open_slots(carrier_id, slot_nameid) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS idx_armor_slot_plates_plate ON armor_slot_plates(plate_id);