2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-09-21 16:37:19 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Initialized the assigned item fix.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* call ace_common_fnc_assignedItemFix
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-09-21 16:37:19 +00:00
|
|
|
*/
|
|
|
|
|
2018-04-15 10:59:14 +00:00
|
|
|
ACE_isMapEnabled = getMissionConfigValue ["showMap", 1] in [true, 1];
|
|
|
|
ACE_isCompassEnabled = getMissionConfigValue ["showCompass", 1] in [true, 1];
|
|
|
|
ACE_isWatchEnabled = getMissionConfigValue ["showWatch", 1] in [true, 1];
|
|
|
|
ACE_isRadioEnabled = getMissionConfigValue ["showRadio", 1] in [true, 1];
|
|
|
|
ACE_isGPSEnabled = getMissionConfigValue ["showGPS", 1] in [true, 1];
|
2015-09-21 16:37:19 +00:00
|
|
|
|
|
|
|
GVAR(AssignedItems) = [];
|
|
|
|
GVAR(AssignedItemsInfo) = [];
|
|
|
|
GVAR(AssignedItemsShownItems) = [
|
|
|
|
ACE_isMapEnabled,
|
|
|
|
ACE_isCompassEnabled,
|
|
|
|
ACE_isWatchEnabled,
|
|
|
|
ACE_isRadioEnabled,
|
|
|
|
ACE_isGPSEnabled
|
|
|
|
];
|
|
|
|
|
2016-06-21 23:39:20 +00:00
|
|
|
["loadout", {
|
2016-05-16 13:22:37 +00:00
|
|
|
params ["_unit"];
|
2015-09-21 16:37:19 +00:00
|
|
|
|
2016-05-16 13:22:37 +00:00
|
|
|
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
2016-05-14 08:49:09 +00:00
|
|
|
|
|
|
|
GVAR(AssignedItemsShownItems) = [
|
2021-12-18 23:15:32 +00:00
|
|
|
((_assignedItems select 0) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"},
|
|
|
|
((_assignedItems select 3) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 3 >> "ACE_hideItemType") != "compass"},
|
|
|
|
((_assignedItems select 4) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 4 >> "ACE_hideItemType") != "watch"},
|
|
|
|
((_assignedItems select 2) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 2 >> "ACE_hideItemType") != "radio"},
|
|
|
|
((_assignedItems select 1) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 1 >> "ACE_hideItemType") != "gps"}
|
2016-05-14 08:49:09 +00:00
|
|
|
];
|
2015-09-21 16:37:19 +00:00
|
|
|
|
|
|
|
GVAR(AssignedItemsShownItems) params ["_showMap", "_showCompass", "_showWatch", "_showRadio", "_showGPS"];
|
|
|
|
|
|
|
|
showMap _showMap;
|
|
|
|
showCompass _showCompass;
|
|
|
|
showWatch _showWatch;
|
|
|
|
showRadio _showRadio;
|
|
|
|
showGPS (_showGPS || {cameraOn == getConnectedUAV _unit}); //If player is activly controling a UAV, showGPS controls showing the map (m key)
|
2016-06-21 23:39:20 +00:00
|
|
|
}] call CBA_fnc_addPlayerEventHandler;
|