Refactor: Standardize function descriptions and variable handling
All checks were successful
Build / Build (push) Successful in 28s

This commit refactors several client-side functions to improve code consistency and readability.

- Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose.
- Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication.
- Removes the bank init function as it is no longer needed.
- Adds a done variable to the preinit file.
This commit is contained in:
Jacob Schmidt 2025-05-25 11:30:26 -05:00
parent 4c33bd9175
commit d474b3676a
143 changed files with 359 additions and 803 deletions

View File

@ -1,14 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_admin_fnc_adminRefresh
* Author: IDSolutions * Author: IDSolutions
* * Refreshes the admin interface
* [Description]
* Refreshes the admin interface player list and resets input fields.
* This function populates the player list with names and paygrades,
* storing player UIDs as data for each entry. Only shows players
* on the same side as the admin.
* *
* Arguments: * Arguments:
* 0: Dummy <ANY> - Optional parameter, not used (for compatibility with event handlers) * 0: Dummy <ANY> - Optional parameter, not used (for compatibility with event handlers)
@ -20,10 +14,9 @@
* [] call forge_client_admin_fnc_adminRefresh; * [] call forge_client_admin_fnc_adminRefresh;
* ["dummy"] call forge_client_admin_fnc_adminRefresh; * ["dummy"] call forge_client_admin_fnc_adminRefresh;
* *
* Public: No - Called from admin dialog controls * Public: No
*/ */
private _dialog = findDisplay 202303; private _dialog = findDisplay 202303;
private _list = _dialog displayCtrl 2023001; private _list = _dialog displayCtrl 2023001;

View File

@ -1,16 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_admin_fnc_handleTransfer
* Author: IDSolutions * Author: IDSolutions
* * Handles fund transfers
* [Description]
* Handles fund transfers through the admin interface.
* This function retrieves the selected player's UID and amount
* from the admin dialog, then sends it to the server-side admin store.
* Supports multiple transfer types: advance (to single player),
* deduct (from single player), advanceAll (to all players),
* and payday (distribute based on paygrade).
* *
* Arguments: * Arguments:
* 0: Condition <STRING> - The type of transfer to perform ("advance", "deduct", "advanceAll", "payday") * 0: Condition <STRING> - The type of transfer to perform ("advance", "deduct", "advanceAll", "payday")

View File

@ -1,13 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_admin_fnc_sendMessage
* Author: IDSolutions * Author: IDSolutions
* * Sends a message to a selected player
* [Description]
* Sends a message to a selected player through the admin interface.
* This function retrieves the selected player's UID and message content
* from the admin dialog, then sends it to the server-side admin store.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,13 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_admin_fnc_updatePaygrade
* Author: IDSolutions * Author: IDSolutions
* * Updates a player's paygrade
* [Description]
* Updates a player's paygrade in the server's admin store.
* This function retrieves the selected player's UID and the target paygrade
* from the admin dialog, then sends it to the server-side admin store.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_ambient_fnc_ambientSound * Author: IDSolutions
* Author: J.Schmidt * Create a sound source and play an ambient sfx sound
*
* [Description]
* Create a sound source and play an ambient sfx sound.
* *
* Arguments: * Arguments:
* 0: The sound source <OBJECT> * 0: The sound source <OBJECT>

View File

@ -1,10 +1,10 @@
#include "script_component.hpp" #include "script_component.hpp"
[{ [{
GETVAR(player,value_loadDone,false) GETVAR(player,EGVAR(player,done),false)
}, { }, {
private _armory_unlocks = player getVariable ["Armory_Unlocks", [[],[],[],[]]]; private _armory_unlocks = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
private _garage_unlocks = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]]; private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
[_armory_unlocks, _garage_unlocks] call FUNC(initArsenal); [_armory_unlocks, _garage_unlocks] call FUNC(initArsenal);
}] call CFUNC(waitUntilAndExecute); }] call CFUNC(waitUntilAndExecute);

View File

