
This commit introduces significant changes to the admin panel, store, and arsenal systems, focusing on improved functionality, UI enhancements, and code optimization. **Admin Panel:** - Migrated to a web-based UI for improved user experience and maintainability. - Implemented dynamic player listing with filtering and search capabilities. - Added functionality for managing player paygrades, sending messages, and transferring funds. - Integrated server-side events for handling admin actions. **Store:** - Added `handleDelivery` event handler. - Streamlined product selection and purchase processes. - Improved handling of organization funds and player balances. - Refactored code for better readability and maintainability. **Arsenal:** - Enhanced initialization process with improved data validation. - Optimized item unlocking logic. These changes aim to provide a more robust, user-friendly, and efficient experience for both administrators and players.
51 lines
1.2 KiB
Plaintext
51 lines
1.2 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: forge_store_fnc_openStore
|
|
* Author: J. Schmidt
|
|
*
|
|
* Description:
|
|
* Opens the store.
|
|
*
|
|
* Arguments:
|
|
* 0: Store <OBJECT> - The store object
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [storeObject] call forge_store_fnc_openStore
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params [["_store", objNull, [objNull]]];
|
|
|
|
if (isNull _store) exitWith {};
|
|
|
|
disableSerialization;
|
|
createDialog "RscStoreDialog";
|
|
|
|
private _display = findDisplay IDD_STOREDIALOG;
|
|
private _categoryList = _display displayCtrl IDC_CATEGORYLIST;
|
|
private _paymentList = _display displayCtrl IDC_PAYMENTLIST;
|
|
private _storeName = _display displayCtrl IDC_DIALOGNAME;
|
|
private _data = _store getVariable ["storeData", []];
|
|
|
|
_data params [["_categories", [], [[]]], ["_products", [], [[]]], ["_name", "", [""]], ["_paymentMethods", [], [[]]]];
|
|
|
|
GVAR(currentStore) = _data;
|
|
_storeName ctrlSetText _name;
|
|
|
|
{
|
|
private _index = _categoryList lbAdd _x;
|
|
_categoryList lbSetData [_index, _x];
|
|
} forEach _categories;
|
|
_categoryList lbSetCurSel 0;
|
|
|
|
{
|
|
private _payment = _x select 0;
|
|
private _index = _paymentList lbAdd _payment;
|
|
_paymentList lbSetData [_index, format ["%1", _x]];
|
|
} forEach _paymentMethods;
|
|
_paymentList lbSetCurSel 0; |