Refactor: Standardize function descriptions and variable handling
All checks were successful
Build / Build (push) Successful in 28s
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:
parent
4c33bd9175
commit
d474b3676a
@ -1,14 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_adminRefresh
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Refreshes the admin interface
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Dummy <ANY> - Optional parameter, not used (for compatibility with event handlers)
|
||||
@ -20,10 +14,9 @@
|
||||
* [] 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 _list = _dialog displayCtrl 2023001;
|
||||
|
||||
|
@ -1,16 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_handleTransfer
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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).
|
||||
* Handles fund transfers
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Condition <STRING> - The type of transfer to perform ("advance", "deduct", "advanceAll", "payday")
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_sendMessage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Sends a message to a selected player
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_admin_fnc_updatePaygrade
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Updates a player's paygrade
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_ambient_fnc_ambientSound
|
||||
* Author: J.Schmidt
|
||||
*
|
||||
* [Description]
|
||||
* Create a sound source and play an ambient sfx sound.
|
||||
* Author: IDSolutions
|
||||
* Create a sound source and play an ambient sfx sound
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The sound source <OBJECT>
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[{
|
||||
GETVAR(player,value_loadDone,false)
|
||||
GETVAR(player,EGVAR(player,done),false)
|
||||
}, {
|
||||
private _armory_unlocks = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
|
||||
private _garage_unlocks = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
|
||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
|
||||
[_armory_unlocks, _garage_unlocks] call FUNC(initArsenal);
|
||||
}] call CFUNC(waitUntilAndExecute);
|
@ -7,6 +7,16 @@ PREP_RECOMPILE_END;
|
||||
|
||||
GVAR(armory_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(armory_type) = "ARS_TYPE" call BFUNC(getParamValue);
|
||||
GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999];
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_addArmoryItem
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds item to player's armory unlocks and updates virtual arsenal
|
||||
*
|
||||
* Arguments:
|
||||
@ -22,9 +19,7 @@
|
||||
|
||||
params [["_class", "", [""]], ["_type", "", [""]]];
|
||||
|
||||
private _default = [[],[],[],[]];
|
||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default);
|
||||
|
||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
|
||||
private _typeToNumber = switch (_type) do {
|
||||
case "facewear";
|
||||
case "headgear";
|
||||
@ -48,8 +43,7 @@ if (_index > -1) then {
|
||||
} else {
|
||||
[GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems);
|
||||
};
|
||||
|
||||
TRACE_2("Item added to armory",_class,_type);
|
||||
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_addGarageVehicle
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds vehicle to player's garage unlocks and updates virtual garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -22,10 +19,7 @@
|
||||
|
||||
params [["_class", "", [""]], ["_type", "", [""]]];
|
||||
|
||||
private _default = [[],[],[],[],[],[]];
|
||||
// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default];
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
||||
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
private _typeToNumber = switch (_type) do {
|
||||
case "car": {0};
|
||||
case "armor": {1};
|
||||
@ -39,11 +33,9 @@ private _typeToNumber = switch (_type) do {
|
||||
private _index = (_garage_unlocks select _typeToNumber) pushBackUnique _class;
|
||||
|
||||
if (_index > -1) then {
|
||||
// player setVariable ["Garage_Unlocks", _garage_unlocks, true];
|
||||
SETPVAR(player,Garage_Unlocks,_garage_unlocks);
|
||||
[[_class]] call FUNC(addVirtualVehicles);
|
||||
|
||||
TRACE_2("Vehicle added to garage",_class,_type);
|
||||
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_addVirtualVehicles
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds vehicles to virtual garage and categorizes them by type
|
||||
*
|
||||
* Arguments:
|
||||
@ -21,15 +18,8 @@
|
||||
|
||||
params [["_vehicles", [], [[]]]];
|
||||
|
||||
private _default = [[],[],[],[],[],[]];
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
||||
|
||||
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;
|
||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
_garage_unlocks params ["_cars", "_armor", "_helis", "_planes", "_naval", "_static"];
|
||||
|
||||
{
|
||||
switch true do {
|
||||
@ -37,31 +27,14 @@ private _static = _garage_unlocks select 5;
|
||||
if ((_x isKindOf "Tank") || (_x isKindOf "Wheeled_APC_F")) exitWith {};
|
||||
_cars pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Tank"): {
|
||||
_armor pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Helicopter"): {
|
||||
_helis pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Plane"): {
|
||||
_planes pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Ship"): {
|
||||
_naval pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Static"): {
|
||||
_static pushBackUnique _x;
|
||||
};
|
||||
case (_x isKindOf "Tank"): { _armor pushBackUnique _x; };
|
||||
case (_x isKindOf "Helicopter"): { _helis 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;
|
||||
|
||||
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]];
|
||||
} forEach _cars;
|
||||
@ -84,6 +57,4 @@ GVAR(static_unlocks) = [];
|
||||
|
||||
{
|
||||
GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
|
||||
} forEach _static;
|
||||
|
||||
TRACE_1("Virtual vehicles updated",count _vehicles);
|
||||
} forEach _static;
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_initArsenal
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the arsenal system with armory and garage data
|
||||
*
|
||||
* Arguments:
|
||||
@ -20,11 +17,8 @@
|
||||
|
||||
params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]];
|
||||
|
||||
private _defaultArmory = [[],[],[],[]];
|
||||
private _defaultGarage = [[],[],[],[],[],[]];
|
||||
|
||||
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 (!(_armory_data isEqualTypeArray GVAR(default_armory)) || (count _armory_data != 4)) then { _armory_data = GVAR(default_armory); };
|
||||
if (!(_garage_data isEqualTypeArray GVAR(default_garage)) || (count _garage_data != 6)) then { _garage_data = GVAR(default_garage); };
|
||||
if (GVAR(armory_type) == 0) then {
|
||||
{
|
||||
[GVAR(gear_box), _x, false, true, 1, _forEachIndex] call BFUNC(addVirtualItemCargo);
|
||||
@ -55,9 +49,4 @@ GVAR(static_unlocks) = _statics;
|
||||
|
||||
{
|
||||
[_x] call FUNC(addVirtualVehicles);
|
||||
} 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);
|
||||
} forEach GVAR(garage_unlocks);
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_openArmory
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Opens the arsenal system
|
||||
* Opens the virtual arsenal
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_openGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Opens the garage system
|
||||
* Opens the virtual garage
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_saveUnlocks
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Saves arsenal/garage unlocks to appropriate storage based on persistence mode
|
||||
*
|
||||
* Arguments:
|
||||
@ -23,20 +20,16 @@ params [["_type", "", [""]]];
|
||||
|
||||
switch (_type) do {
|
||||
case "armory": {
|
||||
private _default_armory_data = [[],[],[],[]];
|
||||
// private _armory_data = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
|
||||
private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_data);
|
||||
private _armory_data = GETVAR(player,Armory_Unlocks,GVAR(default_armory));
|
||||
|
||||
switch (GVAR(pdb_mode)) do {
|
||||
case 0: {
|
||||
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
|
||||
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
||||
};
|
||||
case 1: {
|
||||
["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
||||
};
|
||||
default {
|
||||
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
|
||||
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
||||
};
|
||||
};
|
||||
@ -45,26 +38,20 @@ switch (_type) do {
|
||||
};
|
||||
|
||||
case "garage": {
|
||||
private _default_garage_data = [[],[],[],[],[],[]];
|
||||
// private _garage_data = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
|
||||
private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_data);
|
||||
private _garage_data = GETVAR(player,Garage_Unlocks,GVAR(default_garage));
|
||||
|
||||
switch (GVAR(pdb_mode)) do {
|
||||
case 0: {
|
||||
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
|
||||
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
||||
};
|
||||
case 1: {
|
||||
["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
||||
};
|
||||
default {
|
||||
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
|
||||
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
||||
};
|
||||
};
|
||||
|
||||
[_type, _garage_data] call FUNC(updateUnlocks);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_2("Arsenal Unlocks saved",_type,GVAR(pdb_mode));
|
||||
};
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_arsenal_fnc_updateUnlocks
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Updates the arsenal system variables when unlocks change
|
||||
*
|
||||
* Arguments:
|
||||
@ -24,26 +21,24 @@ params [["_type", "", [""]], ["_data", [], [[]]]];
|
||||
|
||||
switch (_type) do {
|
||||
case "armory": {
|
||||
GVAR(armory_unlocks) = _data;
|
||||
_data params ["_items", "_weapons", "_magazines", "_backpacks"];
|
||||
|
||||
GVAR(item_unlocks) = _data select 0;
|
||||
GVAR(weapon_unlocks) = _data select 1;
|
||||
GVAR(magazine_unlocks) = _data select 2;
|
||||
GVAR(backpack_unlocks) = _data select 3;
|
||||
|
||||
TRACE_1("Armory unlocks updated",count GVAR(armory_unlocks));
|
||||
GVAR(armory_unlocks) = _data;
|
||||
GVAR(item_unlocks) = _items;
|
||||
GVAR(weapon_unlocks) = _weapons;
|
||||
GVAR(magazine_unlocks) = _magazines;
|
||||
GVAR(backpack_unlocks) = _backpacks;
|
||||
};
|
||||
|
||||
case "garage": {
|
||||
GVAR(garage_unlocks) = _data;
|
||||
_data params ["_cars", "_armor", "_helis", "_planes", "_naval", "_static"];
|
||||
|
||||
GVAR(car_unlocks) = _data select 0;
|
||||
GVAR(armor_unlocks) = _data select 1;
|
||||
GVAR(heli_unlocks) = _data select 2;
|
||||
GVAR(plane_unlocks) = _data select 3;
|
||||
GVAR(naval_unlocks) = _data select 4;
|
||||
GVAR(static_unlocks) = _data select 5;
|
||||
|
||||
TRACE_1("Garage unlocks updated",count GVAR(garage_unlocks));
|
||||
GVAR(garage_unlocks) = _data;
|
||||
GVAR(car_unlocks) = _cars;
|
||||
GVAR(armor_unlocks) = _armor;
|
||||
GVAR(heli_unlocks) = _helis;
|
||||
GVAR(plane_unlocks) = _planes;
|
||||
GVAR(naval_unlocks) = _naval;
|
||||
GVAR(static_unlocks) = _static;
|
||||
};
|
||||
};
|
@ -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"));
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_bank_fnc_submit
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Submits the timesheet
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Transfers money to a player.
|
||||
* Transfers money to a player
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* Author: IDSolutions
|
||||
* Withdraws money from the bank.
|
||||
* Withdraws money from the bank
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,15 +1,20 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: PDT for J. Schmidt
|
||||
ends the slide show
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if the slide show was ended; false if not
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* Ends the slide show
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean - true if the slide show was ended; false if not
|
||||
*
|
||||
* Example:
|
||||
* [controller] call ace_briefing_fnc_endSlideShow
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_controller", objNull]];
|
||||
|
||||
|
@ -1,24 +1,26 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: PDT for J. Schmidt
|
||||
sets up a slide show
|
||||
|
||||
Arguments:
|
||||
0: _screen <ARRAY> - array of objects to display images on
|
||||
1: _controllers <ARRAY> - array of objects to use are controlers
|
||||
2: _images <ARRAY> - array of image paths; images should be powers of 2
|
||||
3: _autoScroll <BOOL> - should the image auto-scroll
|
||||
4: _units <ARRAY> - unit(s) that should speak
|
||||
5: _topic <STRING> - conversation topic
|
||||
6: _sentence <STRING> - conversation sentence, "" = play all
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if slide show was setup; false if not
|
||||
|
||||
Example:
|
||||
[Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* Sets up a slide show
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _screen <ARRAY> - array of objects to display images on
|
||||
* 1: _controllers <ARRAY> - array of objects to use are controlers
|
||||
* 2: _images <ARRAY> - array of image paths; images should be powers of 2
|
||||
* 3: _autoScroll <BOOL> - should the image auto-scroll
|
||||
* 4: _units <ARRAY> - unit(s) that should speak
|
||||
* 5: _topic <STRING> - conversation topic
|
||||
* 6: _sentence <STRING> - conversation sentence, "" = play all
|
||||
*
|
||||
* Return Value:
|
||||
* <BOOL> - true if slide show was setup; false if not
|
||||
*
|
||||
* Example:
|
||||
* [Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_screens", []], ["_controllers", []], ["_images", []], ["_autoScroll", false], ["_units", []], ["_topic", ""], ["_sentence", ""]];
|
||||
|
||||
|
@ -1,15 +1,20 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: PDT for J. Schmidt
|
||||
displays the next image
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if the next image was displayed; false if not
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* Displays the next image
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* 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]];
|
||||
|
||||
|
@ -1,15 +1,20 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: PDT for J. Schmidt
|
||||
displays the previous image
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if the previous image was displayed; false if not
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* Displays the previous image
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* 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]];
|
||||
|
||||
|
@ -1,21 +1,25 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Name: forge_client_briefing_fnc_spawnLecture
|
||||
Date: 8/6/2022
|
||||
Version: 1.0
|
||||
Author: J. Schmidt
|
||||
|
||||
Description:
|
||||
AI plays a given sentence/conversation.
|
||||
|
||||
Parameter(s):
|
||||
0: Unit that is playing the given sentence/conversation. <OBJECT>
|
||||
1: Topic that is being talked about. <STRING>
|
||||
2: Sentence partaining to the topic at hand. <STRING>
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* AI plays a given sentence/conversation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that is playing the given sentence/conversation <OBJECT>
|
||||
* 1: Topic that is being talked about <STRING>
|
||||
* 2: Sentence partaining to the topic at hand <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, "topic", "sentence"] call forge_client_briefing_fnc_spawnLecture
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_unit", "_topic", "_sentence"];
|
||||
|
||||
FORGE_Briefing_inProgress = true;
|
||||
publicVariable "FORGE_Briefing_inProgress";
|
||||
|
||||
|
@ -1,20 +1,23 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Name: forge_client_briefing_fnc_spawnLecture
|
||||
Date: 8/6/2022
|
||||
Version: 1.0
|
||||
Author: J. Schmidt
|
||||
|
||||
Description:
|
||||
Object displays a slideshow presentation.
|
||||
|
||||
Parameter(s):
|
||||
0: Object that will display the presentation. <OBJECT>
|
||||
1: Slides that will be used for the presentation. <ARRAY>
|
||||
1-0: Texture used for the Slide. <STRING>
|
||||
1-1: Amount of Time the Slide will display. <NUMBER>
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* Object displays a slideshow presentation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object that will display the presentation <OBJECT>
|
||||
* 1: Slides that will be used for the presentation <ARRAY>
|
||||
* - 0: Texture used for the Slide <STRING>
|
||||
* - 1: Amount of Time the Slide will display <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [screen, [["texture.paa", 5]]] call forge_client_briefing_fnc_spawnLecture
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_object", "_slides"];
|
||||
|
||||
|
@ -1,15 +1,20 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: PDT for J. Schmidt
|
||||
starts the slideshow
|
||||
|
||||
Arguments:
|
||||
0: _controller <OBJECT> - object that controls the slide show
|
||||
|
||||
Return Value:
|
||||
<BOOL> - true if slide show was started
|
||||
*/
|
||||
* Author: IDSolutions
|
||||
* Starts the slideshow
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Controller <OBJECT> - object that controls the slide show
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean - true if slide show was started
|
||||
*
|
||||
* Example:
|
||||
* [controller] call ace_fnc_startSlideShow
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_controller", objNull], ["_units", []], ["_topic", ""], ["_sentence", ""]];
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_db_fnc_requestServerDB
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Sends database requests to the server using CBA events
|
||||
*
|
||||
* Arguments:
|
||||
@ -14,6 +11,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* Request ID <STRING>
|
||||
*
|
||||
* Example:
|
||||
* ["hgetall", "Hello World!", { systemChat format ["Message: %1", _this]; }] call forge_db_fnc_requestServerDB;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
params [
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_dialogue_fnc_selectAI
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Selects AI for dialogue
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [units group player] call FUNC(selectAI);
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params [["_units", [], [[]]]];
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_fetchGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Fetches the vehicles in the garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _display = findDisplay IDD_GARAGEDIALOG;
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_fetchNearby
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Fetches the nearby vehicles
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _display = findDisplay IDD_GARAGEDIALOG;
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_initGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Initializes the garages
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
{
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_openGarage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Opens the garage dialog
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
disableSerialization;
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_spawnVehicle
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Spawns a vehicle from the garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
disableSerialization;
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_garage_fnc_storeVehicle
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* Description:
|
||||
* Stores a vehicle in the garage
|
||||
*
|
||||
* Arguments:
|
||||
@ -12,6 +9,11 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _display = findDisplay IDD_GARAGEDIALOG;
|
||||
|
@ -5,4 +5,6 @@ PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
GVAR(done) = false;
|
||||
|
||||
ADDON = true;
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_initPlayer
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player.
|
||||
* Initialize player
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
@ -32,7 +29,7 @@ removeBackpack player;
|
||||
removeGoggles player;
|
||||
removeHeadgear player;
|
||||
|
||||
SETPVAR(player,value_loadDone,false);
|
||||
SETPVAR(player,GVAR(done),false);
|
||||
cutText ["Loading In...", "BLACK", 1];
|
||||
|
||||
// ["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 EFUNC(interaction,initInteraction);
|
||||
|
||||
waitUntil { GETVAR(player,value_loadDone,false) };
|
||||
waitUntil { GETVAR(player,GVAR(done),false) };
|
||||
cutText ["", "PLAIN", 1];
|
||||
|
||||
waitUntil { !(isNull (findDisplay 46)) };
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_playerDBLoad
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Load player from DB.
|
||||
* Load player from DB
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_playerDBSave
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Save player to DB.
|
||||
* Save player to DB
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
@ -20,13 +17,10 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
private _default_armory_unlocks = [[],[],[],[]];
|
||||
private _default_garage_unlocks = [[],[],[],[],[],[]];
|
||||
|
||||
private _data = [
|
||||
getPlayerUID player,
|
||||
"armory_unlocks", [GETVAR(player,Armory_Unlocks,_default_armory_unlocks)],
|
||||
"garage_unlocks", [GETVAR(player,Garage_Unlocks,_default_garage_unlocks)],
|
||||
"armory_unlocks", [GETVAR(player,Armory_Unlocks,EGVAR(arsenal,default_armory))],
|
||||
"garage_unlocks", [GETVAR(player,Garage_Unlocks,EGVAR(arsenal,default_garage))],
|
||||
"locker", [GETVAR(player,FORGE_Locker,[])],
|
||||
"garage", [GETVAR(player,FORGE_Garage,[])],
|
||||
"cash", [GETVAR(player,FORGE_Cash,0)],
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_init_fnc_playerSaveLoop
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player save loop.
|
||||
* Initialize player save loop
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_interaction_fnc_initInteraction
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player interaction.
|
||||
* Initialize player interaction
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_interaction_fnc_interactionAction
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initialize player interaction.
|
||||
* Initialize player interaction
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Index of current action array <NUMBER>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_interaction_fnc_openInteraction
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Open player interaction.
|
||||
* Open player interaction
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_equipGear
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Equips gear from the locker.
|
||||
* Equips gear from the locker
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_fetchLocker
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Fetches the locker.
|
||||
* Fetches the locker
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_fetchPlayer
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Fetches the player's gear.
|
||||
* Fetches the player's gear
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_initLocker
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the lockers.
|
||||
* Initializes the lockers
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_openLocker
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Opens the locker dialog.
|
||||
* Opens the locker dialog
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_locker_fnc_storeGear
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Stores gear in the locker.
|
||||
* Stores gear in the locker
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_deductMedicalCost
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Deducts the medical cost from the player's account.
|
||||
* Deducts the medical cost from the player's account
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_deductMedicalCost
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Deducts the medical cost from the player's account.
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_initMedical
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the medical system.
|
||||
* Initializes the medical system
|
||||
*
|
||||
* Arguments:
|
||||
* N/A
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_moveInventory
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Moves the unit's inventory to the body bag.
|
||||
* Moves the unit's inventory to the body bag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_onKilled
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Handles the unit's death.
|
||||
* Handles the unit's death
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_onRespawn
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Handles the unit's respawn.
|
||||
* Handles the unit's respawn
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_medical_fnc_saveDroppedWeapons
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Saves the unit's dropped weapons and items.
|
||||
* Saves the unit's dropped weapons and items
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_cargoToPairs
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Converts a cargo array to an array of pairs.
|
||||
* Converts a cargo array to an array of pairs
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Cargo Array <ARRAY>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_deserializeString
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Converts underscores in a string to spaces for display.
|
||||
* Converts underscores in a string to spaces for display
|
||||
*
|
||||
* Arguments:
|
||||
* 0: String <STRING>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_formatNumber
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Formats a number with thousands separators and decimal places.
|
||||
* Formats a number with thousands separators and decimal places
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Number <NUMBER>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_getSystemTime
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Gets the current system time in a formatted string.
|
||||
* Gets the current system time in a formatted string
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_isAssignableBinocular
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Checks if a binocular is assignable.
|
||||
* Checks if a binocular is assignable
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Binocular <STRING>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_isWeaponType
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Checks if a weapon is of a certain type.
|
||||
* Checks if a weapon is of a certain type
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Weapon <STRING>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_notify
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Creates a notification.
|
||||
* Creates a notification
|
||||
*
|
||||
* Arguments:
|
||||
* 0: STRING - The text to display
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_serializeString
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Converts spaces in a string to underscores for database storage.
|
||||
* Converts spaces in a string to underscores for database storage
|
||||
*
|
||||
* Arguments:
|
||||
* 0: String <STRING>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_misc_fnc_test
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Test function.
|
||||
* Test function
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Value <ARRAY|STRING|NUMBER|BOOL>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_money_fnc_giveCash
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Send money to player.
|
||||
* Send money to player
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target to send money <OBJECT>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_money_fnc_giveCashSubmit
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Handle cash to be given.
|
||||
* Handle cash to be given
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target to add money <OBJECT>
|
||||
@ -23,8 +20,6 @@
|
||||
params ["_target", "_player"];
|
||||
|
||||
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 _targetCash = GETVAR(_target,FORGE_Cash,0);
|
||||
|
||||
@ -33,7 +28,6 @@ if (_amount > 0) then {
|
||||
|
||||
private _newCash = _targetCash + _amount;
|
||||
private _formattedAmount = (_amount) call EFUNC(misc,formatNumber);
|
||||
// _target setVariable ["FORGE_Cash", _newCash, true];
|
||||
SETPVAR(_target,FORGE_Cash,_newCash);
|
||||
|
||||
["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2];
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_money_fnc_takeCash
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Handle cash picked up.
|
||||
* Handle cash picked up
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_addAsset
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds an asset to an organization's inventory.
|
||||
* Adds an asset to an organization's inventory
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.)
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_addFunds
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds or removes funds from an organization's account.
|
||||
* Positive values increase funds, negative values decrease funds.
|
||||
* Adds or removes funds from an organization's account
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Amount <NUMBER> - Amount to add (positive) or withdraw (negative)
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_addMember
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Adds a new member to an organization if added by the owner
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player UID <STRING> - Unique identifier of the player to add
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_addReputation
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds or removes reputation from an organization.
|
||||
* Positive values increase reputation, negative values decrease reputation.
|
||||
* Adds or removes reputation from an organization
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Amount <NUMBER> - Amount of reputation to add (positive) or subtract (negative)
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_create
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Creates a new organization for a player.
|
||||
* Initializes the organization with the specified name, owner, and optional starting funds and reputation.
|
||||
* Creates a new organization for a player
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Owner UID <STRING> - Player UID who will own the organization
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_disband
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Disbands an organization if requested by the owner
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_handleOrgLoad
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Loads organization from database
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Raw Data <ARRAY> - DragonflyDB HGETALL result containing raw organization data
|
||||
@ -16,7 +11,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* _orgData call forge_client_org_fnc_handleOrgLoad
|
||||
* [_orgData] call forge_client_org_fnc_handleOrgLoad
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -1,17 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_initOrgStore
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* 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
|
||||
* Provides CRUD operations for organizations
|
||||
*
|
||||
* Returns:
|
||||
* Organization store interface <HASHMAP>
|
||||
@ -19,6 +10,8 @@
|
||||
* Example:
|
||||
* private _orgStore = call forge_client_org_fnc_initOrgStore;
|
||||
* _orgStore call ["createOrg", [getPlayerUID player, "My Organization"]];
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
private _orgStoreInterface = createHashMapObject [[
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_leave
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Removes the player from an organization, not applicable for owners
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,12 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_removeAsset
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Removes an asset from an organization's inventory.
|
||||
* Deletes the specified asset based on its type and unique identifier.
|
||||
* Removes an asset from an organization's inventory
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Asset Type <STRING> - Type of asset (vehicle, building, etc.)
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_org_fnc_verifyOrgStore
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [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.
|
||||
* Ensures the organization store is initialized and returns the store object
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_addContact
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds a contact to the address book.
|
||||
* Adds a contact to the address book
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Contact <OBJECT> - The contact to add
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_addEmail
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds an email to the address book.
|
||||
* Adds an email to the email list
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Email <STRING> - The email to add
|
||||
@ -14,7 +11,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* ["test@test.com"] call forge_client_phone_fnc_addEmail;
|
||||
* ["Hello World"] call forge_client_phone_fnc_addEmail;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_addMsg
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds a message to the message log.
|
||||
* Adds a message to the message list
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Message <STRING> - The message to add
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_addOfflineEmail
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds an email to the offline email list.
|
||||
* Adds an email to the offline email list
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Email <STRING> - The email to add
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_addOfflineMsg
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds a message to the offline message list.
|
||||
* Adds a message to the offline message list
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Message <STRING> - The message to add
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_dateToHhMm
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Converts a date to a string in the format "HH:MM".
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_delEmail
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Deletes an email from the address book.
|
||||
* Deletes an email from the email list
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_delMsg
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Deletes a message from the message log.
|
||||
* Deletes a message from the message list
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_initAction
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the phone action.
|
||||
* Initializes the phone action
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_initAddAction
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the phone action.
|
||||
* Initializes the phone action
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_initPhone
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the phone.
|
||||
* Initializes the phone
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_initVar
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Initializes the phone variables.
|
||||
* Initializes the phone variables
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_newEmail
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds a new email to the address book.
|
||||
* Adds a new email to the email list
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Email <STRING> - The email to add
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_newMsg
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Adds a new message to the message log.
|
||||
* Adds a new message to the message list
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Number <STRING> - The number to add
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_openPhone
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Opens the phone.
|
||||
* Opens the phone
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_sendEmail
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Sends an email.
|
||||
* Sends an email
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Email <STRING> - The email to send to
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_sendMsg
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Sends a message.
|
||||
* Sends a message
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Number <STRING> - The number to send to
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_showContact
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Shows the contact list.
|
||||
* Shows the contact list
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_showDialpad
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Shows the dialpad.
|
||||
* Shows the dialpad
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_showEmail
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Shows the email.
|
||||
* Shows the email
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_showMessage
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Shows the message.
|
||||
* Shows the message
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
/*
|
||||
* Function: forge_client_phone_fnc_showMessageInput
|
||||
* Author: IDSolutions
|
||||
*
|
||||
* [Description]
|
||||
* Shows the message input.
|
||||
* Shows the message input
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user