@ -7,6 +7,16 @@ PREP_RECOMPILE_END;
GVAR(armory_unlocks) = []; GVAR(armory_unlocks) = [];
GVAR(garage_unlocks) = []; GVAR(garage_unlocks) = [];
GVAR(car_unlocks) = [];
GVAR(armor_unlocks) = [];
GVAR(heli_unlocks) = [];
GVAR(plane_unlocks) = [];
GVAR(naval_unlocks) = [];
GVAR(static_unlocks) = [];
GVAR(default_armory) = [[],[],[],[]];
GVAR(default_garage) = [[],[],[],[],[],[]];
GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue); GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue);
GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue); GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue);
GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999]; GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999];

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_addArmoryItem
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Adds item to player's armory unlocks and updates virtual arsenal * Adds item to player's armory unlocks and updates virtual arsenal
* *
* Arguments: * Arguments:
@ -22,9 +19,7 @@
params [["_class", "", [""]], ["_type", "", [""]]]; params [["_class", "", [""]], ["_type", "", [""]]];
private _default = [[],[],[],[]]; private _armory_unlocks = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default);
private _typeToNumber = switch (_type) do { private _typeToNumber = switch (_type) do {
case "facewear"; case "facewear";
case "headgear"; case "headgear";
@ -49,7 +44,6 @@ if (_index > -1) then {
[GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems); [GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems);
}; };
TRACE_2("Item added to armory",_class,_type);
true true
} else { } else {
false false

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_addGarageVehicle
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Adds vehicle to player's garage unlocks and updates virtual garage * Adds vehicle to player's garage unlocks and updates virtual garage
* *
* Arguments: * Arguments:
@ -22,10 +19,7 @@
params [["_class", "", [""]], ["_type", "", [""]]]; params [["_class", "", [""]], ["_type", "", [""]]];
private _default = [[],[],[],[],[],[]]; private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default];
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
private _typeToNumber = switch (_type) do { private _typeToNumber = switch (_type) do {
case "car": {0}; case "car": {0};
case "armor": {1}; case "armor": {1};
@ -39,11 +33,9 @@ private _typeToNumber = switch (_type) do {
private _index = (_garage_unlocks select _typeToNumber) pushBackUnique _class; private _index = (_garage_unlocks select _typeToNumber) pushBackUnique _class;
if (_index > -1) then { if (_index > -1) then {
// player setVariable ["Garage_Unlocks", _garage_unlocks, true];
SETPVAR(player,Garage_Unlocks,_garage_unlocks); SETPVAR(player,Garage_Unlocks,_garage_unlocks);
[[_class]] call FUNC(addVirtualVehicles); [[_class]] call FUNC(addVirtualVehicles);
TRACE_2("Vehicle added to garage",_class,_type);
true true
} else { } else {
false false

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_addVirtualVehicles
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Adds vehicles to virtual garage and categorizes them by type * Adds vehicles to virtual garage and categorizes them by type
* *
* Arguments: * Arguments:
@ -21,15 +18,8 @@
params [["_vehicles", [], [[]]]]; params [["_vehicles", [], [[]]]];
private _default = [[],[],[],[],[],[]]; private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default); _garage_unlocks params ["_cars", "_armor", "_helis", "_planes", "_naval", "_static"];
private _cars = _garage_unlocks select 0;
private _armor = _garage_unlocks select 1;
private _helis = _garage_unlocks select 2;
private _planes = _garage_unlocks select 3;
private _naval = _garage_unlocks select 4;
private _static = _garage_unlocks select 5;
{ {
switch true do { switch true do {
@ -37,31 +27,14 @@ private _static = _garage_unlocks select 5;
if ((_x isKindOf "Tank") || (_x isKindOf "Wheeled_APC_F")) exitWith {}; if ((_x isKindOf "Tank") || (_x isKindOf "Wheeled_APC_F")) exitWith {};
_cars pushBackUnique _x; _cars pushBackUnique _x;
}; };
case (_x isKindOf "Tank"): { case (_x isKindOf "Tank"): { _armor pushBackUnique _x; };
_armor pushBackUnique _x; case (_x isKindOf "Helicopter"): { _helis pushBackUnique _x; };
}; case (_x isKindOf "Plane"): { _planes pushBackUnique _x; };
case (_x isKindOf "Helicopter"): { case (_x isKindOf "Ship"): { _naval pushBackUnique _x; };
_helis pushBackUnique _x; case (_x isKindOf "Static"): { _static pushBackUnique _x; };
};
case (_x isKindOf "Plane"): {
_planes pushBackUnique _x;
};
case (_x isKindOf "Ship"): {
_naval pushBackUnique _x;
};
case (_x isKindOf "Static"): {
_static pushBackUnique _x;
};
}; };
} forEach _vehicles; } forEach _vehicles;
GVAR(car_unlocks) = [];
GVAR(armor_unlocks) = [];
GVAR(heli_unlocks) = [];
GVAR(plane_unlocks) = [];
GVAR(naval_unlocks) = [];
GVAR(static_unlocks) = [];
{ {
GVAR(car_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; GVAR(car_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _cars; } forEach _cars;
@ -85,5 +58,3 @@ GVAR(static_unlocks) = [];
{ {
GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _static; } forEach _static;
TRACE_1("Virtual vehicles updated",count _vehicles);

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_initArsenal
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Initializes the arsenal system with armory and garage data * Initializes the arsenal system with armory and garage data
* *
* Arguments: * Arguments:
@ -20,11 +17,8 @@
params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]]; params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]];
private _defaultArmory = [[],[],[],[]]; if (!(_armory_data isEqualTypeArray GVAR(default_armory)) || (count _armory_data != 4)) then { _armory_data = GVAR(default_armory); };
private _defaultGarage = [[],[],[],[],[],[]]; if (!(_garage_data isEqualTypeArray GVAR(default_garage)) || (count _garage_data != 6)) then { _garage_data = GVAR(default_garage); };
if (!(_armory_data isEqualTypeArray _defaultArmory) || (count _armory_data != 4)) then { _armory_data = _defaultArmory; };
if (!(_garage_data isEqualTypeArray _defaultGarage) || (count _garage_data != 6)) then { _garage_data = _defaultGarage; };
if (GVAR(armory_type) == 0) then { if (GVAR(armory_type) == 0) then {
{ {
[GVAR(gear_box), _x, false, true, 1, _forEachIndex] call BFUNC(addVirtualItemCargo); [GVAR(gear_box), _x, false, true, 1, _forEachIndex] call BFUNC(addVirtualItemCargo);
@ -56,8 +50,3 @@ GVAR(static_unlocks) = _statics;
{ {
[_x] call FUNC(addVirtualVehicles); [_x] call FUNC(addVirtualVehicles);
} forEach GVAR(garage_unlocks); } forEach GVAR(garage_unlocks);
private _armoryCount = count (_armory_data select { count _x > 0 });
private _garageCount = count (_garage_data select { count _x > 0 });
TRACE_2("Arsenal System Initialized",_armoryCount,_garageCount);

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_openArmory
* Author: IDSolutions * Author: IDSolutions
* * Opens the virtual arsenal
* [Description]
* Opens the arsenal system
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_openGarage
* Author: IDSolutions * Author: IDSolutions
* * Opens the virtual garage
* [Description]
* Opens the garage system
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_saveUnlocks
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Saves arsenal/garage unlocks to appropriate storage based on persistence mode * Saves arsenal/garage unlocks to appropriate storage based on persistence mode
* *
* Arguments: * Arguments:
@ -23,20 +20,16 @@ params [["_type", "", [""]]];
switch (_type) do { switch (_type) do {
case "armory": { case "armory": {
private _default_armory_data = [[],[],[],[]]; private _armory_data = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
// private _armory_data = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_data);
switch (GVAR(pdb_mode)) do { switch (GVAR(pdb_mode)) do {
case 0: { case 0: {
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
SETVAR(profileNamespace,Armory_Unlocks,_armory_data); SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
}; };
case 1: { case 1: {
["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; ["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
}; };
default { default {
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
SETVAR(profileNamespace,Armory_Unlocks,_armory_data); SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
}; };
}; };
@ -45,20 +38,16 @@ switch (_type) do {
}; };
case "garage": { case "garage": {
private _default_garage_data = [[],[],[],[],[],[]]; private _garage_data = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
// private _garage_data = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_data);
switch (GVAR(pdb_mode)) do { switch (GVAR(pdb_mode)) do {
case 0: { case 0: {
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
SETVAR(profileNamespace,Garage_Unlocks,_garage_data); SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
}; };
case 1: { case 1: {
["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; ["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
}; };
default { default {
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
SETVAR(profileNamespace,Garage_Unlocks,_garage_data); SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
}; };
}; };
@ -66,5 +55,3 @@ switch (_type) do {
[_type, _garage_data] call FUNC(updateUnlocks); [_type, _garage_data] call FUNC(updateUnlocks);
}; };
}; };
TRACE_2("Arsenal Unlocks saved",_type,GVAR(pdb_mode));

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_arsenal_fnc_updateUnlocks
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Updates the arsenal system variables when unlocks change * Updates the arsenal system variables when unlocks change
* *
* Arguments: * Arguments:
@ -24,26 +21,24 @@ params [["_type", "", [""]], ["_data", [], [[]]]];
switch (_type) do { switch (_type) do {
case "armory": { case "armory": {
_data params ["_items", "_weapons", "_magazines", "_backpacks"];
GVAR(armory_unlocks) = _data; GVAR(armory_unlocks) = _data;
GVAR(item_unlocks) = _items;
GVAR(item_unlocks) = _data select 0; GVAR(weapon_unlocks) = _weapons;
GVAR(weapon_unlocks) = _data select 1; GVAR(magazine_unlocks) = _magazines;
GVAR(magazine_unlocks) = _data select 2; GVAR(backpack_unlocks) = _backpacks;
GVAR(backpack_unlocks) = _data select 3;
TRACE_1("Armory unlocks updated",count GVAR(armory_unlocks));
}; };
case "garage": { case "garage": {
_data params ["_cars", "_armor", "_helis", "_planes", "_naval", "_static"];
GVAR(garage_unlocks) = _data; GVAR(garage_unlocks) = _data;
GVAR(car_unlocks) = _cars;
GVAR(car_unlocks) = _data select 0; GVAR(armor_unlocks) = _armor;
GVAR(armor_unlocks) = _data select 1; GVAR(heli_unlocks) = _helis;
GVAR(heli_unlocks) = _data select 2; GVAR(plane_unlocks) = _planes;
GVAR(plane_unlocks) = _data select 3; GVAR(naval_unlocks) = _naval;
GVAR(naval_unlocks) = _data select 4; GVAR(static_unlocks) = _static;
GVAR(static_unlocks) = _data select 5;
TRACE_1("Garage unlocks updated",count GVAR(garage_unlocks));
}; };
}; };

View File

@ -1,49 +0,0 @@
#include "..\script_component.hpp"
/*
* Function: forge_client_bank_fnc_initBank
* Author: IDSolutions
*
* [Description]
* Initializes the bank system
*
* Arguments:
* None
*
* Return Value:
* None
*
* Examples:
* None
*
* Public: Yes
*/
{
private _configName = configName(_x);
private _className = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "className") call BFUNC(getCfgData);
private _pos = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "pos") call BFUNC(getCfgData);
private _dir = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "dir") call BFUNC(getCfgData);
private _type = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "type") call BFUNC(getCfgData);
if (_type == "object") then {
private _bank = createSimpleObject [_className, [0, 0, 0]];
_bank setPosATL _pos;
_bank setDir _dir;
_bank allowDamage false;
_bank setVariable ["isBank", true, true];
} else {
private _group = createGroup civilian;
private _bank = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"];
_bank disableAI "MOVE";
_bank setPosATL _pos;
_bank setDir _dir;
_bank allowDamage false;
_bank setVariable ["isBank", true, true];
_bank setVariable ["BIS_enableRandomization", false];
};
diag_log text format ["[FORGE Bank] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir];
} forEach ("true" configClasses (missionConfigFile >> "CfgBanks" >> "banks"));

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_bank_fnc_submit
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Submits the timesheet * Submits the timesheet
* *
* Arguments: * Arguments:

View File

@ -2,7 +2,7 @@
/* /*
* Author: IDSolutions * Author: IDSolutions
* Transfers money to a player. * Transfers money to a player
* *
* Arguments: * Arguments:
* None * None

View File

@ -2,7 +2,7 @@
/* /*
* Author: IDSolutions * Author: IDSolutions
* Withdraws money from the bank. * Withdraws money from the bank
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,15 +1,20 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Author: PDT for J. Schmidt * Author: IDSolutions
ends the slide show * Ends the slide show
*
Arguments: * Arguments:
0: _controller <OBJECT> - object that controls the slide show * 0: Controller <OBJECT> - object that controls the slide show
*
Return Value: * Return Value:
<BOOL> - true if the slide show was ended; false if not * Boolean - true if the slide show was ended; false if not
*/ *
* Example:
* [controller] call ace_briefing_fnc_endSlideShow
*
* Public: No
*/
params [["_controller", objNull]]; params [["_controller", objNull]];

View File

@ -1,24 +1,26 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Author: PDT for J. Schmidt * Author: IDSolutions
sets up a slide show * Sets up a slide show
*
Arguments: * Arguments:
0: _screen <ARRAY> - array of objects to display images on * 0: _screen <ARRAY> - array of objects to display images on
1: _controllers <ARRAY> - array of objects to use are controlers * 1: _controllers <ARRAY> - array of objects to use are controlers
2: _images <ARRAY> - array of image paths; images should be powers of 2 * 2: _images <ARRAY> - array of image paths; images should be powers of 2
3: _autoScroll <BOOL> - should the image auto-scroll * 3: _autoScroll <BOOL> - should the image auto-scroll
4: _units <ARRAY> - unit(s) that should speak * 4: _units <ARRAY> - unit(s) that should speak
5: _topic <STRING> - conversation topic * 5: _topic <STRING> - conversation topic
6: _sentence <STRING> - conversation sentence, "" = play all * 6: _sentence <STRING> - conversation sentence, "" = play all
*
Return Value: * Return Value:
<BOOL> - true if slide show was setup; false if not * <BOOL> - true if slide show was setup; false if not
*
Example: * Example:
[Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow; * [Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
*/ *
* Public: No
*/
params [["_screens", []], ["_controllers", []], ["_images", []], ["_autoScroll", false], ["_units", []], ["_topic", ""], ["_sentence", ""]]; params [["_screens", []], ["_controllers", []], ["_images", []], ["_autoScroll", false], ["_units", []], ["_topic", ""], ["_sentence", ""]];

View File

@ -1,15 +1,20 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Author: PDT for J. Schmidt * Author: IDSolutions
displays the next image * Displays the next image
*
Arguments: * Arguments:
0: _controller <OBJECT> - object that controls the slide show * 0: _controller <OBJECT> - object that controls the slide show
*
Return Value: * Return Value:
<BOOL> - true if the next image was displayed; false if not * 0: _return <BOOL> - true if the next image was displayed; false if not
*/ *
* Example:
* [controller] call ace_briefing_fnc_nextImage
*
* Public: No
*/
params [["_controller", objNull]]; params [["_controller", objNull]];

View File

@ -1,15 +1,20 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Author: PDT for J. Schmidt * Author: IDSolutions
displays the previous image * Displays the previous image
*
Arguments: * Arguments:
0: _controller <OBJECT> - object that controls the slide show * 0: _controller <OBJECT> - object that controls the slide show
*
Return Value: * Return Value:
<BOOL> - true if the previous image was displayed; false if not * 0: _return <BOOL> - true if the previous image was displayed; false if not
*/ *
* Example:
* [controller] call forge_briefing_fnc_prevImage
*
* Public: No
*/
params [["_controller", objNull]]; params [["_controller", objNull]];

View File

@ -1,21 +1,25 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Name: forge_client_briefing_fnc_spawnLecture * Author: IDSolutions
Date: 8/6/2022 * AI plays a given sentence/conversation
Version: 1.0 *
Author: J. Schmidt * Arguments:
* 0: Unit that is playing the given sentence/conversation <OBJECT>
Description: * 1: Topic that is being talked about <STRING>
AI plays a given sentence/conversation. * 2: Sentence partaining to the topic at hand <STRING>
*
Parameter(s): * Return Value:
0: Unit that is playing the given sentence/conversation. <OBJECT> * None
1: Topic that is being talked about. <STRING> *
2: Sentence partaining to the topic at hand. <STRING> * Example:
*/ * [player, "topic", "sentence"] call forge_client_briefing_fnc_spawnLecture
*
* Public: No
*/
params ["_unit", "_topic", "_sentence"]; params ["_unit", "_topic", "_sentence"];
FORGE_Briefing_inProgress = true; FORGE_Briefing_inProgress = true;
publicVariable "FORGE_Briefing_inProgress"; publicVariable "FORGE_Briefing_inProgress";

View File

@ -1,20 +1,23 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Name: forge_client_briefing_fnc_spawnLecture * Author: IDSolutions
Date: 8/6/2022 * Object displays a slideshow presentation
Version: 1.0 *
Author: J. Schmidt * Arguments:
* 0: Object that will display the presentation <OBJECT>
Description: * 1: Slides that will be used for the presentation <ARRAY>
Object displays a slideshow presentation. * - 0: Texture used for the Slide <STRING>
* - 1: Amount of Time the Slide will display <NUMBER>
Parameter(s): *
0: Object that will display the presentation. <OBJECT> * Return Value:
1: Slides that will be used for the presentation. <ARRAY> * None
1-0: Texture used for the Slide. <STRING> *
1-1: Amount of Time the Slide will display. <NUMBER> * Example:
*/ * [screen, [["texture.paa", 5]]] call forge_client_briefing_fnc_spawnLecture
*
* Public: No
*/
params ["_object", "_slides"]; params ["_object", "_slides"];

View File

@ -1,15 +1,20 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
Author: PDT for J. Schmidt * Author: IDSolutions
starts the slideshow * Starts the slideshow
*
Arguments: * Arguments:
0: _controller <OBJECT> - object that controls the slide show * 0: Controller <OBJECT> - object that controls the slide show
*
Return Value: * Return Value:
<BOOL> - true if slide show was started * Boolean - true if slide show was started
*/ *
* Example:
* [controller] call ace_fnc_startSlideShow
*
* Public: No
*/
params [["_controller", objNull], ["_units", []], ["_topic", ""], ["_sentence", ""]]; params [["_controller", objNull], ["_units", []], ["_topic", ""], ["_sentence", ""]];

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_db_fnc_requestServerDB
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Sends database requests to the server using CBA events * Sends database requests to the server using CBA events
* *
* Arguments: * Arguments:
@ -14,6 +11,11 @@
* *
* Return Value: * Return Value:
* Request ID <STRING> * Request ID <STRING>
*
* Example:
* ["hgetall", "Hello World!", { systemChat format ["Message: %1", _this]; }] call forge_db_fnc_requestServerDB;
*
* Public: Yes
*/ */
params [ params [

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_dialogue_fnc_selectAI
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Selects AI for dialogue * Selects AI for dialogue
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* [units group player] call FUNC(selectAI);
*
* Public: No
*/ */
params [["_units", [], [[]]]]; params [["_units", [], [[]]]];

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_garage_fnc_fetchGarage
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Fetches the vehicles in the garage * Fetches the vehicles in the garage
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* None
*
* Public: No
*/ */
private _display = findDisplay IDD_GARAGEDIALOG; private _display = findDisplay IDD_GARAGEDIALOG;

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_garage_fnc_fetchNearby
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Fetches the nearby vehicles * Fetches the nearby vehicles
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* None
*
* Public: No
*/ */
private _display = findDisplay IDD_GARAGEDIALOG; private _display = findDisplay IDD_GARAGEDIALOG;

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_garage_fnc_initGarage
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Initializes the garages * Initializes the garages
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* None
*
* Public: No
*/ */
{ {

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_garage_fnc_openGarage
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Opens the garage dialog * Opens the garage dialog
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* None
*
* Public: No
*/ */
disableSerialization; disableSerialization;

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_garage_fnc_spawnVehicle
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Spawns a vehicle from the garage * Spawns a vehicle from the garage
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* None
*
* Public: No
*/ */
disableSerialization; disableSerialization;

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_garage_fnc_storeVehicle
* Author: IDSolutions * Author: IDSolutions
*
* Description:
* Stores a vehicle in the garage * Stores a vehicle in the garage
* *
* Arguments: * Arguments:
@ -12,6 +9,11 @@
* *
* Return Value: * Return Value:
* None * None
*
* Example:
* None
*
* Public: No
*/ */
private _display = findDisplay IDD_GARAGEDIALOG; private _display = findDisplay IDD_GARAGEDIALOG;

View File

@ -5,4 +5,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp" #include "XEH_PREP.hpp"
PREP_RECOMPILE_END; PREP_RECOMPILE_END;
GVAR(done) = false;
ADDON = true; ADDON = true;

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_init_fnc_initPlayer
* Author: IDSolutions * Author: IDSolutions
* * Initialize player
* [Description]
* Initialize player.
* *
* Arguments: * Arguments:
* N/A * N/A
@ -32,7 +29,7 @@ removeBackpack player;
removeGoggles player; removeGoggles player;
removeHeadgear player; removeHeadgear player;
SETPVAR(player,value_loadDone,false); SETPVAR(player,GVAR(done),false);
cutText ["Loading In...", "BLACK", 1]; cutText ["Loading In...", "BLACK", 1];
// ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask; // ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask;
@ -41,7 +38,7 @@ cutText ["Loading In...", "BLACK", 1];
[] spawn FUNC(playerSaveLoop); [] spawn FUNC(playerSaveLoop);
[] spawn EFUNC(interaction,initInteraction); [] spawn EFUNC(interaction,initInteraction);
waitUntil { GETVAR(player,value_loadDone,false) }; waitUntil { GETVAR(player,GVAR(done),false) };
cutText ["", "PLAIN", 1]; cutText ["", "PLAIN", 1];
waitUntil { !(isNull (findDisplay 46)) }; waitUntil { !(isNull (findDisplay 46)) };

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_init_fnc_playerDBLoad
* Author: IDSolutions * Author: IDSolutions
* * Load player from DB
* [Description]
* Load player from DB.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_init_fnc_playerDBSave
* Author: IDSolutions * Author: IDSolutions
* * Save player to DB
* [Description]
* Save player to DB.
* *
* Arguments: * Arguments:
* N/A * N/A
@ -20,13 +17,10 @@
* Public: Yes * Public: Yes
*/ */
private _default_armory_unlocks = [[],[],[],[]];
private _default_garage_unlocks = [[],[],[],[],[],[]];
private _data = [ private _data = [
getPlayerUID player, getPlayerUID player,
"armory_unlocks", [GETVAR(player,Armory_Unlocks,_default_armory_unlocks)], "armory_unlocks", [GETVAR(player,Armory_Unlocks,EGVAR(arsenal,default_armory))],
"garage_unlocks", [GETVAR(player,Garage_Unlocks,_default_garage_unlocks)], "garage_unlocks", [GETVAR(player,Garage_Unlocks,EGVAR(arsenal,default_garage))],
"locker", [GETVAR(player,FORGE_Locker,[])], "locker", [GETVAR(player,FORGE_Locker,[])],
"garage", [GETVAR(player,FORGE_Garage,[])], "garage", [GETVAR(player,FORGE_Garage,[])],
"cash", [GETVAR(player,FORGE_Cash,0)], "cash", [GETVAR(player,FORGE_Cash,0)],

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_init_fnc_playerSaveLoop
* Author: IDSolutions * Author: IDSolutions
* * Initialize player save loop
* [Description]
* Initialize player save loop.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_interaction_fnc_initInteraction
* Author: IDSolutions * Author: IDSolutions
* * Initialize player interaction
* [Description]
* Initialize player interaction.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_interaction_fnc_interactionAction
* Author: IDSolutions * Author: IDSolutions
* * Initialize player interaction
* [Description]
* Initialize player interaction.
* *
* Arguments: * Arguments:
* 0: Index of current action array <NUMBER> * 0: Index of current action array <NUMBER>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_interaction_fnc_openInteraction
* Author: IDSolutions * Author: IDSolutions
* * Open player interaction
* [Description]
* Open player interaction.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_locker_fnc_equipGear
* Author: IDSolutions * Author: IDSolutions
* * Equips gear from the locker
* [Description]
* Equips gear from the locker.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_locker_fnc_fetchLocker
* Author: IDSolutions * Author: IDSolutions
* * Fetches the locker
* [Description]
* Fetches the locker.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_locker_fnc_fetchPlayer
* Author: IDSolutions * Author: IDSolutions
* * Fetches the player's gear
* [Description]
* Fetches the player's gear.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_locker_fnc_initLocker
* Author: IDSolutions * Author: IDSolutions
* * Initializes the lockers
* [Description]
* Initializes the lockers.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_locker_fnc_openLocker
* Author: IDSolutions * Author: IDSolutions
* * Opens the locker dialog
* [Description]
* Opens the locker dialog.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_locker_fnc_storeGear
* Author: IDSolutions * Author: IDSolutions
* * Stores gear in the locker
* [Description]
* Stores gear in the locker.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_deductMedicalCost
* Author: IDSolutions * Author: IDSolutions
* * Deducts the medical cost from the player's account
* [Description]
* Deducts the medical cost from the player's account.
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Unit <OBJECT>

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_deductMedicalCost
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Deducts the medical cost from the player's account. * Deducts the medical cost from the player's account.
* *
* Arguments: * Arguments:

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_initMedical
* Author: IDSolutions * Author: IDSolutions
* * Initializes the medical system
* [Description]
* Initializes the medical system.
* *
* Arguments: * Arguments:
* N/A * N/A

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_moveInventory
* Author: IDSolutions * Author: IDSolutions
* * Moves the unit's inventory to the body bag
* [Description]
* Moves the unit's inventory to the body bag.
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Unit <OBJECT>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_onKilled
* Author: IDSolutions * Author: IDSolutions
* * Handles the unit's death
* [Description]
* Handles the unit's death.
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Unit <OBJECT>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_onRespawn
* Author: IDSolutions * Author: IDSolutions
* * Handles the unit's respawn
* [Description]
* Handles the unit's respawn.
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Unit <OBJECT>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_medical_fnc_saveDroppedWeapons
* Author: IDSolutions * Author: IDSolutions
* * Saves the unit's dropped weapons and items
* [Description]
* Saves the unit's dropped weapons and items.
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Unit <OBJECT>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_cargoToPairs
* Author: IDSolutions * Author: IDSolutions
* * Converts a cargo array to an array of pairs
* [Description]
* Converts a cargo array to an array of pairs.
* *
* Arguments: * Arguments:
* 0: Cargo Array <ARRAY> * 0: Cargo Array <ARRAY>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_deserializeString
* Author: IDSolutions * Author: IDSolutions
* * Converts underscores in a string to spaces for display
* [Description]
* Converts underscores in a string to spaces for display.
* *
* Arguments: * Arguments:
* 0: String <STRING> * 0: String <STRING>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_formatNumber
* Author: IDSolutions * Author: IDSolutions
* * Formats a number with thousands separators and decimal places
* [Description]
* Formats a number with thousands separators and decimal places.
* *
* Arguments: * Arguments:
* 0: Number <NUMBER> * 0: Number <NUMBER>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_getSystemTime
* Author: IDSolutions * Author: IDSolutions
* * Gets the current system time in a formatted string
* [Description]
* Gets the current system time in a formatted string.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_isAssignableBinocular
* Author: IDSolutions * Author: IDSolutions
* * Checks if a binocular is assignable
* [Description]
* Checks if a binocular is assignable.
* *
* Arguments: * Arguments:
* 0: Binocular <STRING> * 0: Binocular <STRING>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_isWeaponType
* Author: IDSolutions * Author: IDSolutions
* * Checks if a weapon is of a certain type
* [Description]
* Checks if a weapon is of a certain type.
* *
* Arguments: * Arguments:
* 0: Weapon <STRING> * 0: Weapon <STRING>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_notify
* Author: IDSolutions * Author: IDSolutions
* * Creates a notification
* [Description]
* Creates a notification.
* *
* Arguments: * Arguments:
* 0: STRING - The text to display * 0: STRING - The text to display

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_serializeString
* Author: IDSolutions * Author: IDSolutions
* * Converts spaces in a string to underscores for database storage
* [Description]
* Converts spaces in a string to underscores for database storage.
* *
* Arguments: * Arguments:
* 0: String <STRING> * 0: String <STRING>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_misc_fnc_test
* Author: IDSolutions * Author: IDSolutions
* * Test function
* [Description]
* Test function.
* *
* Arguments: * Arguments:
* 0: Value <ARRAY|STRING|NUMBER|BOOL> * 0: Value <ARRAY|STRING|NUMBER|BOOL>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_money_fnc_giveCash
* Author: IDSolutions * Author: IDSolutions
* * Send money to player
* [Description]
* Send money to player.
* *
* Arguments: * Arguments:
* 0: Target to send money <OBJECT> * 0: Target to send money <OBJECT>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_money_fnc_giveCashSubmit
* Author: IDSolutions * Author: IDSolutions
* * Handle cash to be given
* [Description]
* Handle cash to be given.
* *
* Arguments: * Arguments:
* 0: Target to add money <OBJECT> * 0: Target to add money <OBJECT>
@ -23,8 +20,6 @@
params ["_target", "_player"]; params ["_target", "_player"];
private _amount = parseNumber (ctrlText 1401); private _amount = parseNumber (ctrlText 1401);
// private _playerCash = player getVariable ["FORGE_Cash", 0];
// private _targetCash = _target getVariable ["FORGE_Cash", 0];
private _playerCash = GETVAR(player,FORGE_Cash,0); private _playerCash = GETVAR(player,FORGE_Cash,0);
private _targetCash = GETVAR(_target,FORGE_Cash,0); private _targetCash = GETVAR(_target,FORGE_Cash,0);
@ -33,7 +28,6 @@ if (_amount > 0) then {
private _newCash = _targetCash + _amount; private _newCash = _targetCash + _amount;
private _formattedAmount = (_amount) call EFUNC(misc,formatNumber); private _formattedAmount = (_amount) call EFUNC(misc,formatNumber);
// _target setVariable ["FORGE_Cash", _newCash, true];
SETPVAR(_target,FORGE_Cash,_newCash); SETPVAR(_target,FORGE_Cash,_newCash);
["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2]; ["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2];

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_money_fnc_takeCash
* Author: IDSolutions * Author: IDSolutions
* * Handle cash picked up
* [Description]
* Handle cash picked up.
* *
* Arguments: * Arguments:
* 0: Target <OBJECT> * 0: Target <OBJECT>

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_addAsset
* Author: IDSolutions * Author: IDSolutions
* * Adds an asset to an organization's inventory
* [Description]
* Adds an asset to an organization's inventory.
* *
* Arguments: * Arguments:
* 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.) * 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.)

View File

@ -1,12 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_addFunds
* Author: IDSolutions * Author: IDSolutions
* * Adds or removes funds from an organization's account
* [Description]
* Adds or removes funds from an organization's account.
* Positive values increase funds, negative values decrease funds.
* *
* Arguments: * Arguments:
* 0: Amount <NUMBER> - Amount to add (positive) or withdraw (negative) * 0: Amount <NUMBER> - Amount to add (positive) or withdraw (negative)

View File

@ -1,12 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_addMember
* Author: IDSolutions * Author: IDSolutions
* * Adds a new member to an organization if added by the owner
* [Description]
* Adds a new member to an organization. Only the organization owner can add members.
* The new member will be assigned the default "member" role.
* *
* Arguments: * Arguments:
* 0: Player UID <STRING> - Unique identifier of the player to add * 0: Player UID <STRING> - Unique identifier of the player to add

View File

@ -1,12 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_addReputation
* Author: IDSolutions * Author: IDSolutions
* * Adds or removes reputation from an organization
* [Description]
* Adds or removes reputation from an organization.
* Positive values increase reputation, negative values decrease reputation.
* *
* Arguments: * Arguments:
* 0: Amount <NUMBER> - Amount of reputation to add (positive) or subtract (negative) * 0: Amount <NUMBER> - Amount of reputation to add (positive) or subtract (negative)

View File

@ -1,12 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_create
* Author: IDSolutions * Author: IDSolutions
* * Creates a new organization for a player
* [Description]
* Creates a new organization for a player.
* Initializes the organization with the specified name, owner, and optional starting funds and reputation.
* *
* Arguments: * Arguments:
* 0: Owner UID <STRING> - Player UID who will own the organization * 0: Owner UID <STRING> - Player UID who will own the organization

View File

@ -1,13 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_disband
* Author: IDSolutions * Author: IDSolutions
* * Disbands an organization if requested by the owner
* [Description]
* Disbands an organization if requested by the owner.
* This permanently deletes the organization from the database and cannot be undone.
* Only the organization owner can perform this action.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,13 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_handleOrgLoad
* Author: IDSolutions * Author: IDSolutions
* * Loads organization from database
* [Description]
* Processes and transforms raw organization data from a database into a structured hashMap.
* Handles data normalization, type conversion, and ensures all required organization fields are present.
* This function is called as a callback when organization data is loaded from the database.
* *
* Arguments: * Arguments:
* 0: Raw Data <ARRAY> - DragonflyDB HGETALL result containing raw organization data * 0: Raw Data <ARRAY> - DragonflyDB HGETALL result containing raw organization data
@ -16,7 +11,7 @@
* None * None
* *
* Example: * Example:
* _orgData call forge_client_org_fnc_handleOrgLoad * [_orgData] call forge_client_org_fnc_handleOrgLoad
* *
* Public: No * Public: No
*/ */

View File

@ -1,17 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_initOrgStore
* Author: IDSolutions * Author: IDSolutions
* * Provides CRUD operations for organizations
* Description:
* Initializes a client-side organization store interface for managing player organization data
* Provides CRUD operations for organizations, including database persistence through ArmaDragonflyClient
*
* Creates a hashMap object with methods for:
* - Creating, loading, and saving organizations
* - Managing organization funds and reputation
* - Adding, removing, and querying organization members and assets
* *
* Returns: * Returns:
* Organization store interface <HASHMAP> * Organization store interface <HASHMAP>
@ -19,6 +10,8 @@
* Example: * Example:
* private _orgStore = call forge_client_org_fnc_initOrgStore; * private _orgStore = call forge_client_org_fnc_initOrgStore;
* _orgStore call ["createOrg", [getPlayerUID player, "My Organization"]]; * _orgStore call ["createOrg", [getPlayerUID player, "My Organization"]];
*
* Public: Yes
*/ */
private _orgStoreInterface = createHashMapObject [[ private _orgStoreInterface = createHashMapObject [[

View File

@ -1,13 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_leave
* Author: IDSolutions * Author: IDSolutions
* * Removes the player from an organization, not applicable for owners
* [Description]
* Removes the current player from an organization.
* This allows a member to leave their organization voluntarily.
* Organization owners cannot use this function and must use disband instead.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,12 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_removeAsset
* Author: IDSolutions * Author: IDSolutions
* * Removes an asset from an organization's inventory
* [Description]
* Removes an asset from an organization's inventory.
* Deletes the specified asset based on its type and unique identifier.
* *
* Arguments: * Arguments:
* 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.) * 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.)

View File

@ -1,13 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_org_fnc_verifyOrgStore
* Author: IDSolutions * Author: IDSolutions
* * Ensures the organization store is initialized and returns the store object
* [Description]
* Ensures the organization store is initialized and returns the store object.
* Acts as a singleton accessor for the organization store interface.
* If the store doesn't exist yet, it initializes it first.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_addContact
* Author: IDSolutions * Author: IDSolutions
* * Adds a contact to the address book
* [Description]
* Adds a contact to the address book.
* *
* Arguments: * Arguments:
* 0: Contact <OBJECT> - The contact to add * 0: Contact <OBJECT> - The contact to add

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_addEmail
* Author: IDSolutions * Author: IDSolutions
* * Adds an email to the email list
* [Description]
* Adds an email to the address book.
* *
* Arguments: * Arguments:
* 0: Email <STRING> - The email to add * 0: Email <STRING> - The email to add
@ -14,7 +11,7 @@
* None * None
* *
* Example: * Example:
* ["test@test.com"] call forge_client_phone_fnc_addEmail; * ["Hello World"] call forge_client_phone_fnc_addEmail;
* *
* Public: Yes * Public: Yes
*/ */

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_addMsg
* Author: IDSolutions * Author: IDSolutions
* * Adds a message to the message list
* [Description]
* Adds a message to the message log.
* *
* Arguments: * Arguments:
* 0: Message <STRING> - The message to add * 0: Message <STRING> - The message to add

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_addOfflineEmail
* Author: IDSolutions * Author: IDSolutions
* * Adds an email to the offline email list
* [Description]
* Adds an email to the offline email list.
* *
* Arguments: * Arguments:
* 0: Email <STRING> - The email to add * 0: Email <STRING> - The email to add

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_addOfflineMsg
* Author: IDSolutions * Author: IDSolutions
* * Adds a message to the offline message list
* [Description]
* Adds a message to the offline message list.
* *
* Arguments: * Arguments:
* 0: Message <STRING> - The message to add * 0: Message <STRING> - The message to add

View File

@ -1,10 +1,7 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_dateToHhMm
* Author: IDSolutions * Author: IDSolutions
*
* [Description]
* Converts a date to a string in the format "HH:MM". * Converts a date to a string in the format "HH:MM".
* *
* Arguments: * Arguments:

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_delEmail
* Author: IDSolutions * Author: IDSolutions
* * Deletes an email from the email list
* [Description]
* Deletes an email from the address book.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_delMsg
* Author: IDSolutions * Author: IDSolutions
* * Deletes a message from the message list
* [Description]
* Deletes a message from the message log.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_initAction
* Author: IDSolutions * Author: IDSolutions
* * Initializes the phone action
* [Description]
* Initializes the phone action.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_initAddAction
* Author: IDSolutions * Author: IDSolutions
* * Initializes the phone action
* [Description]
* Initializes the phone action.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_initPhone
* Author: IDSolutions * Author: IDSolutions
* * Initializes the phone
* [Description]
* Initializes the phone.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_initVar
* Author: IDSolutions * Author: IDSolutions
* * Initializes the phone variables
* [Description]
* Initializes the phone variables.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_newEmail
* Author: IDSolutions * Author: IDSolutions
* * Adds a new email to the email list
* [Description]
* Adds a new email to the address book.
* *
* Arguments: * Arguments:
* 0: Email <STRING> - The email to add * 0: Email <STRING> - The email to add

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_newMsg
* Author: IDSolutions * Author: IDSolutions
* * Adds a new message to the message list
* [Description]
* Adds a new message to the message log.
* *
* Arguments: * Arguments:
* 0: Number <STRING> - The number to add * 0: Number <STRING> - The number to add

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_openPhone
* Author: IDSolutions * Author: IDSolutions
* * Opens the phone
* [Description]
* Opens the phone.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_sendEmail
* Author: IDSolutions * Author: IDSolutions
* * Sends an email
* [Description]
* Sends an email.
* *
* Arguments: * Arguments:
* 0: Email <STRING> - The email to send to * 0: Email <STRING> - The email to send to

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_sendMsg
* Author: IDSolutions * Author: IDSolutions
* * Sends a message
* [Description]
* Sends a message.
* *
* Arguments: * Arguments:
* 0: Number <STRING> - The number to send to * 0: Number <STRING> - The number to send to

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_showContact
* Author: IDSolutions * Author: IDSolutions
* * Shows the contact list
* [Description]
* Shows the contact list.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_showDialpad
* Author: IDSolutions * Author: IDSolutions
* * Shows the dialpad
* [Description]
* Shows the dialpad.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_showEmail
* Author: IDSolutions * Author: IDSolutions
* * Shows the email
* [Description]
* Shows the email.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_showMessage
* Author: IDSolutions * Author: IDSolutions
* * Shows the message
* [Description]
* Shows the message.
* *
* Arguments: * Arguments:
* None * None

View File

@ -1,11 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Function: forge_client_phone_fnc_showMessageInput
* Author: IDSolutions * Author: IDSolutions
* * Shows the message input
* [Description]
* Shows the message input.
* *
* Arguments: * Arguments:
* None * None

Some files were not shown because too many files have changed in this diff Show More