diff --git a/addons/admin/functions/fnc_adminTransfer.sqf b/addons/admin/functions/fnc_adminTransfer.sqf index 9e64d41..335145d 100644 --- a/addons/admin/functions/fnc_adminTransfer.sqf +++ b/addons/admin/functions/fnc_adminTransfer.sqf @@ -57,7 +57,7 @@ switch (_condition) do { case ("payday"): { private _totalPayment = 0; private _paymentToDo = []; - private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BIS_fnc_getCfgData; + private _payGrades = (missionConfigFile >> "CfgPaygrades" >> "payGrades") call BIS_fnc_getCfgData; { private _player = _x; diff --git a/addons/admin/functions/fnc_openAdmin.sqf b/addons/admin/functions/fnc_openAdmin.sqf index d8b17ba..e459015 100644 --- a/addons/admin/functions/fnc_openAdmin.sqf +++ b/addons/admin/functions/fnc_openAdmin.sqf @@ -19,7 +19,7 @@ private _list2 = _dialog displayCtrl 2023003; lbSetCurSel [2023001, 0]; -private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BFUNC(getCfgData); +private _payGrades = (missionConfigFile >> "CfgPaygrades" >> "payGrades") call BFUNC(getCfgData); { private _index = _list2 lbAdd format ["%1 - $%2", (_x select 0), ((_x select 1) call EFUNC(misc,formatNumber))]; diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp index 910b7e3..6948b33 100644 --- a/addons/arsenal/XEH_PREP.hpp +++ b/addons/arsenal/XEH_PREP.hpp @@ -1,6 +1,6 @@ PREP(addArmoryItem); PREP(addGarageVehicle); -PREP(addVirtualVehicle); +PREP(addVirtualVehicles); PREP(initArsenal); PREP(openArmory); PREP(openGarage); diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf index 9ac9b55..8e4c112 100644 --- a/addons/arsenal/XEH_postInit.sqf +++ b/addons/arsenal/XEH_postInit.sqf @@ -3,8 +3,8 @@ [{ GETVAR(player,value_loadDone,false) }, { - private _armoryUnlocks = GETVAR(player,Armory_Unlocks,[]); - private _garageUnlocks = GETVAR(player,Garage_Unlocks,[]); + private _armory_unlocks = player getVariable ["Armory_Unlocks", [[],[],[],[]]]; + private _garage_unlocks = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]]; - [_armoryUnlocks, _garageUnlocks] call FUNC(initArsenal); + [_armory_unlocks, _garage_unlocks] call FUNC(initArsenal); }] call CFUNC(waitUntilAndExecute); \ No newline at end of file diff --git a/addons/arsenal/XEH_preInit.sqf b/addons/arsenal/XEH_preInit.sqf index a4eaba0..6dffad2 100644 --- a/addons/arsenal/XEH_preInit.sqf +++ b/addons/arsenal/XEH_preInit.sqf @@ -7,5 +7,8 @@ PREP_RECOMPILE_END; GVAR(armory_unlocks) = []; GVAR(garage_unlocks) = []; +GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue); +GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue); +GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999]; ADDON = true; \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_addArmoryItem.sqf b/addons/arsenal/functions/fnc_addArmoryItem.sqf index 7ee6de9..361d266 100644 --- a/addons/arsenal/functions/fnc_addArmoryItem.sqf +++ b/addons/arsenal/functions/fnc_addArmoryItem.sqf @@ -5,24 +5,37 @@ * Adds item to player's armory unlocks and updates virtual arsenal */ -params [["_class","",[""]],["_type",0,[0]]]; +params [["_class", "", [""]], ["_type", "", [""]]]; private _default = [[],[],[],[]]; +// private _armory_unlocks = player getVariable ["Armory_Unlocks", _default]; private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default); -private _index = (_armory_unlocks select _type) pushBackUnique _class; + +private _typeToNumber = switch (_type) do { + case "backpack": {3}; + case "facewear": {0}; + case "headgear": {0}; + case "hmd": {0}; + case "item": {0}; + case "magazine": {2}; + case "uniform": {0}; + case "vest": {0}; + case "weapon": {1}; + default {0}; +}; + +private _index = (_armory_unlocks select _typeToNumber) pushBackUnique _class; if (_index > -1) then { - SETVAR(player,Armory_Unlocks,_armory_unlocks); + // player setVariable ["Armory_Unlocks", _armory_unlocks, true]; + SETPVAR(player,Armory_Unlocks,_armory_unlocks); if (GVAR(armory_type) == 0) then { - [GVAR(gear_box),[_class],false,true,1,_type] call BFUNC(addVirtualItemCargo); + [GVAR(gear_box), [_class], false, true, 1, _typeToNumber] call BFUNC(addVirtualItemCargo); } else { - [GVAR(gear_box),[_class]] call AFUNC(arsenal,addVirtualItems); + [GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems); }; - ["armory",_armory_unlocks] call FUNC(updateUnlocks); - ["armory"] call FUNC(saveUnlocks); - TRACE_2("Item added to armory",_class,_type); true } else { diff --git a/addons/arsenal/functions/fnc_addGarageVehicle.sqf b/addons/arsenal/functions/fnc_addGarageVehicle.sqf index 6c7dd6d..43f1d53 100644 --- a/addons/arsenal/functions/fnc_addGarageVehicle.sqf +++ b/addons/arsenal/functions/fnc_addGarageVehicle.sqf @@ -6,18 +6,28 @@ */ -params [["_class","",[""]],["_type",0,[0]]]; +params [["_class", "", [""]], ["_type", "", [""]]]; private _default = [[],[],[],[],[],[]]; +// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default]; private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default); -private _index = (_garage_unlocks select _type) pushBackUnique _class; + +private _typeToNumber = switch (_type) do { + case "car": {0}; + case "armor": {1}; + case "heli": {2}; + case "plane": {3}; + case "naval": {4}; + case "static": {5}; + default {0}; +}; + +private _index = (_garage_unlocks select _typeToNumber) pushBackUnique _class; if (_index > -1) then { - SETVAR(player,Garage_Unlocks,_garage_unlocks); - [[_class]] call FUNC(addVirtualVehs); - - ["garage",_garage_unlocks] call FUNC(updateUnlocks); - ["garage"] call FUNC(saveUnlocks); + // player setVariable ["Garage_Unlocks", _garage_unlocks, true]; + SETPVAR(player,Garage_Unlocks,_garage_unlocks); + [[_class]] call FUNC(addVirtualVehicles); TRACE_2("Vehicle added to garage",_class,_type); true diff --git a/addons/arsenal/functions/fnc_addVirtualVehicles.sqf b/addons/arsenal/functions/fnc_addVirtualVehicles.sqf index fc801db..3cecde6 100644 --- a/addons/arsenal/functions/fnc_addVirtualVehicles.sqf +++ b/addons/arsenal/functions/fnc_addVirtualVehicles.sqf @@ -8,9 +8,10 @@ * 0: Vehicles - Array of vehicle classnames */ -params [["_vehicles",[],[[]]]]; +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; @@ -75,6 +76,4 @@ GVAR(static_unlocks) = []; GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; } forEach _static; -["garage",_garage_unlocks] call FUNC(updateUnlocks); - TRACE_1("Virtual vehicles updated",count _vehicles); \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_initArsenal.sqf b/addons/arsenal/functions/fnc_initArsenal.sqf index d1aaa89..296bc77 100644 --- a/addons/arsenal/functions/fnc_initArsenal.sqf +++ b/addons/arsenal/functions/fnc_initArsenal.sqf @@ -1,29 +1,36 @@ #include "..\script_component.hpp" -params [["_armory_data", [[],[],[],[]], [[]]], ["_garage_data", [[],[],[],[],[],[]], [[]]]]; +params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]]; -if (count _armory_data != 4) then { _armory_data = [[],[],[],[]] }; -if (count _garage_data != 6) then { _garage_data = [[],[],[],[],[],[]] }; - -GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999]; -[GVAR(gear_box), false, false] call AFUNC(arsenal,initBox); - -GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue); -GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue); +if (count _armory_data isEqualTo [""]) then { _armory_data = [[],[],[],[]] }; +if (count _garage_data isEqualTo [""]) then { _garage_data = [[],[],[],[],[],[]] }; +if (GVAR(armory_type) == 0) then { + { + [GVAR(gear_box), _x, false, true, 1, _forEachIndex] call BFUNC(addVirtualItemCargo); + } forEach _armory_data; +} else { + { + [GVAR(gear_box), _x] call AFUNC(arsenal,addVirtualItems); + } forEach _armory_data; +}; GVAR(armory_unlocks) = _armory_data; GVAR(garage_unlocks) = _garage_data; -GVAR(item_unlocks) = _armory_data # 0; -GVAR(weapon_unlocks) = _armory_data # 1; -GVAR(magazine_unlocks) = _armory_data # 2; -GVAR(backpack_unlocks) = _armory_data # 3; +GVAR(item_unlocks) = _armory_data select 0; +GVAR(weapon_unlocks) = _armory_data select 1; +GVAR(magazine_unlocks) = _armory_data select 2; +GVAR(backpack_unlocks) = _armory_data select 3; -GVAR(car_unlocks) = _garage_data # 0; -GVAR(armor_unlocks) = _garage_data # 1; -GVAR(heli_unlocks) = _garage_data # 2; -GVAR(plane_unlocks) = _garage_data # 3; -GVAR(naval_unlocks) = _garage_data # 4; -GVAR(static_unlocks) = _garage_data # 5; +GVAR(car_unlocks) = _garage_data select 0; +GVAR(armor_unlocks) = _garage_data select 1; +GVAR(heli_unlocks) = _garage_data select 2; +GVAR(plane_unlocks) = _garage_data select 3; +GVAR(naval_unlocks) = _garage_data select 4; +GVAR(static_unlocks) = _garage_data select 5; + +{ + [_x] call FUNC(addVirtualVehicles); +} forEach GVAR(garage_unlocks); TRACE_2("Arsenal System Initialized with defaults",count GVAR(armory_unlocks),count GVAR(garage_unlocks)); \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_openGarage.sqf b/addons/arsenal/functions/fnc_openGarage.sqf index b5b43bc..7c5ab39 100644 --- a/addons/arsenal/functions/fnc_openGarage.sqf +++ b/addons/arsenal/functions/fnc_openGarage.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -_locations = (missionConfigFile >> "FORGE_CfgGarages" >> "locations") call BFUNC(getCfgData); +_locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData); { GVAR(vehSpawnPos) = (_x select 1) getPos [5, (_x select 2)]; } count _locations; @@ -33,9 +33,20 @@ SETMVAR(BIS_fnc_garage_centerType,_defaultVehicle); _veh = typeOf _obj; _textures = getObjectTextures _obj; _animationNames = animationNames _obj; + + private _vehicleType = switch true do { + case (_obj isKindOf "Car" && !(_obj isKindOf "Tank") && !(_obj isKindOf "Wheeled_APC_F")): {"car"}; + case (_obj isKindOf "Tank" || _obj isKindOf "Wheeled_APC_F"): {"armor"}; + case (_obj isKindOf "Helicopter"): {"heli"}; + case (_obj isKindOf "Plane"): {"plane"}; + case (_obj isKindOf "Ship"): {"naval"}; + case (_obj isKindOf "Static"): {"static"}; + default {"car"}; + }; + { deleteVehicle _x } forEach _nearestObjects; _createVehicle = createVehicle [_veh, GVAR(vehSpawnPos), [], 0, "CAN_COLLIDE"]; - _createVehicle setVariable ["FORGE_GarageVehicle", true, true]; + _createVehicle setVariable ["FORGE_VehicleType", _vehicleType, true]; if (count _textures > 0) then { _count = 0; diff --git a/addons/arsenal/functions/fnc_saveUnlocks.sqf b/addons/arsenal/functions/fnc_saveUnlocks.sqf index 5705d5a..ad19424 100644 --- a/addons/arsenal/functions/fnc_saveUnlocks.sqf +++ b/addons/arsenal/functions/fnc_saveUnlocks.sqf @@ -14,46 +14,51 @@ * ["armory"] call forge_client_arsenal_fnc_saveArsenalUnlocks */ -params [["_type","",[""]],["_data",[],[[]]]]; - -private _default_armory_unlocks = [[],[],[],[]]; -private _default_garage_unlocks = [[],[],[],[],[],[]]; +params [["_type", "", [""]]]; switch (_type) do { case "armory": { - private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_unlocks); + private _default_armory_data = [[],[],[],[]]; + // private _armory_data = player getVariable ["Armory_Unlocks", [[],[],[],[]]]; + private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_data); switch (GVAR(pdb_mode)) do { case 0: { + // profileNamespace setVariable ["Armory_Unlocks", _armory_data]; SETVAR(profileNamespace,Armory_Unlocks,_armory_data); }; case 1: { - ["hsetid",getPlayerUID player,"armory_unlocks",-1,_armory_data,"",false] remoteExec ["dragonfly_db_fnc_addTask",2,false]; + ["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; }; default { + // profileNamespace setVariable ["Armory_Unlocks", _armory_data]; SETVAR(profileNamespace,Armory_Unlocks,_armory_data); }; }; - [_type,_armory_data] call FUNC(updateUnlocks); + [_type, _armory_data] call FUNC(updateUnlocks); }; case "garage": { - private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_unlocks); + private _default_garage_data = [[],[],[],[],[],[]]; + // private _garage_data = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]]; + private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_data); switch (GVAR(pdb_mode)) do { case 0: { + // profileNamespace setVariable ["Garage_Unlocks", _garage_data]; SETVAR(profileNamespace,Garage_Unlocks,_garage_data); }; case 1: { - ["hsetid",getPlayerUID player,"garage_unlocks",-1,_garage_data,"",false] remoteExec ["dragonfly_db_fnc_addTask",2,false]; + ["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; }; default { + // profileNamespace setVariable ["Garage_Unlocks", _garage_data]; SETVAR(profileNamespace,Garage_Unlocks,_garage_data); }; }; - [_type,_garage_data] call FUNC(updateUnlocks); + [_type, _garage_data] call FUNC(updateUnlocks); }; }; diff --git a/addons/arsenal/functions/fnc_updateUnlocks.sqf b/addons/arsenal/functions/fnc_updateUnlocks.sqf index 64c9830..8fac4da 100644 --- a/addons/arsenal/functions/fnc_updateUnlocks.sqf +++ b/addons/arsenal/functions/fnc_updateUnlocks.sqf @@ -12,7 +12,7 @@ * ["armory", _armory_unlocks] call forge_client_arsenal_fnc_updateUnlocks */ -params [["_type","",[""]],["_data",[],[[]]]]; +params [["_type", "", [""]], ["_data", [], [[]]]]; switch (_type) do { case "armory": { diff --git a/addons/bank/functions/fnc_deposit.sqf b/addons/bank/functions/fnc_deposit.sqf index 1ed2136..68c79a0 100644 --- a/addons/bank/functions/fnc_deposit.sqf +++ b/addons/bank/functions/fnc_deposit.sqf @@ -3,7 +3,6 @@ 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); @@ -11,9 +10,8 @@ if (_amount > 0 && _amount <= _cash) then { _cash = _cash - _amount; _bank = _bank + _amount; - // player setVariable ["FORGE_Bank", _bank]; - // player setVariable ["FORGE_Cash", _cash]; - + // player setVariable ["FORGE_Bank", _bank, true]; + // player setVariable ["FORGE_Cash", _cash, true]; SETPVAR(player,FORGE_Bank,_bank); SETPVAR(player,FORGE_Cash,_cash); diff --git a/addons/bank/functions/fnc_openBank.sqf b/addons/bank/functions/fnc_openBank.sqf index 4d9373e..5a50b15 100644 --- a/addons/bank/functions/fnc_openBank.sqf +++ b/addons/bank/functions/fnc_openBank.sqf @@ -2,17 +2,22 @@ // private _bank = player getVariable ["FORGE_Bank", 0]; // private _cash = player getVariable ["FORGE_Cash", 0]; -// private _rating = player getVariable ["FORGE_Rating", 0]; private _bank = GETVAR(player,FORGE_Bank,0); private _cash = GETVAR(player,FORGE_Cash,0); -private _rating = GETVAR(player,FORGE_Rating,0); +private _payMultiplier = "MULTIPLYR" call BFUNC(getParamValue); +private _plyscore = rating player; +private _pending = _plyscore * _payMultiplier; disableSerialization; createDialog "RscBankDialog"; -ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]]; -ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]]; -ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]]; +private _formattedBank = _bank call EFUNC(misc,formatNumber); +private _formattedCash = _cash call EFUNC(misc,formatNumber); +private _formattedPending = _pending call EFUNC(misc,formatNumber); + +ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _formattedCash]]; +ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _formattedBank]]; +ctrlSetText [IDC_RATINGTEXT, format ["Pending: %1", _formattedPending]]; ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"]; { diff --git a/addons/bank/functions/fnc_refresh.sqf b/addons/bank/functions/fnc_refresh.sqf index 6b63f24..48ff2fb 100644 --- a/addons/bank/functions/fnc_refresh.sqf +++ b/addons/bank/functions/fnc_refresh.sqf @@ -2,15 +2,20 @@ // private _bank = player getVariable ["FORGE_Bank", 0]; // private _cash = player getVariable ["FORGE_Cash", 0]; -// private _rating = player getVariable ["FORGE_Rating", 0]; private _bank = GETVAR(player,FORGE_Bank,0); private _cash = GETVAR(player,FORGE_Cash,0); -private _rating = GETVAR(player,FORGE_Rating,0); +private _payMultiplier = "MULTIPLYR" call BFUNC(getParamValue); +private _plyscore = rating player; +private _pending = _plyscore * _payMultiplier; + +private _formattedBank = _bank call EFUNC(misc,formatNumber); +private _formattedCash = _cash call EFUNC(misc,formatNumber); +private _formattedPending = _pending call EFUNC(misc,formatNumber); if (!isNull (findDisplay IDD_BANKDIALOG)) then { - ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]]; - ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]]; - ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]]; + ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _formattedCash]]; + ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _formattedBank]]; + ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _formattedPending]]; ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"]; ctrlSetText [IDC_AMOUNTINPUT, ""]; ctrlSetText [IDC_PLAYERINPUT, ""]; diff --git a/addons/bank/functions/fnc_submit.sqf b/addons/bank/functions/fnc_submit.sqf index c0b8e80..700e211 100644 --- a/addons/bank/functions/fnc_submit.sqf +++ b/addons/bank/functions/fnc_submit.sqf @@ -1,15 +1,14 @@ #include "..\script_component.hpp" // private _bank = player getVariable ["FORGE_Bank", 0]; -// private _rating = player getVariable ["FORGE_Rating", 0]; private _bank = GETVAR(player,FORGE_Bank,0); -private _rating = GETVAR(player,FORGE_Rating,0); -private _pending = rating player; +private _payMultiplyer = "MULTIPLYR" call BFUNC(getParamValue); +private _plyscore = rating player; +private _multiplyer = _plyscore * _payMultiplyer; -_rating = _rating + _pending; -_bank = _bank + _rating; +_bank = _bank + _multiplyer; -player addRating - _pending; +player addRating - _plyscore; // player setVariable ["FORGE_Bank", _bank]; // player setVariable ["FORGE_Rating", 0]; SETPVAR(player,FORGE_Bank,_bank); @@ -18,5 +17,7 @@ SETPVAR(player,FORGE_Rating,0); // [] call forge_client_bank_fnc_refresh; [] call FUNC(refresh); -// hint format ["Timesheet submitted! Received $%1 bonus based on rating of %2", _rating, _rating]; -[format ["Timesheet submitted! Received $%1 based on rating of %2", _rating, _rating], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file +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_withdraw.sqf b/addons/bank/functions/fnc_withdraw.sqf index eebd664..313caa9 100644 --- a/addons/bank/functions/fnc_withdraw.sqf +++ b/addons/bank/functions/fnc_withdraw.sqf @@ -13,8 +13,8 @@ if (_amount > 0 && _amount <= _bank) then { _bank = _bank - _amount; _cash = _cash + _amount; - // player setVariable ["FORGE_Bank", _bank]; - // player setVariable ["FORGE_Cash", _cash]; + // player setVariable ["FORGE_Bank", _bank, true]; + // player setVariable ["FORGE_Cash", _cash, true]; SETPVAR(player,FORGE_Bank,_bank); SETPVAR(player,FORGE_Cash,_cash); diff --git a/addons/db/functions/fnc_saveToMission.sqf b/addons/db/functions/fnc_saveToMission.sqf index 628035c..5f2035e 100644 --- a/addons/db/functions/fnc_saveToMission.sqf +++ b/addons/db/functions/fnc_saveToMission.sqf @@ -31,8 +31,6 @@ if (isNil "companyFunds") then { companyFunds = 0 }; if (isNil "companyRating") then { companyRating = 0 }; if (isNil "companyGenerals") then { companyGenerals = [] }; if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] }; -// if (isNil "forge_client_armory_arsenalUnlocks") then { forge_client_armory_arsenalUnlocks = [] }; -// if (isNil "forge_client_armory_garageUnlocks") then { forge_client_armory_garageUnlocks = [] }; if (isNil EGVAR(arsenal,armory_unlocks)) then { EGVAR(arsenal,armory_unlocks) = [[],[],[],[]] }; if (isNil EGVAR(arsenal,garage_unlocks)) then { EGVAR(arsenal,garage_unlocks) = [[],[],[],[],[],[]] }; diff --git a/addons/db/functions/fnc_saveToProfile.sqf b/addons/db/functions/fnc_saveToProfile.sqf index 820ca88..2e3a22c 100644 --- a/addons/db/functions/fnc_saveToProfile.sqf +++ b/addons/db/functions/fnc_saveToProfile.sqf @@ -66,4 +66,4 @@ if (isNull objectParent player) then { private _hashMap = createHashMapFromArray _data; // profileNamespace setVariable ["FORGE_PlayerData", _hashMap]; -SETPVAR(profileNamespace,FORGE_PlayerData,_hashMap); \ No newline at end of file +SETVAR(profileNamespace,FORGE_PlayerData,_hashMap); \ No newline at end of file diff --git a/addons/garage/functions/fnc_fetchGarage.sqf b/addons/garage/functions/fnc_fetchGarage.sqf index fff3d05..5761f65 100644 --- a/addons/garage/functions/fnc_fetchGarage.sqf +++ b/addons/garage/functions/fnc_fetchGarage.sqf @@ -8,13 +8,15 @@ private _storedVehicles = GETVAR(player,FORGE_Garage,[]); lbClear _garageList; { - _x params ["_isGarageVehicle", "_className", "_vehData"]; + // _x params ["_vehType", "_className", "_vehData"]; + _x params ["_vehType", "_className"]; private _index = -1; private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture"); _index = _garageList lbAdd _displayName; - _garageList lbSetData [_index, str [_isGarageVehicle, _className, _vehData]]; + // _garageList lbSetData [_index, str [_vehType, _className, _vehData]]; + _garageList lbSetData [_index, str [_vehType, _className]]; _garageList lbSetPicture [_index, _picture]; } forEach _storedVehicles; \ No newline at end of file diff --git a/addons/garage/functions/fnc_fetchNearby.sqf b/addons/garage/functions/fnc_fetchNearby.sqf index 1ff203e..2fb6bce 100644 --- a/addons/garage/functions/fnc_fetchNearby.sqf +++ b/addons/garage/functions/fnc_fetchNearby.sqf @@ -11,17 +11,19 @@ private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFU { if ((getPosATLVisual player) distance (_x select 1) < 20) then { { - // private _isGarageVehicle = _x getVariable ["FORGE_GarageVehicle", false]; - private _isGarageVehicle = GETVAR(_x,FORGE_GarageVehicle,false); + // private _vehType = _x getVariable ["FORGE_VehicleType", ""]; + private _vehType = GETVAR(_x,FORGE_VehicleType,""); + // private _hitPointsData = getAllHitPointsDamage _x; - if (_isGarageVehicle) then { - private _vehData = [ - getAllHitPointsDamage _x, - fuel _x, - damage _x - ]; + if (_vehType != "") then { + // private _vehData = [ + // fuel _x, + // damage _x, + // str _hitPointsData + // ]; - _temp pushBackUnique [_isGarageVehicle, typeOf _x, _vehData, netId _x]; + // _temp pushBackUnique [_vehType, typeOf _x, _vehData, netId _x]; + _temp pushBackUnique [_vehType, typeOf _x, netId _x]; } else { ["This vehicle was not spawned from the garage and cannot be stored.", "warning", 3, "right"] call EFUNC(misc,notify); }; @@ -30,13 +32,15 @@ private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFU } forEach _locations; { - _x params ["_isGarageVehicle", "_className", "_vehData", "_netID"]; + // _x params ["_vehType", "_className", "_vehData", "_netID"]; + _x params ["_vehType", "_className", "_netID"]; private _index = -1; private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture"); _index = _vehicleList lbAdd _displayName; - _vehicleList lbSetData [_index, str [_isGarageVehicle, _className, _vehData, _netID]]; + // _vehicleList lbSetData [_index, str [_vehType, _className, _vehData, _netID]]; + _vehicleList lbSetData [_index, str [_vehType, _className, _netID]]; _vehicleList lbSetPicture [_index, _picture]; } forEach _temp; \ No newline at end of file diff --git a/addons/garage/functions/fnc_spawnVehicle.sqf b/addons/garage/functions/fnc_spawnVehicle.sqf index 1ab3dd3..23d5638 100644 --- a/addons/garage/functions/fnc_spawnVehicle.sqf +++ b/addons/garage/functions/fnc_spawnVehicle.sqf @@ -11,34 +11,43 @@ ctrlEnable [IDC_SPAWNBUTTON, false]; if ((isNil { _data })) exitWith { ctrlEnable [IDC_SPAWNBUTTON, true]; }; -private _isGarageVehicle = _data select 0; +private _vehType = _data select 0; private _className = _data select 1; -private _vehData = _data select 2; +// private _vehData = _data select 2; private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData); { - if (_isGarageVehicle) exitWith { + if ((_x select 0) == _vehType) then { private _vehicle = createVehicle [_className, (_x select 1)]; + // private _fuel = _vehData select 0; + // private _damage = _vehData select 1; + // private _hitPointsData = _vehData select 2; + + // _hitPointsData = call compile _hitPointsData; + + // if (count _hitPointsData > 0) then { + // private _hitPoints = _hitPointsData select 0; + // private _damages = _hitPointsData select 2; + + // { + // _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; + // } forEach _hitPoints; + // }; - private _hitPointsData = _vehData select 0; - - if (count _hitPointsData > 0) then { - private _hitPoints = _hitPointsData select 0; - private _damages = _hitPointsData select 2; - - { - _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; - } forEach _hitPoints; - }; - { - _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; - } forEach _hitPoints; + // { + // _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; + // } forEach _hitPoints; - _vehicle setFuel _fuel; - _vehicle setDamage _damage; - // _vehicle setVariable ["FORGE_GarageVehicle", _isGarageVehicle, true]; - SETPVAR(_vehicle,FORGE_GarageVehicle,_isGarageVehicle); + + // { + // _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; + // } forEach _hitPoints; + + // _vehicle setFuel _fuel; + // _vehicle setDamage _damage; + // _vehicle setVariable ["FORGE_VehicleType", _vehType, true]; + SETPVAR(_vehicle,FORGE_VehicleType,_vehType); _vehicle setDir (_x select 2); }; } forEach _locations; @@ -50,7 +59,7 @@ _vehicleList lbSetCurSel -1; // private _garage = player getVariable ["FORGE_Garage", []]; private _garage = GETVAR(player,FORGE_Garage,[]); -private _index = _garage findIf { (_x select 0) == _isGarageVehicle && (_x select 1) == _className }; +private _index = _garage findIf { _x isEqualTo _data }; if (_index != -1) then { _garage deleteAt _index; diff --git a/addons/garage/functions/fnc_storeVehicle.sqf b/addons/garage/functions/fnc_storeVehicle.sqf index f65418f..9483603 100644 --- a/addons/garage/functions/fnc_storeVehicle.sqf +++ b/addons/garage/functions/fnc_storeVehicle.sqf @@ -11,21 +11,24 @@ ctrlEnable [IDC_STOREBUTTON, false]; if ((isNil { _data })) exitWith { ctrlEnable [IDC_STOREBUTTON, true]; }; -private _isGarageVehicle = _data select 0; +private _vehType = _data select 0; private _className = _data select 1; -private _netID = _data select 3; +private _netID = _data select 2; +// private _netID = _data select 3; private _veh = objectFromNetId _netID; -private _vehData = [ - getAllHitPointsDamage _veh, - fuel _veh, - damage _veh -]; +// private _hitPointsData = getAllHitPointsDamage _veh; +// private _vehData = [ +// fuel _veh, +// damage _veh, +// str _hitPointsData +// ]; // private _garage = player getVariable ["FORGE_Garage", []]; private _garage = GETVAR(player,FORGE_Garage,[]); -_garage pushBack [_isGarageVehicle, _className, _vehData]; +// _garage pushBack [_vehType, _className, _vehData]; +_garage pushBack [_vehType, _className]; // player setVariable ["FORGE_Garage", _garage, true]; SETPVAR(player,FORGE_Garage,_garage); diff --git a/addons/init/functions/fnc_handlePlayerLoad.sqf b/addons/init/functions/fnc_handlePlayerLoad.sqf index 9aa690e..8e4cb68 100644 --- a/addons/init/functions/fnc_handlePlayerLoad.sqf +++ b/addons/init/functions/fnc_handlePlayerLoad.sqf @@ -48,55 +48,70 @@ if (_data isEqualTo [""]) then { switch (_key) do { case "reputation": { + // player setVariable ["Reputation", _value, true]; SETPVAR(player,Reputation,_value); player addRating _value; }; case "loadout": { + // player setVariable ["Loadout", _value, true]; SETPVAR(player,Loadout,_value); player setUnitLoadout _value; }; case "direction": { + // player setVariable ["Direction", _value, true]; SETPVAR(player,Direction,_value); player setDir _value; }; case "cash": { + // player setVariable ["FORGE_Cash", _value, true]; SETPVAR(player,FORGE_Cash,_value); }; case "bank": { + // player setVariable ["FORGE_Bank", _value, true]; SETPVAR(player,FORGE_Bank,_value); }; case "armory_unlocks": { + // player setVariable ["Armory_Unlocks", _value, true]; SETPVAR(player,Armory_Unlocks,_value); }; case "garage_unlocks": { + // player setVariable ["Garage_Unlocks", _value, true]; SETPVAR(player,Garage_Unlocks,_value); }; case "locker": { + // player setVariable ["FORGE_Locker", _value, true]; SETPVAR(player,FORGE_Locker,_value); }; - case "garage": { + case "garage": { + // player setVariable ["FORGE_Garage", _value, true]; SETPVAR(player,FORGE_Garage,_value); }; case "email": { + // player setVariable ["FORGE_Email", _value, true]; SETPVAR(player,FORGE_Email,_value); }; case "number": { + // player setVariable ["FORGE_Phone_Number", _value, true]; SETPVAR(player,FORGE_Phone_Number,_value); }; case "paygrade": { + // player setVariable ["Paygrade", _value, true]; SETPVAR(player,Paygrade,_value); }; case "stance": { + // player setVariable ["Stance", _value, true]; SETPVAR(player,Stance,_value); player playAction _value; }; case "holster": { + // player setVariable ["FORGE_Holster_Weapon", _value, true]; SETPVAR(player,FORGE_Holster_Weapon,_value); if (_value) then { [player] call AFUNC(weaponselect,putWeaponAway); }; }; case "position": { + // player setVariable ["Position", _value, true]; SETPVAR(player,Position,_value); player setPosASL _value; @@ -112,6 +127,7 @@ if (_data isEqualTo [""]) then { }; if (needReload player == 1) then { reload player }; + // player setVariable ["value_loadDone", true, true]; SETPVAR(player,value_loadDone,true); // ["listrng", GETVAR(player,FORGE_Email,_defaultEmail), "", -1, [], "forge_client_phone_fnc_addOfflineEmail", true] spawn dragonfly_db_fnc_addTask; diff --git a/addons/init/functions/fnc_initPlayer.sqf b/addons/init/functions/fnc_initPlayer.sqf index 0c3ae0d..1e5c9b0 100644 --- a/addons/init/functions/fnc_initPlayer.sqf +++ b/addons/init/functions/fnc_initPlayer.sqf @@ -40,9 +40,11 @@ removeBackpack player; removeGoggles player; removeHeadgear player; -SETVAR(player,value_loadDone,false); +// player setVariable ["value_loadDone", false, true]; +SETPVAR(player,value_loadDone,false); cutText ["Loading In...", "BLACK", 1]; +// waitUntil { player getVariable ["value_armoryDone", false] }; // waitUntil { GETVAR(player,value_armoryDone,false) }; // ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask; @@ -51,6 +53,7 @@ cutText ["Loading In...", "BLACK", 1]; [] spawn FUNC(playerSaveLoop); [] spawn EFUNC(interaction,initInteraction); +// waitUntil { player getVariable ["value_loadDone", false] }; waitUntil { GETVAR(player,value_loadDone,false) }; cutText ["", "PLAIN", 1]; diff --git a/addons/misc/functions/fnc_formatNumber.sqf b/addons/misc/functions/fnc_formatNumber.sqf index db3191b..c35f46d 100644 --- a/addons/misc/functions/fnc_formatNumber.sqf +++ b/addons/misc/functions/fnc_formatNumber.sqf @@ -12,13 +12,15 @@ _arr = toArray(_arr select 0); reverse _arr; { - if (_count == 3) then { - _count = 0; - _str = PX_TH_SEP + _str; - }; + if (_count == 3) then { + _count = 0; + _str = PX_TH_SEP + _str; + }; - _str = toString[_x] + _str; - _count = _count + 1; + _str = toString[_x] + _str; + _count = _count + 1; - true -} count _arr \ No newline at end of file + true +} count (_arr); + +_str \ No newline at end of file diff --git a/addons/money/functions/fnc_giveCashSubmit.sqf b/addons/money/functions/fnc_giveCashSubmit.sqf index 578d2c9..1b1ce9f 100644 --- a/addons/money/functions/fnc_giveCashSubmit.sqf +++ b/addons/money/functions/fnc_giveCashSubmit.sqf @@ -31,6 +31,8 @@ params ["_target", "_player"]; private _amount = parseNumber (ctrlText 1401); +// private _playerCash = player getVariable ["FORGE_Cash", 0]; +// private _targetCash = _target getVariable ["FORGE_Cash", 0]; private _playerCash = GETVAR(player,FORGE_Cash,0); private _targetCash = GETVAR(_target,FORGE_Cash,0); @@ -39,6 +41,7 @@ if (_amount > 0) then { private _newCash = _targetCash + _amount; private _formattedAmount = (_amount) call EFUNC(misc,formatNumber); + // _target setVariable ["FORGE_Cash", _newCash, true]; SETPVAR(_target,FORGE_Cash,_newCash); ["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2]; diff --git a/addons/money/functions/fnc_takeCash.sqf b/addons/money/functions/fnc_takeCash.sqf index eb52eec..f597e50 100644 --- a/addons/money/functions/fnc_takeCash.sqf +++ b/addons/money/functions/fnc_takeCash.sqf @@ -29,9 +29,11 @@ params ["_ct"]; +// private _amount = _ct getVariable ["FORGE_Cash", 0]; private _amount = GETVAR(_ct,FORGE_Cash,0); ["advance", "Cash", _amount] call forge_server_money_fnc_handleMoney; +// _ct setVariable ["FORGE_Cash", nil, true]; SETPVAR(_ct,FORGE_Cash,nil); deleteVehicle _ct; \ No newline at end of file diff --git a/addons/phone/functions/fnc_viewSettings.sqf b/addons/phone/functions/fnc_viewSettings.sqf index ec86ff4..460edc1 100644 --- a/addons/phone/functions/fnc_viewSettings.sqf +++ b/addons/phone/functions/fnc_viewSettings.sqf @@ -41,10 +41,10 @@ _ctrl02 ctrlAddEventHandler ["ButtonClick", { lbClear _ctrl01; -private _mC = "FORGE_CfgPhones"; -private _themes = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "themes"); -private _notifications = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "notifications"); -private _ringtones = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "ringtones"); +private _mC = "CfgPhone"; +private _themes = "true" configClasses (missionConfigFile >> "CfgPhone" >> "themes"); +private _notifications = "true" configClasses (missionConfigFile >> "CfgPhone" >> "notifications"); +private _ringtones = "true" configClasses (missionConfigFile >> "CfgPhone" >> "ringtones"); { private _configName = configName(_x); diff --git a/addons/player/functions/fnc_firstLogin.sqf b/addons/player/functions/fnc_firstLogin.sqf index 7b38321..77d6d22 100644 --- a/addons/player/functions/fnc_firstLogin.sqf +++ b/addons/player/functions/fnc_firstLogin.sqf @@ -38,6 +38,9 @@ _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); @@ -45,14 +48,19 @@ 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 = [ @@ -76,8 +84,8 @@ uiSleep 1; [_phoneNumber, ["Field Cmdr", _x]] remoteExec ["forge_server_phone_fnc_addMsg", 2, false]; } forEach _messages; -private _armory_unlocks = [["FORGE_Phone", 0], ["FORGE_Tablet", 0], ["ItemCompass", 0], ["ItemGPS", 0], ["ItemMap", 0], ["ItemRadio", 0], ["ItemWatch", 0], ["U_BG_Guerrilla_6_1", 0], ["V_Rangemaster_belt", 0], ["hgun_P07_F", 1], ["16Rnd_9x21_Mag", 2]]; -private _garage_unlocks = [["B_Quadbike_01_F", 0]]; +private _armory_unlocks = [["FORGE_Phone", "item"], ["FORGE_Tablet", "item"], ["ItemCompass", "item"], ["ItemGPS", "item"], ["ItemMap", "item"], ["ItemRadio", "item"], ["ItemWatch", "item"], ["U_BG_Guerrilla_6_1", "item"], ["V_Rangemaster_belt", "item"], ["hgun_P07_F", "weapon"], ["16Rnd_9x21_Mag", "magazine"]]; +private _garage_unlocks = [["B_Quadbike_01_F", "car"]]; { private _classname = _x select 0; @@ -103,7 +111,8 @@ uiSleep 1; uiSleep 1; [] call EFUNC(init,playerDBSave); -SETVAR(_player,value_loadDone,true); +// player setVariable ["value_loadDone", true, true]; +SETPVAR(_player,value_loadDone,true); uiSleep 1; // ["listrng", _phoneEmail, "", -1, [], "forge_client_phone_fnc_addEmail", true, netId _player] spawn dragonfly_db_fnc_addTask; diff --git a/addons/service/XEH_PREP.hpp b/addons/service/XEH_PREP.hpp index f0c52f2..37d8f48 100644 --- a/addons/service/XEH_PREP.hpp +++ b/addons/service/XEH_PREP.hpp @@ -1,5 +1,5 @@ PREP(fuel); -PREP(init); +PREP(initService); PREP(rearm); PREP(refuel); PREP(repair); diff --git a/addons/service/functions/fnc_init.sqf b/addons/service/functions/fnc_initService.sqf similarity index 100% rename from addons/service/functions/fnc_init.sqf rename to addons/service/functions/fnc_initService.sqf diff --git a/addons/store/functions/fnc_buyItem.sqf b/addons/store/functions/fnc_buyItem.sqf index e388c4a..f9b9dee 100644 --- a/addons/store/functions/fnc_buyItem.sqf +++ b/addons/store/functions/fnc_buyItem.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -params ["_item", "_price", "_configType", "_itemType"]; +params ["_className", "_price", "_configType", "_itemType"]; private _displayName = ""; // private _locker = player getVariable ["FORGE_Locker", []]; @@ -10,26 +10,26 @@ if !([_price] call FUNC(handlePurchase)) exitWith {}; switch (_configType) do { case "item": { - _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); - _locker pushBack [_itemType, _item]; + _displayName = getText (configFile >> "CfgWeapons" >> _className >> "displayName"); + _locker pushBack [_itemType, _className]; }; case "weapon": { - _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); - _locker pushBack [_itemType, _item]; + _displayName = getText (configFile >> "CfgWeapons" >> _className >> "displayName"); + _locker pushBack [_itemType, _className]; }; case "magazine": { - _displayName = getText (configFile >> "CfgMagazines" >> _item >> "displayName"); - _locker pushBack [_itemType, [_item, getNumber (configFile >> "CfgMagazines" >> _item >> "count"), getNumber (configFile >> "CfgMagazines" >> _item >> "count")]]; + _displayName = getText (configFile >> "CfgMagazines" >> _className >> "displayName"); + _locker pushBack [_itemType, [_className, getNumber (configFile >> "CfgMagazines" >> _className >> "count"), getNumber (configFile >> "CfgMagazines" >> _className >> "count")]]; }; case "backpack": { - _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); - _locker pushBack [_itemType, _item]; + _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); + _locker pushBack [_itemType, _className]; }; }; // player setVariable ["FORGE_Locker", _locker, true]; SETPVAR(player,FORGE_Locker,_locker); -[_item, _itemType] call EFUNC(armory,addItemArmory); +[_className, _itemType] call EFUNC(armory,addArmoryItem); [format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/store/functions/fnc_buyVehicle.sqf b/addons/store/functions/fnc_buyVehicle.sqf index 7514873..3313ea4 100644 --- a/addons/store/functions/fnc_buyVehicle.sqf +++ b/addons/store/functions/fnc_buyVehicle.sqf @@ -1,19 +1,20 @@ #include "..\script_component.hpp" -params ["_item", "_price", "_itemType"]; +params ["_className", "_price", "_vehicleType"]; -private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); +private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); // private _garage = player getVariable ["FORGE_Garage", []]; private _garage = GETVAR(player,FORGE_Garage,[]); -private _itemData = [[], 1, 0]; +// private _vehicleData = [1, 0, []]; if !([_price] call FUNC(handlePurchase)) exitWith {}; -_garage pushBack [true, _item, _itemData]; +// _garage pushBack [_vehicleType, _className, _vehicleData]; +_garage pushBack [_vehicleType, _className]; // player setVariable ["FORGE_Garage", _garage, true]; SETPVAR(player,FORGE_Garage,_garage); -[_item, _itemType] call EFUNC(armory,addVehArmory); +[_className, _vehicleType] call EFUNC(arsenal,addGarageVehicle); [format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file diff --git a/a3f_client_version.json b/forge_client_version.json similarity index 100% rename from a3f_client_version.json rename to forge_client_version.json