@@ -252,27 +252,27 @@ class EGVAR(context_menu,actions) {
252
252
};
253
253
class SwitchWeapon {
254
254
displayName = " $STR_A3_Switch1" ;
255
- condition = QUOTE(2 <= {_x != ' ' } count [ARR_3(primaryWeapon _hoveredEntity, handgunWeapon _hoveredEntity, binocular _hoveredEntity)] );
255
+ condition = QUOTE(_hoveredEntity call FUNC (canSwitchWeapon) );
256
256
statement = " " ;
257
257
icon = " \a 3\ui_f\data\IGUI\Cfg\Actions\r eammo_ca.paa" ;
258
- class Rifle {
258
+ class Primary {
259
259
displayName = " $STR_A3_RSCDisplayArsenal_Tab_PrimaryWeapon" ;
260
- condition = QUOTE(!isPlayer _hoveredEntity && {primaryWeapon _hoveredEntity != ' ' && {primaryWeapon _hoveredEntity != currentWeapon _hoveredEntity}} );
260
+ condition = QUOTE(_hoveredEntity call FUNC (canSwitchWeaponPrimary) );
261
261
statement = QUOTE([ARR_3(' zen_common_selectWeapon' , [ARR_2(_hoveredEntity, primaryWeapon _hoveredEntity)], _hoveredEntity)] call CBA_fnc_targetEvent);
262
262
icon = " \a 3\ui_f\data\GUI\Rsc\RscDisplayArsenal\primaryWeapon_ca.paa" ;
263
263
args = 0 ;
264
264
modifierFunction = QUOTE(call FUNC (switchWeaponModifier));
265
265
};
266
- class Handgun : Rifle {
266
+ class Handgun : Primary {
267
267
displayName = " $STR_A3_RSCDisplayArsenal_Tab_Handgun" ;
268
- condition = QUOTE(!isPlayer _hoveredEntity && {handgunWeapon _hoveredEntity != ' ' && {handgunWeapon _hoveredEntity != currentWeapon _hoveredEntity}} );
268
+ condition = QUOTE(_hoveredEntity call FUNC (canSwitchWeaponHandgun) );
269
269
statement = QUOTE([ARR_3(' zen_common_selectWeapon' , [ARR_2(_hoveredEntity, handgunWeapon _hoveredEntity)], _hoveredEntity)] call CBA_fnc_targetEvent);
270
270
icon = " \a 3\ui_f\data\GUI\Rsc\RscDisplayArsenal\handgun_ca.paa" ;
271
271
args = 1 ;
272
272
};
273
- class Binoculars : Rifle {
273
+ class Binoculars : Primary {
274
274
displayName = " $STR_A3_RSCDisplayArsenal_Tab_Binoculars" ;
275
- condition = QUOTE(!isPlayer _hoveredEntity && {binocular _hoveredEntity != ' ' && {binocular _hoveredEntity != currentWeapon _hoveredEntity}} );
275
+ condition = QUOTE(_hoveredEntity call FUNC (canSwitchWeaponBinocular) );
276
276
statement = QUOTE([ARR_3(' zen_common_selectWeapon' , [ARR_2(_hoveredEntity, binocular _hoveredEntity)], _hoveredEntity)] call CBA_fnc_targetEvent);
277
277
icon = " \a 3\ui_f\data\GUI\Rsc\RscDisplayArsenal\b inoculars_ca.paa" ;
278
278
args = 2 ;
0 commit comments