From 23632281cfe8c1f3bed73833dfd0cb574b7686ef Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 17 Apr 2016 23:22:41 -0500 Subject: [PATCH] Add day (non night vision) version of the vector 21 --- .../functions/fnc_handleFired.sqf | 2 +- addons/dagr/functions/fnc_menuInit.sqf | 2 +- addons/vector/CfgWeapons.hpp | 5 +++++ addons/vector/config.cpp | 2 +- addons/vector/functions/fnc_onKeyHold.sqf | 2 +- addons/vector/initKeybinds.sqf | 4 ++-- addons/vector/stringtable.xml | 12 ++++++++++++ 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 9646f065d4..aa6922946a 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -88,7 +88,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { _bulletTraceVisible = false; if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { - if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then { + if (currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay", "Binocular", "Rangefinder", "Laserdesignator"]) then { _bulletTraceVisible = true; } else { if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then { diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index e4fb341537..471150dd1c 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -522,7 +522,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __mainText) ctrlSetText "Connecting..."; }; if (ACE_time - GVAR(busyTimer) > 0.6) then { - if (ACE_player hasWeapon "ACE_Vector") then { + if ((ACE_player hasWeapon "ACE_Vector") || {ACE_player hasWeapon "ACE_VectorDay"}) then { GVAR(displaySelection) = "VECTOR"; (__dsp displayCtrl __mainText) ctrlSetText "Vector Connected"; GVAR(vectorConnected) = true; diff --git a/addons/vector/CfgWeapons.hpp b/addons/vector/CfgWeapons.hpp index 019d774da8..a28321bdc8 100644 --- a/addons/vector/CfgWeapons.hpp +++ b/addons/vector/CfgWeapons.hpp @@ -13,4 +13,9 @@ class CfgWeapons { opticsZoomMin = 0.06621; weaponInfoType = "ACE_RscOptics_vector"; }; + class ACE_VectorDay: ACE_Vector { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(VectorDayName); + visionMode[] = {"Normal"}; + }; }; diff --git a/addons/vector/config.cpp b/addons/vector/config.cpp index e2a52b47ef..e4cdf9a55b 100644 --- a/addons/vector/config.cpp +++ b/addons/vector/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { units[] = {"ACE_Item_Vector"}; - weapons[] = {"ACE_Vector"}; + weapons[] = {"ACE_Vector", "ACE_VectorDay"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author[] = {"Ghost","Hamburger SV","commy2","bux578"}; diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index ff4e5fc6ad..b76fe0ad0c 100644 --- a/addons/vector/functions/fnc_onKeyHold.sqf +++ b/addons/vector/functions/fnc_onKeyHold.sqf @@ -7,7 +7,7 @@ PFH executed while holding a vector key down. */ #include "script_component.hpp" -if (currentWeapon ACE_player != "ACE_Vector") exitWith { +if (!(currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay"])) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; GVAR(currentMode) = ""; diff --git a/addons/vector/initKeybinds.sqf b/addons/vector/initKeybinds.sqf index babef0819c..0d4bb59d27 100644 --- a/addons/vector/initKeybinds.sqf +++ b/addons/vector/initKeybinds.sqf @@ -5,7 +5,7 @@ // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false}; + if !((currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay"]) && {cameraView == "GUNNER"}) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey1,false)) exitWith {false}; @@ -34,7 +34,7 @@ // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false}; + if !((currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay"]) && {cameraView == "GUNNER"}) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey2,false)) exitWith {false}; diff --git a/addons/vector/stringtable.xml b/addons/vector/stringtable.xml index 80135294d4..fd8d73858c 100644 --- a/addons/vector/stringtable.xml +++ b/addons/vector/stringtable.xml @@ -2,6 +2,18 @@ + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + + Vector 21 Vector 21 Vector 21