85 Commits

Author SHA1 Message Date
Jacob Schmidt
ee7d1603ef feat(garage): add refuel and repair service requests
- Implemented requestRefuel and requestRepair functions in bridge.js to handle vehicle service requests.
- Updated AppShell.js to include buttons for refueling and repairing nearby vehicles, with appropriate state management.
- Added requestRefuelSelected and requestRepairSelected actions in events.js to validate and process service requests.
- Enhanced economy README and usage guides to document new refuel and repair service functionalities.
- Introduced server-side handling for refuel requests in FEconomyStore, ensuring organization billing and fuel management.
2026-04-18 14:09:14 -05:00
Jacob Schmidt
8117e6ffa6 feat(economy): Enhance economy system with service charges and medical billing
- Expanded README.md to detail economy addon functionalities including refueling, medical services, and service charges.
- Updated XEH_PREP.hpp to include initSEconomyStore preparation.
- Modified XEH_postInit.sqf to ensure MEconomyStore initializes only if not nil.
- Adjusted XEH_preInit.sqf to initialize SEconomyStore correctly.
- Updated config.cpp to include forge_server_common as a required addon.
- Enhanced fnc_initFEconomyStore.sqf to manage fuel refueling sessions and organization charges.
- Improved fnc_initMEconomyStore.sqf to handle medical billing and fallback to organization funds.
- Created fnc_initSEconomyStore.sqf for organization-funded service charges and repairs.
- Updated org.rs and org.rs service layer to support member debt recording and organization fund charging.
- Added ECONOMY_USAGE_GUIDE.md for comprehensive documentation on economy functionalities.
- Updated MODULE_REFERENCE.md and README.md to include links to the new economy guide.
2026-04-18 13:37:09 -05:00
Jacob Schmidt
89169f1e84 Update documentation and add new client usage guides
- Revised README.md for the Forge Client Example Addon to clarify its purpose as a template.
- Enhanced MODULE_REFERENCE.md to categorize guides into Server and Extension guides and Client guides.
- Created detailed usage guides for various client addons including Actor, Bank, CAD, Garage, Locker, Notifications, Organization, Phone, and Store.
- Added a Client Common Usage Guide to outline shared browser UI bridge patterns.
- Introduced a Client Main Usage Guide to define the foundational elements for client addons.
- Established authoritative state notes and usage rules across new guides to ensure clarity on server ownership and client responsibilities.
2026-04-18 13:04:01 -05:00
Jacob Schmidt
b8fef9be98 Enhance task module documentation with CAD compatibility details and BIS task prerequisites 2026-04-18 12:32:50 -05:00
Jacob Schmidt
0cfaec86d0 Add CAD compatibility section to task module documentation 2026-04-18 12:15:24 -05:00
Jacob Schmidt
81baca90d3 Enhance task module documentation with new task creation methods and usage examples 2026-04-18 12:11:16 -05:00
Jacob Schmidt
586c3dcde8 Add usage guides for Actor, Bank, Org, Phone, CAD, Task, and Owned Storage modules 2026-04-18 12:03:54 -05:00
Jacob Schmidt
9d789440e0 Enhance documentation and functionality across various server addons
- Updated README.md files for extension, garage, locker, main, organization, phone, store, and task addons to provide clearer overviews, dependencies, main components, and usage notes.
- Improved task module documentation to clarify timer semantics and server task flows, ensuring accurate usage of time limits.
- Adjusted default values for task time limits and IED timers to enforce positive countdown requirements.
- Added new CAD addon for dispatch coordination, including its overview, dependencies, main components, and event handling.
2026-04-18 11:55:19 -05:00
Jacob Schmidt
5576cc4746 Refactor task modules for improved parameter handling and logging
- Updated fnc_defuseModule, fnc_deliveryModule, fnc_destroyModule, fnc_hostageModule, fnc_hvtModule to enhance parameter retrieval and logging.
- Introduced error handling for missing task IDs across modules.
- Consolidated task initialization logic into fnc_startTask for better maintainability.
- Added fnc_cargoModule as a sync target for cargo entities in delivery tasks.
- Improved logging to provide clearer insights into task parameters and synced entities.
2026-04-17 19:34:21 -05:00
8b5d1bdf76 Merge pull request 'Refactor store module: rename StoreStore to StorefrontStore, update initialization and checkout logic, and enhance documentation' (#7) from feature/surrealdb-storage into master
Reviewed-on: #7
2026-04-17 18:15:49 -05:00
ad7a42b03b Merge branch 'master' into feature/surrealdb-storage 2026-04-17 18:15:45 -05:00
Jacob Schmidt
f0d8d37921 Refactor store module: rename StoreStore to StorefrontStore, update initialization and checkout logic, and enhance documentation 2026-04-17 18:11:29 -05:00
b0b53eb28b Merge pull request 'Expand framework usage guides' (#6) from feature/surrealdb-storage into master
Reviewed-on: #6
2026-04-17 17:57:07 -05:00
Jacob Schmidt
23144ccd7a Merge remote-tracking branch 'origin/master' into feature/surrealdb-storage 2026-04-17 17:56:06 -05:00
Jacob Schmidt
9d950db890 Expand framework usage guides 2026-04-17 17:55:38 -05:00
9d17d68453 Merge pull request 'Add framework module documentation' (#5) from feature/surrealdb-storage into master
Reviewed-on: #5
2026-04-17 17:41:36 -05:00
Jacob Schmidt
cec65381dd Merge remote-tracking branch 'origin/master' into feature/surrealdb-storage 2026-04-17 17:39:46 -05:00
Jacob Schmidt
2063efab80 Add framework module documentation 2026-04-17 17:39:20 -05:00
b620393eae Merge pull request 'Remove Redis backend support' (#4) from feature/surrealdb-storage into master
Reviewed-on: #4
2026-04-17 17:29:34 -05:00
Jacob Schmidt
8268bcf4ff Merge remote-tracking branch 'origin/master' into feature/surrealdb-storage 2026-04-17 17:23:59 -05:00
Jacob Schmidt
0b2b6265f3 Remove Redis backend support 2026-04-17 17:09:21 -05:00
Jacob Schmidt
06c634c642 Move extension storage to SurrealDB schema modules
- Split storage repositories into per-domain modules
- Add SurrealDB schema definitions and route handlers
- Update phone docs for new persistent table layout
2026-04-16 19:55:05 -05:00
Jacob Schmidt
4532e7b73d Add SurrealDB-backed phone storage and message deletion
- Wire phone, garage, and locker stores to the new storage layer
- Add delete flows for messages and emails in the phone UI
- Update contact, mail, and message views for the new data model
2026-04-11 22:36:11 -05:00
Jacob Schmidt
a8415eb1fd Add phone addon and wire UI events
- Introduce client phone addon, UI, and XEH handlers
- Route actor phone interaction to the new phone UI
- Add initial phone state, event handling, and persistence
2026-04-06 19:07:18 -05:00
Jacob Schmidt
5a032a45d9 Merge branch 'development' into master 2026-04-06 06:12:09 -05:00
Jacob Schmidt
d8812df381 Refresh org portal state and treasury interactions
- Hydrate portal/session data from login and sync payloads
- Add treasury notices for credit, invite, leave, and disband actions
- Improve portal cards and modal UI for members, fleet, and treasury
2026-04-06 06:06:09 -05:00
Jacob Schmidt
8a31d456f1 Add org invite request and response handling
- Wire invite request, accept, and decline events through the UI bridge
- Add client and server handlers for invite success and failure responses
- Extend portal state and UI to support member invite actions
2026-04-05 22:32:00 -05:00
Jacob Schmidt
3599f802c8 Tighten actor cache loading flow
- Clarify client loading status text
- Document server-side actor hydration and snapshot recovery
- Stop hot reads from forcing repository initialization
2026-04-05 21:57:45 -05:00
Jacob Schmidt
cd3e937cdc Hydrate missing actor and org records from live data
- Require actor records to exist in storage before hot load
- Fall back to player snapshots to fill missing actor fields and org defaults
- Refresh org member names when a better value is available
- Keep bootstrap extension calls on the direct path by default
2026-04-05 21:44:10 -05:00
Jacob Schmidt
1d54cc70c3 Move hot state into transient extension-backed stores
- Remove in-SQF registry mirroring for actor, bank, CAD, org, and task state
- Add validation harness and persistence warnings for hot-state flows
- Treat CAD and task operational state as restart-scoped
2026-04-05 10:05:48 -05:00
ff7ff0c4e5 Implement org credit line debt and bank repayment flow (#2)
## Summary

This finishes the org credit line workflow so it behaves like reserved treasury-backed credit instead of a simple member allowance.

## What changed

- reserve org funds immediately when a credit line is assigned
- track credit lines with:
  - approved amount
  - available amount
  - outstanding principal
  - interest rate
  - amount due
- consume reserved credit during store checkout without charging org funds a second time
- add credit line repayment through the bank app
- sync richer credit line state into org and bank payloads/UI
- keep legacy `amount` compatibility mapped to available credit for older consumers

## User-facing behavior

- assigning a credit line now reduces available org funds immediately
- spending on `credit_line` reduces available credit and creates debt with interest
- the bank app now shows outstanding credit debt and allows repayment from personal bank funds
- the org treasury view now shows reserved credit and outstanding due totals

## Validation

- `cargo fmt`
- `npm run build:webui`
- `cargo test -p forge-services --quiet`
- `cargo test -p forge-server --quiet`

## Follow-up checks

- validate in-game that assigning a credit line reduces org funds immediately
- validate store checkout with `credit_line` updates available credit and debt correctly
- validate bank repayment decreases player bank balance, increases org funds, and reduces amount due

Co-authored-by: Jacob Schmidt <innovativestudios@outlook.com>
Reviewed-on: #2
2026-04-02 16:50:38 -05:00
Jacob Schmidt
5ded3a60e5 Add credit line repayment to bank UI
- Wire bank client and server for credit line repayment requests
- Show credit line balance and repay action in the banking view
- Extend org/bank payloads and models with credit line fields
2026-04-02 16:41:10 -05:00
Jacob Schmidt
b8dd3ef651 Add task and request payload plumbing to CAD dispatcher
- Thread request data through UI bridge and dispatcher events
- Add task models, repositories, services, and extension wiring
- Include submitted request fields in converted order notes
2026-04-02 15:35:39 -05:00
Jacob Schmidt
445a114c1c Refactor org and store services around shared payloads
- Add shared store payload handling in server and extension code
- Remove obsolete org member and treasury service split
- Update client repositories and portal UI/store hydration
2026-04-02 13:56:49 -05:00
Jacob Schmidt
ffbfc70be8 Add checkout mutation and defer hot state saves
- Replace bank payment flow with a checkout mutation using explicit source context
- Return backend errors to players instead of silently falling back to local state
- Queue hot state persistence for actors, garages, lockers, orgs, and owned assets
2026-04-02 09:54:32 -05:00
Jacob Schmidt
53bc8db7d0 Handle bank account sync in UI bridge
- Route bank sync payloads through the client bridge
- Refresh account state without rebuilding the full session
- Split CAD dispatcher UI into modular source files
2026-04-02 09:10:12 -05:00
Jacob Schmidt
4ea7cf7d05 Add CAD request workflows and focus actions
- Add request hydration, submission, closing, and response handling
- Wire UI events for dispatch orders, support requests, and map focus
- Expand dispatcher layout for alerts, requests, and detail views
2026-03-31 20:14:45 -05:00
Jacob Schmidt
112488f82e Rename offline status to unavailable
- Update CAD client UI and generated site assets
- Keep dispatcher and sidepanel status lists aligned with server defaults
- Refresh task, assignment, and group repository initialization
2026-03-31 06:21:43 -05:00
Jacob Schmidt
56b560edf2 Support dispatch board and map view switching
- Add dispatchView state to the CAD repository and hydrate payloads
- Toggle the dispatcher between board and map layouts in the UI bridge
- Update side panel logic to hide contract tabs in dispatch map mode
2026-03-30 21:39:39 -05:00
Jacob Schmidt
1ca2499af7 Add dispatcher mode to CAD UI
- Add a dispatcher web view and layout switching
- Route group role updates and dispatcher hydration through the UI bridge
- Refresh top bar and hide map/side panel outside operations mode
2026-03-30 20:22:48 -05:00
Jacob Schmidt
0e9d0d3dc4 Refactor CAD sidepanel to hydrate board data
- Replace task-only refresh flow with hydrate/assignment/group events
- Add contracts, groups, and activity tabs to the client sidepanel
- Introduce server-side CAD store and request handlers
2026-03-29 22:17:07 -05:00
Jacob Schmidt
45a4f7460a Integrate task contracts and CAD UI pipeline
- add the imported server task addon to the current framework with task ownership, task catalog, mission-manager attack generation, org-owned reward routing, participant notifications, and reputation syncing
- restructure org persistence so core org data, assets, fleet, and members are handled through the current Redis/extension model with matching Rust repository and service updates
- wire the client CAD addon into the framework, actor device action, shared web UI bridge pattern, and task listing/acceptance flow
- add a source-driven CAD web UI layout with ui.config.mjs and extend the shared web UI builder to support custom HTML template pages for multi-surface UIs
2026-03-28 02:20:34 -05:00
Jacob Schmidt
65f33ee02a Align client module naming and org member hydrate 2026-03-27 19:00:32 -05:00
Jacob Schmidt
db565d1e51 Refactor module hydration and init flow 2026-03-25 20:29:51 -05:00
Jacob Schmidt
6c0ce9e867 refactor(bank): split monolithic store into focused modules; fix locker grant for attachments
- Split BankBaseStore into SessionManager, Messenger, Model, Store, Validator
- Extract validation logic into BankValidator with try/catch and per-action methods
- Remove duplicate notifications from transaction actions
- Update event handlers to call validator first, forward context to store/session
- Fix locker grantItems: add missing 'attachment' category mapping to 'item'
- Fix locker grantItems: replace exitWith with if/else to prevent skipping remaining items

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-16 10:54:25 -05:00
7a8ca6b237 Merge pull request 'Merge development into master: shared Web UI runtime, bridge-driven UIs, and server-authoritative store flow' (#1) from development into master
Reviewed-on: #1
2026-03-14 20:12:08 -05:00
Jacob Schmidt
68218304ab Move store catalog service server-side and rebuild WebUI bundles
- Shift store catalog initialization from client addon to server addon
- Rebuild/minify bank, garage, org, and store WebUI site assets
- Update webui build tooling and npm metadata; ignore node_modules
2026-03-14 20:06:27 -05:00
Jacob Schmidt
603963c935 Refactor bank UI to bridge-driven single-page flow
- Replace separate bank/ATM pages with a unified `index.html` app bundle
- Split bank init into `initClass`, `initSessionService`, and `initUIBridge`
- Route UI events through `BankUIBridge` and refresh session payloads after sync
2026-03-14 12:11:34 -05:00
Jacob Schmidt
bdc1e36e63 Implement interactive garage UI with service-based client bridge
- replace placeholder garage interaction with real UI open flow
- add catalog/session/UI bridge services for hydrate, sync, store, and retrieve actions
- migrate garage web UI bundle to new app shell/runtime structure
- align org/store function naming with shared init and UI bridge patterns
2026-03-14 03:06:18 -05:00
Jacob Schmidt
e15d4b3066 Introduce shared web UI runtime and migrate org/store bridges
- add common ForgeWebUI runtime, site loader, and SQF WebUI bridge base declarations
- migrate org and store web UIs to src-driven bundles and new bridge/bootstrap flow
- update addon configs/prep hooks and document the shared CT_WEBBROWSER framework
2026-03-14 00:40:34 -05:00