From 21beefe668ea7ca31e2925499f0423dd973e2a78 Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 5 Apr 2025 16:51:53 -0500 Subject: [PATCH] feat: Enhance documentation and update variable names This commit introduces several enhancements to the Forge client, including improved documentation for the Garage and Locker modules, updates to variable names for consistency, and additions to the .gitignore file. The following changes were made: - **Garage and Locker Modules:** Added comprehensive README.md files to the Garage and Locker modules, providing overviews, dependency information, author details, feature descriptions, event handler usage, debugging instructions, and version information. - **Variable Name Consistency:** Updated variable names in `fnc_playerDBSave.sqf` and `fnc_firstLogin.sqf` to use the `FORGE_PayGrade` constant instead of `Paygrade` for consistency with the Forge naming conventions. - **.gitignore:** Added `/api` to the .gitignore file to exclude the Forge API directory from version control. --- .gitignore | 2 + addons/admin/README.md | 63 ++++++++++++++++++ addons/arsenal/README.md | 64 ++++++++++++++++++ addons/bank/README.md | 76 ++++++++++++++++++++++ addons/garage/README.md | 59 ++++++++++++++++- addons/init/functions/fnc_playerDBSave.sqf | 2 +- addons/locker/README.md | 59 ++++++++++++++++- addons/medical/README.md | 61 +++++++++++++++++ addons/player/functions/fnc_firstLogin.sqf | 2 +- addons/service/README.md | 57 ++++++++++++++++ addons/store/README.md | 61 +++++++++++++++++ 11 files changed, 498 insertions(+), 8 deletions(-) create mode 100644 addons/admin/README.md create mode 100644 addons/arsenal/README.md create mode 100644 addons/bank/README.md create mode 100644 addons/medical/README.md create mode 100644 addons/service/README.md create mode 100644 addons/store/README.md diff --git a/.gitignore b/.gitignore index 7cd12b9..5eb01d3 100644 --- a/.gitignore +++ b/.gitignore @@ -404,6 +404,8 @@ hemtt hemtt.exe *.biprivatekey +# Forge API +/api # Added by cargo diff --git a/addons/admin/README.md b/addons/admin/README.md new file mode 100644 index 0000000..77b61fb --- /dev/null +++ b/addons/admin/README.md @@ -0,0 +1,63 @@ +# Forge Admin Module + +## Overview +The Admin module provides administrative functionality for the Forge client system. It includes features for user management, messaging, and administrative controls. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Administrative Functions +1. **Admin Initialization** (`fnc_initAdmin.sqf`) + - Initializes the admin system + - Sets up necessary permissions and configurations + +2. **Admin Interface** (`fnc_openAdmin.sqf`) + - Opens the administrative user interface + - Provides access to administrative controls + +3. **User Management** + - **Promotion** (`fnc_adminPromote.sqf`) + - Handles user promotion to administrative roles + - **Transfer** (`fnc_adminTransfer.sqf`) + - Manages administrative role transfers + - **Refresh** (`fnc_adminRefresh.sqf`) + - Updates administrative permissions and states + +4. **Communication** + - **Admin Messages** (`fnc_adminMessage.sqf`) + - Handles administrative messaging system + +### User Interface +The module includes two main UI components: +1. **RscCommon.hpp** + - Common UI elements and definitions +2. **RscAdmin.hpp** + - Administrative interface specific elements + +## 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 + +## Usage +To use the admin module: +1. Ensure the module is properly loaded in your mission +2. Access administrative functions through the provided UI +3. Use appropriate administrative commands based on your role + +## 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. \ No newline at end of file diff --git a/addons/arsenal/README.md b/addons/arsenal/README.md new file mode 100644 index 0000000..d20eca1 --- /dev/null +++ b/addons/arsenal/README.md @@ -0,0 +1,64 @@ +# 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. + +## 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 + +2. **Armory Interface** (`fnc_openArmory.sqf`) + - Opens the armory user interface + - Provides access to weapon and equipment management + +3. **Item Management** + - **Add Armory Items** (`fnc_addArmoryItem.sqf`) + - Handles adding new items to the armory + - **Save Unlocks** (`fnc_saveUnlocks.sqf`) + - Manages the persistence of unlocked items + - **Update Unlocks** (`fnc_updateUnlocks.sqf`) + - Updates the unlock status of items + +### Vehicle Management +1. **Garage System** + - **Open Garage** (`fnc_openGarage.sqf`) + - Provides access to the vehicle garage interface + - **Add Garage Vehicle** (`fnc_addGarageVehicle.sqf`) + - Handles adding new vehicles to the garage + - **Add Virtual Vehicles** (`fnc_addVirtualVehicles.sqf`) + - Manages virtual vehicle entries in the garage + +## 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 + +## 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. \ No newline at end of file diff --git a/addons/bank/README.md b/addons/bank/README.md new file mode 100644 index 0000000..e73aae2 --- /dev/null +++ b/addons/bank/README.md @@ -0,0 +1,76 @@ +# Forge Bank Module + +## Overview +The Bank module provides a comprehensive banking system for the Forge client. It includes features for managing player finances, transfers, and timesheet functionality. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Banking System +1. **Bank Initialization** (`fnc_initBank.sqf`) + - Initializes the banking system + - Sets up necessary configurations and account structures + +2. **Bank Interface** (`fnc_openBank.sqf`) + - Opens the banking user interface + - Provides access to all banking functions + +3. **Transaction Management** + - **Deposit** (`fnc_deposit.sqf`) + - Handles money deposits into bank accounts + - **Withdraw** (`fnc_withdraw.sqf`) + - Manages money withdrawals from bank accounts + - **Transfer** (`fnc_transfer.sqf`) + - Handles money transfers between players + - **Submit** (`fnc_submit.sqf`) + - Processes transaction submissions + - **Refresh** (`fnc_refresh.sqf`) + - Updates account information and balances + +### User Interface +The module includes several UI components: +1. **Base Controls** (`BaseControls.hpp`) + - Common UI elements and definitions +2. **Bank Dialog** (`RscBankDialog.hpp`) + - Banking interface specific elements + +### Interface Elements +The module defines several UI control IDs: +- Account Information Display +- Amount Input Fields +- Player Selection +- Transaction Buttons (Deposit, Withdraw, Transfer) +- Wallet and Bank Balance Displays +- Rating System +- Timesheet Integration + +## 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 bank module: +1. Ensure the module is properly loaded in your mission +2. Access the bank through the provided UI +3. Perform transactions using the appropriate functions +4. Monitor account status and transactions + +## 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. \ No newline at end of file diff --git a/addons/garage/README.md b/addons/garage/README.md index bb1536d..01e71e9 100644 --- a/addons/garage/README.md +++ b/addons/garage/README.md @@ -1,4 +1,57 @@ -forge_garage -========== +# Forge Garage Module -A player garage addon that provides personal storage functionality. Players can store and retrieve their vehicles securely using individual garages. This addon handles the storage and management of player vehicles in a safe and organized way. \ No newline at end of file +## Overview +The Garage module provides a comprehensive vehicle management system for the Forge client. It includes features for storing, spawning, and managing vehicles in a garage environment. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Garage System +1. **Garage Initialization** (`fnc_initGarage.sqf`) + - Initializes the garage system + - Sets up necessary configurations and vehicle storage + +2. **Garage Interface** (`fnc_openGarage.sqf`) + - Opens the garage user interface + - Provides access to vehicle management functions + +3. **Vehicle Management** + - **Spawn Vehicle** (`fnc_spawnVehicle.sqf`) + - Handles vehicle spawning from garage + - **Store Vehicle** (`fnc_storeVehicle.sqf`) + - Manages vehicle storage in garage + - **Fetch Garage** (`fnc_fetchGarage.sqf`) + - Retrieves garage vehicle information + - **Fetch Nearby** (`fnc_fetchNearby.sqf`) + - Locates and manages nearby vehicles + +## 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 garage module: +1. Ensure the module is properly loaded in your mission +2. Access the garage through the provided UI +3. Manage vehicles using the appropriate functions +4. Monitor vehicle status and location + +## 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. \ No newline at end of file diff --git a/addons/init/functions/fnc_playerDBSave.sqf b/addons/init/functions/fnc_playerDBSave.sqf index 4ea2e81..700ae0d 100644 --- a/addons/init/functions/fnc_playerDBSave.sqf +++ b/addons/init/functions/fnc_playerDBSave.sqf @@ -33,7 +33,7 @@ getPlayerUID player, "bank", [GETVAR(player,FORGE_Bank,0)], "number", [GETVAR(player,FORGE_Phone_Number,"unknown")], "email", [GETVAR(player,FORGE_Email,"unknown@spearnet.mil")], -"paygrade", [GETVAR(player,Paygrade,"E1")], +"paygrade", [GETVAR(player,FORGE_PayGrade,"E1")], "organization", [GETVAR(player,FORGE_Organization,"")], "reputation", [rating player], "loadout", [getUnitLoadout player], diff --git a/addons/locker/README.md b/addons/locker/README.md index f14845e..8e33d9b 100644 --- a/addons/locker/README.md +++ b/addons/locker/README.md @@ -1,4 +1,57 @@ -forge_locker -========== +# Forge Locker Module -A player locker addon that provides personal storage functionality. Players can store and retrieve their items securely using individual lockers. This addon handles the storage and management of player inventories in a safe and organized way. \ No newline at end of file +## Overview +The Locker module provides a comprehensive equipment management system for the Forge client. It includes features for storing, equipping, and managing player gear in a secure locker system. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Locker System +1. **Locker Initialization** (`fnc_initLocker.sqf`) + - Initializes the locker system + - Sets up necessary configurations and storage structures + +2. **Locker Interface** (`fnc_openLocker.sqf`) + - Opens the locker user interface + - Provides access to equipment management functions + +3. **Equipment Management** + - **Store Gear** (`fnc_storeGear.sqf`) + - Handles equipment storage in locker + - **Equip Gear** (`fnc_equipGear.sqf`) + - Manages equipment equipping from locker + - **Fetch Locker** (`fnc_fetchLocker.sqf`) + - Retrieves locker contents and information + - **Fetch Player** (`fnc_fetchPlayer.sqf`) + - Retrieves player equipment 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 locker module: +1. Ensure the module is properly loaded in your mission +2. Access the locker through the provided UI +3. Manage equipment using the appropriate functions +4. Monitor equipment status and storage + +## 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. \ No newline at end of file diff --git a/addons/medical/README.md b/addons/medical/README.md new file mode 100644 index 0000000..c7ad220 --- /dev/null +++ b/addons/medical/README.md @@ -0,0 +1,61 @@ +# Forge Medical Module + +## Overview +The Medical module provides a comprehensive medical system for the Forge client. It includes features for handling player health, death, respawn, and medical costs. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Medical System +1. **Medical Initialization** (`fnc_initMedical.sqf`) + - Initializes the medical system + - Sets up necessary configurations and health monitoring + +2. **Health Management** + - **Heart Beat** (`fnc_heartBeat.sqf`) + - Monitors player vital signs + - **On Killed** (`fnc_onKilled.sqf`) + - Handles player death events + - **On Respawn** (`fnc_onRespawn.sqf`) + - Manages player respawn process + +3. **Inventory Management** + - **Move Inventory** (`fnc_moveInventory.sqf`) + - Handles inventory transfers during medical events + - **Save Dropped Weapons** (`fnc_saveDroppedWeapons.sqf`) + - Manages weapon preservation on death + +4. **Medical Costs** + - **Deduct Medical Cost** (`fnc_deductMedicalCost.sqf`) + - Handles medical service payments + +## 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 medical module: +1. Ensure the module is properly loaded in your mission +2. Monitor player health through the medical system +3. Handle medical events using the appropriate functions +4. Manage medical costs and inventory during medical events + +## 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. \ No newline at end of file diff --git a/addons/player/functions/fnc_firstLogin.sqf b/addons/player/functions/fnc_firstLogin.sqf index e5ea860..50a07e5 100644 --- a/addons/player/functions/fnc_firstLogin.sqf +++ b/addons/player/functions/fnc_firstLogin.sqf @@ -32,7 +32,7 @@ _player addRating 500; SETPVAR(_player,FORGE_Bank,2000); SETPVAR(_player,FORGE_Holster_Weapon,true); -SETPVAR(_player,PayGrade,_defaultPaygrade); +SETPVAR(_player,FORGE_PayGrade,_defaultPaygrade); private _number = "0160" + (_uid select [count (toArray _uid) - 6, 6]); private _email = _number + "@spearnet.mil"; diff --git a/addons/service/README.md b/addons/service/README.md new file mode 100644 index 0000000..c16d2bc --- /dev/null +++ b/addons/service/README.md @@ -0,0 +1,57 @@ +# Forge Service Module + +## Overview +The Service module provides a comprehensive vehicle service system for the Forge client. It includes features for vehicle repair, refueling, rearming, and general maintenance. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Service System +1. **Service Initialization** (`fnc_initService.sqf`) + - Initializes the service system + - Sets up necessary configurations and service points + +2. **Vehicle Maintenance** + - **Repair** (`fnc_repair.sqf`) + - Handles vehicle repair operations + - **Refuel** (`fnc_refuel.sqf`) + - Manages vehicle refueling + - **Rearm** (`fnc_rearm.sqf`) + - Handles vehicle rearming + - **Fuel** (`fnc_fuel.sqf`) + - Manages fuel system operations + +3. **Vehicle Service** (`fnc_vehicle.sqf`) + - Comprehensive vehicle service management + - Coordinates different service operations + +## 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 service module: +1. Ensure the module is properly loaded in your mission +2. Access service points through the provided functions +3. Perform vehicle maintenance using the appropriate functions +4. Monitor vehicle status and service operations + +## 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. \ No newline at end of file diff --git a/addons/store/README.md b/addons/store/README.md new file mode 100644 index 0000000..835cfec --- /dev/null +++ b/addons/store/README.md @@ -0,0 +1,61 @@ +# Forge Store Module + +## Overview +The Store module provides a comprehensive shopping system for the Forge client. It includes features for purchasing items, vehicles, and managing store operations. + +## Dependencies +- forge_client_main + +## Authors +- J. Schmidt +- Creedcoder +- IDSolutions + +## Features + +### Store System +1. **Store Initialization** (`fnc_initStore.sqf`) + - Initializes the store system + - Sets up necessary configurations and product catalog + +2. **Store Interface** + - **Open Store** (`fnc_openStore.sqf`) + - Opens the store user interface + - **Select Product** (`fnc_selectProduct.sqf`) + - Handles product selection + - **Change Filter** (`fnc_changeFilter.sqf`) + - Manages product filtering + - **Change Payment** (`fnc_changePayment.sqf`) + - Handles payment method selection + +3. **Purchase Management** + - **Handle Purchase** (`fnc_handlePurchase.sqf`) + - Processes purchase transactions + - **Buy Item** (`fnc_buyItem.sqf`) + - Handles item purchases + - **Buy Vehicle** (`fnc_buyVehicle.sqf`) + - Manages vehicle purchases + +## 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 store module: +1. Ensure the module is properly loaded in your mission +2. Access the store through the provided UI +3. Browse and filter products +4. Make purchases using the appropriate functions + +## 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. \ No newline at end of file