client/addons/store/README.md
Jacob Schmidt 21beefe668 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.
2025-04-05 16:51:53 -05:00

1.9 KiB

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:

#define DEBUG_MODE_FULL

Version Information

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