From 44625a8677a22f15387fbf73fe1dcd0aa0265cab Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 5 Apr 2025 16:12:32 -0500 Subject: [PATCH] feat: Refactor and document client-side functions This commit refactors and adds documentation to several client-side functions across various addons, including: - **Task Addon:** Added function headers and descriptions to task-related functions (fnc_destroy, fnc_attack, fnc_defuse, fnc_hostage, fnc_makeIED, fnc_hvt, fnc_heartBeat, fnc_makeTarget, fnc_makeHVT, fnc_makeHostage, fnc_makeObject, fnc_makeShooter, fnc_attackModule, fnc_destroyModule, fnc_hvtModule, fnc_hostageModule, fnc_defuseModule, fnc_protectedModule, fnc_hostagesModule, fnc_explosivesModule, fnc_shootersModule). - **Org Addon:** Updated author and added function headers/descriptions to organization-related functions (fnc_initOrgStore, fnc_requestServerDB, fnc_addAsset, fnc_addReputation, fnc_create, fnc_removeAsset, fnc_addFunds, fnc_leave, fnc_addMember, fnc_disband, fnc_verifyOrgStore, fnc_handleOrgLoad). - **Garage Addon:** Added function headers and descriptions to garage-related functions (fnc_openGarage, fnc_fetchNearby, fnc_initGarage, fnc_fetchGarage, fnc_storeVehicle). - **Locker Addon:** Added function headers and descriptions to locker-related functions (fnc_openLocker, fnc_fetchPlayer, fnc_initLocker, fnc_fetchLocker). - **Phone Addon:** Added function headers, descriptions, and examples to phone-related functions (fnc_initAction, fnc_showEmail, fnc_showMessage, fnc_delEmail, fnc_delMsg, fnc_showMessageInput, fnc_addContact, fnc_initPhone, fnc_addMsg, fnc_addEmail, fnc_newEmail, fnc_initVar, fnc_addOfflineEmail, fnc_addOfflineMsg, fnc_sendMsg, fnc_sendEmail, fnc_showContact, fnc_newMsg, fnc_dateToHhMm, fnc_initAddAction, fnc_openPhone, fnc_viewSettings, fnc_viewMessages, fnc_viewContacts, fnc_viewEmail, fnc_showDialpad, fnc_showSafari). - **Admin Addon:** Added function headers and descriptions to admin-related functions (fnc_adminMessage, fnc_printAddonName, fnc_initAdmin, fnc_openAdmin, fnc_adminPromote). - **Store Addon:** Added function headers and descriptions to store-related functions (fnc_openStore, fnc_initStore, fnc_selectProduct, fnc_changeFilter, fnc_changePayment, fnc_handlePurchase). - **Medical Addon:** Added function headers, descriptions, and examples to medical-related functions (fnc_saveDroppedWeapons, fnc_moveInventory, fnc_onRespawn, fnc_onKilled, fnc_initMedical, fnc_deductMedicalCost, fnc_heartBeat). - **Misc Addon:** Added function headers, descriptions, and examples to misc-related functions (fnc_formatNumber, fnc_isAssignableBinocular, fnc_isWeaponType, fnc_cargoToPairs, fnc_serializeString, fnc_deserializeString, fnc_getSystemTime). - **Init Addon:** Updated author and removed unnecessary copyright information from init-related functions (fnc_initPlayer, fnc_playerDBSave, fnc_playerSaveLoop, fnc_playerDBLoad, fnc_handlePlayerLoad). - **Money Addon:** Removed unnecessary copyright information from money-related functions (fnc_takeCash, fnc_giveCash, fnc_giveCashSubmit). - **Interaction Addon:** Removed unnecessary copyright information from interaction-related functions (fnc_initInteraction, fnc_openInteraction, fnc_interactionAction). - **Ambient Addon:** Removed unnecessary copyright information from ambient-related functions (fnc_ambientSound). - **Arsenal Addon:** Added function headers, descriptions, and examples to arsenal-related functions (fnc_openArmory, fnc_saveUnlocks, fnc_updateUnlocks, fnc_openGarage, fnc_addGarageVehicle, fnc_addVirtualVehicles, fnc_addVirtualVehicles). - **Dialogue Addon:** Added function headers and descriptions to dialogue-related functions (fnc_selectAI, fnc_selectDialogue). - **Service Addon:** Added function headers and descriptions to service-related functions (fnc_initService). - **Bank Addon:** Added function headers and descriptions to bank-related functions (fnc_initBank, fnc_refresh, fnc_openBank). These changes improve code readability, maintainability, and provide better context for developers working with these functions. The author field was updated to `IDSolutions` where appropriate. --- addons/admin/functions/fnc_adminMessage.sqf | 19 ++++++ addons/admin/functions/fnc_adminPromote.sqf | 24 ++++++- addons/admin/functions/fnc_adminRefresh.sqf | 34 ++++++++-- addons/admin/functions/fnc_adminTransfer.sqf | 46 ++++++++++--- addons/admin/functions/fnc_initAdmin.sqf | 19 ++++++ addons/admin/functions/fnc_openAdmin.sqf | 22 +++++- addons/admin/functions/fnc_printAddonName.sqf | 19 ++++++ addons/ambient/functions/fnc_ambientSound.sqf | 8 --- .../arsenal/functions/fnc_addArmoryItem.sqf | 17 ++++- .../functions/fnc_addGarageVehicle.sqf | 16 ++++- .../functions/fnc_addVirtualVehicles.sqf | 12 +++- addons/arsenal/functions/fnc_initArsenal.sqf | 20 ++++++ addons/arsenal/functions/fnc_openArmory.sqf | 19 ++++++ addons/arsenal/functions/fnc_openGarage.sqf | 19 ++++++ addons/arsenal/functions/fnc_saveUnlocks.sqf | 9 ++- .../arsenal/functions/fnc_updateUnlocks.sqf | 10 ++- addons/bank/functions/fnc_deposit.sqf | 24 +++++-- addons/bank/functions/fnc_initBank.sqf | 19 ++++++ addons/bank/functions/fnc_openBank.sqf | 21 +++++- addons/bank/functions/fnc_refresh.sqf | 21 +++++- addons/bank/functions/fnc_submit.sqf | 24 +++++-- addons/bank/functions/fnc_transfer.sqf | 26 +++++-- addons/bank/functions/fnc_withdraw.sqf | 26 +++++-- addons/db/functions/fnc_requestServerDB.sqf | 4 +- addons/dialogue/functions/fnc_selectAI.sqf | 23 ++++--- .../dialogue/functions/fnc_selectDialogue.sqf | 25 +++---- addons/garage/functions/fnc_fetchGarage.sqf | 15 +++- addons/garage/functions/fnc_fetchNearby.sqf | 14 ++++ addons/garage/functions/fnc_initGarage.sqf | 14 ++++ addons/garage/functions/fnc_openGarage.sqf | 14 ++++ addons/garage/functions/fnc_spawnVehicle.sqf | 17 ++++- addons/garage/functions/fnc_storeVehicle.sqf | 15 +++- .../init/functions/fnc_handlePlayerLoad.sqf | 12 +--- addons/init/functions/fnc_initPlayer.sqf | 10 +-- addons/init/functions/fnc_playerDBLoad.sqf | 10 +-- addons/init/functions/fnc_playerDBSave.sqf | 10 +-- addons/init/functions/fnc_playerSaveLoop.sqf | 10 +-- .../functions/fnc_initInteraction.sqf | 10 +-- .../functions/fnc_interactionAction.sqf | 10 +-- .../functions/fnc_openInteraction.sqf | 10 +-- addons/locker/functions/fnc_equipGear.sqf | 68 ++++++------------- addons/locker/functions/fnc_fetchLocker.sqf | 20 +++++- addons/locker/functions/fnc_fetchPlayer.sqf | 19 ++++++ addons/locker/functions/fnc_initLocker.sqf | 19 ++++++ addons/locker/functions/fnc_openLocker.sqf | 19 ++++++ addons/locker/functions/fnc_storeGear.sqf | 29 +++++--- .../functions/fnc_deductMedicalCost.sqf | 20 ++++++ addons/medical/functions/fnc_heartBeat.sqf | 20 ++++++ addons/medical/functions/fnc_initMedical.sqf | 19 ++++++ .../medical/functions/fnc_moveInventory.sqf | 20 ++++++ addons/medical/functions/fnc_onKilled.sqf | 22 ++++++ addons/medical/functions/fnc_onRespawn.sqf | 20 ++++++ .../functions/fnc_saveDroppedWeapons.sqf | 19 ++++++ addons/misc/functions/fnc_cargoToPairs.sqf | 20 ++++++ .../misc/functions/fnc_deserializeString.sqf | 21 ++++-- addons/misc/functions/fnc_formatNumber.sqf | 19 ++++++ addons/misc/functions/fnc_getSystemTime.sqf | 19 ++++++ .../functions/fnc_isAssignableBinocular.sqf | 19 ++++++ addons/misc/functions/fnc_isWeaponType.sqf | 20 ++++++ addons/misc/functions/fnc_notify.sqf | 10 +-- addons/misc/functions/fnc_serializeString.sqf | 21 ++++-- addons/misc/functions/fnc_test.sqf | 10 +-- addons/money/functions/fnc_giveCash.sqf | 10 +-- addons/money/functions/fnc_giveCashSubmit.sqf | 10 +-- addons/money/functions/fnc_takeCash.sqf | 10 +-- addons/org/functions/fnc_addAsset.sqf | 5 +- addons/org/functions/fnc_addFunds.sqf | 5 +- addons/org/functions/fnc_addMember.sqf | 5 +- addons/org/functions/fnc_addReputation.sqf | 5 +- addons/org/functions/fnc_create.sqf | 5 +- addons/org/functions/fnc_disband.sqf | 5 +- addons/org/functions/fnc_handleOrgLoad.sqf | 5 +- addons/org/functions/fnc_initOrgStore.sqf | 2 +- addons/org/functions/fnc_leave.sqf | 5 +- addons/org/functions/fnc_removeAsset.sqf | 5 +- addons/org/functions/fnc_verifyOrgStore.sqf | 5 +- addons/phone/functions/fnc_addContact.sqf | 19 ++++++ addons/phone/functions/fnc_addEmail.sqf | 19 ++++++ addons/phone/functions/fnc_addMsg.sqf | 19 ++++++ .../phone/functions/fnc_addOfflineEmail.sqf | 19 ++++++ addons/phone/functions/fnc_addOfflineMsg.sqf | 19 ++++++ addons/phone/functions/fnc_dateToHhMm.sqf | 19 ++++++ addons/phone/functions/fnc_delEmail.sqf | 19 ++++++ addons/phone/functions/fnc_delMsg.sqf | 19 ++++++ addons/phone/functions/fnc_initAction.sqf | 19 ++++++ addons/phone/functions/fnc_initAddAction.sqf | 19 ++++++ addons/phone/functions/fnc_initPhone.sqf | 19 ++++++ addons/phone/functions/fnc_initVar.sqf | 19 ++++++ addons/phone/functions/fnc_newEmail.sqf | 19 ++++++ addons/phone/functions/fnc_newMsg.sqf | 19 ++++++ addons/phone/functions/fnc_openPhone.sqf | 19 ++++++ addons/phone/functions/fnc_sendEmail.sqf | 20 ++++++ addons/phone/functions/fnc_sendMsg.sqf | 20 ++++++ addons/phone/functions/fnc_showContact.sqf | 19 ++++++ addons/phone/functions/fnc_showDialpad.sqf | 19 ++++++ addons/phone/functions/fnc_showEmail.sqf | 19 ++++++ addons/phone/functions/fnc_showMessage.sqf | 19 ++++++ .../phone/functions/fnc_showMessageInput.sqf | 19 ++++++ addons/phone/functions/fnc_showSafari.sqf | 19 ++++++ addons/phone/functions/fnc_viewContacts.sqf | 19 ++++++ addons/phone/functions/fnc_viewEmail.sqf | 19 ++++++ addons/phone/functions/fnc_viewMessages.sqf | 19 ++++++ addons/phone/functions/fnc_viewSettings.sqf | 19 ++++++ addons/player/functions/fnc_firstLogin.sqf | 19 +----- addons/service/functions/fnc_fuel.sqf | 36 ++++++++-- addons/service/functions/fnc_initService.sqf | 19 ++++++ addons/service/functions/fnc_rearm.sqf | 33 ++++++++- addons/service/functions/fnc_refuel.sqf | 33 ++++++++- addons/service/functions/fnc_repair.sqf | 33 ++++++++- addons/service/functions/fnc_vehicle.sqf | 53 ++++++++++++--- addons/store/functions/fnc_buyItem.sqf | 24 ++++++- addons/store/functions/fnc_buyVehicle.sqf | 25 +++++-- addons/store/functions/fnc_changeFilter.sqf | 20 ++++++ addons/store/functions/fnc_changePayment.sqf | 20 ++++++ addons/store/functions/fnc_handlePurchase.sqf | 21 +++++- addons/store/functions/fnc_initStore.sqf | 19 ++++++ addons/store/functions/fnc_openStore.sqf | 19 ++++++ addons/store/functions/fnc_selectProduct.sqf | 19 ++++++ addons/task/functions/fnc_attack.sqf | 3 + addons/task/functions/fnc_attackModule.sqf | 21 ++++++ addons/task/functions/fnc_defuse.sqf | 3 + addons/task/functions/fnc_defuseModule.sqf | 21 ++++++ addons/task/functions/fnc_destroy.sqf | 3 + addons/task/functions/fnc_destroyModule.sqf | 21 ++++++ .../task/functions/fnc_explosivesModule.sqf | 21 ++++++ addons/task/functions/fnc_handler.sqf | 6 +- addons/task/functions/fnc_heartBeat.sqf | 3 + addons/task/functions/fnc_hostage.sqf | 3 + addons/task/functions/fnc_hostageModule.sqf | 21 ++++++ addons/task/functions/fnc_hostagesModule.sqf | 21 ++++++ addons/task/functions/fnc_hvt.sqf | 3 + addons/task/functions/fnc_hvtModule.sqf | 21 ++++++ addons/task/functions/fnc_makeHVT.sqf | 3 + addons/task/functions/fnc_makeHostage.sqf | 3 + addons/task/functions/fnc_makeIED.sqf | 3 + addons/task/functions/fnc_makeObject.sqf | 5 +- addons/task/functions/fnc_makeShooter.sqf | 5 +- addons/task/functions/fnc_makeTarget.sqf | 3 + addons/task/functions/fnc_protectedModule.sqf | 21 ++++++ addons/task/functions/fnc_shootersModule.sqf | 21 ++++++ 140 files changed, 2054 insertions(+), 341 deletions(-) diff --git a/addons/admin/functions/fnc_adminMessage.sqf b/addons/admin/functions/fnc_adminMessage.sqf index 31115c7..983d735 100644 --- a/addons/admin/functions/fnc_adminMessage.sqf +++ b/addons/admin/functions/fnc_adminMessage.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_adminMessage + * Author: IDSolutions + * + * [Description] + * Admin Message Menu + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private ["_data", "_dialog", "_list", "_target", "_targetValue", "_textBox", "_textMessage"]; _dialog = findDisplay 202303; diff --git a/addons/admin/functions/fnc_adminPromote.sqf b/addons/admin/functions/fnc_adminPromote.sqf index b28272f..7ced94e 100644 --- a/addons/admin/functions/fnc_adminPromote.sqf +++ b/addons/admin/functions/fnc_adminPromote.sqf @@ -1,6 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_adminPromote + * Author: IDSolutions + * + * [Description] + * Admin Promote Menu + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + params [["_condition", "", [""]]]; + private ["_data", "_data2", "_dialog", "_list", "_list2", "_paygrade", "_rankValue", "_target", "_targetValue"]; _dialog = findDisplay 202303; @@ -21,10 +41,10 @@ if ((isNil {_data})) exitWith { hintSilent "You did not select a player!" }; switch (_condition) do { case ("promote"): { - SETPVAR(_target,PayGrade,_paygrade) + SETPVAR(_target,FORGE_PayGrade,_paygrade) }; case ("demote"): { - SETPVAR(_target,PayGrade,_paygrade) + SETPVAR(_target,FORGE_PayGrade,_paygrade) }; }; diff --git a/addons/admin/functions/fnc_adminRefresh.sqf b/addons/admin/functions/fnc_adminRefresh.sqf index 01a1127..2293259 100644 --- a/addons/admin/functions/fnc_adminRefresh.sqf +++ b/addons/admin/functions/fnc_adminRefresh.sqf @@ -1,18 +1,44 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_adminRefresh + * Author: IDSolutions + * + * [Description] + * Admin Refresh Menu + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + params [["_condition", "", [""]], ["_amount", 0, [0]]]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (isNil "_org") exitWith { ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify) }; + +private _orgFunds = _org get "funds"; + private _newFunds = 0; private _dialog = findDisplay 202303; private _list = _dialog displayCtrl 2023001; switch (_condition) do { case ("deduct"): { - _newFunds = companyFunds - _amount; + _newFunds = _orgFunds - _amount; ctrlSetText [2023002, format ["$%1", (_newFunds call EFUNC(misc,formatNumber))]]; }; case ("advance"): { - _newFunds = companyFunds + _amount; + _newFunds = _orgFunds + _amount; ctrlSetText [2023002, format ["$%1", (_newFunds call EFUNC(misc,formatNumber))]]; }; default { @@ -22,7 +48,7 @@ switch (_condition) do { if (str (side _x) == str (playerSide)) then { private _name = name (_x); private _defaultPaygrade = "E1"; - private _paygrade = GETVAR(_x,PayGrade,_defaultPaygrade); + private _paygrade = GETVAR(_x,FORGE_PayGrade,_defaultPaygrade); private _index = _list lbAdd format["%1 - %2", _name, _paygrade]; _list lbSetData [_index, name (_x)]; @@ -41,7 +67,7 @@ lbClear _list; if (str (side _x) == str (playerSide)) then { private _name = name (_x); private _defaultPaygrade = "E1"; - private _paygrade = GETVAR(_x,PayGrade,_defaultPaygrade); + private _paygrade = GETVAR(_x,FORGE_PayGrade,_defaultPaygrade); private _index = _list lbAdd format["%1 - %2", _name, _paygrade]; _list lbSetData [_index, name (_x)]; diff --git a/addons/admin/functions/fnc_adminTransfer.sqf b/addons/admin/functions/fnc_adminTransfer.sqf index 335145d..6ef1213 100644 --- a/addons/admin/functions/fnc_adminTransfer.sqf +++ b/addons/admin/functions/fnc_adminTransfer.sqf @@ -1,7 +1,33 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_adminTransfer + * Author: IDSolutions + * + * [Description] + * Admin Transfer Menu + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + params [["_condition", "", [""]]]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (isNil "_org") exitWith { ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify) }; + +private _orgFunds = _org get "funds"; + private _dialog = findDisplay 202303; private _list = _dialog displayCtrl 2023001; private _targetValue = lbCurSel _list; @@ -21,27 +47,27 @@ switch (_condition) do { private _bank = GETVAR(_target,FORGE_Bank,0); private _newBalance = _bank + _amount; - if (_amount > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) }; + if (_amount > _orgFunds) exitWith { ["Not enough money in the organization's account!", "warning", 3] call EFUNC(misc,notify) }; SETPVAR(_target,FORGE_Bank,_newBalance); ["deduct", _amount] call FUNC(adminRefresh); - ["deduct", _amount] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + _store call ["updateFunds", -_amount]; }; case ("advanceAll"): { private _count = count playableUnits; - if ((10000 * _count) > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) }; + if ((10000 * _count) > _orgFunds) exitWith { ["Not enough money in the organization's account!", "warning", 3] call EFUNC(misc,notify) }; { - private _bank = GETVAR(_x,Cash_Bank,0); + private _bank = GETVAR(_x,FORGE_Bank,0); private _newBalance = _bank + 10000; - SETPVAR(_x,Cash_Bank,_newBalance); + SETPVAR(_x,FORGE_Bank,_newBalance); } count playableUnits; ["deduct", (10000 * _count)] call FUNC(adminRefresh); - ["deduct", (10000 * _count)] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + _store call ["updateFunds", -(10000 * _count)]; }; case ("deduct"): { private _bank = GETVAR(_target,FORGE_Bank,0); @@ -52,7 +78,7 @@ switch (_condition) do { SETPVAR(_target,FORGE_Bank,_newBalance); ["advance", _amount] call FUNC(adminRefresh); - ["advance", _amount] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + _store call ["updateFunds", _amount]; }; case ("payday"): { private _totalPayment = 0; @@ -61,7 +87,7 @@ switch (_condition) do { { private _player = _x; - private _payGrade = GETVAR(_player,PayGrade,nil); + private _payGrade = GETVAR(_player,FORGE_PayGrade,nil); { _x params ["_payGradeIndex", "_payGradeBonus"]; @@ -73,7 +99,7 @@ switch (_condition) do { } forEach _payGrades; } count playableUnits; - if (_totalPayment > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) }; + if (_totalPayment > _orgFunds) exitWith { ["Not enough money in the organization's account!", "warning", 3] call EFUNC(misc,notify) }; { _x params ["_player", "_bonus"]; @@ -85,7 +111,7 @@ switch (_condition) do { } count _paymentToDo; ["deduct", _totalPayment] call FUNC(adminRefresh); - ["deduct", _totalPayment] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + _store call ["updateFunds", -_totalPayment]; }; }; diff --git a/addons/admin/functions/fnc_initAdmin.sqf b/addons/admin/functions/fnc_initAdmin.sqf index 5ce6fed..6bb88dc 100644 --- a/addons/admin/functions/fnc_initAdmin.sqf +++ b/addons/admin/functions/fnc_initAdmin.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_initAdmin + * Author: IDSolutions + * + * [Description] + * Initializes the admin menu. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: No + */ + { private _configName = configName(_x); private _className = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "className") call BFUNC(getCfgData); diff --git a/addons/admin/functions/fnc_openAdmin.sqf b/addons/admin/functions/fnc_openAdmin.sqf index e459015..ccd5fc4 100644 --- a/addons/admin/functions/fnc_openAdmin.sqf +++ b/addons/admin/functions/fnc_openAdmin.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_openAdmin + * Author: IDSolutions + * + * [Description] + * Opens the admin menu. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + disableSerialization; createDialog "RscAdmin"; @@ -10,7 +29,8 @@ private _list2 = _dialog displayCtrl 2023003; { if (str (side _x) == str (playerSide)) then { private _name = name (_x); - private _payGrade = GETVAR(_x,paygrade,nil); + private _defaultPaygrade = "E1"; + private _payGrade = GETVAR(_x,FORGE_PayGrade,_defaultPaygrade); private _index = _list lbAdd format["%1 - %2", _name, _payGrade]; _list lbSetData [_index, _name]; diff --git a/addons/admin/functions/fnc_printAddonName.sqf b/addons/admin/functions/fnc_printAddonName.sqf index 511d7b1..e0326e0 100644 --- a/addons/admin/functions/fnc_printAddonName.sqf +++ b/addons/admin/functions/fnc_printAddonName.sqf @@ -1,3 +1,22 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_admin_fnc_printAddonName + * Author: IDSolutions + * + * [Description] + * Prints the name of the addon to the system chat. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: No + */ + systemChat format ["Thank you for using the %1", 'ADDON']; \ No newline at end of file diff --git a/addons/ambient/functions/fnc_ambientSound.sqf b/addons/ambient/functions/fnc_ambientSound.sqf index e32818d..4fa77b2 100644 --- a/addons/ambient/functions/fnc_ambientSound.sqf +++ b/addons/ambient/functions/fnc_ambientSound.sqf @@ -3,14 +3,6 @@ /* * Function: forge_client_ambient_fnc_ambientSound * Author: J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 * * [Description] * Create a sound source and play an ambient sfx sound. diff --git a/addons/arsenal/functions/fnc_addArmoryItem.sqf b/addons/arsenal/functions/fnc_addArmoryItem.sqf index 361d266..684097d 100644 --- a/addons/arsenal/functions/fnc_addArmoryItem.sqf +++ b/addons/arsenal/functions/fnc_addArmoryItem.sqf @@ -1,14 +1,28 @@ #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: + * 0: Classname of item to add + * 1: Type of item to add + * + * Return Value: + * None + * + * Examples: + * ["B_AssaultPack_rgr", "backpack"] call forge_client_arsenal_fnc_addArmoryItem + * + * Public: Yes */ params [["_class", "", [""]], ["_type", "", [""]]]; private _default = [[],[],[],[]]; -// private _armory_unlocks = player getVariable ["Armory_Unlocks", _default]; private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default); private _typeToNumber = switch (_type) do { @@ -27,7 +41,6 @@ private _typeToNumber = switch (_type) do { private _index = (_armory_unlocks select _typeToNumber) pushBackUnique _class; if (_index > -1) then { - // player setVariable ["Armory_Unlocks", _armory_unlocks, true]; SETPVAR(player,Armory_Unlocks,_armory_unlocks); if (GVAR(armory_type) == 0) then { diff --git a/addons/arsenal/functions/fnc_addGarageVehicle.sqf b/addons/arsenal/functions/fnc_addGarageVehicle.sqf index 43f1d53..4bf46c5 100644 --- a/addons/arsenal/functions/fnc_addGarageVehicle.sqf +++ b/addons/arsenal/functions/fnc_addGarageVehicle.sqf @@ -1,11 +1,25 @@ #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: + * 0: Classname of vehicle to add + * 1: Type of vehicle to add + * + * Return Value: + * None + * + * Examples: + * ["B_T_LSV_01_unarmed_F", "car"] call forge_client_arsenal_fnc_addGarageVehicle + * + * Public: Yes */ - params [["_class", "", [""]], ["_type", "", [""]]]; private _default = [[],[],[],[],[],[]]; diff --git a/addons/arsenal/functions/fnc_addVirtualVehicles.sqf b/addons/arsenal/functions/fnc_addVirtualVehicles.sqf index 3cecde6..e38432c 100644 --- a/addons/arsenal/functions/fnc_addVirtualVehicles.sqf +++ b/addons/arsenal/functions/fnc_addVirtualVehicles.sqf @@ -1,17 +1,27 @@ #include "..\script_component.hpp" /* + * Function: forge_client_arsenal_fnc_addVirtualVehicles * Author: IDSolutions + * + * [Description] * Adds vehicles to virtual garage and categorizes them by type * * Arguments: * 0: Vehicles - Array of vehicle classnames + * + * Return Value: + * None + * + * Examples: + * ["B_T_LSV_01_unarmed_F", "car"] call forge_client_arsenal_fnc_addVirtualVehicles + * + * Public: Yes */ params [["_vehicles", [], [[]]]]; private _default = [[],[],[],[],[],[]]; -// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default]; private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default); private _cars = _garage_unlocks select 0; diff --git a/addons/arsenal/functions/fnc_initArsenal.sqf b/addons/arsenal/functions/fnc_initArsenal.sqf index 296bc77..6d6f7b9 100644 --- a/addons/arsenal/functions/fnc_initArsenal.sqf +++ b/addons/arsenal/functions/fnc_initArsenal.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_arsenal_fnc_initArsenal + * Author: IDSolutions + * + * [Description] + * Initializes the arsenal system + * + * Arguments: + * 0: Armory data + * 1: Garage data + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]]; if (count _armory_data isEqualTo [""]) then { _armory_data = [[],[],[],[]] }; diff --git a/addons/arsenal/functions/fnc_openArmory.sqf b/addons/arsenal/functions/fnc_openArmory.sqf index 006f516..b69bb98 100644 --- a/addons/arsenal/functions/fnc_openArmory.sqf +++ b/addons/arsenal/functions/fnc_openArmory.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_arsenal_fnc_openArmory + * Author: IDSolutions + * + * [Description] + * Opens the arsenal system + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + if (GVAR(armory_type) == 0) then { ["Open", [false, GVAR(gear_box), player]] call BFUNC(arsenal); } else { diff --git a/addons/arsenal/functions/fnc_openGarage.sqf b/addons/arsenal/functions/fnc_openGarage.sqf index 7c5ab39..3cf977d 100644 --- a/addons/arsenal/functions/fnc_openGarage.sqf +++ b/addons/arsenal/functions/fnc_openGarage.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_arsenal_fnc_openGarage + * Author: IDSolutions + * + * [Description] + * Opens the garage system + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData); { GVAR(vehSpawnPos) = (_x select 1) getPos [5, (_x select 2)]; diff --git a/addons/arsenal/functions/fnc_saveUnlocks.sqf b/addons/arsenal/functions/fnc_saveUnlocks.sqf index ad19424..a195a6d 100644 --- a/addons/arsenal/functions/fnc_saveUnlocks.sqf +++ b/addons/arsenal/functions/fnc_saveUnlocks.sqf @@ -1,7 +1,10 @@ #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: @@ -10,8 +13,10 @@ * Return Value: * None * - * Example: - * ["armory"] call forge_client_arsenal_fnc_saveArsenalUnlocks + * Examples: + * ["armory"] call forge_client_arsenal_fnc_saveUnlocks + * + * Public: Yes */ params [["_type", "", [""]]]; diff --git a/addons/arsenal/functions/fnc_updateUnlocks.sqf b/addons/arsenal/functions/fnc_updateUnlocks.sqf index 8fac4da..c1703a3 100644 --- a/addons/arsenal/functions/fnc_updateUnlocks.sqf +++ b/addons/arsenal/functions/fnc_updateUnlocks.sqf @@ -1,15 +1,23 @@ #include "..\script_component.hpp" /* + * Function: forge_client_arsenal_fnc_updateUnlocks * Author: IDSolutions + * + * [Description] * Updates the arsenal system variables when unlocks change * * Arguments: * 0: Type ("armory" or "garage") * 1: Data (Array of unlocks) * - * Example: + * Return Value: + * None + * + * Examples: * ["armory", _armory_unlocks] call forge_client_arsenal_fnc_updateUnlocks + * + * Public: Yes */ params [["_type", "", [""]], ["_data", [], [[]]]]; diff --git a/addons/bank/functions/fnc_deposit.sqf b/addons/bank/functions/fnc_deposit.sqf index 68c79a0..61533f0 100644 --- a/addons/bank/functions/fnc_deposit.sqf +++ b/addons/bank/functions/fnc_deposit.sqf @@ -1,8 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_bank_fnc_deposit + * Author: IDSolutions + * + * [Description] + * Deposits money into the bank + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private _amount = parseNumber (ctrlText IDC_AMOUNTINPUT); -// private _bank = player getVariable ["FORGE_Bank", 0]; -// private _cash = player getVariable ["FORGE_Cash", 0]; private _bank = GETVAR(player,FORGE_Bank,0); private _cash = GETVAR(player,FORGE_Cash,0); @@ -10,12 +27,9 @@ if (_amount > 0 && _amount <= _cash) then { _cash = _cash - _amount; _bank = _bank + _amount; - // player setVariable ["FORGE_Bank", _bank, true]; - // player setVariable ["FORGE_Cash", _cash, true]; SETPVAR(player,FORGE_Bank,_bank); SETPVAR(player,FORGE_Cash,_cash); - // [] call forge_client_bank_fnc_refresh; [] call FUNC(refresh); hint "Money deposited successfully"; } else { diff --git a/addons/bank/functions/fnc_initBank.sqf b/addons/bank/functions/fnc_initBank.sqf index 33d6331..28d253e 100644 --- a/addons/bank/functions/fnc_initBank.sqf +++ b/addons/bank/functions/fnc_initBank.sqf @@ -1,5 +1,24 @@ #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); diff --git a/addons/bank/functions/fnc_openBank.sqf b/addons/bank/functions/fnc_openBank.sqf index 5a50b15..bd9b3a4 100644 --- a/addons/bank/functions/fnc_openBank.sqf +++ b/addons/bank/functions/fnc_openBank.sqf @@ -1,7 +1,24 @@ #include "..\script_component.hpp" -// private _bank = player getVariable ["FORGE_Bank", 0]; -// private _cash = player getVariable ["FORGE_Cash", 0]; +/* + * Function: forge_client_bank_fnc_openBank + * Author: IDSolutions + * + * [Description] + * Opens the bank dialog + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private _bank = GETVAR(player,FORGE_Bank,0); private _cash = GETVAR(player,FORGE_Cash,0); private _payMultiplier = "MULTIPLYR" call BFUNC(getParamValue); diff --git a/addons/bank/functions/fnc_refresh.sqf b/addons/bank/functions/fnc_refresh.sqf index 48ff2fb..4771d3e 100644 --- a/addons/bank/functions/fnc_refresh.sqf +++ b/addons/bank/functions/fnc_refresh.sqf @@ -1,7 +1,24 @@ #include "..\script_component.hpp" -// private _bank = player getVariable ["FORGE_Bank", 0]; -// private _cash = player getVariable ["FORGE_Cash", 0]; +/* + * Function: forge_client_bank_fnc_refresh + * Author: IDSolutions + * + * [Description] + * Refreshes the bank dialog + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private _bank = GETVAR(player,FORGE_Bank,0); private _cash = GETVAR(player,FORGE_Cash,0); private _payMultiplier = "MULTIPLYR" call BFUNC(getParamValue); diff --git a/addons/bank/functions/fnc_submit.sqf b/addons/bank/functions/fnc_submit.sqf index 700e211..dcdd9f0 100644 --- a/addons/bank/functions/fnc_submit.sqf +++ b/addons/bank/functions/fnc_submit.sqf @@ -1,6 +1,24 @@ #include "..\script_component.hpp" -// private _bank = player getVariable ["FORGE_Bank", 0]; +/* + * Function: forge_client_bank_fnc_submit + * Author: IDSolutions + * + * [Description] + * Submits the timesheet + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private _bank = GETVAR(player,FORGE_Bank,0); private _payMultiplyer = "MULTIPLYR" call BFUNC(getParamValue); private _plyscore = rating player; @@ -9,15 +27,11 @@ private _multiplyer = _plyscore * _payMultiplyer; _bank = _bank + _multiplyer; player addRating - _plyscore; -// player setVariable ["FORGE_Bank", _bank]; -// player setVariable ["FORGE_Rating", 0]; SETPVAR(player,FORGE_Bank,_bank); SETPVAR(player,FORGE_Rating,0); -// [] call forge_client_bank_fnc_refresh; [] call FUNC(refresh); private _formattedRating = _bank call EFUNC(misc,formatNumber); -// hint format ["Timesheet submitted! Received $%1 bonus based on rating of %2", _formattedRating, _plyscore]; [format ["Timesheet submitted! Received $%1 based on rating of %2", _formattedRating, _plyscore], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/bank/functions/fnc_transfer.sqf b/addons/bank/functions/fnc_transfer.sqf index a042336..7280554 100644 --- a/addons/bank/functions/fnc_transfer.sqf +++ b/addons/bank/functions/fnc_transfer.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_bank_fnc_transfer + * Author: IDSolutions + * + * [Description] + * Transfers money to a player + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private _display = findDisplay IDD_BANKDIALOG; private _input = _display displayCtrl IDC_AMOUNTINPUT; private _dropdown = _display displayCtrl IDC_PLAYERINPUT; @@ -8,25 +27,18 @@ private _selectedTarget = lbCurSel _dropdown; private _selectedTargetData = _dropdown lbData _selectedTarget; private _target = objectFromNetId _selectedTargetData; -// private _bank = player getVariable ["FORGE_Bank", 0]; -// private _targetBank = _target getVariable ["FORGE_Bank", 0]; private _bank = GETVAR(player,FORGE_Bank,0); private _targetBank = GETVAR(_target,FORGE_Bank,0); if (!isNull _target && _amount > 0 && _amount <= _bank) then { _targetBank = _targetBank + _amount; - // _target setVariable ["FORGE_Bank", _targetBank, true]; SETPVAR(_target,FORGE_Bank,_targetBank); _bank = _bank - _amount; - // player setVariable ["FORGE_Bank", _bank, true]; SETPVAR(player,FORGE_Bank,_bank); - // [] call forge_client_bank_fnc_refresh; [] call FUNC(refresh); - // hint format ["Transferred $%1", _amount]; [format ["Transferred $%1", _amount], "info", 3, "right"] call EFUNC(misc,notify); } else { - // hint "Invalid transfer details"; [format ["Invalid transfer details"], "warning", 3, "right"] call EFUNC(misc,notify); }; \ No newline at end of file diff --git a/addons/bank/functions/fnc_withdraw.sqf b/addons/bank/functions/fnc_withdraw.sqf index 313caa9..4c1f341 100644 --- a/addons/bank/functions/fnc_withdraw.sqf +++ b/addons/bank/functions/fnc_withdraw.sqf @@ -1,11 +1,28 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_bank_fnc_withdraw + * Author: IDSolutions + * + * [Description] + * Withdraws money from the bank + * + * Arguments: + * None + * + * Return Value: + * None + * + * Examples: + * None + * + * Public: Yes + */ + private _display = findDisplay IDD_BANKDIALOG; private _input = _display displayCtrl IDC_AMOUNTINPUT; private _amount = parseNumber (ctrlText _input); -// private _bank = player getVariable ["FORGE_Bank", 0]; -// private _cash = player getVariable ["FORGE_Cash", 0]; private _bank = GETVAR(player,FORGE_Bank,0); private _cash = GETVAR(player,FORGE_Cash,0); @@ -13,16 +30,11 @@ if (_amount > 0 && _amount <= _bank) then { _bank = _bank - _amount; _cash = _cash + _amount; - // player setVariable ["FORGE_Bank", _bank, true]; - // player setVariable ["FORGE_Cash", _cash, true]; SETPVAR(player,FORGE_Bank,_bank); SETPVAR(player,FORGE_Cash,_cash); - // [] call forge_client_bank_fnc_refresh; [] call FUNC(refresh); - // hint "Money withdrawn successfully"; [format ["Money withdrawn successfully"], "info", 3, "right"] call EFUNC(misc,notify); } else { - // hint "Invalid amount"; [format ["Invalid amount"], "warning", 3, "right"] call EFUNC(misc,notify); }; \ No newline at end of file diff --git a/addons/db/functions/fnc_requestServerDB.sqf b/addons/db/functions/fnc_requestServerDB.sqf index 9daef63..a7638ed 100644 --- a/addons/db/functions/fnc_requestServerDB.sqf +++ b/addons/db/functions/fnc_requestServerDB.sqf @@ -2,8 +2,8 @@ /* * Function: forge_client_db_fnc_requestServerDB - * Author: J. Schmidt - * + * Author: IDSolutions + * * Description: * Sends database requests to the server using CBA events * diff --git a/addons/dialogue/functions/fnc_selectAI.sqf b/addons/dialogue/functions/fnc_selectAI.sqf index 2a98227..0cb92a7 100644 --- a/addons/dialogue/functions/fnc_selectAI.sqf +++ b/addons/dialogue/functions/fnc_selectAI.sqf @@ -1,17 +1,18 @@ #include "..\script_component.hpp" /* - Name: forge_client_dialogue_fnc_selectAI - Date: 8/6/2022 - Version: 1.0 - Author: J. Schmidt - - Description: - Select AI for dialogue. - - Arguments: - 0: OBJECT - The AI unit -*/ + * Function: forge_client_dialogue_fnc_selectAI + * Author: IDSolutions + * + * Description: + * Selects AI for dialogue + * + * Arguments: + * 0: _units - Array of AI units + * + * Return Value: + * None + */ params [["_units", [], [[]]]]; diff --git a/addons/dialogue/functions/fnc_selectDialogue.sqf b/addons/dialogue/functions/fnc_selectDialogue.sqf index 5bea444..2441e44 100644 --- a/addons/dialogue/functions/fnc_selectDialogue.sqf +++ b/addons/dialogue/functions/fnc_selectDialogue.sqf @@ -1,18 +1,19 @@ #include "..\script_component.hpp" /* - Name: forge_client_dialogue_fnc_selectDialogue - Date: 8/6/2022 - Version: 1.0 - Author: J. Schmidt - - Description: - Create dialogue for AI unit. - - Arguments: - 0: OBJECT - The AI unit - 1: STRING - The dialogue -*/ + * Function: forge_client_dialogue_fnc_selectDialogue + * Author: IDSolutions + * + * Description: + * Selects dialogue for AI + * + * Arguments: + * 0: _units - Array of AI units + * 1: _dialogue - Array of dialogue + * + * Return Value: + * None + */ params [["_units", [], [[]]], ["_dialogue", [], [[]]]]; diff --git a/addons/garage/functions/fnc_fetchGarage.sqf b/addons/garage/functions/fnc_fetchGarage.sqf index 5761f65..b4be25d 100644 --- a/addons/garage/functions/fnc_fetchGarage.sqf +++ b/addons/garage/functions/fnc_fetchGarage.sqf @@ -1,8 +1,21 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_garage_fnc_fetchGarage + * Author: IDSolutions + * + * Description: + * Fetches the vehicles in the garage + * + * Arguments: + * None + * + * Return Value: + * None + */ + private _display = findDisplay IDD_GARAGEDIALOG; private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST; -// private _storedVehicles = player getVariable ["FORGE_Garage", []]; private _storedVehicles = GETVAR(player,FORGE_Garage,[]); lbClear _garageList; diff --git a/addons/garage/functions/fnc_fetchNearby.sqf b/addons/garage/functions/fnc_fetchNearby.sqf index 2fb6bce..e552bae 100644 --- a/addons/garage/functions/fnc_fetchNearby.sqf +++ b/addons/garage/functions/fnc_fetchNearby.sqf @@ -1,5 +1,19 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_garage_fnc_fetchNearby + * Author: IDSolutions + * + * Description: + * Fetches the nearby vehicles + * + * Arguments: + * None + * + * Return Value: + * None + */ + private _display = findDisplay IDD_GARAGEDIALOG; private _vehicleList = _display displayCtrl IDC_VEHICLELIST; diff --git a/addons/garage/functions/fnc_initGarage.sqf b/addons/garage/functions/fnc_initGarage.sqf index d21a6b6..2a9d305 100644 --- a/addons/garage/functions/fnc_initGarage.sqf +++ b/addons/garage/functions/fnc_initGarage.sqf @@ -1,5 +1,19 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_garage_fnc_initGarage + * Author: IDSolutions + * + * Description: + * Initializes the garages + * + * Arguments: + * None + * + * Return Value: + * None + */ + { private _configName = configName(_x); private _className = (missionConfigFile >> "CfgGarages" >> "garages" >> _configName >> "className") call BFUNC(getCfgData); diff --git a/addons/garage/functions/fnc_openGarage.sqf b/addons/garage/functions/fnc_openGarage.sqf index 334e9b8..b0d264c 100644 --- a/addons/garage/functions/fnc_openGarage.sqf +++ b/addons/garage/functions/fnc_openGarage.sqf @@ -1,5 +1,19 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_garage_fnc_openGarage + * Author: IDSolutions + * + * Description: + * Opens the garage dialog + * + * Arguments: + * None + * + * Return Value: + * None + */ + disableSerialization; createDialog "RscGarageDialog"; diff --git a/addons/garage/functions/fnc_spawnVehicle.sqf b/addons/garage/functions/fnc_spawnVehicle.sqf index 23d5638..5aeb9e5 100644 --- a/addons/garage/functions/fnc_spawnVehicle.sqf +++ b/addons/garage/functions/fnc_spawnVehicle.sqf @@ -1,5 +1,20 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_garage_fnc_spawnVehicle + * Author: IDSolutions + * + * Description: + * Spawns a vehicle from the garage + * + * Arguments: + * None + * + * Return Value: + * None + */ + +disableSerialization; private _display = findDisplay IDD_GARAGEDIALOG; private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST; private _vehicleList = _display displayCtrl IDC_VEHICLELIST; @@ -57,13 +72,11 @@ lbClear _vehicleList; _garageList lbSetCurSel -1; _vehicleList lbSetCurSel -1; -// private _garage = player getVariable ["FORGE_Garage", []]; private _garage = GETVAR(player,FORGE_Garage,[]); private _index = _garage findIf { _x isEqualTo _data }; if (_index != -1) then { _garage deleteAt _index; - // player setVariable ["FORGE_Garage", _garage, true]; SETPVAR(player,FORGE_Garage,_garage); }; diff --git a/addons/garage/functions/fnc_storeVehicle.sqf b/addons/garage/functions/fnc_storeVehicle.sqf index 9483603..a162ce0 100644 --- a/addons/garage/functions/fnc_storeVehicle.sqf +++ b/addons/garage/functions/fnc_storeVehicle.sqf @@ -1,5 +1,19 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_garage_fnc_storeVehicle + * Author: IDSolutions + * + * Description: + * Stores a vehicle in the garage + * + * Arguments: + * None + * + * Return Value: + * None + */ + private _display = findDisplay IDD_GARAGEDIALOG; private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST; private _vehicleList = _display displayCtrl IDC_VEHICLELIST; @@ -24,7 +38,6 @@ private _veh = objectFromNetId _netID; // str _hitPointsData // ]; -// private _garage = player getVariable ["FORGE_Garage", []]; private _garage = GETVAR(player,FORGE_Garage,[]); // _garage pushBack [_vehType, _className, _vehData]; diff --git a/addons/init/functions/fnc_handlePlayerLoad.sqf b/addons/init/functions/fnc_handlePlayerLoad.sqf index 5ac7c48..5f63cd0 100644 --- a/addons/init/functions/fnc_handlePlayerLoad.sqf +++ b/addons/init/functions/fnc_handlePlayerLoad.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_init_fnc_handlePlayerLoad - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Handle player load from DB. @@ -84,7 +76,7 @@ if (_data isEqualTo [""]) then { SETPVAR(player,FORGE_Phone_Number,_value); }; case "paygrade": { - SETPVAR(player,Paygrade,_value); + SETPVAR(player,FORGE_PayGrade,_value); }; case "organization": { SETPVAR(player,FORGE_Organization,_value); diff --git a/addons/init/functions/fnc_initPlayer.sqf b/addons/init/functions/fnc_initPlayer.sqf index a120878..2ea4d7b 100644 --- a/addons/init/functions/fnc_initPlayer.sqf +++ b/addons/init/functions/fnc_initPlayer.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_init_fnc_initPlayer - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Initialize player. diff --git a/addons/init/functions/fnc_playerDBLoad.sqf b/addons/init/functions/fnc_playerDBLoad.sqf index 0574cbd..78f6b26 100644 --- a/addons/init/functions/fnc_playerDBLoad.sqf +++ b/addons/init/functions/fnc_playerDBLoad.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_init_fnc_playerDBLoad - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Load player from DB. diff --git a/addons/init/functions/fnc_playerDBSave.sqf b/addons/init/functions/fnc_playerDBSave.sqf index c248995..4ea2e81 100644 --- a/addons/init/functions/fnc_playerDBSave.sqf +++ b/addons/init/functions/fnc_playerDBSave.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_init_fnc_playerDBSave - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Save player to DB. diff --git a/addons/init/functions/fnc_playerSaveLoop.sqf b/addons/init/functions/fnc_playerSaveLoop.sqf index 47e2399..efd3999 100644 --- a/addons/init/functions/fnc_playerSaveLoop.sqf +++ b/addons/init/functions/fnc_playerSaveLoop.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_init_fnc_playerSaveLoop - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Initialize player save loop. diff --git a/addons/interaction/functions/fnc_initInteraction.sqf b/addons/interaction/functions/fnc_initInteraction.sqf index 70148fa..a95deaa 100644 --- a/addons/interaction/functions/fnc_initInteraction.sqf +++ b/addons/interaction/functions/fnc_initInteraction.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_interaction_fnc_initInteraction - * Author: Creedcoder, J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Initialize player interaction. diff --git a/addons/interaction/functions/fnc_interactionAction.sqf b/addons/interaction/functions/fnc_interactionAction.sqf index 0bed88c..a7a0896 100644 --- a/addons/interaction/functions/fnc_interactionAction.sqf +++ b/addons/interaction/functions/fnc_interactionAction.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_interaction_fnc_interactionAction - * Author: Creedcoder, J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Initialize player interaction. diff --git a/addons/interaction/functions/fnc_openInteraction.sqf b/addons/interaction/functions/fnc_openInteraction.sqf index bbf8087..93265d8 100644 --- a/addons/interaction/functions/fnc_openInteraction.sqf +++ b/addons/interaction/functions/fnc_openInteraction.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_interaction_fnc_openInteraction - * Author: Creedcoder, J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Open player interaction. diff --git a/addons/locker/functions/fnc_equipGear.sqf b/addons/locker/functions/fnc_equipGear.sqf index d081101..a13ac5a 100644 --- a/addons/locker/functions/fnc_equipGear.sqf +++ b/addons/locker/functions/fnc_equipGear.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_locker_fnc_equipGear + * Author: IDSolutions + * + * [Description] + * Equips gear from the locker. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_locker_fnc_equipGear; + * + * Public: Yes + */ + private _display = findDisplay IDD_LOCKERDIALOG; private _playerItems = _display displayCtrl IDC_PLAYEREQUIPMENTLIST; private _lockerItems = _display displayCtrl IDC_LOCKEREQUIPMENTLIST; @@ -7,7 +26,6 @@ private _selectedItem = lbCurSel _lockerItems; private _selectedItemData = _lockerItems lbData _selectedItem; private _data = call compile _selectedItemData; -// private _locker = player getVariable ["FORGE_Locker", []]; private _locker = GETVAR(player,FORGE_Locker,[]); if ((isNil { _data })) exitWith { ctrlEnable [IDC_EQUIPBUTTON, true]; }; @@ -23,7 +41,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You already have a backpack equipped!"; ["You already have a backpack equiped!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -34,7 +51,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You already have facewear equipped!"; ["You already have facewear equiped!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -45,7 +61,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You already have headgear equipped!"; ["You already have headgear equiped!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -56,7 +71,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You already have a HMD equipped!"; ["You already have a HMD equiped!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -67,7 +81,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You don't have enough space left!"; ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -78,7 +91,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You don't have enough space left!"; ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -89,7 +101,6 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You already have a uniform equipped!"; ["You already have a uniform equiped!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; @@ -100,50 +111,10 @@ switch (_itemType) do { playSound "FD_Finish_F"; } else { _clear = false; - // hintSilent "You already have a vest equipped!"; ["You already have a vest equiped!", "warning", 3, "right"] call EFUNC(misc,notify); playSound "FD_CP_Not_Clear_F"; }; }; - // case "weapon": { - // if (!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) && - // {!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) || primaryWeapon player == ""} && - // {!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) || handgunWeapon player == ""} && - // {!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) || secondaryWeapon player == ""}) then { - - // private _compatibleMags = getArray (configFile >> "CfgWeapons" >> _item >> "magazines"); - // private _baseType = (_compatibleMags select 0) select [0, (_compatibleMags select 0) find "_Tracer"]; - - // if (_baseType == "") then { _baseType = _compatibleMags select 0 }; - - // private _magIndices = []; - // { - // if ((_x select 0) == "magazine") then { - // private _magClass = (_x select 1) select 0; - - // if ((_magClass in _compatibleMags || - // {("ACE_" in _magClass) && {_baseType in _magClass}}) && - // {player canAdd _magClass}) then { - // player addMagazine [_magClass, (_x select 1) select 1]; - // _magIndices pushBack _forEachIndex; - // }; - // }; - // } forEach _locker; - - // reverse _magIndices; - // { - // _locker deleteAt _x; - // } forEach _magIndices; - - // player addWeapon _item; - // playSound "FD_Finish_F"; - // } else { - // _clear = false; - // // hintSilent "You don't have enough space left!"; - // ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); - // playSound "FD_CP_Not_Clear_F"; - // }; - // }; case "weapon": { private _weaponType = getNumber (configFile >> "CfgWeapons" >> _item >> "type"); private _hasSpace = switch (_weaponType) do { @@ -193,7 +164,6 @@ if (_clear) then { private _index = _locker findIf { _x isEqualTo _data }; _locker deleteAt _index; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); [] call FUNC(fetchLocker); diff --git a/addons/locker/functions/fnc_fetchLocker.sqf b/addons/locker/functions/fnc_fetchLocker.sqf index 34104c1..a8d8688 100644 --- a/addons/locker/functions/fnc_fetchLocker.sqf +++ b/addons/locker/functions/fnc_fetchLocker.sqf @@ -1,8 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_locker_fnc_fetchLocker + * Author: IDSolutions + * + * [Description] + * Fetches the locker. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_locker_fnc_fetchLocker; + * + * Public: Yes + */ + private _display = findDisplay IDD_LOCKERDIALOG; private _itemList = _display displayCtrl IDC_LOCKEREQUIPMENTLIST; -// private _locker = player getVariable ["FORGE_Locker", []]; private _locker = GETVAR(player,FORGE_Locker,[]); { diff --git a/addons/locker/functions/fnc_fetchPlayer.sqf b/addons/locker/functions/fnc_fetchPlayer.sqf index 65b3ad8..6ae30da 100644 --- a/addons/locker/functions/fnc_fetchPlayer.sqf +++ b/addons/locker/functions/fnc_fetchPlayer.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_locker_fnc_fetchPlayer + * Author: IDSolutions + * + * [Description] + * Fetches the player's gear. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_locker_fnc_fetchPlayer; + * + * Public: Yes + */ + private _display = findDisplay IDD_LOCKERDIALOG; private _itemList = _display displayCtrl IDC_PLAYEREQUIPMENTLIST; private _data = []; diff --git a/addons/locker/functions/fnc_initLocker.sqf b/addons/locker/functions/fnc_initLocker.sqf index 8fdf48c..09b6465 100644 --- a/addons/locker/functions/fnc_initLocker.sqf +++ b/addons/locker/functions/fnc_initLocker.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_locker_fnc_initLocker + * Author: IDSolutions + * + * [Description] + * Initializes the lockers. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_locker_fnc_initLocker; + * + * Public: Yes + */ + { private _configName = configName(_x); private _className = (missionConfigFile >> "CfgLockers" >> "lockers" >> _configName >> "className") call BFUNC(getCfgData); diff --git a/addons/locker/functions/fnc_openLocker.sqf b/addons/locker/functions/fnc_openLocker.sqf index b320370..ec42192 100644 --- a/addons/locker/functions/fnc_openLocker.sqf +++ b/addons/locker/functions/fnc_openLocker.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_locker_fnc_openLocker + * Author: IDSolutions + * + * [Description] + * Opens the locker dialog. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_locker_fnc_openLocker; + * + * Public: Yes + */ + disableSerialization; createDialog "RscLockerDialog"; diff --git a/addons/locker/functions/fnc_storeGear.sqf b/addons/locker/functions/fnc_storeGear.sqf index fdcef14..dc99eca 100644 --- a/addons/locker/functions/fnc_storeGear.sqf +++ b/addons/locker/functions/fnc_storeGear.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_locker_fnc_storeGear + * Author: IDSolutions + * + * [Description] + * Stores gear in the locker. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_locker_fnc_storeGear; + * + * Public: Yes + */ + private _display = findDisplay IDD_LOCKERDIALOG; private _playerItems = _display displayCtrl IDC_PLAYEREQUIPMENTLIST; private _lockerItems = _display displayCtrl IDC_LOCKEREQUIPMENTLIST; @@ -7,7 +26,6 @@ private _selectedItem = lbCurSel _playerItems; private _selectedItemData = _playerItems lbData _selectedItem; private _data = call compile _selectedItemData; -// private _locker = player getVariable ["FORGE_Locker", []]; private _locker = GETVAR(player,FORGE_Locker,[]); if ((isNil { _data })) exitWith { ctrlEnable [IDC_STOREBUTTON, true]; }; @@ -35,7 +53,6 @@ switch (_itemType) do { } count (magazinesAmmoCargo backpackContainer player); _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); removeBackpack player; @@ -43,7 +60,6 @@ switch (_itemType) do { }; case "facewear": { _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); removeGoggles player; @@ -51,7 +67,6 @@ switch (_itemType) do { }; case "headgear": { _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); removeHeadgear player; @@ -59,7 +74,6 @@ switch (_itemType) do { }; case "hmd": { _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); player unassignItem _item; @@ -68,7 +82,6 @@ switch (_itemType) do { }; case "item": { _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); if (_item == (currentMuzzle player)) then { @@ -83,7 +96,6 @@ switch (_itemType) do { }; case "magazine": { _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); private _temp = magazinesAmmoFull player; @@ -161,7 +173,6 @@ switch (_itemType) do { } count (magazinesAmmoCargo uniformContainer player); _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); removeUniform player; @@ -186,7 +197,6 @@ switch (_itemType) do { } count (magazinesAmmoCargo vestContainer player); _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); removeVest player; @@ -194,7 +204,6 @@ switch (_itemType) do { }; case "weapon": { _locker pushBack [_itemType, _item]; - // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); private _temp = weaponsItems player; diff --git a/addons/medical/functions/fnc_deductMedicalCost.sqf b/addons/medical/functions/fnc_deductMedicalCost.sqf index 3fcc5eb..ab86086 100644 --- a/addons/medical/functions/fnc_deductMedicalCost.sqf +++ b/addons/medical/functions/fnc_deductMedicalCost.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_deductMedicalCost + * Author: IDSolutions + * + * [Description] + * Deducts the medical cost from the player's account. + * + * Arguments: + * 0: Unit + * 1: Total Cost + * + * Return Value: + * None + * + * Example: + * [player, 100] call forge_client_medical_fnc_deductMedicalCost; + * + * Public: Yes + */ + params ["_unit", "_totalCost"]; private _preferredAccount = GETVAR(_unit,FORGE_Bank,0); diff --git a/addons/medical/functions/fnc_heartBeat.sqf b/addons/medical/functions/fnc_heartBeat.sqf index cad5f68..f5a2045 100644 --- a/addons/medical/functions/fnc_heartBeat.sqf +++ b/addons/medical/functions/fnc_heartBeat.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_deductMedicalCost + * Author: IDSolutions + * + * [Description] + * Deducts the medical cost from the player's account. + * + * Arguments: + * 0: Unit + * 1: Total Cost + * + * Return Value: + * None + * + * Example: + * [player, 100] call forge_client_medical_fnc_deductMedicalCost; + * + * Public: Yes + */ + params ["_unit", "_totalCost"]; while { (GETVAR(_unit,FORGE_Cash,0)) < _totalCost or (GETVAR(_unit,FORGE_Bank,0)) < _totalCost } do { diff --git a/addons/medical/functions/fnc_initMedical.sqf b/addons/medical/functions/fnc_initMedical.sqf index 06515a1..b3a38d2 100644 --- a/addons/medical/functions/fnc_initMedical.sqf +++ b/addons/medical/functions/fnc_initMedical.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_initMedical + * Author: IDSolutions + * + * [Description] + * Initializes the medical system. + * + * Arguments: + * N/A + * + * Return Value: + * None + * + * Example: + * [] call forge_client_medical_fnc_initMedical; + * + * Public: Yes + */ + private _worldCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); private _stretcherTypes = ["Land_Stretcher_01_F", "Land_Stretcher_01_olive_F", "Land_Stretcher_01_sand_F"]; private _stretchers = nearestObjects [_worldCenter, _stretcherTypes, 500000]; diff --git a/addons/medical/functions/fnc_moveInventory.sqf b/addons/medical/functions/fnc_moveInventory.sqf index 52fbb2c..cb44b35 100644 --- a/addons/medical/functions/fnc_moveInventory.sqf +++ b/addons/medical/functions/fnc_moveInventory.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_moveInventory + * Author: IDSolutions + * + * [Description] + * Moves the unit's inventory to the body bag. + * + * Arguments: + * 0: Unit + * 1: Body Bag + * + * Return Value: + * None + * + * Example: + * [player, bodyBag] call forge_client_medical_fnc_moveInventory; + * + * Public: Yes + */ + params ["_unit", "_bodyBag"]; private _items = []; diff --git a/addons/medical/functions/fnc_onKilled.sqf b/addons/medical/functions/fnc_onKilled.sqf index 28c3e48..0d28d07 100644 --- a/addons/medical/functions/fnc_onKilled.sqf +++ b/addons/medical/functions/fnc_onKilled.sqf @@ -1,5 +1,27 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_onKilled + * Author: IDSolutions + * + * [Description] + * Handles the unit's death. + * + * Arguments: + * 0: Unit + * 1: Killer + * 2: Instigator + * 3: Use Effects + * + * Return Value: + * None + * + * Example: + * [player, objNull, objNull, true] call forge_client_medical_fnc_onKilled; + * + * Public: Yes + */ + params ["_unit", "_killer", "_instigator", "_useEffects"]; if (!isPlayer _unit) exitWith {}; diff --git a/addons/medical/functions/fnc_onRespawn.sqf b/addons/medical/functions/fnc_onRespawn.sqf index 9ce6189..1d80c47 100644 --- a/addons/medical/functions/fnc_onRespawn.sqf +++ b/addons/medical/functions/fnc_onRespawn.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_onRespawn + * Author: IDSolutions + * + * [Description] + * Handles the unit's respawn. + * + * Arguments: + * 0: Unit + * 1: Corpse + * + * Return Value: + * None + * + * Example: + * [player, bodyBag] call forge_client_medical_fnc_onRespawn; + * + * Public: Yes + */ + params ["_unit", "_corpse"]; private _newBank = 0; diff --git a/addons/medical/functions/fnc_saveDroppedWeapons.sqf b/addons/medical/functions/fnc_saveDroppedWeapons.sqf index d175e18..b504c25 100644 --- a/addons/medical/functions/fnc_saveDroppedWeapons.sqf +++ b/addons/medical/functions/fnc_saveDroppedWeapons.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_medical_fnc_saveDroppedWeapons + * Author: IDSolutions + * + * [Description] + * Saves the unit's dropped weapons and items. + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call forge_client_medical_fnc_saveDroppedWeapons; + * + * Public: Yes + */ + params ["_unit"]; private _droppedWeapons = []; diff --git a/addons/misc/functions/fnc_cargoToPairs.sqf b/addons/misc/functions/fnc_cargoToPairs.sqf index 58981d9..f933a45 100644 --- a/addons/misc/functions/fnc_cargoToPairs.sqf +++ b/addons/misc/functions/fnc_cargoToPairs.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_misc_fnc_cargoToPairs + * Author: IDSolutions + * + * [Description] + * Converts a cargo array to an array of pairs. + * + * Arguments: + * 0: Cargo Array + * 1: Optional: Second Array + * + * Return Value: + * Array of Pairs + * + * Example: + * [[1, 2, 3], [4, 5, 6]] call forge_client_misc_fnc_cargoToPairs; + * + * Public: Yes + */ + private _array = []; if (count _this > 1) then { diff --git a/addons/misc/functions/fnc_deserializeString.sqf b/addons/misc/functions/fnc_deserializeString.sqf index 15179d7..beebdd4 100644 --- a/addons/misc/functions/fnc_deserializeString.sqf +++ b/addons/misc/functions/fnc_deserializeString.sqf @@ -1,15 +1,22 @@ #include "..\script_component.hpp" /* - * Function: dragonfly_misc_fnc_deserializeString - * Description: - * Converts underscores in a string to spaces for display + * Function: forge_client_misc_fnc_deserializeString + * Author: IDSolutions * - * Parameters: - * 0: _string - String to convert + * [Description] + * Converts underscores in a string to spaces for display. * - * Returns: - * Converted string + * Arguments: + * 0: String + * + * Return Value: + * Deserialized String + * + * Example: + * ["Hello_World"] call forge_client_misc_fnc_deserializeString; + * + * Public: Yes */ params [["_string", "", [""]]]; diff --git a/addons/misc/functions/fnc_formatNumber.sqf b/addons/misc/functions/fnc_formatNumber.sqf index c35f46d..0415967 100644 --- a/addons/misc/functions/fnc_formatNumber.sqf +++ b/addons/misc/functions/fnc_formatNumber.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_misc_fnc_formatNumber + * Author: IDSolutions + * + * [Description] + * Formats a number with thousands separators and decimal places. + * + * Arguments: + * 0: Number + * + * Return Value: + * Formatted Number + * + * Example: + * [1234567.89] call forge_client_misc_fnc_formatNumber; + * + * Public: Yes + */ + #define PX_DC_SEP "." #define PX_TH_SEP "," #define PX_DC_PL 2 diff --git a/addons/misc/functions/fnc_getSystemTime.sqf b/addons/misc/functions/fnc_getSystemTime.sqf index 85e57df..0668ebc 100644 --- a/addons/misc/functions/fnc_getSystemTime.sqf +++ b/addons/misc/functions/fnc_getSystemTime.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_misc_fnc_getSystemTime + * Author: IDSolutions + * + * [Description] + * Gets the current system time in a formatted string. + * + * Arguments: + * None + * + * Return Value: + * Formatted System Time + * + * Example: + * [] call forge_client_misc_fnc_getSystemTime; + * + * Public: Yes + */ + private _timestamp = systemTimeUTC apply { if (_x < 10) then { "0" + str _x } else { str _x }}; private _dateTime = format ["%1-%2-%3_%4:%5:%6.%7", _timestamp#0, _timestamp#1, _timestamp#2, _timestamp#3, _timestamp#4, _timestamp#5, _timestamp#6]; diff --git a/addons/misc/functions/fnc_isAssignableBinocular.sqf b/addons/misc/functions/fnc_isAssignableBinocular.sqf index a99dae8..88ae980 100644 --- a/addons/misc/functions/fnc_isAssignableBinocular.sqf +++ b/addons/misc/functions/fnc_isAssignableBinocular.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_misc_fnc_isAssignableBinocular + * Author: IDSolutions + * + * [Description] + * Checks if a binocular is assignable. + * + * Arguments: + * 0: Binocular + * + * Return Value: + * Is Assignable + * + * Example: + * ["Binocular"] call forge_client_misc_fnc_isAssignableBinocular; + * + * Public: Yes + */ + private _player = _this select 0; private _item = _this select 1; private _isAssignable = true; diff --git a/addons/misc/functions/fnc_isWeaponType.sqf b/addons/misc/functions/fnc_isWeaponType.sqf index 968f82f..b1623e4 100644 --- a/addons/misc/functions/fnc_isWeaponType.sqf +++ b/addons/misc/functions/fnc_isWeaponType.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_misc_fnc_isWeaponType + * Author: IDSolutions + * + * [Description] + * Checks if a weapon is of a certain type. + * + * Arguments: + * 0: Weapon + * 1: Type + * + * Return Value: + * Is Weapon Type + * + * Example: + * ["arifle_MX_F", 4096] call forge_client_misc_fnc_isWeaponType; + * + * Public: Yes + */ + private _weapon = _this select 0; private _type = _this select 1; private _typeBits = []; diff --git a/addons/misc/functions/fnc_notify.sqf b/addons/misc/functions/fnc_notify.sqf index fda2192..4477789 100644 --- a/addons/misc/functions/fnc_notify.sqf +++ b/addons/misc/functions/fnc_notify.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_misc_fnc_notify - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Creates a notification. diff --git a/addons/misc/functions/fnc_serializeString.sqf b/addons/misc/functions/fnc_serializeString.sqf index 2b321cf..5212e66 100644 --- a/addons/misc/functions/fnc_serializeString.sqf +++ b/addons/misc/functions/fnc_serializeString.sqf @@ -1,15 +1,22 @@ #include "..\script_component.hpp" /* - * Function: dragonfly_misc_fnc_serializeString - * Description: - * Converts spaces in a string to underscores for database storage + * Function: forge_client_misc_fnc_serializeString + * Author: IDSolutions * - * Parameters: - * 0: _string - String to convert + * [Description] + * Converts spaces in a string to underscores for database storage. * - * Returns: - * Converted string + * Arguments: + * 0: String + * + * Return Value: + * Serialized String + * + * Example: + * ["Hello World"] call forge_client_misc_fnc_serializeString; + * + * Public: Yes */ params [["_string", "", [""]]]; diff --git a/addons/misc/functions/fnc_test.sqf b/addons/misc/functions/fnc_test.sqf index 09c7cb6..e2e0356 100644 --- a/addons/misc/functions/fnc_test.sqf +++ b/addons/misc/functions/fnc_test.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_misc_fnc_test - * Author: Creedcoder, J.Schmidt - * Edit: 07.15.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Test function. diff --git a/addons/money/functions/fnc_giveCash.sqf b/addons/money/functions/fnc_giveCash.sqf index f76574f..da89264 100644 --- a/addons/money/functions/fnc_giveCash.sqf +++ b/addons/money/functions/fnc_giveCash.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_money_fnc_giveCash - * Author: Creedcoder, J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Send money to player. diff --git a/addons/money/functions/fnc_giveCashSubmit.sqf b/addons/money/functions/fnc_giveCashSubmit.sqf index 1b1ce9f..b17a6d0 100644 --- a/addons/money/functions/fnc_giveCashSubmit.sqf +++ b/addons/money/functions/fnc_giveCashSubmit.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_money_fnc_giveCashSubmit - * Author: Creedcoder, J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Handle cash to be given. diff --git a/addons/money/functions/fnc_takeCash.sqf b/addons/money/functions/fnc_takeCash.sqf index f597e50..d35b238 100644 --- a/addons/money/functions/fnc_takeCash.sqf +++ b/addons/money/functions/fnc_takeCash.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_money_fnc_takeCash - * Author: Creedcoder, J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Handle cash picked up. diff --git a/addons/org/functions/fnc_addAsset.sqf b/addons/org/functions/fnc_addAsset.sqf index 94f8d1e..fb21bda 100644 --- a/addons/org/functions/fnc_addAsset.sqf +++ b/addons/org/functions/fnc_addAsset.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * Function: forge_client_org_fnc_addAsset + * Author: IDSolutions + * + * [Description] * Adds an asset to an organization's inventory. * * Arguments: diff --git a/addons/org/functions/fnc_addFunds.sqf b/addons/org/functions/fnc_addFunds.sqf index d864f85..a8d3c17 100644 --- a/addons/org/functions/fnc_addFunds.sqf +++ b/addons/org/functions/fnc_addFunds.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. * diff --git a/addons/org/functions/fnc_addMember.sqf b/addons/org/functions/fnc_addMember.sqf index dd861d6..0f3a092 100644 --- a/addons/org/functions/fnc_addMember.sqf +++ b/addons/org/functions/fnc_addMember.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. * diff --git a/addons/org/functions/fnc_addReputation.sqf b/addons/org/functions/fnc_addReputation.sqf index aa796de..6aa3368 100644 --- a/addons/org/functions/fnc_addReputation.sqf +++ b/addons/org/functions/fnc_addReputation.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * Function: forge_client_org_fnc_addReputation + * Author: IDSolutions + * + * [Description] * Adds or removes reputation from an organization. * Positive values increase reputation, negative values decrease reputation. * diff --git a/addons/org/functions/fnc_create.sqf b/addons/org/functions/fnc_create.sqf index fa75f7d..0a145b9 100644 --- a/addons/org/functions/fnc_create.sqf +++ b/addons/org/functions/fnc_create.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. * diff --git a/addons/org/functions/fnc_disband.sqf b/addons/org/functions/fnc_disband.sqf index 45b77b8..ab0f6a2 100644 --- a/addons/org/functions/fnc_disband.sqf +++ b/addons/org/functions/fnc_disband.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. diff --git a/addons/org/functions/fnc_handleOrgLoad.sqf b/addons/org/functions/fnc_handleOrgLoad.sqf index a933758..e71685e 100644 --- a/addons/org/functions/fnc_handleOrgLoad.sqf +++ b/addons/org/functions/fnc_handleOrgLoad.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. diff --git a/addons/org/functions/fnc_initOrgStore.sqf b/addons/org/functions/fnc_initOrgStore.sqf index 614301e..83b4cb8 100644 --- a/addons/org/functions/fnc_initOrgStore.sqf +++ b/addons/org/functions/fnc_initOrgStore.sqf @@ -2,7 +2,7 @@ /* * Function: forge_client_org_fnc_initOrgStore - * Author: J. Schmidt + * Author: IDSolutions * * Description: * Initializes a client-side organization store interface for managing player organization data diff --git a/addons/org/functions/fnc_leave.sqf b/addons/org/functions/fnc_leave.sqf index d653b42..3cb6a86 100644 --- a/addons/org/functions/fnc_leave.sqf +++ b/addons/org/functions/fnc_leave.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. diff --git a/addons/org/functions/fnc_removeAsset.sqf b/addons/org/functions/fnc_removeAsset.sqf index 8bc5c54..efa96a1 100644 --- a/addons/org/functions/fnc_removeAsset.sqf +++ b/addons/org/functions/fnc_removeAsset.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. * diff --git a/addons/org/functions/fnc_verifyOrgStore.sqf b/addons/org/functions/fnc_verifyOrgStore.sqf index 19b2e8a..70b057b 100644 --- a/addons/org/functions/fnc_verifyOrgStore.sqf +++ b/addons/org/functions/fnc_verifyOrgStore.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* - * Author: J. Schmidt + * 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. diff --git a/addons/phone/functions/fnc_addContact.sqf b/addons/phone/functions/fnc_addContact.sqf index f3e2ec9..a8bc969 100644 --- a/addons/phone/functions/fnc_addContact.sqf +++ b/addons/phone/functions/fnc_addContact.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_addContact + * Author: IDSolutions + * + * [Description] + * Adds a contact to the address book. + * + * Arguments: + * 0: Contact - The contact to add + * + * Return Value: + * None + * + * Example: + * [cursorObject] call forge_client_phone_fnc_addContact; + * + * Public: Yes + */ + params ["_contact"]; private _defaultPhoneNumber = "unknown"; diff --git a/addons/phone/functions/fnc_addEmail.sqf b/addons/phone/functions/fnc_addEmail.sqf index 524c518..9a23066 100644 --- a/addons/phone/functions/fnc_addEmail.sqf +++ b/addons/phone/functions/fnc_addEmail.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_addEmail + * Author: IDSolutions + * + * [Description] + * Adds an email to the address book. + * + * Arguments: + * 0: Email - The email to add + * + * Return Value: + * None + * + * Example: + * ["test@test.com"] call forge_client_phone_fnc_addEmail; + * + * Public: Yes + */ + if (_this isEqualTo [""]) exitWith {}; private _tmp = call compile format ["%1", _this]; diff --git a/addons/phone/functions/fnc_addMsg.sqf b/addons/phone/functions/fnc_addMsg.sqf index 6443714..15b4cdf 100644 --- a/addons/phone/functions/fnc_addMsg.sqf +++ b/addons/phone/functions/fnc_addMsg.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_addMsg + * Author: IDSolutions + * + * [Description] + * Adds a message to the message log. + * + * Arguments: + * 0: Message - The message to add + * + * Return Value: + * None + * + * Example: + * ["Hello World"] call forge_client_phone_fnc_addMsg; + * + * Public: Yes + */ + if (_this isEqualTo [""]) exitWith {}; private _tmp = call compile format ["%1", _this]; diff --git a/addons/phone/functions/fnc_addOfflineEmail.sqf b/addons/phone/functions/fnc_addOfflineEmail.sqf index 9e9cd97..9234252 100644 --- a/addons/phone/functions/fnc_addOfflineEmail.sqf +++ b/addons/phone/functions/fnc_addOfflineEmail.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_addOfflineEmail + * Author: IDSolutions + * + * [Description] + * Adds an email to the offline email list. + * + * Arguments: + * 0: Email - The email to add + * + * Return Value: + * None + * + * Example: + * ["test@test.com"] call forge_client_phone_fnc_addOfflineEmail; + * + * Public: Yes + */ + if (_this isEqualTo [""]) exitWith {}; private _tmp = call compile format ["%1", _this]; diff --git a/addons/phone/functions/fnc_addOfflineMsg.sqf b/addons/phone/functions/fnc_addOfflineMsg.sqf index 42e4399..b3f8e35 100644 --- a/addons/phone/functions/fnc_addOfflineMsg.sqf +++ b/addons/phone/functions/fnc_addOfflineMsg.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_addOfflineMsg + * Author: IDSolutions + * + * [Description] + * Adds a message to the offline message list. + * + * Arguments: + * 0: Message - The message to add + * + * Return Value: + * None + * + * Example: + * ["Hello World"] call forge_client_phone_fnc_addOfflineMsg; + * + * Public: Yes + */ + if (_this isEqualTo [""]) exitWith {}; private _tmp = call compile format ["%1", _this]; diff --git a/addons/phone/functions/fnc_dateToHhMm.sqf b/addons/phone/functions/fnc_dateToHhMm.sqf index 9d107f7..97dfcb1 100644 --- a/addons/phone/functions/fnc_dateToHhMm.sqf +++ b/addons/phone/functions/fnc_dateToHhMm.sqf @@ -1,5 +1,24 @@ #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: + * 0: Date - The date to convert + * + * Return Value: + * None + * + * Example: + * [date] call forge_client_phone_fnc_dateToHhMm; + * + * Public: Yes + */ + private ["_h", "_m"]; _h = _this select 0; diff --git a/addons/phone/functions/fnc_delEmail.sqf b/addons/phone/functions/fnc_delEmail.sqf index 040cc00..cab7c20 100644 --- a/addons/phone/functions/fnc_delEmail.sqf +++ b/addons/phone/functions/fnc_delEmail.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_delEmail + * Author: IDSolutions + * + * [Description] + * Deletes an email from the address book. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_delEmail; + * + * Public: Yes + */ + private _myDialog = findDisplay 202300; private _ctrl01 = _myDialog displayCtrl 202302; diff --git a/addons/phone/functions/fnc_delMsg.sqf b/addons/phone/functions/fnc_delMsg.sqf index 317ea7d..cf5abe8 100644 --- a/addons/phone/functions/fnc_delMsg.sqf +++ b/addons/phone/functions/fnc_delMsg.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_delMsg + * Author: IDSolutions + * + * [Description] + * Deletes a message from the message log. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_delMsg; + * + * Public: Yes + */ + private _myDialog = findDisplay 202300; private _ctrl01 = _myDialog displayCtrl 202302; diff --git a/addons/phone/functions/fnc_initAction.sqf b/addons/phone/functions/fnc_initAction.sqf index 3e82ba5..2e0efa9 100644 --- a/addons/phone/functions/fnc_initAction.sqf +++ b/addons/phone/functions/fnc_initAction.sqf @@ -1,3 +1,22 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_initAction + * Author: IDSolutions + * + * [Description] + * Initializes the phone action. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_initAction; + * + * Public: Yes + */ + [] spawn FUNC(openPhone); \ No newline at end of file diff --git a/addons/phone/functions/fnc_initAddAction.sqf b/addons/phone/functions/fnc_initAddAction.sqf index 6a50893..fadb28b 100644 --- a/addons/phone/functions/fnc_initAddAction.sqf +++ b/addons/phone/functions/fnc_initAddAction.sqf @@ -1,4 +1,23 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_initAddAction + * Author: IDSolutions + * + * [Description] + * Initializes the phone action. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_initAddAction; + * + * Public: No + */ + waitUntil { "FORGE_Phone" in items player }; FORGE_addAction = player addAction ["Mobile Phone", FUNC(initAction), [], -99, false, false, "", ""]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_initPhone.sqf b/addons/phone/functions/fnc_initPhone.sqf index 8882870..b9ecaea 100644 --- a/addons/phone/functions/fnc_initPhone.sqf +++ b/addons/phone/functions/fnc_initPhone.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_initPhone + * Author: IDSolutions + * + * [Description] + * Initializes the phone. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_initPhone; + * + * Public: No + */ + waitUntil { !isNull player && player == player }; waitUntil { !isNil "BIS_fnc_init" }; waitUntil { !(isNull (findDisplay 46)) }; diff --git a/addons/phone/functions/fnc_initVar.sqf b/addons/phone/functions/fnc_initVar.sqf index 2ae7dd6..cf7acfe 100644 --- a/addons/phone/functions/fnc_initVar.sqf +++ b/addons/phone/functions/fnc_initVar.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_initVar + * Author: IDSolutions + * + * [Description] + * Initializes the phone variables. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_initVar; + * + * Public: No + */ + FORGE_AddressBook = GETVAR(profileNamespace,FORGE_AddressBook,[]); FORGE_Phone_MSG = []; FORGE_Email = []; \ No newline at end of file diff --git a/addons/phone/functions/fnc_newEmail.sqf b/addons/phone/functions/fnc_newEmail.sqf index af2659c..edfda8e 100644 --- a/addons/phone/functions/fnc_newEmail.sqf +++ b/addons/phone/functions/fnc_newEmail.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_newEmail + * Author: IDSolutions + * + * [Description] + * Adds a new email to the address book. + * + * Arguments: + * 0: Email - The email to add + * + * Return Value: + * None + * + * Example: + * ["test@test.com"] call forge_client_phone_fnc_newEmail; + * + * Public: Yes + */ + _email = (_this select 0); { if (_email == (_x select 1)) then { diff --git a/addons/phone/functions/fnc_newMsg.sqf b/addons/phone/functions/fnc_newMsg.sqf index c9e928f..5d424e9 100644 --- a/addons/phone/functions/fnc_newMsg.sqf +++ b/addons/phone/functions/fnc_newMsg.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_newMsg + * Author: IDSolutions + * + * [Description] + * Adds a new message to the message log. + * + * Arguments: + * 0: Number - The number to add + * + * Return Value: + * None + * + * Example: + * ["1234567890"] call forge_client_phone_fnc_newMsg; + * + * Public: Yes + */ + _number = (_this select 0); { if (_number == (_x select 1)) then { diff --git a/addons/phone/functions/fnc_openPhone.sqf b/addons/phone/functions/fnc_openPhone.sqf index 49c9679..415b97f 100644 --- a/addons/phone/functions/fnc_openPhone.sqf +++ b/addons/phone/functions/fnc_openPhone.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_openPhone + * Author: IDSolutions + * + * [Description] + * Opens the phone. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_openPhone; + * + * Public: Yes + */ + private _defaultTheme = ["bg_dark01", "\@forge\userconfig\backgrounds\bgdark_01.paa"]; private _theme = GETVAR(profileNamespace,FORGE_PhoneTheme,_defaultTheme); private _themeBackground = _theme select 1; diff --git a/addons/phone/functions/fnc_sendEmail.sqf b/addons/phone/functions/fnc_sendEmail.sqf index 470a733..da6e9f1 100644 --- a/addons/phone/functions/fnc_sendEmail.sqf +++ b/addons/phone/functions/fnc_sendEmail.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_sendEmail + * Author: IDSolutions + * + * [Description] + * Sends an email. + * + * Arguments: + * 0: Email - The email to send to + * 1: Message - The message to send + * + * Return Value: + * None + * + * Example: + * ["test@test.com", "Hello World"] call forge_client_phone_fnc_sendEmail; + * + * Public: Yes + */ + params ["_email", "_msg"]; private _defaultEmail = "unknown@spearnet.mil"; diff --git a/addons/phone/functions/fnc_sendMsg.sqf b/addons/phone/functions/fnc_sendMsg.sqf index 4b33be5..9d623fb 100644 --- a/addons/phone/functions/fnc_sendMsg.sqf +++ b/addons/phone/functions/fnc_sendMsg.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_sendMsg + * Author: IDSolutions + * + * [Description] + * Sends a message. + * + * Arguments: + * 0: Number - The number to send to + * 1: Message - The message to send + * + * Return Value: + * None + * + * Example: + * ["1234567890", "Hello World"] call forge_client_phone_fnc_sendMsg; + * + * Public: Yes + */ + params ["_number", "_msg"]; private _defaultPhoneNumber = "unknown"; diff --git a/addons/phone/functions/fnc_showContact.sqf b/addons/phone/functions/fnc_showContact.sqf index b7d9093..c90da3d 100644 --- a/addons/phone/functions/fnc_showContact.sqf +++ b/addons/phone/functions/fnc_showContact.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_showContact + * Author: IDSolutions + * + * [Description] + * Shows the contact list. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_showContact; + * + * Public: Yes + */ + private _cntcBtns = [202223, 202224, 202414, 202415]; private _metaCtrls = [2023001, 2023002, 2023003, 2023004, 2023005, 2023006]; diff --git a/addons/phone/functions/fnc_showDialpad.sqf b/addons/phone/functions/fnc_showDialpad.sqf index ce4afbb..bb5e361 100644 --- a/addons/phone/functions/fnc_showDialpad.sqf +++ b/addons/phone/functions/fnc_showDialpad.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_showDialpad + * Author: IDSolutions + * + * [Description] + * Shows the dialpad. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_showDialpad; + * + * Public: Yes + */ + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; private _dialpadBgBtns = [202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221, 202222]; diff --git a/addons/phone/functions/fnc_showEmail.sqf b/addons/phone/functions/fnc_showEmail.sqf index 4bab8ba..1542c92 100644 --- a/addons/phone/functions/fnc_showEmail.sqf +++ b/addons/phone/functions/fnc_showEmail.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_showEmail + * Author: IDSolutions + * + * [Description] + * Shows the email. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_showEmail; + * + * Public: Yes + */ + private _metaCtrls = [2023001, 2023002, 2023003]; { diff --git a/addons/phone/functions/fnc_showMessage.sqf b/addons/phone/functions/fnc_showMessage.sqf index 97168cf..142f9b6 100644 --- a/addons/phone/functions/fnc_showMessage.sqf +++ b/addons/phone/functions/fnc_showMessage.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_showMessage + * Author: IDSolutions + * + * [Description] + * Shows the message. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_showMessage; + * + * Public: Yes + */ + private _metaCtrls = [2023001, 2023002, 2023003]; { diff --git a/addons/phone/functions/fnc_showMessageInput.sqf b/addons/phone/functions/fnc_showMessageInput.sqf index 38bdfc2..e73eccc 100644 --- a/addons/phone/functions/fnc_showMessageInput.sqf +++ b/addons/phone/functions/fnc_showMessageInput.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_showMessageInput + * Author: IDSolutions + * + * [Description] + * Shows the message input. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_showMessageInput; + * + * Public: Yes + */ + private _metaCtrls = [2023001, 2023002, 2023003]; { diff --git a/addons/phone/functions/fnc_showSafari.sqf b/addons/phone/functions/fnc_showSafari.sqf index 0ca1b6b..b0a9e11 100644 --- a/addons/phone/functions/fnc_showSafari.sqf +++ b/addons/phone/functions/fnc_showSafari.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_showSafari + * Author: IDSolutions + * + * [Description] + * Shows the safari browser. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_showSafari; + * + * Public: Yes + */ + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; diff --git a/addons/phone/functions/fnc_viewContacts.sqf b/addons/phone/functions/fnc_viewContacts.sqf index 55dbdd8..e6e7d30 100644 --- a/addons/phone/functions/fnc_viewContacts.sqf +++ b/addons/phone/functions/fnc_viewContacts.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_viewContacts + * Author: IDSolutions + * + * [Description] + * Shows the contact list. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_viewContacts; + * + * Public: Yes + */ + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; diff --git a/addons/phone/functions/fnc_viewEmail.sqf b/addons/phone/functions/fnc_viewEmail.sqf index edd70c6..0b4c3dd 100644 --- a/addons/phone/functions/fnc_viewEmail.sqf +++ b/addons/phone/functions/fnc_viewEmail.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_viewEmail + * Author: IDSolutions + * + * [Description] + * Shows the email list. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_viewEmail; + * + * Public: Yes + */ + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; diff --git a/addons/phone/functions/fnc_viewMessages.sqf b/addons/phone/functions/fnc_viewMessages.sqf index 92a9141..8307043 100644 --- a/addons/phone/functions/fnc_viewMessages.sqf +++ b/addons/phone/functions/fnc_viewMessages.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_viewMessages + * Author: IDSolutions + * + * [Description] + * Shows the message list. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_viewMessages; + * + * Public: Yes + */ + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; diff --git a/addons/phone/functions/fnc_viewSettings.sqf b/addons/phone/functions/fnc_viewSettings.sqf index 460edc1..310db22 100644 --- a/addons/phone/functions/fnc_viewSettings.sqf +++ b/addons/phone/functions/fnc_viewSettings.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_phone_fnc_viewSettings + * Author: IDSolutions + * + * [Description] + * Shows the settings. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_phone_fnc_viewSettings; + * + * Public: Yes + */ + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; diff --git a/addons/player/functions/fnc_firstLogin.sqf b/addons/player/functions/fnc_firstLogin.sqf index 77d6d22..e5ea860 100644 --- a/addons/player/functions/fnc_firstLogin.sqf +++ b/addons/player/functions/fnc_firstLogin.sqf @@ -2,15 +2,7 @@ /* * Function: forge_client_player_fnc_firstLogin - * Author: J.Schmidt - * Edit: 07.23.2024 - * Copyright © 2024 J.Schmidt, All rights reserved - * - * Do not edit without permission! - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. - * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, - * PO Box 1866, Mountain View, CA 94042 + * Author: IDSolutions * * [Description] * Setup new player. @@ -38,9 +30,6 @@ _player setUnitLoadout [[],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",17],[],"" _player action ["SwitchWeapon", _player, _player, -1]; _player addRating 500; -// player setVariable ["FORGE_Bank", 2000, true]; -// player setVariable ["FORGE_Holster_Weapon", true, true]; -// player setVariable ["PayGrade", _defaultPaygrade, true]; SETPVAR(_player,FORGE_Bank,2000); SETPVAR(_player,FORGE_Holster_Weapon,true); SETPVAR(_player,PayGrade,_defaultPaygrade); @@ -48,19 +37,14 @@ SETPVAR(_player,PayGrade,_defaultPaygrade); private _number = "0160" + (_uid select [count (toArray _uid) - 6, 6]); private _email = _number + "@spearnet.mil"; -// player setVariable ["FORGE_Phone_Number", _number, true]; -// player setVariable ["FORGE_Email", _email, true]; SETPVAR(_player,FORGE_Phone_Number,_number); SETPVAR(_player,FORGE_Email,_email); private _name = name _player; -// private _phoneNumber = player getVariable ["FORGE_Phone_Number", _defaultPhoneNumber]; -// private _phoneEmail = player getVariable ["FORGE_Email", _defaultEmail]; private _phoneNumber = GETVAR(_player,FORGE_Phone_Number,_defaultPhoneNumber); private _phoneEmail = GETVAR(_player,FORGE_Email,_defaultEmail); EGVAR(phone,addressbook) pushBackUnique [_name, _phoneNumber, _phoneEmail]; -// profileNamespace setVariable ["FORGE_AddressBook", EGVAR(phone,addressbook)]; SETVAR(profileNamespace,FORGE_AddressBook,EGVAR(phone,addressbook)); private _messages = [ @@ -111,7 +95,6 @@ uiSleep 1; uiSleep 1; [] call EFUNC(init,playerDBSave); -// player setVariable ["value_loadDone", true, true]; SETPVAR(_player,value_loadDone,true); uiSleep 1; diff --git a/addons/service/functions/fnc_fuel.sqf b/addons/service/functions/fnc_fuel.sqf index 2ce4213..4ebec50 100644 --- a/addons/service/functions/fnc_fuel.sqf +++ b/addons/service/functions/fnc_fuel.sqf @@ -1,7 +1,35 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_service_fnc_fuel + * Author: Creedcoder, J. Schmidt + * + * Description: + * Refuels the vehicle. + * + * Arguments: + * 0: Vehicle - The vehicle to refuel + * + * Return Value: + * None + * + * Example: + * [vehicle] call forge_client_service_fnc_fuel; + * + * Public: No + */ + params ["_veh"]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (_org isEqualTo nil) exitWith { + ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify); +}; + +private _orgFunds = _org get "funds"; + private _fuelNeeded = 1 - (fuel _veh); private _fuelCost = "FUEL_COST" call BFUNC(getParamValue); private _estimatedCost = _fuelNeeded * _fuelCost; @@ -10,13 +38,13 @@ private _fuelAdded = 0; private _refuelRate = 0.01; private _refuelInterval = 0.1; -if (companyFunds < _estimatedCost) exitWith { - ["Insufficient company funds for refueling.", "warning", 3] call EFUNC(misc,notify); +if (_orgFunds < _estimatedCost) exitWith { + ["Insufficient organization funds for refueling.", "warning", 3] call EFUNC(misc,notify); }; ["Refueling Vehicle...", "grey", 3] call EFUNC(misc,notify); -while { fuel _veh < 0.99 && companyFunds >= (_fuelAdded * _fuelCost) } do { +while { fuel _veh < 0.99 && _orgFunds >= (_fuelAdded * _fuelCost) } do { _veh setFuel ((fuel _veh) + _refuelRate); _fuelAdded = _fuelAdded + _refuelRate; uiSleep _refuelInterval; @@ -26,7 +54,7 @@ private _totalCost = _fuelAdded * _fuelCost; private _formattedTotalCost = (_totalCost) call EFUNC(misc,formatNumber); private _formattedFuelAdded = (_fuelAdded) toFixed 2; -["deduct", _totalCost] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; +_store call ["updateFunds", -_totalCost]; [format ["VEHICLE REFUELED:
Fuel Added: %1 diff --git a/addons/service/functions/fnc_initService.sqf b/addons/service/functions/fnc_initService.sqf index c1bc6c7..8b19d99 100644 --- a/addons/service/functions/fnc_initService.sqf +++ b/addons/service/functions/fnc_initService.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_service_fnc_initService + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the service system. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call forge_client_service_fnc_initService; + * + * Public: No + */ + private _worldCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); private _fuelPumpTypes = ["Land_fs_feed_F", "Land_FuelStation_Feed_F", "Land_FuelStation_01_pump_malevil_F", "Land_FuelStation_01_pump_F", "Land_FuelStation_03_pump_F", "Land_A_FuelStation_Feed", "Land_Benzina_schnell", "Land_Fuelstation_army", "Land_Ind_FuelStation_Feed_EP1", "Land_Fuelstation"]; private _fuelPumps = nearestTerrainObjects [_worldCenter, _fuelPumpTypes, 500000]; diff --git a/addons/service/functions/fnc_rearm.sqf b/addons/service/functions/fnc_rearm.sqf index c969b82..4aee3a6 100644 --- a/addons/service/functions/fnc_rearm.sqf +++ b/addons/service/functions/fnc_rearm.sqf @@ -1,7 +1,36 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_service_fnc_rearm + * Author: Creedcoder, J. Schmidt + * + * Description: + * Rears the vehicle. + * + * Arguments: + * 0: Vehicle - The vehicle to rearm + * 1: Vehicle Type - The classname of vehicle to rearm + * + * Return Value: + * None + * + * Example: + * [vehicle, "B_APC_Tracked_01_CRV_F"] call forge_client_service_fnc_rearm; + * + * Public: No + */ + params ["_veh", "_vehType"]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (_org isEqualTo nil) exitWith { + ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify); +}; + +private _orgFunds = _org get "funds"; + private _fnc_removeMagazines = { params ["_vehicle", "_magazines"]; private _removedMags = []; @@ -52,8 +81,8 @@ _rearmCost = _rearmCost + ([_veh, _vehMags] call _fnc_addMagazines); private _turretConfig = configFile >> "CfgVehicles" >> _vehType >> "Turrets"; _rearmCost = _rearmCost + ([_veh, _turretConfig] call _fnc_processTurrets); -if (companyFunds < _rearmCost) exitWith { - ["Insufficient company funds for rearming.", "warning", 3] call EFUNC(misc,notify); +if (_orgFunds < _rearmCost) exitWith { + ["Insufficient organization funds for rearming.", "warning", 3] call EFUNC(misc,notify); }; _veh vehicleChat "Rearming..."; diff --git a/addons/service/functions/fnc_refuel.sqf b/addons/service/functions/fnc_refuel.sqf index 3684c20..f541142 100644 --- a/addons/service/functions/fnc_refuel.sqf +++ b/addons/service/functions/fnc_refuel.sqf @@ -1,7 +1,36 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_service_fnc_refuel + * Author: Creedcoder, J. Schmidt + * + * Description: + * Refuels the vehicle. + * + * Arguments: + * 0: Vehicle - The vehicle to refuel + * 1: Vehicle Type - The classname of vehicle to refuel + * + * Return Value: + * None + * + * Example: + * [vehicle, "B_APC_Tracked_01_CRV_F"] call forge_client_service_fnc_refuel; + * + * Public: No + */ + params ["_veh", "_vehType"]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (_org isEqualTo nil) exitWith { + ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify); +}; + +private _orgFunds = _org get "funds"; + private _fnc_calculateFuelCost = { params ["_currentFuel", "_fuelPrice"]; private _fuelNeeded = 1 - _currentFuel; @@ -30,8 +59,8 @@ private _fuelDetails = [_currentFuel, _fuelPrice] call _fnc_calculateFuelCost; _fuelDetails params ["_fuelNeeded", "_estimatedCost"]; -if (companyFunds < _estimatedCost) exitWith { - ["Insufficient company funds for refueling.", "warning", 3] call EFUNC(misc,notify); +if (_orgFunds < _estimatedCost) exitWith { + ["Insufficient organization funds for refueling.", "warning", 3] call EFUNC(misc,notify); }; _veh vehicleChat "Refueling..."; diff --git a/addons/service/functions/fnc_repair.sqf b/addons/service/functions/fnc_repair.sqf index ca1a332..c22c49c 100644 --- a/addons/service/functions/fnc_repair.sqf +++ b/addons/service/functions/fnc_repair.sqf @@ -1,7 +1,36 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_service_fnc_repair + * Author: Creedcoder, J. Schmidt + * + * Description: + * Repairs the vehicle. + * + * Arguments: + * 0: Vehicle - The vehicle to repair + * 1: Vehicle Type - The classname of vehicle to repair + * + * Return Value: + * None + * + * Example: + * [vehicle, "B_APC_Tracked_01_CRV_F"] call forge_client_service_fnc_repair; + * + * Public: No + */ + params ["_veh", "_vehType"]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (_org isEqualTo nil) exitWith { + ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify); +}; + +private _orgFunds = _org get "funds"; + private _fnc_calculateRepairCost = { params ["_damage", "_repairPrice"]; private _laborHours = _damage * 10; @@ -30,8 +59,8 @@ private _formattedTotalCost = (_repairCost) call EFUNC(misc,formatNumber); uiSleep 5; -if (companyFunds < _repairCost) exitWith { - ["Insufficient company funds for repairing.", "warning", 3] call EFUNC(misc,notify); +if (_orgFunds < _repairCost) exitWith { + ["Insufficient organization funds for repairing.", "warning", 3] call EFUNC(misc,notify); }; _veh vehicleChat "Repairing..."; diff --git a/addons/service/functions/fnc_vehicle.sqf b/addons/service/functions/fnc_vehicle.sqf index a1ef7cf..95b4d71 100644 --- a/addons/service/functions/fnc_vehicle.sqf +++ b/addons/service/functions/fnc_vehicle.sqf @@ -1,19 +1,52 @@ #include "..\script_component.hpp" /* - * Usage: - * _trg = createTrigger ["EmptyDetector", getPos player]; - * _trg setTriggerArea [5, 5, 0, false]; - * _trg setTriggerActivation ["ANYPLAYER", "PRESENT", true]; - * _trg setTriggerStatements [ - * "call { {_x iskindof 'LAND' && speed _x < 1} count thisList > 0; };", - * "call { _handle = [(thisList select 0), 'LAND'] spawn forge_client_service_fnc_vehicle; };", - * "" - * ]; + * Function: forge_client_service_fnc_vehicle + * Author: Creedcoder, J. Schmidt + * + * Description: + * Handles servicing of vehicles including rearmament, refueling, and repairs. + * Calculates and deducts service costs from the player's organization funds. + * + * Arguments: + * 0: Vehicle - The vehicle to service + * 1: Vehicle Kind - The type of vehicle to check ("LAND", "AIR", etc.) + * + * Return Value: + * None + * + * Example: + * [vehicle, "LAND"] call forge_client_service_fnc_vehicle; + * + * Notes: + * - Vehicle must be stationary (speed < 1) + * - Player must be the driver of the vehicle + * - Costs are automatically calculated and deducted + * + * Trigger Example: + * _trg = createTrigger ["EmptyDetector", getPos player]; + * _trg setTriggerArea [5, 5, 0, false]; + * _trg setTriggerActivation ["ANYPLAYER", "PRESENT", true]; + * _trg setTriggerStatements [ + * "call { {_x iskindof 'LAND' && speed _x < 1} count thisList > 0; };", + * "call { _handle = [(thisList select 0), 'LAND'] spawn forge_client_service_fnc_vehicle; };", + * "" + * ]; + * + * Public: No */ params ["_veh", "_vehKind"]; +private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; +private _org = _store call ["getOrg", []]; + +if (_org isEqualTo nil) exitWith { + ["You are not in an organization!", "warning", 3] call EFUNC(misc,notify); +}; + +private _orgFunds = _org get "funds"; + private _veh = _this select 0; private _vehType = getText (configFile >> "CfgVehicles" >> typeOf _veh >> "DisplayName"); @@ -38,7 +71,7 @@ if ((_veh isKindOf _vehKind) && (driver _veh == player)) exitWith { private _formattedRepairCost = (_RepairCost) call EFUNC(misc,formatNumber); private _formattedTotalCost = (_totalCost) call EFUNC(misc,formatNumber); - ["deduct", _totalCost] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + _store call ["updateFunds", -_totalCost]; [format ["SERVICE COST:
Rearmament: $%1 diff --git a/addons/store/functions/fnc_buyItem.sqf b/addons/store/functions/fnc_buyItem.sqf index d86846b..be265d3 100644 --- a/addons/store/functions/fnc_buyItem.sqf +++ b/addons/store/functions/fnc_buyItem.sqf @@ -1,9 +1,30 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_buyItem + * Author: J. Schmidt + * + * Description: + * Purchases an item and adds it to the player's locker. + * + * Arguments: + * 0: Class Name - The classname of the item to purchase + * 1: Price - The price of the item + * 2: Config Type - The type of config ("item", "weapon", "magazine", "backpack") + * 3: Item Type - The type of item for locker storage + * + * Return Value: + * None + * + * Example: + * ["arifle_MX_F", 1000, "weapon", "primary"] call forge_store_fnc_buyItem + * + * Public: No + */ + params ["_className", "_price", "_configType", "_itemType"]; private _displayName = ""; -// private _locker = player getVariable ["FORGE_Locker", []]; private _locker = GETVAR(player,FORGE_Locker,[]); if !([_price] call FUNC(handlePurchase)) exitWith {}; @@ -27,7 +48,6 @@ switch (_configType) do { }; }; -// player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); [_className, _itemType] call EFUNC(arsenal,addArmoryItem); diff --git a/addons/store/functions/fnc_buyVehicle.sqf b/addons/store/functions/fnc_buyVehicle.sqf index 3313ea4..9237293 100644 --- a/addons/store/functions/fnc_buyVehicle.sqf +++ b/addons/store/functions/fnc_buyVehicle.sqf @@ -1,18 +1,35 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_buyVehicle + * Author: J. Schmidt + * + * Description: + * Purchases a vehicle and adds it to the player's garage. + * + * Arguments: + * 0: Class Name - The classname of the vehicle to purchase + * 1: Price - The price of the vehicle + * 2: Vehicle Type - The type of vehicle ("car", "air", "ship", "tank") + * + * Return Value: + * None + * + * Example: + * ["B_APC_Tracked_01_rcws_F", 5000, "tank"] call forge_store_fnc_buyVehicle + * + * Public: No + */ + params ["_className", "_price", "_vehicleType"]; private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); -// private _garage = player getVariable ["FORGE_Garage", []]; private _garage = GETVAR(player,FORGE_Garage,[]); -// private _vehicleData = [1, 0, []]; if !([_price] call FUNC(handlePurchase)) exitWith {}; -// _garage pushBack [_vehicleType, _className, _vehicleData]; _garage pushBack [_vehicleType, _className]; -// player setVariable ["FORGE_Garage", _garage, true]; SETPVAR(player,FORGE_Garage,_garage); [_className, _vehicleType] call EFUNC(arsenal,addGarageVehicle); diff --git a/addons/store/functions/fnc_changeFilter.sqf b/addons/store/functions/fnc_changeFilter.sqf index 4e26f69..2357c1b 100644 --- a/addons/store/functions/fnc_changeFilter.sqf +++ b/addons/store/functions/fnc_changeFilter.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_changeFilter + * Author: J. Schmidt + * + * Description: + * Changes the filter of the store. + * + * Arguments: + * 0: Control - The control that was changed + * 1: Selected Index - The index of the selected item + * + * Return Value: + * None + * + * Example: + * [_filterList, 0] call forge_store_fnc_changeFilter + * + * Public: No + */ + params ["_control", "_selectedIndex"]; private _display = ctrlParent _control; diff --git a/addons/store/functions/fnc_changePayment.sqf b/addons/store/functions/fnc_changePayment.sqf index 05a7e27..a4bee16 100644 --- a/addons/store/functions/fnc_changePayment.sqf +++ b/addons/store/functions/fnc_changePayment.sqf @@ -1,5 +1,25 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_changePayment + * Author: J. Schmidt + * + * Description: + * Changes the payment method of the store. + * + * Arguments: + * 0: Control - The control that was changed + * 1: Selected Index - The index of the selected item + * + * Return Value: + * None + * + * Example: + * [_paymentList, 0] call forge_store_fnc_changePayment + * + * Public: No + */ + params ["_control", "_selectedIndex"]; private _display = ctrlParent _control; diff --git a/addons/store/functions/fnc_handlePurchase.sqf b/addons/store/functions/fnc_handlePurchase.sqf index cc1ed40..48797ad 100644 --- a/addons/store/functions/fnc_handlePurchase.sqf +++ b/addons/store/functions/fnc_handlePurchase.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_handlePurchase + * Author: J. Schmidt + * + * Description: + * Handles the purchase of an item. + * + * Arguments: + * 0: Price - The price of the item + * + * Return Value: + * None + * + * Example: + * [1000] call forge_store_fnc_handlePurchase + * + * Public: No + */ + params ["_price"]; private _paymentData = GVAR(activePayment); @@ -18,7 +37,7 @@ if (count _payment > 3) then { if (_payment select 0 == "Organization") then { private _store = missionNamespace getVariable ["FORGE_ORG_STORE_REG", createHashMap]; - private _org = _store call ["getCurrentOrg", []]; + private _org = _store call ["getOrg", []]; private _ownerUID = _org get "owner"; if (getPlayerUID player != _ownerUID) then { diff --git a/addons/store/functions/fnc_initStore.sqf b/addons/store/functions/fnc_initStore.sqf index ab8a844..4b76e73 100644 --- a/addons/store/functions/fnc_initStore.sqf +++ b/addons/store/functions/fnc_initStore.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_initStore + * Author: J. Schmidt + * + * Description: + * Initializes the store. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * None + * + * Public: No + */ + { private _configName = configName(_x); private _className = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "className") call BFUNC(getCfgData); diff --git a/addons/store/functions/fnc_openStore.sqf b/addons/store/functions/fnc_openStore.sqf index aaa49f3..66056a1 100644 --- a/addons/store/functions/fnc_openStore.sqf +++ b/addons/store/functions/fnc_openStore.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_openStore + * Author: J. Schmidt + * + * Description: + * Opens the store. + * + * Arguments: + * 0: Store - The store object + * + * Return Value: + * None + * + * Example: + * [storeObject] call forge_store_fnc_openStore + * + * Public: No + */ + params [["_store", objNull, [objNull]]]; if (isNull _store) exitWith {}; diff --git a/addons/store/functions/fnc_selectProduct.sqf b/addons/store/functions/fnc_selectProduct.sqf index 4168bb3..d3c9200 100644 --- a/addons/store/functions/fnc_selectProduct.sqf +++ b/addons/store/functions/fnc_selectProduct.sqf @@ -1,5 +1,24 @@ #include "..\script_component.hpp" +/* + * Function: forge_store_fnc_selectProduct + * Author: J. Schmidt + * + * Description: + * Selects a product from the store. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * _this call forge_store_fnc_selectProduct + * + * Public: No + */ + private _display = findDisplay IDD_STOREDIALOG; private _productList = _display displayCtrl IDC_PRODUCTLIST; private _productIndex = lbCurSel _productList; diff --git a/addons/task/functions/fnc_attack.sqf b/addons/task/functions/fnc_attack.sqf index 8f703e0..a17a2fd 100644 --- a/addons/task/functions/fnc_attack.sqf +++ b/addons/task/functions/fnc_attack.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_attack * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an attack task. * * Arguments: diff --git a/addons/task/functions/fnc_attackModule.sqf b/addons/task/functions/fnc_attackModule.sqf index 8a31475..7ec5037 100644 --- a/addons/task/functions/fnc_attackModule.sqf +++ b/addons/task/functions/fnc_attackModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_attackModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the attack module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_attackModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; diff --git a/addons/task/functions/fnc_defuse.sqf b/addons/task/functions/fnc_defuse.sqf index 45a413e..6dd4298 100644 --- a/addons/task/functions/fnc_defuse.sqf +++ b/addons/task/functions/fnc_defuse.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_defuse * Author: Creedcoder, J. Schmidt + * + * Description: * Registers a defuse task. * * Arguments: diff --git a/addons/task/functions/fnc_defuseModule.sqf b/addons/task/functions/fnc_defuseModule.sqf index 5be3a0e..a7144b2 100644 --- a/addons/task/functions/fnc_defuseModule.sqf +++ b/addons/task/functions/fnc_defuseModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_defuseModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the defuse module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_defuseModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; diff --git a/addons/task/functions/fnc_destroy.sqf b/addons/task/functions/fnc_destroy.sqf index b8dd588..e3639a3 100644 --- a/addons/task/functions/fnc_destroy.sqf +++ b/addons/task/functions/fnc_destroy.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_destroy * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an destroy task. * * Arguments: diff --git a/addons/task/functions/fnc_destroyModule.sqf b/addons/task/functions/fnc_destroyModule.sqf index 7e23ba2..33a0480 100644 --- a/addons/task/functions/fnc_destroyModule.sqf +++ b/addons/task/functions/fnc_destroyModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_destroyModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the destroy module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_destroyModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; diff --git a/addons/task/functions/fnc_explosivesModule.sqf b/addons/task/functions/fnc_explosivesModule.sqf index 5c4673e..0eda50c 100644 --- a/addons/task/functions/fnc_explosivesModule.sqf +++ b/addons/task/functions/fnc_explosivesModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_explosivesModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the explosives module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_explosivesModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; \ No newline at end of file diff --git a/addons/task/functions/fnc_handler.sqf b/addons/task/functions/fnc_handler.sqf index 3b5e700..9c58ce9 100644 --- a/addons/task/functions/fnc_handler.sqf +++ b/addons/task/functions/fnc_handler.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_handler * Author: Creedcoder, J. Schmidt + * + * Description: * Server side task handler/spawner. * * Arguments: @@ -25,7 +28,6 @@ private _thread = 0; GVAR(acceptTask) = false; if (isNil "companyRating") then { companyRating = 0; }; -if (isNil "_minRating") then { _minRating = 0; }; private _companyRating = companyRating; if (_companyRating < _minRating) exitWith { @@ -58,6 +60,6 @@ switch (_taskType) do { }; }; -diag_log "Mision Handler Done"; +diag_log "[FORGE] Mission Handler Done"; GVAR(acceptTask) = true; \ No newline at end of file diff --git a/addons/task/functions/fnc_heartBeat.sqf b/addons/task/functions/fnc_heartBeat.sqf index 039713f..86ca90d 100644 --- a/addons/task/functions/fnc_heartBeat.sqf +++ b/addons/task/functions/fnc_heartBeat.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_heartBeat * Author: Creedcoder, J. Schmidt + * + * Description: * Registers Entity and starts heartbeat. * * Arguments: diff --git a/addons/task/functions/fnc_hostage.sqf b/addons/task/functions/fnc_hostage.sqf index 3dc1d9c..58d7aaa 100644 --- a/addons/task/functions/fnc_hostage.sqf +++ b/addons/task/functions/fnc_hostage.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_hostage * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an hostage task. * * Arguments: diff --git a/addons/task/functions/fnc_hostageModule.sqf b/addons/task/functions/fnc_hostageModule.sqf index 0f1bb85..30de7b5 100644 --- a/addons/task/functions/fnc_hostageModule.sqf +++ b/addons/task/functions/fnc_hostageModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_hostageModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the hostage module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_hostageModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; diff --git a/addons/task/functions/fnc_hostagesModule.sqf b/addons/task/functions/fnc_hostagesModule.sqf index 5c4673e..8162c1d 100644 --- a/addons/task/functions/fnc_hostagesModule.sqf +++ b/addons/task/functions/fnc_hostagesModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_hostagesModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the hostage module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_hostagesModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; \ No newline at end of file diff --git a/addons/task/functions/fnc_hvt.sqf b/addons/task/functions/fnc_hvt.sqf index 6ca2db2..9c0f96a 100644 --- a/addons/task/functions/fnc_hvt.sqf +++ b/addons/task/functions/fnc_hvt.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_hvt * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an hvt task. * * Arguments: diff --git a/addons/task/functions/fnc_hvtModule.sqf b/addons/task/functions/fnc_hvtModule.sqf index ed82eed..47653cf 100644 --- a/addons/task/functions/fnc_hvtModule.sqf +++ b/addons/task/functions/fnc_hvtModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_hvtModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the hvt module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_hvtModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; diff --git a/addons/task/functions/fnc_makeHVT.sqf b/addons/task/functions/fnc_makeHVT.sqf index 28f1126..479ce35 100644 --- a/addons/task/functions/fnc_makeHVT.sqf +++ b/addons/task/functions/fnc_makeHVT.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_makeHVT * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an AI unit as a hvt. * * Arguments: diff --git a/addons/task/functions/fnc_makeHostage.sqf b/addons/task/functions/fnc_makeHostage.sqf index 202f29a..3132633 100644 --- a/addons/task/functions/fnc_makeHostage.sqf +++ b/addons/task/functions/fnc_makeHostage.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_makeHostage * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an AI unit as a hostage/POW. * * Arguments: diff --git a/addons/task/functions/fnc_makeIED.sqf b/addons/task/functions/fnc_makeIED.sqf index 91bc003..01354b4 100644 --- a/addons/task/functions/fnc_makeIED.sqf +++ b/addons/task/functions/fnc_makeIED.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_makeIED * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an IED and starts countdown timer. * * Arguments: diff --git a/addons/task/functions/fnc_makeObject.sqf b/addons/task/functions/fnc_makeObject.sqf index 4d90aad..e97c0db 100644 --- a/addons/task/functions/fnc_makeObject.sqf +++ b/addons/task/functions/fnc_makeObject.sqf @@ -1,8 +1,11 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_makeObject * Author: Creedcoder, J. Schmidt - * Registers an item as an object. + * + * Description: + * Registers an object. * * Arguments: * 0: The object diff --git a/addons/task/functions/fnc_makeShooter.sqf b/addons/task/functions/fnc_makeShooter.sqf index edba8d8..905b7c7 100644 --- a/addons/task/functions/fnc_makeShooter.sqf +++ b/addons/task/functions/fnc_makeShooter.sqf @@ -1,8 +1,11 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_makeShooter * Author: Creedcoder, J. Schmidt - * Registers an AI unit as a shooter/POW. + * + * Description: + * Registers an AI unit as a shooter. * * Arguments: * 0: The AI unit diff --git a/addons/task/functions/fnc_makeTarget.sqf b/addons/task/functions/fnc_makeTarget.sqf index c6e3a0b..73bcce0 100644 --- a/addons/task/functions/fnc_makeTarget.sqf +++ b/addons/task/functions/fnc_makeTarget.sqf @@ -1,7 +1,10 @@ #include "..\script_component.hpp" /* + * Function: forge_client_task_fnc_makeTarget * Author: Creedcoder, J. Schmidt + * + * Description: * Registers an AI unit as a target. * * Arguments: diff --git a/addons/task/functions/fnc_protectedModule.sqf b/addons/task/functions/fnc_protectedModule.sqf index 5c4673e..01ead61 100644 --- a/addons/task/functions/fnc_protectedModule.sqf +++ b/addons/task/functions/fnc_protectedModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_protectedModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the protected module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_protectedModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; \ No newline at end of file diff --git a/addons/task/functions/fnc_shootersModule.sqf b/addons/task/functions/fnc_shootersModule.sqf index 5c4673e..d50a0c3 100644 --- a/addons/task/functions/fnc_shootersModule.sqf +++ b/addons/task/functions/fnc_shootersModule.sqf @@ -1,5 +1,26 @@ #include "..\script_component.hpp" +/* + * Function: forge_client_task_fnc_shootersModule + * Author: Creedcoder, J. Schmidt + * + * Description: + * Initializes the shooters module. + * + * Arguments: + * 0: Logic - The logic object + * 1: Units - The array of units + * 2: Activated - Whether the module is activated + * + * Return Value: + * None + * + * Example: + * [logicObject, [unit1, unit2], true] call forge_client_task_fnc_shootersModule; + * + * Public: No + */ + params [["_logic", objNull, [objNull]], ["_units", [], [[]]], ["_activated", true, [true]]]; if !(_activated) exitWith {}; \ No newline at end of file