mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user