mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Refuel - Add Progress Bar Duration Setting (#8971)
* Refuel: Allow changing progress bars' duration * Clarify Turkish progressDuration_DisplayName * Update addons/refuel/functions/fnc_moduleRefuelSettings.sqf * Change progressDuration setting's type to TIME * Update progressDuration setting display name, add description too Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
a76f8924d8
commit
f3c66e83b4
@ -78,6 +78,11 @@ class CfgVehicles {
|
|||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
defaultValue = 12;
|
defaultValue = 12;
|
||||||
};
|
};
|
||||||
|
class progressDuration {
|
||||||
|
displayName = CSTRING(RefuelSettings_progressDuration_DisplayName);
|
||||||
|
typeName = "NUMBER";
|
||||||
|
defaultValue = 2;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,4 +2,3 @@
|
|||||||
#define REFUEL_DISABLED_FUEL -1
|
#define REFUEL_DISABLED_FUEL -1
|
||||||
#define REFUEL_ACTION_DISTANCE 7
|
#define REFUEL_ACTION_DISTANCE 7
|
||||||
#define REFUEL_NOZZLE_ACTION_DISTANCE 2
|
#define REFUEL_NOZZLE_ACTION_DISTANCE 2
|
||||||
#define REFUEL_PROGRESS_DURATION 2
|
|
||||||
|
@ -21,7 +21,7 @@ params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]];
|
|||||||
private _fuel = [_source] call FUNC(getFuel);
|
private _fuel = [_source] call FUNC(getFuel);
|
||||||
|
|
||||||
[
|
[
|
||||||
TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION * 2),
|
GVAR(progressDuration) * 2,
|
||||||
[_unit, _source, _fuel],
|
[_unit, _source, _fuel],
|
||||||
{
|
{
|
||||||
params ["_args"];
|
params ["_args"];
|
||||||
|
@ -65,7 +65,7 @@ _bestPosASL = _bestPosASL vectorAdd ((_bestPosASL vectorFromTo _startingPosASL)
|
|||||||
private _attachPosModel = _sink worldToModel (ASLtoAGL _bestPosASL);
|
private _attachPosModel = _sink worldToModel (ASLtoAGL _bestPosASL);
|
||||||
|
|
||||||
[
|
[
|
||||||
TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION),
|
GVAR(progressDuration),
|
||||||
[_unit, _nozzle, _sink, _attachPosModel],
|
[_unit, _nozzle, _sink, _attachPosModel],
|
||||||
{
|
{
|
||||||
params ["_args"];
|
params ["_args"];
|
||||||
|
@ -23,5 +23,6 @@ if !(_activated) exitWith {};
|
|||||||
|
|
||||||
[_logic, QGVAR(rate), "rate"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(rate), "rate"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(hoseLength), "hoseLength"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(hoseLength), "hoseLength"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(progressDuration), "progressDuration"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
INFO_2("Refuel Module Initialized with flow rate: %1 - hoseLength: %2",GVAR(rate), GVAR(hoseLength))
|
INFO_3("Refuel Module Initialized with flow rate: %1 - hoseLength: %2 - progressDuration: %3",GVAR(rate),GVAR(hoseLength),GVAR(progressDuration))
|
||||||
|
@ -23,7 +23,7 @@ private _nozzle = _unit getVariable [QGVAR(nozzle), objNull];
|
|||||||
if (isNull _nozzle || {_source != _nozzle getVariable QGVAR(source)}) exitWith {};
|
if (isNull _nozzle || {_source != _nozzle getVariable QGVAR(source)}) exitWith {};
|
||||||
|
|
||||||
[
|
[
|
||||||
TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION),
|
GVAR(progressDuration),
|
||||||
[_unit, _nozzle, _source],
|
[_unit, _nozzle, _source],
|
||||||
{
|
{
|
||||||
params ["_args"];
|
params ["_args"];
|
||||||
|
@ -22,7 +22,7 @@ params [
|
|||||||
];
|
];
|
||||||
|
|
||||||
[
|
[
|
||||||
TIME_PROGRESSBAR(REFUEL_PROGRESS_DURATION),
|
GVAR(progressDuration),
|
||||||
[_unit, _object],
|
[_unit, _object],
|
||||||
{
|
{
|
||||||
params ["_args"];
|
params ["_args"];
|
||||||
|
@ -15,3 +15,12 @@
|
|||||||
true, // isGlobal
|
true, // isGlobal
|
||||||
{[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
{[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(progressDuration), "TIME",
|
||||||
|
[LSTRING(RefuelSettings_progressDuration_DisplayName), LSTRING(RefuelSettings_progressDuration_Description)],
|
||||||
|
[localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_refuel"],
|
||||||
|
[0, 10, 2], // [min, max, default value]
|
||||||
|
true, // isGlobal
|
||||||
|
{[QGVAR(progressDuration), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define COMPONENT_BEAUTIFIED Refuel
|
#define COMPONENT_BEAUTIFIED Refuel
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
// #define FAST_PROGRESSBARS
|
|
||||||
// #define DRAW_HOOKS_POS
|
// #define DRAW_HOOKS_POS
|
||||||
// #define DEBUG_MODE_FULL
|
// #define DEBUG_MODE_FULL
|
||||||
// #define DISABLE_COMPILE_CACHE
|
// #define DISABLE_COMPILE_CACHE
|
||||||
@ -20,11 +19,5 @@
|
|||||||
|
|
||||||
#include "\z\ace\addons\refuel\defines.hpp"
|
#include "\z\ace\addons\refuel\defines.hpp"
|
||||||
|
|
||||||
#ifdef FAST_PROGRESSBARS
|
|
||||||
#define TIME_PROGRESSBAR(X) ((X) * 0.075)
|
|
||||||
#else
|
|
||||||
#define TIME_PROGRESSBAR(X) (X)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define INTERACT_EXCEPTIONS_REFUELING "isNotInside", "isNotOnLadder", "isNotSwimming"
|
#define INTERACT_EXCEPTIONS_REFUELING "isNotInside", "isNotOnLadder", "isNotSwimming"
|
||||||
#define INTERACT_EXCEPTIONS INTERACT_EXCEPTIONS_REFUELING, "isNotRefueling"
|
#define INTERACT_EXCEPTIONS INTERACT_EXCEPTIONS_REFUELING, "isNotRefueling"
|
||||||
|
@ -479,7 +479,15 @@
|
|||||||
<Portuguese>Comprimento da Mangueira de Combustível</Portuguese>
|
<Portuguese>Comprimento da Mangueira de Combustível</Portuguese>
|
||||||
<French>Longueur du tuyau</French>
|
<French>Longueur du tuyau</French>
|
||||||
<Czech>Délka hadice na palivo</Czech>
|
<Czech>Délka hadice na palivo</Czech>
|
||||||
<Turkish>Yakıt poması uzunluğu</Turkish>
|
<Turkish>Yakıt hortumu uzunluğu</Turkish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Refuel_RefuelSettings_progressDuration_DisplayName">
|
||||||
|
<English>Pump/Hose Interaction Time</English>
|
||||||
|
<Turkish>Pompa/Hortum Etkileşim Süresi</Turkish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Refuel_RefuelSettings_progressDuration_Description">
|
||||||
|
<English>How long refuel interactions take in seconds.</English>
|
||||||
|
<Turkish>Saniye biriminde yakıt ikmali etkileşimlerinin süresi.</Turkish>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Refuel_fuelCargo_edenName">
|
<Key ID="STR_ACE_Refuel_fuelCargo_edenName">
|
||||||
<English>Fuel Cargo Volume</English>
|
<English>Fuel Cargo Volume</English>
|
||||||
|
Loading…
Reference in New Issue
Block a user