diff --git a/functions/Other/fn_natoSymbolHelper.sqf b/functions/Other/fn_natoSymbolHelper.sqf new file mode 100644 index 0000000..1572017 --- /dev/null +++ b/functions/Other/fn_natoSymbolHelper.sqf @@ -0,0 +1,67 @@ +if(!hasInterface) exitWith {}; + +_colorConfigBlufor = [ + (profilenamespace getvariable ['Map_BLUFOR_R',0]), + (profilenamespace getvariable ['Map_BLUFOR_G',1]), + (profilenamespace getvariable ['Map_BLUFOR_B',1]), + (profilenamespace getvariable ['Map_BLUFOR_A',0.8]) +]; + +_colorConfigOpfor = [ + (profilenamespace getvariable ['Map_OPFOR_R',0]), + (profilenamespace getvariable ['Map_OPFOR_G',1]), + (profilenamespace getvariable ['Map_OPFOR_B',1]), + (profilenamespace getvariable ['Map_OPFOR_A',0.8]) +]; + +_colorConfigIndependent = [ + (profilenamespace getvariable ['Map_Independent_R',0]), + (profilenamespace getvariable ['Map_Independent_G',1]), + (profilenamespace getvariable ['Map_Independent_B',1]), + (profilenamespace getvariable ['Map_Independent_A',0.8]) +]; + +_colorBluforHex = _colorConfigBlufor call BIS_fnc_colorRGBAtoHTML; +_colorOpforHex = _colorConfigOpfor call BIS_fnc_colorRGBAtoHTML; +_colorIndependentHex = _colorConfigIndependent call BIS_fnc_colorRGBAtoHTML; + +_prefix = "b"; +_color = _colorBluforHex; + +if (side player isEqualTo east) then { + _prefix = "o"; + _color = _colorOpforHex; +} else { + if (side player isEqualTo independent) then { + _prefix = "n"; + _color = _colorIndependentHex; + }; +}; + +player createDiaryRecord ["Diary", ["NATO symbols", +' + Heli
+ Anit-Air
+ Armor
+ Artillery
+ HQ
+ Infantry
+ Installation
+ Maintenance
+ Mechanized infantry
+ Medical
+ Mortar
+ Motorized infantry
+ Naval
+ Ordnance
+ Plane
+ Recon
+ Service
+ Support
+ UAV
+
+ BLUFOR Base
+ OPFOR Base
+ Independent Base
+' +]]; diff --git a/includes/CfgFunctions.hpp b/includes/CfgFunctions.hpp index 38d822c..80f1fcf 100644 --- a/includes/CfgFunctions.hpp +++ b/includes/CfgFunctions.hpp @@ -8,4 +8,5 @@ class DLib{ #include "Radio\CfgFunctions.hpp" #include "Util\CfgFunctions.hpp" #include "Zeus\CfgFunctions.hpp" + #include "Other\CfgFunctions.hpp" } \ No newline at end of file diff --git a/includes/Other/CfgFunctions.hpp b/includes/Other/CfgFunctions.hpp new file mode 100644 index 0000000..ca5b5ce --- /dev/null +++ b/includes/Other/CfgFunctions.hpp @@ -0,0 +1,4 @@ +class Other{ + file="DLib\functions\Other"; + class natoSymbolHelper{}; +} \ No newline at end of file