ACE3/addons/refuel/initSettings.inc.sqf
Dystopian 7c65f8503d
Refuel - Add enable setting (#7613)
* Add enable setting

* Exclude man class init

* Fix multiplayer terrain pump fuel sync

* Add terrain pumps positions

* Add vanilla fuel cargo restoring before destroying

* Add Livonia positions by bux

* Fix terrain pumps destruction

* Improve settings init

* Fix double settings category

* Check enabled var in public functions

* Fix fnc_makeSource

* Handle recent CUP Terrains changes

* Update includes

* Fix issues introduced in #9133

* Change warning

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Optimisations and cleanup

- Use hashmaps wherever possible
- Reduced pump search radius by ~30%
- Sorted pumps alphabetically and sorted positions by "smallest" first, for consistency

* Add init debug trace

* compileScript in dev

* yoda conditions & DFUNC macro

* Wait until CBA settings are ready

* Update Chernarus 2020 and add more maps configs

* Remove vanilla fuel cargo restoring before destroying

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-05-23 21:47:19 +02:00

48 lines
1.7 KiB
Plaintext

private _category = [ELSTRING(main,Category_Logistics), "str_state_refuel"];
[
QGVAR(enabled), "CHECKBOX",
ELSTRING(common,Enabled),
_category,
true,
1,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_fnc_addSetting;
[
QGVAR(rate), "SLIDER",
[LSTRING(RefuelSettings_speed_DisplayName), LSTRING(RefuelSettings_speed_Description)],
_category,
[0,25,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(rate), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting;
[
QGVAR(cargoRate), "SLIDER",
[LSTRING(RefuelSettings_speedCargo_DisplayName), LSTRING(RefuelSettings_speedCargo_Description)],
_category,
[0,250,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(cargoRate), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting;
[
QGVAR(hoseLength), "SLIDER",
[LSTRING(RefuelSettings_hoseLength_DisplayName)],
_category,
[0,50,12,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting;
[
QGVAR(progressDuration), "TIME",
[LSTRING(RefuelSettings_progressDuration_DisplayName), LSTRING(RefuelSettings_progressDuration_Description)],
_category,
[0, 10, 2], // [min, max, default value]
true, // isGlobal
{[QGVAR(progressDuration), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting;