Merge pull request #2471 from acemod/340noactionmenu

optional pbo to hide select weapon actions
This commit is contained in:
commy2 2015-09-17 22:47:35 +02:00
commit 27ca3dc7bd
6 changed files with 67 additions and 0 deletions

View File

@ -61,6 +61,9 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
// check server version/addons
///////////////
if (isMultiplayer) then {
// don't check optional addons
_addons = [_addons, {getNumber (configFile >> "CfgPatches" >> _this >> "ACE_isOptional") != 1}] call FUNC(filter);
if (isServer) then {
// send servers version of ACE to all clients
GVAR(ServerVersion) = _version;

View File

@ -0,0 +1 @@
z\ace\addons\noactionmenu

View File

@ -0,0 +1,24 @@
class CfgActions {
// to pistol
class None;
class HandGunOn: None {
show = 0;
};
// to rifle
class HandGunOff: None {
show = 0;
};
// to launcher, (also used for binoculars?)
class SwitchWeapon: None {
show = 0;
};
class SwitchMagazine: SwitchWeapon {
show = 1;
};
// no idea, probably unused
class HideWeapon: SwitchWeapon {
show = 0;
};
};

View File

@ -0,0 +1,11 @@
ace_noactionmenu
===========
Removes weapon select action.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [commy2](https://github.com/commy2)

View File

@ -0,0 +1,16 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
ACE_isOptional = 1;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2"};
authorUrl = "https://github.com/commy2";
VERSION_CONFIG;
};
};
#include "CfgActions.hpp"

View File

@ -0,0 +1,12 @@
#define COMPONENT noactionmenu
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_NOACTIONMENU
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_ENABLED_NOACTIONMENU
#define DEBUG_SETTINGS DEBUG_ENABLED_NOACTIONMENU
#endif
#include "\z\ace\addons\main\script_macros.hpp"