Skip to content

Commit

Permalink
Merging newest Grad Trenches release
Browse files Browse the repository at this point in the history
  • Loading branch information
AdlerSalbei committed Nov 30, 2018
1 parent ba18d5f commit ec9b458
Show file tree
Hide file tree
Showing 38 changed files with 1,742 additions and 202 deletions.
8 changes: 8 additions & 0 deletions addons/trenches/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Cfg3DEN {
class EventHandlers {
class ADDON {
onMissionPreviewEnd = QUOTE([] spawn {waitUntil {!isNil QQFUNC(initTrench3DEN)}; call FUNC(initTrench3DEN)}); // Don't ask me why but this function is nil when this event triggers
onMissionLoad = QUOTE([] spawn {waitUntil {!isNil QQFUNC(initTrench3DEN)}; call FUNC(initTrench3DEN)}); // Don't ask me why but this function is nil when this event triggers
};
};
};
34 changes: 33 additions & 1 deletion addons/trenches/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
Expand Down Expand Up @@ -30,3 +29,36 @@ class Extended_DisplayLoad_EventHandlers {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

class Extended_Deleted_EventHandlers {
class ACE_envelope_small {
class ADDON {
deleted = QUOTE(if (isServer) then {_this call FUNC(deleteCamouflage)});
};
};
class ACE_envelope_big: ACE_envelope_small {};
class ACE_envelope_gigant: ACE_envelope_small {};
class ACE_envelope_vehicle: ACE_envelope_small {};
class ACE_envelope_short: ACE_envelope_small {};
};

class Extended_Init_EventHandlers {
class ACE_envelope_small {
class ADDON {
init = QUOTE(_this call FUNC(initTrench));
};
};

class ACE_envelope_big: ACE_envelope_small {};
class ACE_envelope_gigant: ACE_envelope_small {};
class ACE_envelope_vehicle: ACE_envelope_small {};
class ACE_envelope_short: ACE_envelope_small {};
};

class Extended_InitPost_EventHandlers {
class ModuleCurator_F {
class ADDON {
init = QUOTE(_this call FUNC(initCurator));
};
};
};
212 changes: 154 additions & 58 deletions addons/trenches/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
class CBA_Extended_EventHandlers;

#define ACE_TRENCHES_ACTIONS class ACE_Actions { \
class ACE_MainActions { \
displayName = ECSTRING(interaction,MainAction); \
selection = ""; \
distance = 3; \
condition = QUOTE(true); \
class ACE_ContinueDiggingTrench { \
displayName = CSTRING(ContinueDiggingTrench); \
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)); \
statement = QUOTE([ARR_2(_target,_player)] call FUNC(continueDiggingTrench);); \
}; \
class ACE_RemoveTrench { \
displayName = CSTRING(RemoveEnvelope); \
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canRemoveTrench)); \
statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeTrench);); \
}; \
}; \
}

