Skip to content

Commit

Permalink
Misc - Add / Update - Armband NVG version integration & code cleanup (#…
Browse files Browse the repository at this point in the history
…463)

- Adds new night vision variants of all armbands.
- Adjusted code to save which armband (goggles or nvg) was used for
sling to bone.
- Code cleanup for sling file, now much more compact.
  • Loading branch information
MissHeda authored Feb 29, 2024
1 parent 6844553 commit 3b94f2b
Show file tree
Hide file tree
Showing 8 changed files with 362 additions and 380 deletions.
8 changes: 4 additions & 4 deletions addons/misc/CfgGlasses.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CfgGlasses
{
class None;
class kat_armband_red_cross: None
class kat_Armband_Red_Cross_Goggles: None
{
author = "Miss Heda, vccv9040 (Swedish Forces Pack)";
displayname = CSTRING(Armband_Red_Cross_ItemName);
Expand All @@ -13,23 +13,23 @@ class CfgGlasses
identityTypes[] = {};
};

class kat_armband_medic: kat_armband_red_cross
class kat_Armband_Medic_Goggles: kat_Armband_Red_Cross_Goggles
{
author= "Miss Heda, vccv9040 (Swedish Forces Pack)";
displayname = CSTRING(Armband_Medic_ItemName);
hiddenSelectionsTextures[] = {QPATHTOF(models\armband\ArmbandWCM.paa)};
picture= QPATHTOF(ui\ArmbandWhiteCrossMedic.paa);
};

class kat_armband_doctor: kat_armband_red_cross
class kat_Armband_Doctor_Goggles: kat_Armband_Red_Cross_Goggles
{
author= "Miss Heda, vccv9040 (Swedish Forces Pack)";
displayname = CSTRING(Armband_Doctor_ItemName);
hiddenSelectionsTextures[] = {QPATHTOF(models\armband\ArmbandWCD.paa)};
picture= QPATHTOF(ui\ArmbandWhiteCrossDoctor.paa);
};

class kat_armband_kat: kat_armband_red_cross
class kat_Armband_Kat_Goggles: kat_Armband_Red_Cross_Goggles
{
author= "Miss Heda, vccv9040 (Swedish Forces Pack)";
displayname = CSTRING(Armband_Kat_ItemName);
Expand Down
219 changes: 180 additions & 39 deletions addons/misc/CfgVehicles.hpp

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions addons/misc/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class CfgWeapons
{
class ToolKit;
class ACE_ItemCore;
class ACE_NVGoggles_WP;
class CBA_MiscItem_ItemInfo;
class Attachable_Helistretcher: ToolKit {
author = "Battlekeeper";
Expand Down Expand Up @@ -47,6 +48,45 @@ class CfgWeapons
picture = QPATHTOF(ui\ArmbandKat.paa);
};

class kat_Armband_Red_Cross_NVG: ACE_NVGoggles_WP {
author = "Miss Heda, vccv9040 (Swedish Forces Pack)";
displayName = CSTRING(Armband_Red_Cross_ItemName);
editorPreview = QPATHTOF(ui\ArmbandWhiteCross.paa);
picture = QPATHTOF(ui\ArmbandWhiteCross.paa);
model = QPATHTOF(models\armband\Armband.p3d);
hiddenSelections[] = {"Armband"};
hiddenSelectionsTextures[] = {QPATHTOF(models\armband\ArmbandWC.paa)};
class ItemInfo {
type = 616;
hmdType = 0;
hiddenSelections[] = {"Armband"};
uniformModel = QPATHTOF(models\armband\Armband.p3d);
modelOff = QPATHTOF(models\armband\Armband.p3d);
mass = 3;
};
};

class kat_Armband_Medic_NVG: kat_Armband_Red_Cross_NVG {
displayName = CSTRING(Armband_Medic_ItemName);
editorPreview = QPATHTOF(ui\ArmbandWhiteCrossMedic.paa);
picture = QPATHTOF(ui\ArmbandWhiteCrossMedic.paa);
hiddenSelectionsTextures[] = {QPATHTOF(models\armband\ArmbandWCM.paa)};
};

class kat_Armband_Doctor_NVG: kat_Armband_Red_Cross_NVG {
displayName = CSTRING(Armband_Doctor_ItemName);
editorPreview = QPATHTOF(ui\ArmbandWhiteCrossDoctor.paa);
picture = QPATHTOF(ui\ArmbandWhiteCrossDoctor.paa);
hiddenSelectionsTextures[] = {QPATHTOF(models\armband\ArmbandWCD.paa)};
};

class kat_Armband_Kat_NVG: kat_Armband_Red_Cross_NVG {
displayName = CSTRING(Armband_Kat_ItemName);
editorPreview = QPATHTOF(ui\ArmbandKat.paa);
picture = QPATHTOF(ui\ArmbandKat.paa);
hiddenSelectionsTextures[] = {QPATHTOF(models\armband\ArmbandKAT.paa)};
};

class kat_Bubble_Wrap_Item: ACE_ItemCore {
author = "Miss Heda";
displayName = CSTRING(Bubble_Wrap_Display);
Expand Down
8 changes: 4 additions & 4 deletions addons/misc/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ if (GVAR(incompatibilityWarning)) then {
GVAR(uniqueItemsCache) = nil;
}] call CBA_fnc_addPlayerEventHandler;

["kat_Armband_Red_Cross_Item", "kat_armband_red_cross"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Medic_Item", "kat_armband_medic"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Doctor_Item", "kat_armband_doctor"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Kat_Item", "kat_armband_kat"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Red_Cross_Item", "kat_Armband_Red_Cross_Goggles"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Medic_Item", "kat_Armband_Medic_Goggles"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Doctor_Item", "kat_Armband_Doctor_Goggles"] call ACEFUNC(common,registerItemReplacement);
["kat_Armband_Kat_Item", "kat_Armband_Kat_Goggles"] call ACEFUNC(common,registerItemReplacement);
["kat_Bubble_Wrap_Item", "kat_Bubble_Wrap"] call ACEFUNC(common,registerItemReplacement);

[QGVAR(stopCarryingPrompt), LINKFUNC(stopCarryingPrompt)] call CBA_fnc_addEventHandler;
Expand Down
72 changes: 56 additions & 16 deletions addons/misc/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingLeftArmPos_Display), LLSTRING(SETTING_ArmbandSlingLeftArmPos_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"0.2, -0.39, -0.2",
2
"[0.2, -0.39, -0.2]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingLeftArm), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingLeftArm), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband rotation left arm (yaw, pitch, roll)
Expand All @@ -100,8 +105,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingLeftArmRot_Display), LLSTRING(SETTING_ArmbandSlingLeftArmRot_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"240, 33, 26",
2
"[240, 33, 26]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingLeftArmRotation), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingLeftArmRotation), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband sling right arm (x, y, z)
Expand All @@ -110,8 +120,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingRightArmPos_Display), LLSTRING(SETTING_ArmbandSlingRightArmPos_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"-0.228, -0.1, -0.43",
2
"[-0.228, -0.1, -0.43]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingRightArm), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingRightArm), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband rotation right arm (yaw, pitch, roll)
Expand All @@ -120,8 +135,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingRightArmRot_Display), LLSTRING(SETTING_ArmbandSlingRightArmRot_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"5, -5, -5",
2
"[5, -5, -5]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingRightArmRotation), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingRightArmRotation), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband sling left leg (x, y, z)
Expand All @@ -130,8 +150,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingLeftLegPos_Display), LLSTRING(SETTING_ArmbandSlingLeftLegPos_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"0.435, -0.075, -0.38",
2
"[0.435, -0.075, -0.38]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingLeftLeg), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingLeftLeg), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband rotation left leg (yaw, pitch, roll)
Expand All @@ -140,8 +165,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingLeftLegRot_Display), LLSTRING(SETTING_ArmbandSlingLeftLegRot_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"-160, -5, 45",
2
"[-160, -5, 45]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingLeftLegRotation), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingLeftLegRotation), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband sling right leg (x, y, z)
Expand All @@ -150,8 +180,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingRightLegPos_Display), LLSTRING(SETTING_ArmbandSlingRightLegPos_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"-0.32, -0.29, -0.42",
2
"[-0.32, -0.29, -0.42]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingRightLeg), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingRightLeg), _array, true];
}
] call CBA_Settings_fnc_init;

//Adjust armband rotation right Leg (yaw, pitch, roll)
Expand All @@ -160,8 +195,13 @@ PREP_RECOMPILE_END;
"EDITBOX",
[LLSTRING(SETTING_ArmbandSlingRightLegRot_Display), LLSTRING(SETTING_ArmbandSlingRightLegRot_Desc)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Armband)],
"-30, -5, 38",
2
"[-30, -5, 38]",
2,
{
private _string = missionNamespace getVariable [QGVAR(armbandSlingRightLegRotation), ""];
private _array = parseSimpleArray _string;
missionNamespace setVariable [QGVAR(armbandSlingRightLegRotation), _array, true];
}
] call CBA_Settings_fnc_init;

// Remove IFAK when empty
Expand Down
12 changes: 8 additions & 4 deletions addons/misc/functions/fnc_checkArmbandCondition.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@

params ["_unit"];

[_unit, "kat_armband_red_cross"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_armband_medic"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_armband_doctor"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_armband_kat"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Red_Cross_Goggles"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Medic_Goggles"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Doctor_Goggles"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Kat_Goggles"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Red_Cross_NVG"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Medic_NVG"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Doctor_NVG"] call ACEFUNC(common,hasItem) ||
[_unit, "kat_Armband_Kat_NVG"] call ACEFUNC(common,hasItem) ||
!(_unit getVariable [QGVAR(isRightArmFree), false]) ||
!(_unit getVariable [QGVAR(isLeftLegFree), false]) ||
!(_unit getVariable [QGVAR(isRightLegFree), false]) ||
Expand Down
Loading

0 comments on commit 3b94f2b

Please sign in to comment.