mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
@ -3,29 +3,29 @@ class CfgVehicles {
|
|||||||
class CAManBase: Man {
|
class CAManBase: Man {
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
class ACE_MainActions {
|
class ACE_MainActions {
|
||||||
class GVAR(WeapontoGunbag) {
|
class GVAR(weaponTo) {
|
||||||
displayName = CSTRING(toGunbag);
|
displayName = CSTRING(ToGunbag);
|
||||||
condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 0});
|
condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 0});
|
||||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag));
|
statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 1;
|
priority = 1;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
};
|
};
|
||||||
class GVAR(WeaponoffGunbag) {
|
class GVAR(weaponOff) {
|
||||||
displayName = CSTRING(offGunbag);
|
displayName = CSTRING(OffGunbag);
|
||||||
condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 1});
|
condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 1});
|
||||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag));
|
statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 1;
|
priority = 1;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
};
|
};
|
||||||
class GVAR(StatusGunbag) {
|
class GVAR(status) {
|
||||||
displayName = CSTRING(Status);
|
displayName = CSTRING(Status);
|
||||||
condition = QUOTE([_target] call FUNC(hasGunbag));
|
condition = QUOTE([_target] call FUNC(hasGunbag));
|
||||||
statement = QUOTE([_target] call FUNC(status));
|
statement = QUOTE([_target] call FUNC(status));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -33,35 +33,35 @@ class CfgVehicles {
|
|||||||
class ACE_SelfActions {
|
class ACE_SelfActions {
|
||||||
class ACE_Equipment {
|
class ACE_Equipment {
|
||||||
class GVAR(actions) {
|
class GVAR(actions) {
|
||||||
displayName = CSTRING(displayname);
|
displayName = CSTRING(Displayname);
|
||||||
condition = QUOTE([_player] call FUNC(hasGunbag));
|
condition = QUOTE([_player] call FUNC(hasGunbag));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.1;
|
priority = 0.1;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
|
|
||||||
class GVAR(WeapontoGunbag) {
|
class GVAR(weaponTo) {
|
||||||
displayName = CSTRING(toGunbag);
|
displayName = CSTRING(ToGunbag);
|
||||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0);
|
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0);
|
||||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag));
|
statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 1;
|
priority = 1;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
};
|
};
|
||||||
class GVAR(WeaponoffGunbag) {
|
class GVAR(weaponOff) {
|
||||||
displayName = CSTRING(offGunbag);
|
displayName = CSTRING(OffGunbag);
|
||||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1);
|
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1);
|
||||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag));
|
statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 1;
|
priority = 1;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
};
|
};
|
||||||
class GVAR(StatusGunbag) {
|
class GVAR(status) {
|
||||||
displayName = CSTRING(Status);
|
displayName = CSTRING(Status);
|
||||||
condition = QUOTE([_player] call FUNC(hasGunbag));
|
condition = QUOTE([_player] call FUNC(hasGunbag));
|
||||||
statement = QUOTE([_player] call FUNC(status));
|
statement = QUOTE([_player] call FUNC(status));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -69,33 +69,33 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Bag_Base;
|
class Bag_Base;
|
||||||
class CLASSNAME: Bag_Base {
|
class ADDON: Bag_Base {
|
||||||
_generalMacro = QUOTE(CLASSNAME);
|
_generalMacro = QUOTE(ADDON);
|
||||||
author = "Ir0n1E";
|
author = "Ir0n1E";
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = CSTRING(Displayname);
|
displayName = CSTRING(Displayname);
|
||||||
model = PATHTOF(data\gunbag.p3d);
|
model = QPATHTOF(data\ace_gunbag.p3d);
|
||||||
picture = PATHTOF(ui\gunbag_ca.paa);
|
picture = QPATHTOF(ui\gunbag_ca.paa);
|
||||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
icon = QPATHTOF(ui\gunbag_icon_ca.paa);
|
||||||
hiddenSelections[] = {QUOTE(Camo),QUOTE(insignia)};
|
hiddenSelections[] = {"Camo", "insignia"};
|
||||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_co.paa)};
|
hiddenSelectionsTextures[] = {QPATHTOF(data\gunbag_co.paa)};
|
||||||
maximumLoad = 80;
|
maximumLoad = 80;
|
||||||
mass = 11;
|
mass = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DOUBLES(CLASSNAME,Tan): CLASSNAME {
|
class GVAR(Tan): ADDON {
|
||||||
_generalMacro = QUOTE(DOUBLES(CLASSNAME,Tan));
|
_generalMacro = QGVAR(Tan);
|
||||||
author = "Ir0n1E";
|
author = "Ir0n1E";
|
||||||
displayName = CSTRING(Displayname_Tan);
|
displayName = CSTRING(Displayname_Tan);
|
||||||
picture = PATHTOF(ui\gunbag_tan_ca.paa);
|
picture = QPATHTOF(ui\gunbag_tan_ca.paa);
|
||||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_tan_co.paa)};
|
hiddenSelectionsTextures[] = {QPATHTOF(data\gunbag_tan_co.paa)};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Box_NATO_Support_F;
|
class Box_NATO_Support_F;
|
||||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||||
class TransportBackpacks {
|
class TransportBackpacks {
|
||||||
MACRO_ADDBACKPACK(CLASSNAME,3);
|
MACRO_ADDBACKPACK(ADDON,3);
|
||||||
MACRO_ADDBACKPACK(DOUBLES(CLASSNAME,Tan),3);
|
MACRO_ADDBACKPACK(GVAR(Tan),3);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -8,3 +8,4 @@ Adds a gunbag for DMRs.
|
|||||||
|
|
||||||
The people responsible for merging changes to this component or answering potential questions.
|
The people responsible for merging changes to this component or answering potential questions.
|
||||||
|
|
||||||
|
- [commy2](https://github.com/commy2)
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
units[] = {CLASSNAME, DOUBLES(CLASSNAME,Tan)};
|
units[] = {QUOTE(ADDON), QGVAR(Tan)};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_interaction", "ace_movement"};
|
requiredAddons[] = {"ace_interaction", "ace_movement"};
|
||||||
author[] = {"Ir0n1E"};
|
author = ECSTRING(common,ACETeam);
|
||||||
|
authors[] = {"Ir0n1E"};
|
||||||
|
url = ECSTRING(main,URL);
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -144,5 +144,5 @@ class CfgModels {
|
|||||||
skeletonName = "OFP2_ManSkeleton";
|
skeletonName = "OFP2_ManSkeleton";
|
||||||
};
|
};
|
||||||
|
|
||||||
class gunbag: ArmaMan {};
|
class ace_gunbag: ArmaMan {};
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* calculate mass of weapon an items
|
* Calculate mass of weapon an items.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Weapon <STRING>
|
* 0: Weapon <STRING>
|
||||||
@ -10,6 +10,9 @@
|
|||||||
* Return Value:
|
* Return Value:
|
||||||
* Mass <NUMBER>
|
* Mass <NUMBER>
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* ["weapon", ["item1", "item2"], ["mag1", "mag2"]] call ace_gunbag_fnc_calculateMass
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* Check if client able to interact with gunbag
|
* Check if client able to interact with gunbag.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
@ -9,6 +9,9 @@
|
|||||||
* Return Value:
|
* Return Value:
|
||||||
* <NUMBER> -1: can't interact 0: empty gunbag 1: full gunbag
|
* <NUMBER> -1: can't interact 0: empty gunbag 1: full gunbag
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* _canInteract = [player, target] call ace_gunbag_fnc_canInteract
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* switches gunbag full/empty for mass calculation
|
* Switches gunbag full/empty for mass calculation.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* (BOOL)
|
* Has Gunbag <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_gunbag_fnc_hasGunbag
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -14,4 +17,4 @@
|
|||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
backpackContainer _unit isKindOf QUOTE(CLASSNAME)
|
(backpackContainer _unit) isKindOf QUOTE(ADDON)
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* get weapon out of gunbag
|
* Get weapon out of gunbag.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Target <OBJECT>
|
* 1: Target <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, target] call ace_gunbag_fnc_toGunbag
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -20,7 +23,7 @@ private _gunbag = backpackContainer _target;
|
|||||||
_unit call EFUNC(common,goKneeling);
|
_unit call EFUNC(common,goKneeling);
|
||||||
|
|
||||||
// play sound
|
// play sound
|
||||||
if (!isNil "ACE_Backpacks") then {
|
if (["ace_backpacks"] call EFUNC(common,isModLoaded)) then {
|
||||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* get weapon out of gunbag
|
* Get weapon out of gunbag.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Target <OBJECT>
|
* 1: Target <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, target] call ace_gunbag_fnc_offGunbagCallback
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -43,6 +46,6 @@ private _mass = [_weapon, _items, _magazines] call FUNC(calculateMass);
|
|||||||
_gunbag setVariable [QGVAR(gunbagWeapon), [], true];
|
_gunbag setVariable [QGVAR(gunbagWeapon), [], true];
|
||||||
|
|
||||||
// play sound
|
// play sound
|
||||||
if (!isNil "ACE_Backpacks") then {
|
if (["ace_backpacks"] call EFUNC(common,isModLoaded)) then {
|
||||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||||
};
|
};
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* check gunbag status full/empty
|
* Check gunbag status full/empty.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_gunbag_fnc_status
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* put weapon into gunbag
|
* Put weapon into gunbag.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Target <OBJECT>
|
* 1: Target <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, target] call ace_gunbag_fnc_toGunbag
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -20,7 +23,7 @@ private _gunbag = backpackContainer _target;
|
|||||||
_unit call EFUNC(common,goKneeling);
|
_unit call EFUNC(common,goKneeling);
|
||||||
|
|
||||||
// play sound
|
// play sound
|
||||||
if (!isNil "ACE_Backpacks") then {
|
if (["ace_backpacks"] call EFUNC(common,isModLoaded)) then {
|
||||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ir0n1E
|
* Author: Ir0n1E
|
||||||
* put weapon into gunbag
|
* Put weapon into gunbag.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Target <OBJECT>
|
* 1: Target <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player, target] call ace_gunbag_fnc_toGunbagCallback
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -40,6 +43,6 @@ _unit removeWeapon _weapon;
|
|||||||
_gunbag setVariable [QGVAR(gunbagWeapon), [_weapon, _items, _magazines], true];
|
_gunbag setVariable [QGVAR(gunbagWeapon), [_weapon, _items, _magazines], true];
|
||||||
|
|
||||||
// play sound
|
// play sound
|
||||||
if (!isNil "ACE_Backpacks") then {
|
if (["ace_backpacks"] call EFUNC(common,isModLoaded)) then {
|
||||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||||
};
|
};
|
||||||
|
@ -16,5 +16,4 @@
|
|||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
#define CLASSNAME ACE_Gunbag
|
|
||||||
#define PROGRESSBAR_TIME 5
|
#define PROGRESSBAR_TIME 5
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="gunbag">
|
<Package name="Gunbag">
|
||||||
<Key ID="STR_ACE_Gunbag_DisplayName">
|
<Key ID="STR_ACE_Gunbag_DisplayName">
|
||||||
<English>Gunbag</English>
|
<English>Gunbag</English>
|
||||||
<German>Waffentasche</German>
|
<German>Waffentasche</German>
|
||||||
@ -9,19 +9,19 @@
|
|||||||
<English>Gunbag (Tan)</English>
|
<English>Gunbag (Tan)</English>
|
||||||
<German>Waffentasche (Tan)</German>
|
<German>Waffentasche (Tan)</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Gunbag_toGunbag">
|
<Key ID="STR_ACE_Gunbag_ToGunbag">
|
||||||
<English>Put weapon into gunbag</English>
|
<English>Put weapon into gunbag</English>
|
||||||
<German>Lege Waffe in Waffentasche</German>
|
<German>Lege Waffe in Waffentasche</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Gunbag_offGunbag">
|
<Key ID="STR_ACE_Gunbag_OffGunbag">
|
||||||
<English>Get weapon out of gunbag</English>
|
<English>Get weapon out of gunbag</English>
|
||||||
<German>Hole Waffe aus Waffentasche</German>
|
<German>Hole Waffe aus Waffentasche</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Gunbag_Status">
|
<Key ID="STR_ACE_Gunbag_Status">
|
||||||
<English>Status Gunbag</English>
|
<English>Status</English>
|
||||||
<German>Status Waffentasche</German>
|
<German>Status</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Gunbag_empty">
|
<Key ID="STR_ACE_Gunbag_Empty">
|
||||||
<English>Gunbag Empty</English>
|
<English>Gunbag Empty</English>
|
||||||
<German>Waffentasche leer</German>
|
<German>Waffentasche leer</German>
|
||||||
</Key>
|
</Key>
|
||||||
|
Reference in New Issue
Block a user