Trenches - Add settings to configure dig/remove trenches durations (#7831)

* Trenches - Add settings to configure dig/remove trenches durations

Signed-off-by: Mysteryjuju <mysteryjuju42@gmail.com>

* Trenches - Remove dirty tabs

Signed-off-by: Mysteryjuju <mysteryjuju42@gmail.com>

* Trenches - Update French translation

Signed-off-by: Mysteryjuju <mysteryjuju42@gmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Update addons/trenches/stringtable.xml

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Trenches - Change SLIDER to TIME settings & update english translations

Signed-off-by: Mysteryjuju <mysteryjuju42@gmail.com>

* Trenches - Change CBA settings function

Signed-off-by: Mysteryjuju <mysteryjuju42@gmail.com>

Co-authored-by: Elgin675 <elgin675@hotmail.com>
This commit is contained in:
Mysteryjuju 2020-08-09 17:12:54 +02:00 committed by GitHub
parent 1626d05201
commit 5c68f1dac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 80 additions and 6 deletions

View File

@ -53,8 +53,8 @@ class CfgVehicles {
descriptionShort = CSTRING(EnevlopeSmallDescription);
model = QPATHTOEF(apl,ace_envelope_small4.p3d);
scope = 2;
GVAR(diggingDuration) = 20;
GVAR(removalDuration) = 12;
GVAR(diggingDuration) = QGVAR(smallEnvelopeDigDuration);
GVAR(removalDuration) = QGVAR(smallEnvelopeRemoveDuration);
GVAR(noGeoClass) = "ACE_envelope_small_NoGeo";
GVAR(placementData)[] = {2,3,0.35};
GVAR(grassCuttingPoints)[] = {{0,-0.5,0}};
@ -69,8 +69,8 @@ class CfgVehicles {
descriptionShort = CSTRING(EnevlopeBigDescription);
model = QPATHTOEF(apl,ace_envelope_big4.p3d);
scope = 2;
GVAR(diggingDuration) = 25;
GVAR(removalDuration) = 15;
GVAR(diggingDuration) = QGVAR(bigEnvelopeDigDuration);
GVAR(removalDuration) = QGVAR(bigEnvelopeRemoveDuration);
GVAR(noGeoClass) = "ACE_envelope_big_NoGeo";
GVAR(placementData)[] = {6,1.1,0.20};
GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};

View File

@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.sqf"
ADDON = true;

View File

@ -25,7 +25,7 @@ if(_actualProgress == 1) exitWith {};
// Mark trench as being worked on
_trench setVariable [QGVAR(digging), true, true];
private _digTime = getNumber (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration));
private _digTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration)), 20];
private _digTimeLeft = _digTime * (1 - _actualProgress);
private _placeData = _trench getVariable [QGVAR(placeData), [[], []]];

View File

@ -25,7 +25,7 @@ if(_actualProgress == 0) exitWith {};
// Mark trench as being worked on
_trench setVariable [QGVAR(digging), true, true];
private _removeTime = getNumber (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration));
private _removeTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration)), 12];
private _removeTimeLeft = _removeTime * _actualProgress;
if (isNil {_trench getVariable QGVAR(placeData)}) then {

View File

@ -0,0 +1,36 @@
// Trenches dig/remove durations
[
QGVAR(smallEnvelopeDigDuration),
"TIME",
[LSTRING(SmallEnvelopeDigDuration_DisplayName), LSTRING(SmallEnvelopeDigDuration_Description)],
LSTRING(Category),
[5, 600, 20],
true
] call CBA_fnc_addSetting;
[
QGVAR(smallEnvelopeRemoveDuration),
"TIME",
[LSTRING(SmallEnvelopeRemoveDuration_DisplayName), LSTRING(SmallEnvelopeRemoveDuration_Description)],
LSTRING(Category),
[5, 600, 12],
true
] call CBA_fnc_addSetting;
[
QGVAR(bigEnvelopeDigDuration),
"TIME",
[LSTRING(BigEnvelopeDigDuration_DisplayName), LSTRING(BigEnvelopeDigDuration_Description)],
LSTRING(Category),
[5, 600, 25],
true
] call CBA_fnc_addSetting;
[
QGVAR(bigEnvelopeRemoveDuration),
"TIME",
[LSTRING(BigEnvelopeRemoveDuration_DisplayName), LSTRING(BigEnvelopeRemoveDuration_Description)],
LSTRING(Category),
[5, 600, 15],
true
] call CBA_fnc_addSetting;

View File

@ -239,5 +239,41 @@
<Chinese>移除掩體中</Chinese>
<Turkish>Siper Kaldırılıyor</Turkish>
</Key>
<Key ID="STR_ACE_Trenches_Category">
<English>ACE Trenches</English>
<French>ACE Tranchées</French>
</Key>
<Key ID="STR_ACE_Trenches_SmallEnvelopeDigDuration_DisplayName">
<English>Small Trench Dig Duration</English>
<French>Petites tranchées - durée d'excavation</French>
</Key>
<Key ID="STR_ACE_Trenches_SmallEnvelopeDigDuration_Description">
<English>Time, in seconds, required to dig a small trench.</English>
<French>Définit le temps nécessaire au déploiement des petites tranchées (en secondes).</French>
</Key>
<Key ID="STR_ACE_Trenches_SmallEnvelopeRemoveDuration_DisplayName">
<English>Small Trench Remove Duration</English>
<French>Petites tranchées - durée de retrait</French>
</Key>
<Key ID="STR_ACE_Trenches_SmallEnvelopeRemoveDuration_Description">
<English>Time, in seconds, required to remove a small trench.</English>
<French>Définit le temps nécessaire pour le retrait des petites tranchées (en secondes).</French>
</Key>
<Key ID="STR_ACE_Trenches_BigEnvelopeDigDuration_DisplayName">
<English>Big Trench Dig Duration</English>
<French>Grandes tranchées - durée d'excavation</French>
</Key>
<Key ID="STR_ACE_Trenches_BigEnvelopeDigDuration_Description">
<English>Time, in seconds, required to dig a big trench.</English>
<French>Définit le temps nécessaire au déploiement des grandes tranchées (en secondes).</French>
</Key>
<Key ID="STR_ACE_Trenches_BigEnvelopeRemoveDuration_DisplayName">
<English>Big Trench Remove Duration</English>
<French>Grandes tranchées - durée de retrait</French>
</Key>
<Key ID="STR_ACE_Trenches_BigEnvelopeRemoveDuration_Description">
<English>Time, in seconds, required to remove a big trench.</English>
<French>Définit le temps nécessaire pour le retrait des grandes tranchées (en secondes).</French>
</Key>
</Package>
</Project>