class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Equipment {
class GVAR(digEnvelopeSmall) {
displayName = CSTRING(DigEnvelopeSmall);
condition = QUOTE(_player call FUNC(canDigTrench));
//wait a frame to handle "Do When releasing action menu key" option
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_small')])] call CBA_fnc_execNextFrame);
exceptions[] = {};
showDisabled = 0;
//icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
class GVAR(digEnvelopeBig) {
displayName = CSTRING(DigEnvelopeBig);
condition = QUOTE(_player call FUNC(canDigTrench));
//wait a frame to handle "Do When releasing action menu key" option
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_big')])] call CBA_fnc_execNextFrame);
exceptions[] = {};
class ACE_Trenches {
displayName = CSTRING(ActionCategory);
condition = QUOTE(_player call FUNC(canDigTrench) && GVAR(allowDigging));
statement = "";
showDisabled = 0;
//icon = QPATHTOF(UI\icon_sandbag_ca.paa);
priority = 3;
// icon = "z\ace\addons\trenches\UI\w_entrchtool_ca.paa";
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
class GVAR(digEnvelopeShort) {
displayName = CSTRING(DigEnvelopeShort);
condition = QUOTE(GVAR(allowDigging) && ([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)) && GVAR(allowShortEnvelope));
//wait a frame to handle "Do When releasing action menu key" option
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_short')])] call CBA_fnc_execNextFrame);
exceptions[] = {};
showDisabled = 0;
priority = 4;
//icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
class GVAR(digEnvelopeSmall): GVAR(digEnvelopeShort) {
displayName = CSTRING(DigEnvelopeSmall);
condition = QUOTE(GVAR(allowDigging) && ([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)) && GVAR(allowSmallEnvelope));
//wait a frame to handle "Do When releasing action menu key" option
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_small')])] call CBA_fnc_execNextFrame);
};
class GVAR(digEnvelopeBig): GVAR(digEnvelopeShort) {
displayName = CSTRING(DigEnvelopeBig);
condition = QUOTE(GVAR(allowDigging) && ([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)) && GVAR(allowBigEnvelope));
//wait a frame to handle "Do When releasing action menu key" option
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_big')])] call CBA_fnc_execNextFrame);
};
class GVAR(DigEnvelopeGigant): GVAR(digEnvelopeShort) {
displayName = CSTRING(DigEnvelopeGigant);
condition = QUOTE(_player call FUNC(canDigTrench) && ([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)) && GVAR(allowGigantEnvelope));
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_gigant')])] call CBA_fnc_execNextFrame);
};
class GVAR(DigEnvelopeVehicle): GVAR(digEnvelopeShort) {
displayName = CSTRING(DigEnvelopeVehicle);
condition = QUOTE(_player call FUNC(canDigTrench) && ([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)) && GVAR(allowVehicleEnvelope));
statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_vehicle')])] call CBA_fnc_execNextFrame);
};
};
};
};
Expand All @@ -51,44 +55,136 @@ class CfgVehicles {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(EnvelopeSmallName);
descriptionShort = CSTRING(EnevlopeSmallDescription);
model = QPATHTOEF(apl,ace_envelope_small4.p3d);
model = QPATHTOF(data\trench_small.p3d);
scope = 2;
GVAR(diggingDuration) = 20;
GVAR(removalDuration) = 12;
GVAR(noGeoClass) = "ACE_envelope_small_NoGeo";
scopeCurator = 2;
GVAR(diggingDuration) = QGVAR(smallEnvelopeDigTime);
GVAR(removalDuration) = QGVAR(smallEnvelopeRemovalTime);
GVAR(placementData)[] = {2,3,0.35};
GVAR(grassCuttingPoints)[] = {{0,-0.5,0}};
ACE_TRENCHES_ACTIONS;

editorCategory = "EdCat_Things";
editorSubcategory = "EdSubcat_Military";
hiddenSelections[] = {"velka"};

class GVAR(camouflagePositions) {
center[] = {0, 1.3, 0};
left[] = {1.3, -0.8, 0.4};
right[] = {-1.3,-0.8,0.4};
};

class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
selection = "";
distance = 3;
condition = QUOTE(true);
class GVAR(continueDigging) {
displayName = CSTRING(continueDiggingTrench);
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench));
statement = QUOTE([ARR_2(_target,_player)] call FUNC(continueDiggingTrench););
priority = -1;
};
class GVAR(helpDigging) {
displayName = CSTRING(HelpDigging); \
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canHelpDiggingTrench));
statement = QUOTE([ARR_2(_target,_player)] call FUNC(addDigger));
priority = -1;
};
class GVAR(remove) {
displayName = CSTRING(removeEnvelope);
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canRemoveTrench));
statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeTrench););
priority = -1;
};
class GVAR(placeCamouflage) {
displayName = CSTRING(placeCamouflage);
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canPlaceCamouflage));
statement = QUOTE([ARR_2(_target,_player)] call FUNC(placeCamouflage));
priority = -1;
};
class GVAR(removeCamouflage) {
displayName = CSTRING(removeCamouflage);
condition = QUOTE([_target] call FUNC(canRemoveCamouflage));
statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeCamouflage));
priority = -1;
};
};
};

