Rearm - Add enable setting (#8067)

* Add enable setting

* Update test

* Optimize eden macro

* Fix bad command name in eden

* Apply suggestions from code review

Co-authored-by: jonpas <jonpas33@gmail.com>

* Cleanup unused argument

* Handle RHS config

* Optimize init function a little

* Improve macro

Co-authored-by: jonpas <jonpas33@gmail.com>

* compats and leftovers

* function header (sorry jonpas)

* add enabled check to initSupplyVehicle

* use toString

* fix validate

* inheritance cleanup

---------

Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
This commit is contained in:
Dystopian
2023-07-28 12:47:23 +03:00
committed by GitHub
parent 93520bdc9d
commit 0321545098
15 changed files with 88 additions and 74 deletions

View File

@ -41,7 +41,11 @@ private _currentSupply = if (_addToCurrent) then {
_source setVariable [QGVAR(currentSupply), _currentSupply + _rearmCargo, true];
private _rearmCargoConfig = getNumber (configOf _source >> QGVAR(defaultSupply));
private _config = configOf _source;
private _rearmCargoConfig = getNumber (_config >> QGVAR(defaultSupply));
if (_rearmCargoConfig == 0) then {
_rearmCargoConfig = getNumber (_config >> "transportAmmo");
};
// initialize if it's not a config rearm vehicle
if (!(_rearmCargoConfig > 0 && _source getVariable [QGVAR(isSupplyVehicle), false])) then {