mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 15:40:50 +03:00
@@ -1,5 +1,5 @@
|
||||
private ["_isFuelTruck","_fuelTruckCapacity","_started","_finished","_animState","_isMedic","_newFuel","_abort","_newFuelSrc","_canSize","_vehicle","_configVeh","_capacity","_nameText","_fuelTruck","_findNearestVehicle"];
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_fuelTruck = _this select 3;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_soundSource","_fuelCan","_emptyCan"];
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_fillgen;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_34" call dayz_rollingMessages;};
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
private ["_qty","_dis","_sfx","_started","_finished","_animState","_isRefuel","_fuelCans","_qty20","_qty5","_qty210","_magazines","_cursorTarget","_fuelAmount","_fuelNeeded"];
|
||||
private ["_qty","_dis","_sfx","_started","_finished","_animState","_isRefuel","_qty20","_qty5","_qty210","_magazines","_cursorTarget","_fuelAmount","_fuelNeeded"];
|
||||
|
||||
player removeAction s_player_fillfuel;
|
||||
//s_player_fillfuel = -1;
|
||||
@@ -18,17 +18,17 @@ if (isNil "_fuelAmount") then {
|
||||
_qty5 = {_x == "ItemFuelcanEmpty"} count _magazines;
|
||||
_qty20 = {_x == "ItemJerrycanEmpty"} count _magazines;
|
||||
_qty210 = {_x == "ItemFuelBarrelEmpty"} count _magazines;
|
||||
_qty = _qty5 + _qty20 + _qty210;
|
||||
|
||||
_fuelNeeded = (_qty5 * 5) + (_qty20 * 20) + (_qty210 * 210);
|
||||
|
||||
//Inform if there is not enough to fill all containers in inventory, then proceed to fill available containers
|
||||
if (_fuelAmount < _fuelNeeded) then {format[localize "str_fill_notenough",typeOf _cursorTarget,_fuelAmount,_fuelNeeded] call dayz_rollingMessages;};
|
||||
|
||||
_fuelCans = ["ItemFuelcanEmpty","ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||
//If there is not enough to fill any of their cans then exit
|
||||
if (_fuelAmount < 5 or (_fuelAmount < 20 && _qty5 == 0) or (_fuelAmount < 210 && (_qty5 == 0 && _qty20 == 0))) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
_qty = 0;
|
||||
_qty = {_x in _fuelCans} count _magazines;
|
||||
|
||||
if (("ItemJerrycanEmpty" in _magazines) or ("ItemFuelcanEmpty" in _magazines) or ("ItemFuelBarrelEmpty" in _magazines)) then {
|
||||
if (_qty > 0) then {
|
||||
player playActionNow "Medic";
|
||||
|
||||
_dis=5;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype",
|
||||
"_emptycan","_started","_finished","_animState","_isRefuel","_type"];
|
||||
@@ -19,7 +19,6 @@ _fueling = player getVariable ["fueling",false];
|
||||
if (fuel _vehicle == 1) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
player removeAction s_player_fillfuel + _capacity;
|
||||
a_player_jerryfilling = true;
|
||||
player setVariable ["fueling", true];
|
||||
|
||||
if (!_fueling) then {
|
||||
@@ -76,7 +75,7 @@ if (!_fueling) then {
|
||||
} else {
|
||||
localize "str_refuel_fail" call dayz_rollingMessages;
|
||||
};
|
||||
a_player_jerryfilling = false;
|
||||
|
||||
r_action = false;
|
||||
player setVariable ["fueling", false];
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
Reference in New Issue
Block a user