Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions cScripts/functions/gear/fn_gear_applyCosmetics.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ if (!isNil{GETVAR(player,EGVAR(Unit,Name),nil)}) then {
};

// Player Rank to ingame rank
if (EGVAR(Settings,setPlayerRank)) then {
if (!isNil{GETVAR(player,EGVAR(Unit,Rank),nil)}) then {
private _rank = [player] call EFUNC(player,getRank);
SETVAR(player,EGVAR(Unit,Rank),_rank);
};
if (!isNil{GETVAR(player,EGVAR(Unit,Rank),nil)}) then {
private _rank = [player] call EFUNC(player,getRank);
SETVAR(player,EGVAR(Unit,Rank),_rank);
};

// Team Color
Expand All @@ -34,14 +32,12 @@ if (!isNil{GETVAR(player,EGVAR(Unit,TeamColor),nil)}) then {
};

// Apply squad insignia
if (EGVAR(Settings,allowInsigniaApplication)) then {
private _insignia = if (call EFUNC(profile,loadInsignia) != "") then {
call EFUNC(profile,loadInsignia);
} else {
call EFUNC(unit,getSquadInsignia);
};
[{
params ["_insignia"];
[player, _insignia, false] call EFUNC(unit,setInsignia);
}, [_insignia], 2] call CBA_fnc_waitAndExecute;
};
private _insignia = if (QEGVAR(Settings,allowProfileSavedInsignia) && (call EFUNC(profile,loadInsignia) != "")) then {
call EFUNC(profile,loadInsignia);
} else {
call EFUNC(unit,getSquadInsignia);
};
[{
params ["_insignia"];
[player, _insignia, false] call EFUNC(unit,setInsignia);
}, [_insignia], 2] call CBA_fnc_waitAndExecute;
10 changes: 4 additions & 6 deletions cScripts/functions/gear/fn_gear_applyFunctions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ if (EGVAR(Settings,enableRadios)) then {


// Earplugs
if (EGVAR(Settings,addEarplugs)) then {
if !([player] call ace_hearing_fnc_hasEarPlugsIn) then {
[{
[_this select 0] call ace_hearing_fnc_putInEarplugs;
}, [player]] call CBA_fnc_execNextFrame;
};
if !([player] call ace_hearing_fnc_hasEarPlugsIn) then {
[{
[_this select 0] call ace_hearing_fnc_putInEarplugs;
}, [player]] call CBA_fnc_execNextFrame;
};


Expand Down
1 change: 1 addition & 0 deletions cScripts/functions/players/fn_unit_setInsignia.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ params [

if (!isPlayer _unit) exitWith {};
if (!_save) exitWith {};
if (!QEGVAR(Settings,allowProfileSavedInsignia)) exitWith {};

[_insignia] call EFUNC(profile,saveInsignia);
48 changes: 7 additions & 41 deletions cScripts/initSettings.inc.sqf
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
private _cScriptSettings = "cScripts Mission Settings";

// 1; Mission
[ // Mission Type
QEGVAR(Settings,setMissionType),
"LIST",
["Mission Type", "This will deside on what kind of startup hint you get on mission start."],
[_cScriptSettings, "1; Mission"],
[[0,1,2,3], ["Custom", "Operation", "Training", "Public"], 1],
true,
{},
true
] call CBA_fnc_addSetting;
[ // Ai setting
QEGVAR(Settings,setAiSystemDifficulty),
"LIST",
Expand Down Expand Up @@ -76,16 +66,6 @@ private _cScriptSettings = "cScripts Mission Settings";
{},
true
] call CBA_fnc_addSetting;
[ // Rank
QEGVAR(Settings,setPlayerRank),
"CHECKBOX",
["Rank","Allow mission to apply arma rank based on name rank prefixes."],
[_cScriptSettings, "3; Player"],
true,
true,
{},
true
] call CBA_fnc_addSetting;
[ // Tagging
QEGVAR(Settings,allowCustomTagging),
"CHECKBOX",
Expand All @@ -97,27 +77,16 @@ private _cScriptSettings = "cScripts Mission Settings";
true
] call CBA_fnc_addSetting;
[ // Insignia
QEGVAR(Settings,allowInsigniaApplication),
"CHECKBOX",
["Insignia","Automaticly apply insignias based on squad name."],
[_cScriptSettings, "3; Player"],
true,
true,
{},
true
] call CBA_fnc_addSetting;
[ // Apply Earplugs
QEGVAR(Settings,addEarplugs),
QEGVAR(Settings,allowProfileSavedInsignia),
"CHECKBOX",
["Apply Earplugs","Automaticly apply earplugs to players on spawn and respawn."],
["Insignia","Automaticly apply insignia saved on your user profile."],
[_cScriptSettings, "3; Player"],
true,
true,
false,
{},
true
false
] call CBA_fnc_addSetting;


// 4; Staging
[ // Enable
QEGVAR(Settings,enableStagingSystem),
Expand All @@ -127,7 +96,7 @@ private _cScriptSettings = "cScripts Mission Settings";
true,
true,
{},
false
true
] call CBA_fnc_addSetting;
[ // Show all loadouts
QEGVAR(Settings,showAllLoadouts),
Expand All @@ -136,10 +105,7 @@ private _cScriptSettings = "cScripts Mission Settings";
[_cScriptSettings, "4; Staging"],
false,
true,
{
params ["_value"];
{ EGVAR(Staging,showAllLoadouts) = _value; } remoteExecCall ["call"];
},
{},
false
] call CBA_fnc_addSetting;
[ // Use Filtered Arsenal
Expand Down Expand Up @@ -278,7 +244,7 @@ private _cScriptSettings = "cScripts Mission Settings";
[[0,1,2], ["None", "Basic", "Advanced"], 2],
true,
{},
true
false
] call CBA_fnc_addSetting;
[ // Include Night Vision Googles
QEGVAR(Settings,jumpSimulationNVG),
Expand Down