class Attributes {
class GVAR(camouflageAttribute) {
control = "CheckboxNumber";
defaultValue = "0";
displayName = CSTRING(CamouflageAttribute);
tooltip = CSTRING(CamouflageAttributeTooltip);
expression = QUOTE([ARR_2(_this,_value)] call FUNC(applyCamouflageAttribute));
property = CAMOUFLAGE_3DEN_ATTRIBUTE;
};
};

class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
};
class ACE_envelope_big: BagFence_base_F {
author = ECSTRING(common,ACETeam);
class ACE_envelope_big: ACE_envelope_small {
displayName = CSTRING(EnvelopeBigName);
descriptionShort = CSTRING(EnevlopeBigDescription);
model = QPATHTOEF(apl,ace_envelope_big4.p3d);
scope = 2;
GVAR(diggingDuration) = 25;
GVAR(removalDuration) = 15;
GVAR(noGeoClass) = "ACE_envelope_big_NoGeo";
model = QPATHTOF(data\trench_big.p3d);
GVAR(diggingDuration) = QGVAR(bigEnvelopeDigTime);
GVAR(removalDuration) = QGVAR(bigEnvelopeRemovalTime);
GVAR(placementData)[] = {6,1.1,0.20};
GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};
ACE_TRENCHES_ACTIONS;
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};

class GVAR(camouflagePositions) {
center[] = {-0.4, 0.4, 0.2};
left[] = {-1.75, 0.2, 0.2};
right[] = {1.75, 0.2, 0.2};
};
};
class ACE_envelope_gigant: ACE_envelope_small {
displayName = CSTRING(EnvelopeGigantName);
descriptionShort = CSTRING(EnevlopeGigantDescription);
GVAR(diggingDuration) = QGVAR(gigantEnvelopeDigTime);
GVAR(removalDuration) = QGVAR(gigantEnvelopeRemovalTime);
GVAR(placementData)[] = {15,1.1,0.40};
GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};
model = QPATHTOF(data\trench_gigant.p3d);

class ACE_envelope_small_NoGeo: ACE_envelope_small {
scope = 1;
//@todo: replace by a no geo model
model = QPATHTOEF(apl,ace_envelope_small4_nogeo.p3d);
class GVAR(camouflagePositions) {
left1[] = {-0.5, 0.3, 0.5};
left2[] = {-2.7, 0.3, 0.5};
right1[] = {2.7, 0.15, 0.35};
right2[] = {4.9, -0.5, -0.15};
};
};
class ACE_envelope_big_NoGeo: ACE_envelope_big {
scope = 1;
//@todo: replace by a no geo model
model = QPATHTOEF(apl,ace_envelope_big4_nogeo.p3d);
class ACE_envelope_vehicle: ACE_envelope_small {
displayName = CSTRING(EnvelopeVehicleName);
descriptionShort = CSTRING(EnevlopeVehicleDescription);
GVAR(diggingDuration) = QGVAR(vehicleEnvelopeDigTime);
GVAR(removalDuration) = QGVAR(vehicleEnvelopeRemovalTime);
GVAR(placementData)[] = {6,1.1,0.20};
GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};
model = QPATHTOF(data\trench_vehicle.p3d);

class GVAR(camouflagePositions) {};
class Attributes {};
};

class ACE_envelope_short: ACE_envelope_small {
displayName = CSTRING(EnvelopeshortName);
descriptionShort = CSTRING(EnevlopeshortDescription);
GVAR(diggingDuration) = QGVAR(shortEnvelopeDigTime);
GVAR(removalDuration) = QGVAR(shortEnvelopeRemovalTime);
GVAR(placementData)[] = {6,1.1,0.20};
GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};
model = QPATHTOF(data\trench_short.p3d);

class GVAR(camouflagePositions) {
right[] = {1.1,0.2,0.2};
left[] = {-1.1,0.1,0.2};
};
class Attributes {};
};

class Box_NATO_Support_F;
Expand Down
Loading

0 comments on commit ec9b458

Please sign in to comment.