From 352db4cb66445c647003f02882a60ec40d6273e6 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Tue, 24 Nov 2015 22:43:42 +0100 Subject: [PATCH] remove some crap code replace some variables with macros --- addons/gestures/CfgVehicles.hpp | 36 ++++++++++++++++----------------- addons/gestures/key.sqf | 16 +-------------- addons/gestures/stringtable.xml | 10 +-------- 3 files changed, 20 insertions(+), 42 deletions(-) diff --git a/addons/gestures/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp index 6a34d8119e..cfc4ae0ac7 100644 --- a/addons/gestures/CfgVehicles.hpp +++ b/addons/gestures/CfgVehicles.hpp @@ -3,14 +3,14 @@ class CfgVehicles { class Man; class CAManBase: Man { class ACE_SelfActions { - class ACE_Gestures { + class ADDON { displayName = CSTRING(Gestures); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = ""; showDisabled = 1; priority = 3.5; icon = PATHTOF(UI\gestures_ca.paa); - class ACE_Gesture_Advance { + class GVAR(Advance) { displayName = CSTRING(BIgestureAdvance); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureAdvance';); @@ -18,7 +18,7 @@ class CfgVehicles { priority = 1.9; }; - class ACE_Gesture_Go { + class GVAR(Go) { displayName = CSTRING(BIgestureGo); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2);); @@ -26,7 +26,7 @@ class CfgVehicles { priority = 1.8; }; - class ACE_Gesture_Follow { + class GVAR(Follow) { displayName = CSTRING(BIgestureFollow); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureFollow';); @@ -34,7 +34,7 @@ class CfgVehicles { priority = 1.7; }; - class ACE_Gesture_Up { + class GVAR(Up) { displayName = CSTRING(BIgestureUp); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureUp';); @@ -42,7 +42,7 @@ class CfgVehicles { priority = 1.5; }; - class ACE_Gesture_CeaseFire { + class GVAR(CeaseFire) { displayName = CSTRING(BIgestureCeaseFire); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureCeaseFire';); @@ -50,7 +50,7 @@ class CfgVehicles { priority = 1.3; }; - class ACE_Gesture_Freeze { + class GVAR(Freeze) { displayName = CSTRING(BIgestureFreeze); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureFreeze';); @@ -58,7 +58,7 @@ class CfgVehicles { priority = 1.2; }; - class ACE_Gesture_Forward { + class GVAR(Forward) { displayName = CSTRING(forward); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal)); @@ -66,7 +66,7 @@ class CfgVehicles { priority = 1.9; }; - class ACE_Gesture_Regroup { + class GVAR(Regroup) { displayName = CSTRING(regroup); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal)); @@ -74,7 +74,7 @@ class CfgVehicles { priority = 1.8; }; - class ACE_Gesture_Stop { + class GVAR(Stop) { displayName = CSTRING(stop); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(stop)) call FUNC(playSignal)); @@ -82,7 +82,7 @@ class CfgVehicles { priority = 1.7; }; - class ACE_Gesture_Cover { + class GVAR(Cover) { displayName = CSTRING(cover); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal)); @@ -90,7 +90,7 @@ class CfgVehicles { priority = 1.6; }; - class ACE_Gesture_Point { + class GVAR(Point) { displayName = CSTRING(point); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal)); @@ -98,7 +98,7 @@ class CfgVehicles { priority = 1.5; }; - class ACE_Gesture_Engage { + class GVAR(Engage) { displayName = CSTRING(engage); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal)); @@ -106,7 +106,7 @@ class CfgVehicles { priority = 1.4; }; - class ACE_Gesture_Hold { + class GVAR(Hold) { displayName = CSTRING(hold); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal)); @@ -114,7 +114,7 @@ class CfgVehicles { priority = 1.3; }; - class ACE_Gesture_Warning { + class GVAR(Warning) { displayName = CSTRING(warning); condition = QUOTE(canStand _target && GVAR(ReloadMutex)); statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal)); @@ -123,7 +123,7 @@ class CfgVehicles { }; /* - class ACE_Gesture_Yes { + class class GVAR(Yes) { displayName = ECSTRING(common,Yes); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2);); @@ -132,7 +132,7 @@ class CfgVehicles { hotkey = "8"; }; - class ACE_Gesture_No { + class class GVAR(No) { displayName = ECSTRING(common,No); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureNo';); @@ -141,7 +141,7 @@ class CfgVehicles { hotkey = "9"; }; - class ACE_Gesture_Hi { + class class GVAR(Hi) { displayName = CSTRING(Gestures_Hi); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3);); diff --git a/addons/gestures/key.sqf b/addons/gestures/key.sqf index 5afb9c8ae3..7c1b4b946d 100644 --- a/addons/gestures/key.sqf +++ b/addons/gestures/key.sqf @@ -7,7 +7,7 @@ _currentName = _currentName select [2]; }; - private _code = (compile format [QUOTE(QUOTE(QGVAR(%1)) call FUNC(playSignal);), _currentName]); + private _code = (compile format ["'%1%2' call %3", QGVAR(),_currentName,QFUNC(playSignal)]); [ "ACE3 Gestures", @@ -19,20 +19,6 @@ false ] call CBA_fnc_addKeybind; - /* - if (56 in (actionKeys "LookAround")) then { - [ - "ACE3 Gestures", - _currentName + "ALT", - localize format[LSTRING(%1), _currentName], - _code, - {}, - [_key, if (_key == 0) then {[false, false, false]} else { [false, true, true] }], - false - ] call CBA_fnc_addKeybind; - }; - */ - false } count [ ["stop", DIK_NUMPAD2], diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index 6c0cc5d270..1485575915 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -1,7 +1,7 @@ - + ACE Gestures ACE Gesten ACE Gesty @@ -179,13 +179,5 @@ Achtung Uwaga - - - - + freelook - + vue libre - + Frei Blick - + rozglądanie się -