mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ACE syntax
This commit is contained in:
parent
9567b587c6
commit
d3500d4bee
@ -1,12 +1,12 @@
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
@ -2,107 +2,107 @@
|
||||
class CBA_Extended_EventHandlers;
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(actions) {
|
||||
displayName = CSTRING(displayname);
|
||||
condition = QUOTE([_player] call FUNC(isGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 0.1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
class GVAR(WeapontoGunbag) {
|
||||
displayName = CSTRING(toGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0);
|
||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(WeaponoffGunbag) {
|
||||
displayName = CSTRING(offGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1);
|
||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(StatusGunbag) {
|
||||
displayName = CSTRING(Status);
|
||||
condition = QUOTE([_player] call FUNC(isGunbag));
|
||||
statement = QUOTE([_player] call FUNC(status));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(actions) {
|
||||
displayName = CSTRING(displayname);
|
||||
condition = QUOTE([_player] call FUNC(isGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 0.1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
class GVAR(WeapontoGunbag) {
|
||||
displayName = CSTRING(toGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0);
|
||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class GVAR(WeapontoGunbag) {
|
||||
displayName = CSTRING(toGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 0);
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(WeaponoffGunbag) {
|
||||
displayName = CSTRING(offGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 1);
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(StatusGunbag) {
|
||||
displayName = CSTRING(Status);
|
||||
condition = QUOTE([_target] call FUNC(isGunbag));
|
||||
statement = QUOTE([_target] call FUNC(status));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
class GVAR(WeaponoffGunbag) {
|
||||
displayName = CSTRING(offGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1);
|
||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(StatusGunbag) {
|
||||
displayName = CSTRING(Status);
|
||||
condition = QUOTE([_player] call FUNC(isGunbag));
|
||||
statement = QUOTE([_player] call FUNC(status));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Bag_Base;
|
||||
class CLASSNAME: Bag_Base {
|
||||
_generalMacro = QUOTE(CLASSNAME);
|
||||
author = "Ir0n1E";
|
||||
scope = 2;
|
||||
displayName = CSTRING(Displayname);
|
||||
model = PATHTOF(data\gunbag.p3d);
|
||||
picture = PATHTOF(ui\gunbag_ca.paa);
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class GVAR(WeapontoGunbag) {
|
||||
displayName = CSTRING(toGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 0);
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
hiddenSelections[] = {QUOTE(Camo),QUOTE(insignia)};
|
||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_co.paa)};
|
||||
maximumLoad = 80;
|
||||
transportMaxMagazines = 2;
|
||||
transportMaxWeapons = 1;
|
||||
transportMaxBackpacks = 0;
|
||||
GVAR(gunbagswitch) = QUOTE(DOUBLES(CLASSNAME,Full));
|
||||
};
|
||||
class GVAR(WeaponoffGunbag) {
|
||||
displayName = CSTRING(offGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 1);
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(StatusGunbag) {
|
||||
displayName = CSTRING(Status);
|
||||
condition = QUOTE([_target] call FUNC(isGunbag));
|
||||
statement = QUOTE([_target] call FUNC(status));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mass = 11;
|
||||
};
|
||||
class DOUBLES(CLASSNAME,Tan): CLASSNAME {
|
||||
displayName = CSTRING(Displayname_Tan);
|
||||
picture = PATHTOF(ui\gunbag_tan_ca.paa);
|
||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_tan_co.paa)};
|
||||
GVAR(gunbagswitch) = QUOTE(TRIPLES(CLASSNAME,Tan,Full));
|
||||
};
|
||||
class DOUBLES(CLASSNAME,Full): CLASSNAME {
|
||||
scope = 1;
|
||||
mass = 311;
|
||||
GVAR(gunbagswitch) = QUOTE(CLASSNAME);
|
||||
};
|
||||
class TRIPLES(CLASSNAME,Tan,Full): DOUBLES(CLASSNAME,Tan) {
|
||||
scope = 1;
|
||||
mass = 311;
|
||||
GVAR(gunbagswitch) = QUOTE(DOUBLES(CLASSNAME,Tan));
|
||||
};
|
||||
|
||||
class Bag_Base;
|
||||
class CLASSNAME: Bag_Base {
|
||||
_generalMacro = QUOTE(CLASSNAME);
|
||||
author = "Ir0n1E";
|
||||
scope = 2;
|
||||
displayName = CSTRING(Displayname);
|
||||
model = PATHTOF(data\gunbag.p3d);
|
||||
picture = PATHTOF(ui\gunbag_ca.paa);
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
hiddenSelections[] = {QUOTE(Camo),QUOTE(insignia)};
|
||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_co.paa)};
|
||||
maximumLoad = 80;
|
||||
transportMaxMagazines = 2;
|
||||
transportMaxWeapons = 1;
|
||||
transportMaxBackpacks = 0;
|
||||
GVAR(gunbagswitch) = QUOTE(DOUBLES(CLASSNAME,Full));
|
||||
|
||||
mass = 11;
|
||||
};
|
||||
class DOUBLES(CLASSNAME,Tan): CLASSNAME {
|
||||
displayName = CSTRING(Displayname_Tan);
|
||||
picture = PATHTOF(ui\gunbag_tan_ca.paa);
|
||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_tan_co.paa)};
|
||||
GVAR(gunbagswitch) = QUOTE(TRIPLES(CLASSNAME,Tan,Full));
|
||||
};
|
||||
class DOUBLES(CLASSNAME,Full): CLASSNAME {
|
||||
scope = 1;
|
||||
mass = 311;
|
||||
GVAR(gunbagswitch) = QUOTE(CLASSNAME);
|
||||
};
|
||||
class TRIPLES(CLASSNAME,Tan,Full): DOUBLES(CLASSNAME,Tan) {
|
||||
scope = 1;
|
||||
mass = 311;
|
||||
GVAR(gunbagswitch) = QUOTE(DOUBLES(CLASSNAME,Tan));
|
||||
};
|
||||
};
|
||||
|
@ -1,41 +1,41 @@
|
||||
class CfgWeapons {
|
||||
class Rifle_Long_Base_F;
|
||||
class Rifle_Long_Base_F;
|
||||
|
||||
/* Long Rifles */
|
||||
/* Long Rifles */
|
||||
|
||||
class GM6_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class GM6_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class LRR_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class LRR_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_06_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class DMR_06_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_05_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class DMR_05_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_04_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class DMR_04_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_03_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class DMR_03_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_02_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class DMR_02_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
};
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {"ACE_Gunbag", "ACE_Gunbag_tan", "ACE_Gunbag_full", "ACE_Gunbag_tan_full"};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"Ir0n1E"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {"ACE_Gunbag", "ACE_Gunbag_tan", "ACE_Gunbag_full", "ACE_Gunbag_tan_full"};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"Ir0n1E"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
@ -35,16 +35,16 @@ _items = _state select 0;
|
||||
|
||||
|
||||
if ((_magazine select 0) != "") then {
|
||||
_unit addMagazine _magazine;
|
||||
_unit addMagazine _magazine;
|
||||
};
|
||||
|
||||
_unit removeWeapon _weapon;
|
||||
|
||||
|
||||
for "_loop" from 0 to (count _state) -1 do {
|
||||
if (typeName (_state select _loop) == QUOTE(STRING)) then {
|
||||
_items pushBack (_state select _loop);
|
||||
};
|
||||
if (typeName (_state select _loop) == QUOTE(STRING)) then {
|
||||
_items pushBack (_state select _loop);
|
||||
};
|
||||
};
|
||||
|
||||
([_target] call FUNC(switchBackpack)) setVariable [QGVAR(GunbagWeapon), [[_weapon], _items], true];
|
||||
|
@ -1,29 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="gunbag">
|
||||
<Key ID="STR_ACE_Gunbag_DisplayName">
|
||||
<English>Gunbag</English>
|
||||
<German>Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_DisplayName_Tan">
|
||||
<English>Gunbag (Tan)</English>
|
||||
<German>Waffentasche (Tan)</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_toGunbag">
|
||||
<English>Put weapon into gunbag</English>
|
||||
<German>Lege Waffe in Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_offGunbag">
|
||||
<English>Get weapon out of gunbag</English>
|
||||
<German>Hole Waffe aus Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_Status">
|
||||
<English>Status Gunbag</English>
|
||||
<German>Status Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_empty">
|
||||
<English>Gunbag Empty</English>
|
||||
<German>Waffentasche leer</German>
|
||||
</Key>
|
||||
</Package>
|
||||
<Package name="gunbag">
|
||||
<Key ID="STR_ACE_Gunbag_DisplayName">
|
||||
<English>Gunbag</English>
|
||||
<German>Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_DisplayName_Tan">
|
||||
<English>Gunbag (Tan)</English>
|
||||
<German>Waffentasche (Tan)</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_toGunbag">
|
||||
<English>Put weapon into gunbag</English>
|
||||
<German>Lege Waffe in Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_offGunbag">
|
||||
<English>Get weapon out of gunbag</English>
|
||||
<German>Hole Waffe aus Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_Status">
|
||||
<English>Status Gunbag</English>
|
||||
<German>Status Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_empty">
|
||||
<English>Gunbag Empty</English>
|
||||
<German>Waffentasche leer</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user