mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user