Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam McKendrick committed Aug 13, 2023
2 parents ea38d7a + 8f76ef5 commit adce1ab
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ texHeaders.bin
Thumbs.db
ArmaScriptCompiler.exe
hemtt.exe
*.env

# VS extraneous build shit
extensions/builds/*.exp
Expand Down
9 changes: 9 additions & 0 deletions addons/ace/XEH_clientPostInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ if (
// Player Self Actions
call FUNC(playerActions);
call FUNC(zeusActions);

if (GET_CONFIG(enableManageKit,true) && GET_CONFIG(enableKitAutosave,true)) then {
GVAR(arsenalClosedEH) = ["ace_arsenal_displayClosed", {
if ((player getVariable [QEGVAR(core,savedLoadout), []]) isEqualTo []) then {
player setVariable [QEGVAR(core,savedLoadout), getUnitLoadout player];
hint "Kit saved automatically. Will be loaded on respawn.";
};
}] call CBA_fnc_addEventHandler;
};
2 changes: 1 addition & 1 deletion addons/ace/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED ACE
#include "\z\sia3f\addons\main\script_mod.hpp"

#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

Expand Down
8 changes: 8 additions & 0 deletions addons/configuration/FrameworkSettings/aceActionOptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class GVAR(aceActionOptions) {
defaultValue = true;
};

class GVAR(enableKitAutosave) {
displayName = "Loadout Autosave";
tooltip = "Autosave player loadout when exiting arsenal";
property = QGVAR(enableKitAutosave);
control = "Checkbox";
defaultValue = true;
};

class GVAR(enableLoadoutInfo) {
displayName = "Loadout Information";
tooltip = "Enable 'Update Loadout Info' on ACE Buttons";
Expand Down
1 change: 1 addition & 0 deletions addons/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This will define all of the variables that can be used with ``GET_CONFIG(var,def
|enableTPMenu|Teleport Menu|If checked, the teleport menu will be enabled on the ACE Buttons, allowing players to teleport to any other player on their side.|Boolean|True|
|enableTPToSquad|Teleport to Squad|If checked, players can TP to their squad member (leader if available, then random-ish) via the ACE Buttons.|Boolean|True|
|enableManageKit|Kit Manager|If checked, players can save/load their kits on ACE Buttons, which are then loaded on respawn.|Boolean|True|
|enableKitAutosave|Loadout Autosave|If checked, the player's loadout will be automatically saved upon exiting the arsenal. Will not overwrite a saved kit.|Boolean|True|
|enableLoadoutInfo|Loadout Information|Enables players to update the briefing loadout info on ACE Buttons.|Boolean|True|
|enableGoAFK|Go AFK|Enables players to go AFK via the self-interact menu.|Boolean|True|
|**Briefing Additional Settings**|
Expand Down
2 changes: 1 addition & 1 deletion addons/configuration/display3DEN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class display3DEN { // https://community.bistudio.com/wiki/Eden_Editor:_Configur
};

class GVAR(frameworkMeta) {
text = "Framework Version 1.0.1";
text = "Framework Version 1.0.2";
picture = "\a3\3DEN\Data\Controls\ctrlMenu\link_ca.paa";
weblink = "https://github.com/Soliders-in-Arms-Arma-3-Group/sia3f";
opensNewWindow = 1;
Expand Down
2 changes: 1 addition & 1 deletion addons/configuration/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED Configuration
#include "\z\sia3f\addons\main\script_mod.hpp"

#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

Expand Down
16 changes: 9 additions & 7 deletions addons/core/functions/fnc_briefing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ private _signalText = [GET_CONFIG(signalTabText,"")] call FUNC(formatBriefing);

TRACE_5("briefing content",_situationText,_missionText,_executionText,_supportText,_signalText);

player createDiaryRecord ["Diary", [GET_CONFIG(signalTabName,"Signal"), _signalText]];
private _record = player createDiaryRecord ["Diary", [GET_CONFIG(supportTabName,"Support"), _supportText]];
player createDiaryRecord ["Diary", [GET_CONFIG(execTabName,"Execution"), _executionText]];
player createDiaryRecord ["Diary", [GET_CONFIG(missionTabName,"Mission"), _missionText]];
player createDiaryRecord ["Diary", [GET_CONFIG(situationTabName,"Situation"), _situationText]];
if !(_signalText isEqualTo "") then { player createDiaryRecord ["Diary", [GET_CONFIG(signalTabName,"Signal"), _signalText]]; };
private "_record";
if !(_supportText isEqualTo "" && _vehicles isEqualTo []) then { _record = player createDiaryRecord ["Diary", [GET_CONFIG(supportTabName,"Support"), _supportText]]; };
if !(_executionText isEqualTo "") then { player createDiaryRecord ["Diary", [GET_CONFIG(execTabName,"Execution"), _executionText]]; };
if !(_missionText isEqualTo "") then { player createDiaryRecord ["Diary", [GET_CONFIG(missionTabName,"Mission"), _missionText]]; };
if !(_situationText isEqualTo "") then { player createDiaryRecord ["Diary", [GET_CONFIG(situationTabName,"Situation"), _situationText]]; };

if (isNil "_vehicles") exitWith { LOG_FUNC_END_ERROR("nil _vehicles"); };
if (_vehicles isEqualTo []) exitWith { LOG_FUNC_END_ERROR("no support vehicles to add"); };

_supportText = _supportText + "<br></br><br></br><font face='PuristaBold' color='#FFB84C'>Vehicle Assets</font><font face='PuristaLight'> (Automatically Generated by the SIA Framework)</font>:<br></br><br></br>" + ([_vehicles, _record] call FUNC(vehicleInfo));
if !(_supportText isEqualTo "") then { _supportText = _supportText + "<br></br><br></br>"; };
_supportText = _supportText + "<font face='PuristaBold' color='#FFB84C'>Vehicle Assets</font><font face='PuristaLight'> (Automatically Generated by the SIA Framework)</font>:<br></br><br></br>" + ([_vehicles, _record] call FUNC(vehicleInfo));
player setDiaryRecordText [["Diary", _record], [GET_CONFIG(supportTabName,"Support"), _supportText]];

LOG_FUNC_END;
2 changes: 1 addition & 1 deletion addons/core/functions/fnc_formatBriefing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ private _strArr = _str splitString "";
{
if (_x == _newlineChar) then {
_strArr set [_forEachIndex, "<br></br>"];
TRACE_2("character replaced with newline",_forEachIndex,_x);
};
} forEach _strArr; // there should be a more efficient way to do this than iterating through the entire array, which could possibly have thousands of indexes elements.

// ToDo: colors, bold, images?, etc.
private _returnStr = _strArr joinString "";
TRACE_1("string returned",_returnStr);
INFO("fnc_formatBriefing.sqf fully executed.");

LOG_FUNC_END;
_returnStr
1 change: 1 addition & 0 deletions addons/core/functions/fnc_vehicleInfo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ params [

if (_vehicles isEqualTo []) exitWith {
LOG_FUNC_END_ERROR("invalid parameters or no vehicles to add");
""
}; // Exit if array not given.
LOG_FUNC_START;

Expand Down
1 change: 1 addition & 0 deletions addons/core/functions/fnc_vehicleInfoTab.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ if (!(player diarySubjectExists _newDiarySubject)) then { player createDiarySubj

TRACE_3("diary record values"_displayName,_text,_icon);
private _retValue = player createDiaryRecord ["vehicleInfo", [_displayName, _text, _icon]];

LOG_FUNC_END;
_retValue
2 changes: 1 addition & 1 deletion addons/core/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED Core
#include "\z\sia3f\addons\main\script_mod.hpp"

#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED Main
#include "\z\sia3f\addons\main\script_mod.hpp"

#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

Expand Down
4 changes: 2 additions & 2 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 0
#define PATCHLVL 1
#define BUILD 4
#define PATCHLVL 2
#define BUILD 5
6 changes: 6 additions & 0 deletions addons/radio/functions/fnc_reorderMPTT.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ if (!_hasRadio) exitWith {
};

private _radio = [_radioType] call acre_api_fnc_getRadioByType;

if (isNil "_radio") exitWith {
LOG_FUNC_END_ERROR("radio could not be found");
ERROR_1("%1 radio type could not be found on player",_radioType);
};

private _mptt = [] call acre_api_fnc_getMultiPushToTalkAssignment;
private _index = _mptt find _radio;
TRACE_3("ACRE Reorder MPTT vars",_radio,_mptt,_index);
Expand Down
2 changes: 1 addition & 1 deletion addons/radio/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED Radio
#include "\z\sia3f\addons\main\script_mod.hpp"

#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

Expand Down

0 comments on commit adce1ab

Please sign in to comment.