Skip to content

Commit

Permalink
Emergency Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AdlerSalbei committed Sep 26, 2018
1 parent 53ad42f commit 0456de8
Show file tree
Hide file tree
Showing 21 changed files with 128 additions and 558 deletions.
19 changes: 5 additions & 14 deletions addons/functions/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
class ACE_ContinueDiggingTrench { \
statement = QUOTE([ARR_2(_target,_player)] call FUNC(continueDiggingTrench);); \
}; \
class ACE_RemoveTrench { \
statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeTrench);); \
}; \
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(placeCamouflage) { \
displayName = CSTRING(placeCamouflage); \
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canPlaceCamouflage)); \
Expand Down Expand Up @@ -98,7 +89,7 @@ class CfgVehicles {
GVAR(isTrench) = 1;
ace_trenches_diggingDuration = QGVAR(smallEnvelopeDigTime);

class CamouflagePositions01 {
class CamouflagePositions {
center[] = {0, 1.3, 0};
left[] = {1.3, -0.8, 0.4};
right[] = {-1.3,-0.8,0.4};
Expand All @@ -114,7 +105,7 @@ class CfgVehicles {
GVAR(isTrench) = 1;
ace_trenches_diggingDuration = QGVAR(bigEnvelopeDigTime);

class CamouflagePositions01 {
class CamouflagePositions {
center[] = {-0.4, 0.4, 0.2};
left[] = {-1.75, 0.2, 0.2};
right[] = {1.75, 0.2, 0.2};
Expand All @@ -138,7 +129,7 @@ class CfgVehicles {
editorCategory = "EdCat_Things";
editorSubcategory = "EdSubcat_Military";

class CamouflagePositions01 {
class CamouflagePositions {
left1[] = {-0.5, 0.3, 0.5};
left2[] = {-2.7, 0.3, 0.5};
right1[] = {2.7, 0.15, 0.35};
Expand All @@ -160,7 +151,7 @@ class CfgVehicles {
editorCategory = "EdCat_Things";
editorSubcategory = "EdSubcat_Military";

class CamouflagePositions01 {};
class CamouflagePositions {};
class Attributes {};
};

Expand All @@ -178,7 +169,7 @@ class CfgVehicles {
editorCategory = "EdCat_Things";
editorSubcategory = "EdSubcat_Military";

class CamouflagePositions01 {
class CamouflagePositions {
right[] = {1.1,0.2,0.2};
left[] = {-1.1,0.1,0.2};
};
Expand Down
97 changes: 14 additions & 83 deletions addons/functions/CfgWorldsTextures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,15 @@ class CfgWorldsTextures {
//Baranow
class Baranow {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_Surfaces_t\staszow\";
filePrefix = "co.paa";
camouflageObjects[] = {};
class Surfaces {
class lib_sf_france_raps {
texturePath = "WW2\TerrainsIF_t\Worlds\IF_Surfaces_t\France\lib_sf_france_raps_co.paa";
};
};
};
//Baranow Winter
class BaranowWinter {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_SurfacesWinter_t\Baranow\";
filePrefix = "co.paa";
filePrefix = "_co.paa";
camouflageObjects[] = {};
};
//Bray-Dunes
class SWU_Dunkirk_Bray_Dunes_1940: Baranow {
class SWU_Dunkirk_Bray_Dunes_1940 {
surfaceTextureBasePath = "WW2\TerrainsWW2_swurvin\Surfaces_t\";
filePrefix = "_co.paa";
filePrefix = "co.paa";
camouflageObjects[] = {};
class Surfaces {
class Default {
texturePath = "a3\map_data\gdt_beach_co.paa";
};
};
};
// Bukovina
Expand Down Expand Up @@ -78,14 +62,8 @@ class CfgWorldsTextures {
};
//Colleville
class Colleville: Baranow {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_Surfaces_t\France\";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
//Colleville Winter
class CollevilleWinter {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_SurfacesWinter_t\France\";
class Colleville {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_Surfaces_t\staszow\";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
Expand All @@ -101,14 +79,14 @@ class CfgWorldsTextures {
class pja310 {
surfaceTextureBasePath = "mak\projetA3-10\Data\";
filePrefix = "co.paa";
camouflageObjects[] = {"A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
camouflageObjects[] = {/*"A3\plants_f\Clutter\c_Thistle_Thorn_Brown.p3d" ,*/ "A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
};
//G.O.S Leskovets
class pja314 {
surfaceTextureBasePath = "MAK\projetA3014\data\";
filePrefix = "co.paa";
camouflageObjects[] = {"A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
camouflageObjects[] = {/*"A3\plants_f\Clutter\c_Thistle_Thorn_Brown.p3d" ,*/ "A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
};
//Ivachev
Expand All @@ -118,32 +96,11 @@ class CfgWorldsTextures {
camouflageObjects[] = {};
};
//Ivachev Winter
class IvachevWinter {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_SurfacesWinter_t\Ivachev\";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
//Panovo Winter
class PanovoWinter {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_SurfacesWinter_t\Panovo\";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
//Staszow Winter
class StaszowWinter {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_SurfacesWinter_t\Staszow\";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
// Kerama
class kerama {
surfaceTextureBasePath = "Kerama\data\";
filePrefix = "co.paa";
camouflageObjects[] = {"A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
camouflageObjects[] = {/*"A3\plants_f\Clutter\c_Thistle_Thorn_Brown.p3d" ,*/ "A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
};
//Lythium
Expand All @@ -167,34 +124,20 @@ class CfgWorldsTextures {
class Napf {
surfaceTextureBasePath = "momo\Napf\data\";
filePrefix = "co.paa";
camouflageObjects[] = {"A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
camouflageObjects[] = {/*"A3\plants_f\Clutter\c_Thistle_Thorn_Brown.p3d" ,*/ "A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d"};
};
//Montherme
class SWU_Ardennes_1940: Baranow {
class SWU_Ardennes_1940 {
surfaceTextureBasePath = "WW2\TerrainsWW2_swurvin\Surfaces_t\";
filePrefix = "_co.paa";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
//Montherme Winter
class SWU_Ardennes_1944_Winter {
surfaceTextureBasePath = "WW2\TerrainsWW2_swurvin\Surfaces_t\";
filePrefix = "_co.paa";
camouflageObjects[] = {};
};
//Pella Region Greece
class SWU_Greece_Pella_Region {
surfaceTextureBasePath = "WW2\TerrainsWW2_swurvin\Surfaces_t\";
filePrefix = "_co.paa";
camouflageObjects[] = {};
};
//Volkhov Forest
class SWU_Russia_Volkhov_Forest {
surfaceTextureBasePath = "WW2\TerrainsWW2_swurvin\Surfaces_t\";
filePrefix = "_co.paa";
filePrefix = "co.paa";
camouflageObjects[] = {};
};
Expand Down Expand Up @@ -250,15 +193,10 @@ class CfgWorldsTextures {
};
//Sark
class Hyde_Sark: Baranow {
class Hyde_Sark {
surfaceTextureBasePath = "WW2\TerrainsWW2_Hyde\Surfaces_t\";
filePrefix = "co.paa";
camouflageObjects[] = {};
class Surfaces {
class default {
texturePath = "WW2\TerrainsWW2_Hyde\Surfaces_t\Hyde_SA_beach_co.paa";
};
};
};
//Shapur
Expand All @@ -275,8 +213,7 @@ class CfgWorldsTextures {
camouflageObjects[] = {"A3\plants_f\Clutter\c_Thistle_Thorn_Brown.p3d"};
};
//Staszow
class Staszow: Baranow {
class Staszow {
surfaceTextureBasePath = "WW2\TerrainsIF_t\Worlds\IF_Surfaces_t\staszow\";
filePrefix = "co.paa";
camouflageObjects[] = {};
Expand Down Expand Up @@ -330,10 +267,4 @@ class CfgWorldsTextures {
filePrefix = "co.paa";
camouflageObjects[] = {"ca\plants_E\Clutter\c_Brush_Soft_EP1.p3d"};
};
//Ihantala Winter
class tem_ihantalaw {
surfaceTextureBasePath = "tem\tem_ihantalaw\data\";
filePrefix = "_co.paa";
camouflageObjects[] = {};
};
};
5 changes: 1 addition & 4 deletions addons/functions/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
PREP(addDigger);
PREP(applyCamouflageAttribute);
PREP(canHelpDiggingTrench);
PREP(canPlaceCamouflage);
PREP(canRemoveCamouflage);
PREP(continueDiggingTrench);
Expand All @@ -11,6 +9,5 @@ PREP(initTrench3DEN);
PREP(placeCamouflage);
PREP(placeConfirm);
PREP(placeTrench);
PREP(progressBar);
PREP(removeCamouflage);
PREP(removeTrench);
PREP(setTrenchPlacement);
1 change: 0 additions & 1 deletion addons/functions/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ PREP_RECOMPILE_END;
[QGVAR(allowCamouflage), "CHECKBOX", [localize LSTRING(settingAllowCamouflage_displayName), localize LSTRING(settingAllowCamouflage_tooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
[QGVAR(camouflageRequireEntrenchmentTool), "CHECKBOX", [localize LSTRING(settingCamouflageRequireEntrenchmentTool_displayName), localize LSTRING(settingCamouflageRequireEntrenchmentTool_tooltip)], localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init;
[QGVAR(buildFatigueFactor), "SLIDER", [localize LSTRING(settingBuildFatigueFactor_displayName), localize LSTRING(settingBuildFatigueFactor_tooltip)], localize LSTRING(settingCategory), [0, 5, 1, 1]] call CBA_Settings_fnc_init;
[QGVAR(stopBuildingAtFatigueMax), "CHECKBOX", [localize LSTRING(stopBuildingAtFatigueMax_displayName), localize LSTRING(stopBuildingAtFatigueMax_tooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;

[QGVAR(allowShortEnvelope), "CHECKBOX", [localize LSTRING(allowShortEnvelope_displayName), localize LSTRING(allowShortEnvelope_tooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
[QGVAR(allowSmallEnvelope), "CHECKBOX", [localize LSTRING(allowSmallEnvelope_displayName), localize LSTRING(allowSmallEnvelope_tooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
Expand Down
65 changes: 0 additions & 65 deletions addons/functions/functions/fnc_addDigger.sqf

This file was deleted.

6 changes: 6 additions & 0 deletions addons/functions/functions/fnc_applyCamouflageAttribute.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
#include "script_component.hpp"
params ["_object", "_value"];

diag_log "Attribute value";
diag_log str(_value);
diag_log str(_object);

if (_value isEqualTo 1) then {
diag_log "Placing camouflage";
[_object] call FUNC(placeCamouflage);
} else {
diag_log "Removing camouflage";
[_object] call FUNC(deleteCamouflage);
};
21 changes: 0 additions & 21 deletions addons/functions/functions/fnc_canHelpDiggingTrench.sqf

This file was deleted.

13 changes: 2 additions & 11 deletions addons/functions/functions/fnc_canPlaceCamouflage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@

params ["_trench", "_unit"];

private _statusNumber = _trench getVariable [QGVAR(trenchCamouflageStatus), 0];
private _statusString = "";

if (_statusNumber <10) then {
_statusString = ("CamouflagePositions0" + str(_statusNumber +1));
}else{
_statusString = ("CamouflagePositions" + str(_statusNumber +1));
};

if !(GVAR(allowCamouflage)) exitWith {false};
if (GVAR(camouflageRequireEntrenchmentTool) && {!("ACE_EntrenchingTool" in items _unit)}) exitWith {false};

(isClass (configFile >> "CfgVehicles" >> (typeof _trench) >> _statusString)) &&
(count (_trench getVariable [QGVAR(camouflageObjects), []]) == 0) &&
{count (getArray (configFile >> "CfgWorldsTextures" >> worldName >> "camouflageObjects")) > 0} &&
{count (configProperties [configFile >> "CfgVehicles" >> (typeof _trench) >> _statusString]) > 0}
{count (configProperties [configFile >> "CfgVehicles" >> (typeof _trench) >> "CamouflagePositions"]) > 0}
2 changes: 1 addition & 1 deletion addons/functions/functions/fnc_canRemoveCamouflage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#include "script_component.hpp"

params ["_trench"];
if !(GVAR(allowCamouflage)) exitWith {false};

(count (_trench getVariable [QGVAR(camouflageObjects), []]) > 0)
Loading

0 comments on commit 0456de8

Please sign in to comment.