Add setting to disable base takeover #1886

No classes inherit from Generator_DZ, so there is no need to use
isKindOf over typeOf.
This commit is contained in:
ebaydayz
2017-02-01 12:16:16 -05:00
parent 9f7ae93bef
commit 6aa5c9b64f
7 changed files with 22 additions and 24 deletions

View File

@@ -1,14 +1,15 @@
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
dayz_actionInProgress = true;
private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype",
"_emptycan","_started","_finished","_animState","_isRefuel"];
"_emptycan","_started","_finished","_animState","_isRefuel","_type"];
_array = _this select 3;
_cantype = _array select 0;
_vehicle = _array select 1;
_type = typeOf _vehicle;
_canSize = getNumber(configFile >> "cfgMagazines" >> _cantype >> "fuelQuantity");
_emptycan = getText(configFile >> "cfgMagazines" >> _cantype >> "emptycan");
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
_configVeh = configFile >> "cfgVehicles" >> _type;
_capacity = getNumber(_configVeh >> "fuelCapacity");
_nameType = getText(_configVeh >> "displayName");
_curFuel = ((fuel _vehicle) * _capacity);
@@ -57,7 +58,7 @@ if (!_fueling) then {
r_doLoop = false;
if (_finished) then {
if((_vehicle isKindOf "Generator_DZ") && {!(_vehicle getVariable ["GeneratorFilled", false])}) then {
if ((_type == "Generator_DZ") && {!(_vehicle getVariable ["GeneratorFilled", false])}) then {
_vehicle setVariable ["GeneratorFilled", true, true];
};
if (local _vehicle) then {