# Forge Arsenal Module

## Overview
The Arsenal module provides a comprehensive weapon and vehicle management system for the Forge client. It includes features for managing armory items, vehicle garages, and unlock systems, with support for both traditional and virtual arsenals.

## Dependencies
- forge_client_main

## Authors
- J. Schmidt
- Creedcoder
- IDSolutions

## Features

### Armory Management
1. **Armory Initialization** (`fnc_initArsenal.sqf`)
   - Initializes the arsenal system
   - Sets up necessary configurations and permissions
   - Configures default armory and garage data
   - Supports both traditional and virtual arsenal types

2. **Armory Interface** (`fnc_openArmory.sqf`)
   - Opens the armory user interface
   - Provides access to weapon and equipment management
   - Supports both traditional and ACE arsenal interfaces

3. **Item Management**
   - **Add Armory Items** (`fnc_addArmoryItem.sqf`)
     - Handles adding new items to the armory
     - Supports multiple item types:
       - Facewear (goggles, masks)
       - Headgear (helmets, caps)
       - HMD (night vision devices)
       - Items (tools, medical supplies)
       - Uniforms
       - Vests
       - Weapons
       - Magazines
       - Backpacks
   - **Save Unlocks** (`fnc_saveUnlocks.sqf`)
     - Manages the persistence of unlocked items
     - Integrates with player database system
   - **Update Unlocks** (`fnc_updateUnlocks.sqf`)
     - Updates the unlock status of items
     - Maintains synchronization between client and server

### Vehicle Management
1. **Garage System**
   - **Open Garage** (`fnc_openGarage.sqf`)
     - Provides access to the vehicle garage interface
     - Categorizes vehicles by type
   - **Add Garage Vehicle** (`fnc_addGarageVehicle.sqf`)
     - Handles adding new vehicles to the garage
     - Supports vehicle categories:
       - Cars
       - Armored vehicles
       - Helicopters
       - Planes
       - Naval vessels
       - Static weapons
   - **Add Virtual Vehicles** (`fnc_addVirtualVehicles.sqf`)
     - Manages virtual vehicle entries in the garage
     - Automatically categorizes vehicles by type
     - Maintains vehicle model information

## Event Handlers
The module uses several event handlers for initialization and execution:
- `XEH_preInit.sqf`: Pre-initialization setup
- `XEH_postInit.sqf`: Post-initialization tasks
- `XEH_preStart.sqf`: Pre-start configuration
- `XEH_postInit_client.sqf`: Client-specific post-initialization
- `XEH_preInit_server.sqf`: Server-specific pre-initialization

## Usage
To use the arsenal module:
1. Ensure the module is properly loaded in your mission
2. Access the armory through the provided UI for weapon management
3. Use the garage interface for vehicle management
4. Manage unlocks and permissions through the appropriate functions

## Item Types
The module supports various item categories:
- Weapons (Primary, Secondary, Handgun)
- Magazines
- Items (Tools, Medical, etc.)
- Uniforms
- Vests
- Backpacks
- Facewear
- Headgear
- HMD (Night Vision)

## Vehicle Categories
Vehicles are organized into the following categories:
1. Cars (Light vehicles, transport)
2. Armor (Tanks, APCs)
3. Helicopters (All rotary-wing aircraft)
4. Planes (Fixed-wing aircraft)
5. Naval (Boats, ships)
6. Static (Weapons, emplacements)

## Debugging
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
```cpp
#define DEBUG_MODE_FULL
```

## Version Information
Version information is managed through the main Forge client system configuration.

## Technical Details
- Supports both traditional Arma 3 arsenal and ACE arsenal systems
- Automatic vehicle categorization based on class inheritance
- Persistent unlock system with database integration
- Efficient item and vehicle management
- Client-server synchronization for unlocks
- Integration with the locker system for item storage
- Support for virtual and physical vehicle spawning 