mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2471 from acemod/340noactionmenu
optional pbo to hide select weapon actions
This commit is contained in:
commit
27ca3dc7bd
@ -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;
|
||||
|
1
optionals/noactionmenu/$PBOPREFIX$
Normal file
1
optionals/noactionmenu/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\noactionmenu
|
24
optionals/noactionmenu/CfgActions.hpp
Normal file
24
optionals/noactionmenu/CfgActions.hpp
Normal 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;
|
||||
};
|
||||
};
|
11
optionals/noactionmenu/README.md
Normal file
11
optionals/noactionmenu/README.md
Normal 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)
|
16
optionals/noactionmenu/config.cpp
Normal file
16
optionals/noactionmenu/config.cpp
Normal 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"
|
12
optionals/noactionmenu/script_component.hpp
Normal file
12
optionals/noactionmenu/script_component.hpp
Normal 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"
|
Loading…
Reference in New Issue
Block a user