From 872857c257679fd0b86015cf878644c384cd4fba Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 4 Jan 2025 19:25:56 -0600 Subject: [PATCH] Major Hotfix 01042025@1925 --- .hemtt/project.toml | 17 ++++++++ addons/init/functions/fnc_serverSetup.sqf | 2 +- addons/main/config.cpp | 5 +++ addons/main/functions/fnc_writeRPT.sqf | 2 +- .../save/functions/fnc_handleDisconnect.sqf | 43 ++++++++++++++----- ..._version.json => forge_server_version.json | 0 include/a3/ui_f/hpp/defineResincl.inc | 2 +- 7 files changed, 57 insertions(+), 14 deletions(-) rename a3f_server_version.json => forge_server_version.json (100%) diff --git a/.hemtt/project.toml b/.hemtt/project.toml index 424fe8d..732f01e 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -2,3 +2,20 @@ name = "FORGE Server" author = "IDSolutions" prefix = "forge_server" mainprefix = "z" + +[files] +include = [ + "*.dll", + "*.so", + "*.json", + "mod.cpp", + "README.md", + "LICENSE", + "icon_64_ca.paa", + "icon_128_ca.paa", + "icon_128_highlight_ca.paa", + "title_co.paa" +] + +[version] +git_hash = 0 \ No newline at end of file diff --git a/addons/init/functions/fnc_serverSetup.sqf b/addons/init/functions/fnc_serverSetup.sqf index 5719f76..9e67680 100644 --- a/addons/init/functions/fnc_serverSetup.sqf +++ b/addons/init/functions/fnc_serverSetup.sqf @@ -3,7 +3,7 @@ value_serverDone = false; publicVariable "value_serverDone"; -diag_log "Executing SOF Server Side Functions..."; +diag_log "Executing FORGE Server Side Functions..."; [] call EFUNC(save,handleDisconnect); diag_log "Server Handle Disconnect Initialized."; diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 968131c..86128d2 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -10,6 +10,11 @@ class CfgPatches { authors[] = {"J. Schmidt", "Creedcoder"}; author = "IDSolutions"; VERSION_CONFIG; + + serverSaveLoop = 0; + serverSaveLoopTime = 30; + companyGenerals[] = {"76561198027566824"}; + AISkill = 0.8; }; }; diff --git a/addons/main/functions/fnc_writeRPT.sqf b/addons/main/functions/fnc_writeRPT.sqf index d8b830e..a8d5873 100644 --- a/addons/main/functions/fnc_writeRPT.sqf +++ b/addons/main/functions/fnc_writeRPT.sqf @@ -20,7 +20,7 @@ params ["_msg", "_syschatEnabled"]; -private _text = format ["[SOF] %1", _msg]; +private _text = format ["[FORGE] %1", _msg]; [_text] call CFUNC(log); diff --git a/addons/save/functions/fnc_handleDisconnect.sqf b/addons/save/functions/fnc_handleDisconnect.sqf index 6254620..a9ae70c 100644 --- a/addons/save/functions/fnc_handleDisconnect.sqf +++ b/addons/save/functions/fnc_handleDisconnect.sqf @@ -22,31 +22,52 @@ addMissionEventHandler ["HandleDisconnect", { private _unit = _this select 0; private _uid = _this select 2; + private _default_armory_unlocks = [[],[],[],[]]; + private _default_garage_unlocks = [[],[],[],[],[],[]]; + private _data = [ _uid, - "armory_unlocks", [_unit getVariable ["Armory_Unlocks", [[],[],[],[]]]], - "garage_unlocks", [_unit getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]]], - "locker", [_unit getVariable ["FORGE_Locker", []]], - "garage", [_unit getVariable ["FORGE_Garage", []]], - "cash", [_unit getVariable ["FORGE_Cash", 0]], - "bank", [_unit getVariable ["FORGE_Bank", 0]], - "number", [_unit getVariable ["FORGE_Phone_Number", "unknown"]], - "email", [_unit getVariable ["FORGE_Email", "unknown@spearnet.mil"]], - "paygrade", [_unit getVariable ["Paygrade", "E1"]], + // "armory_unlocks", [_unit getVariable ["Armory_Unlocks", _default_armory_unlocks]], + // "garage_unlocks", [_unit getVariable ["Garage_Unlocks", _default_garage_unlocks]], + "armory_unlocks", [GETVAR(_unit,Armory_Unlocks,_default_armory_unlocks)], + "garage_unlocks", [GETVAR(_unit,Garage_Unlocks,_default_garage_unlocks)], + // "locker", [_unit getVariable ["FORGE_Locker", []]], + // "garage", [_unit getVariable ["FORGE_Garage", []]], + "locker", [GETVAR(_unit,FORGE_Locker,[])], + "garage", [GETVAR(_unit,FORGE_Garage,[])], + // "cash", [_unit getVariable ["FORGE_Cash", 0]], + // "bank", [_unit getVariable ["FORGE_Bank", 0]], + "cash", [GETVAR(_unit,FORGE_Cash,0)], + "bank", [GETVAR(_unit,FORGE_Bank,0)], + // "number", [_unit getVariable ["FORGE_Phone_Number", "unknown"]], + // "email", [_unit getVariable ["FORGE_Email", "unknown@spearnet.mil"]], + "number", [GETVAR(_unit,FORGE_Phone_Number,"unknown")], + "email", [GETVAR(_unit,FORGE_Email,"unknown@spearnet.mil")], + // "paygrade", [_unit getVariable ["Paygrade", "E1"]], + "paygrade", [GETVAR(_unit,Paygrade,"E1")], "reputation", [rating _unit], "loadout", [getUnitLoadout _unit], - "holster", [_unit getVariable ["FORGE_Holster_Weapon", true]], + // "holster", [_unit getVariable ["FORGE_Holster_Weapon", true]], + "holster", [GETVAR(_unit,FORGE_Holster_Weapon,true)], "position", [getPosASLVisual _unit], "direction", [getDirVisual _unit] ]; - if (vehicle _unit == _unit) then { + // if (vehicle _unit == _unit) then { + // _data pushBack "currentWeapon"; + // _data pushBack [currentMuzzle _unit]; + // _data pushBack "stance"; + // _data pushBack [stance _unit]; + // }; + if (isNull objectParent _unit) then { _data pushBack "currentWeapon"; _data pushBack [currentMuzzle _unit]; _data pushBack "stance"; _data pushBack [stance _unit]; }; + diag_log format ["Saving Player: %1", _data]; + // ["hsetidbulk", "", "", -1, _data, "", false] call dragonfly_db_fnc_addTask; ["hsetidbulk", "", "", -1, _data, "", false] remoteExecCall ["dragonfly_db_fnc_addTask", 2, false]; diff --git a/a3f_server_version.json b/forge_server_version.json similarity index 100% rename from a3f_server_version.json rename to forge_server_version.json diff --git a/include/a3/ui_f/hpp/defineResincl.inc b/include/a3/ui_f/hpp/defineResincl.inc index 818fd43..986ac0d 100644 --- a/include/a3/ui_f/hpp/defineResincl.inc +++ b/include/a3/ui_f/hpp/defineResincl.inc @@ -2683,7 +2683,7 @@ enum #define IDC_MP_SCORE_TABLE_ORDER 106 #define IDC_MP_SCORE_TABLE_PLAYERSNAME 107 #define IDC_MP_SCORE_TABLE_KILLS_INF 108 -#define IDC_MP_SCORE_TABLE_KILLS_SOFT 109 +#define IDC_MP_SCORE_TABLE_KILLS_FORGET 109 #define IDC_MP_SCORE_TABLE_KILLS_ARMOR 110 #define IDC_MP_SCORE_TABLE_KILLS_AIR 111 #define IDC_MP_SCORE_TABLE_KILLED 112