Update jerry_fill.sqf

Vanilla commit:

ef236938c1
This commit is contained in:
ebayShopper
2017-04-14 11:26:23 -04:00
parent 9fc72a8b87
commit e99792d0f4
7 changed files with 17 additions and 36 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -284,7 +284,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
//Allow player to fill Fuel can
if (_hasEmptyFuelCan && {_isFuel} && {!a_player_jerryfilling} && {_isAlive}) then {
if (_hasEmptyFuelCan && _isFuel && _isAlive) then {
if (s_player_fillfuel < 0) then {
s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",_cursorTarget, 1, false, true];
};
@@ -295,7 +295,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
if (damage _cursorTarget < 1) then {
//Allow player to fill vehicle 210L
if (_hasBarrel && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_isDisallowRefuel}) then {
if (_hasBarrel && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then {
if (s_player_fillfuel210 < 0) then {
s_player_fillfuel210 = player addAction [format[localize "str_actions_medical_10",_text,"210"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelBarrel",_cursorTarget], 0, true, true, "", "'ItemFuelBarrel' in magazines player"];
};
@@ -305,7 +305,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
//Allow player to fill vehicle 20L
if (_hasFuel20 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_isDisallowRefuel}) then {
if (_hasFuel20 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then {
if (s_player_fillfuel20 < 0) then {
s_player_fillfuel20 = player addAction [format[localize "str_actions_medical_10",_text,"20"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemJerrycan",_cursorTarget], 0, true, true, "", "'ItemJerrycan' in magazines player"];
};
@@ -315,7 +315,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
//Allow player to fill vehicle 5L
if (_hasFuel5 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_isDisallowRefuel}) then {
if (_hasFuel5 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then {
if (s_player_fillfuel5 < 0) then {
s_player_fillfuel5 = player addAction [format[localize "str_actions_medical_10",_text,"5"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelcan",_cursorTarget], 0, true, true, "", "'ItemFuelcan' in magazines player"];
};
@@ -329,7 +329,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
Epoch generator fill action is below.
*/
//Allow player to siphon vehicles
if (_hasEmptyFuelCan && {!_isMan} && {_isVehicle} && {!_isBicycle} && {!a_player_jerryfilling} && {fuel _cursorTarget > 0}) then {
if (_hasEmptyFuelCan && {!_isMan} && {_isVehicle} && {!_isBicycle} && {fuel _cursorTarget > 0}) then {
if (s_player_siphonfuel < 0) then {
s_player_siphonfuel = player addAction [format[localize "str_siphon_start"], "\z\addons\dayz_code\actions\siphonFuel.sqf",_cursorTarget, 0, true, true];
};

View File

@@ -158,7 +158,6 @@ Dayz_GUI_B = 0.26; // -0.26
//actions blockers
a_player_cooking = false;
a_player_boil = false;
a_player_jerryfilling = false;
//Player self-action handles
dayz_resetSelfActions = {

View File

@@ -838,7 +838,6 @@
<German>Hacken</German>
<Czech>Rozsekat</Czech>
<French>Hacker</French>
<Spanish></Spanish>
</Key>
<Key ID="str_action_studybody">
<English>Study Body</English>
@@ -11552,14 +11551,6 @@
<French>La cuisson est déjà en cours.</French>
<Czech>Vaření již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_24">
<English>Refuel is already in progress.</English>
<German>Betanken bereits im Gange.</German>
<Russian>Уже заправляется.</Russian>
<Dutch>Je bent al aan het tanken.</Dutch>
<French>Le ravitaillement en carburant est déjà en cours.</French>
<Czech>Doplňování paliva již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_25">
<English>Preparing to fuel and start generator, move to cancel.</English>
<German>Betanken und Starten des Generators, bewege dich um den Vorgang abzubrechen.</German>
@@ -11573,7 +11564,7 @@
<German>Abgebrochen.</German>
<Russian>Отмена.</Russian>
<Dutch>Ge-annuleerd.</Dutch>
<French>Annulé</French></French>
<French>Annulé</French>
<Czech>Zrušeno.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_27">
@@ -11629,14 +11620,6 @@
<German>Du hast es geschafft %1 aufzubrechen.</German>
<Russian>Вам удалось открыть %1 с помощью набора для угона.</Russian>
</Key>
<Key ID="STR_EPOCH_PLAYER_34">
<English>You are already filling a fuel container.</English>
<German>Befüllen des Kraftstoffbehälters bereits im Gange.</German>
<Russian>Канистра уже наполняется.</Russian>
<Dutch>Je bent al een jerrycan aan het vullen.</Dutch>
<French>Le remplissage du jerrycan est déjà en cours.</French>
<Czech>Plnění kanystru již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_36">
<English>No recent Deaths.</English>
<German>Keine aktuellen Todesfälle.</German>