diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp index 3d7d2ee28..af2888e1d 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp @@ -282,6 +282,8 @@ class ItemFuelBarrel: CA_Magazine model = "\z\addons\dayz_epoch\models\oil_drum_model.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_oil_drum_model_ca.paa"; descriptionShort = "210 litres of fuel per barrel"; + fireIntensity = 6; //used for tent burning + emptycan = "ItemFuelBarrelEmpty"; }; class ItemFuelBarrelEmpty: ItemFuelBarrel { @@ -292,15 +294,16 @@ class ItemFuelBarrelEmpty: ItemFuelBarrel displayName = "Fuel Barrel (Empty)"; picture = "\z\addons\dayz_epoch\pictures\equip_oildrum_e_CA.paa"; descriptionShort = "210 litres of fuel per barrel (Empty)"; + fullcan = "ItemFuelBarrel"; class ItemActions { class Crafting { - text = $STR_EPOCH_PLAYER_276; - script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem; r_action_count = r_action_count + 1;"; - neednearby[] = {}; - requiretools[] = {"ItemToolbox","ItemMatchbox"}; - output[] = {{"ItemFireBarrel_kit",1}}; - input[] = {{"ItemFuelBarrelEmpty",1},{"ItemJerryCan",1},{"PartWoodPile",4}}; + text = $STR_EPOCH_PLAYER_276; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem; r_action_count = r_action_count + 1;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox","ItemMatchbox"}; + output[] = {{"ItemFireBarrel_kit",1}}; + input[] = {{"ItemFuelBarrelEmpty",1},{"ItemJerryCan",1},{"PartWoodPile",4}}; }; }; }; diff --git a/SQF/dayz_code/actions/refuel.sqf b/SQF/dayz_code/actions/refuel.sqf index 49e8b47fd..0f7907565 100644 --- a/SQF/dayz_code/actions/refuel.sqf +++ b/SQF/dayz_code/actions/refuel.sqf @@ -1,11 +1,11 @@ if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;}; DZE_ActionInProgress = true; private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype", -"_emptycan","_isMan","_isAnimal","_isZombie","_started","_finished","_animState","_isRefuel"]; +"_emptycan","_started","_finished","_animState","_isRefuel"]; -_vehicle = cursorTarget; _array = _this select 3; _cantype = _array select 0; +_vehicle = _array select 1; _canSize = getNumber(configFile >> "cfgMagazines" >> _cantype >> "fuelQuantity"); _emptycan = getText(configFile >> "cfgMagazines" >> _cantype >> "emptycan"); _configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle); @@ -14,11 +14,7 @@ _nameType = getText(_configVeh >> "displayName"); _curFuel = ((fuel _vehicle) * _capacity); _newFuel = (_curFuel + _canSize); _fueling = player getVariable ["fueling",false]; -_isMan = _vehicle isKindOf "Man"; -_isAnimal = _vehicle isKindOf "Animal"; -_isZombie = _vehicle isKindOf "zZombie_base"; -if (_isMan or _isAnimal or _isZombie) exitWith { localize "str_refuel_notvehicle" call dayz_rollingMessages; DZE_ActionInProgress = false;}; if (fuel _vehicle == 1) exitWith {DZE_ActionInProgress = false;}; player removeAction s_player_fillfuel + _capacity; diff --git a/SQF/dayz_code/actions/siphonFuel.sqf b/SQF/dayz_code/actions/siphonFuel.sqf index 5cf841ae7..0d8c07911 100644 --- a/SQF/dayz_code/actions/siphonFuel.sqf +++ b/SQF/dayz_code/actions/siphonFuel.sqf @@ -1,7 +1,8 @@ private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort", "_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText", -"_availableCansEmpty","_hasHose","_PlayerNear","_isMan","_isAnimal","_isZombie"]; +"_availableCansEmpty","_hasHose","_PlayerNear"]; +_vehicle = _this select 3; player removeAction s_player_siphonfuel; _hasHose = "equip_hose" in magazines player; @@ -11,18 +12,12 @@ _PlayerNear = {isPlayer _x} count ((getPosATL _vehicle) nearEntities ["CAManBase if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages;}; dayz_siphonFuelInProgress = true; -_vehicle = _this select 3; _abort = false; // Static vehicle fuel information _configVeh = configFile >> "cfgVehicles" >> typeOf _vehicle; _capacity = getNumber(_configVeh >> "fuelCapacity"); _nameText = getText(_configVeh >> "displayName"); -_isMan = _vehicle isKindOf "Man"; -_isAnimal = _vehicle isKindOf "Animal"; -_isZombie = _vehicle isKindOf "zZombie_base"; - -if (_isMan or _isAnimal or _isZombie) exitWith { localize "str_siphon_notvehicle" call dayz_rollingMessages; }; // Loop to find containers that can could hold fuel and fill them { @@ -35,7 +30,7 @@ if (_isMan or _isAnimal or _isZombie) exitWith { localize "str_siphon_notvehicle _canTypeEmpty = getText(_configCanEmpty >> "displayName"); // Get Full can size - _canName = configName(inheritsFrom(configFile >> "cfgMagazines" >> _canNameEmpty)); + _canName = getText(_configCanEmpty >> "fullCan"); _canSize = getNumber(configFile >> "cfgMagazines" >> _canName >> "fuelQuantity"); // is empty diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 8dfbc3d51..3cda44807 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -289,10 +289,20 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; if (damage _cursorTarget < 1) then { + //Allow player to fill vehicle 210L + if (_hasBarrel && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle or _isGenerator} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_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"]; + }; + } else { + player removeAction s_player_fillfuel210; + s_player_fillfuel210 = -1; + }; + //Allow player to fill vehicle 20L - if ((_hasFuel20 or _hasBarrel) && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle or _isGenerator} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_isDisallowRefuel}) then { + if (_hasFuel20 && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle or _isGenerator} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_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"], 0, true, true, "", "(('ItemJerrycan' in magazines player) or ('ItemFuelBarrel' in magazines player))"]; + 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"]; }; } else { player removeAction s_player_fillfuel20; @@ -300,9 +310,9 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; //Allow player to fill vehicle 5L - if (_hasFuel5 && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle or _isGenerator} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling}) then { + if (_hasFuel5 && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle or _isGenerator} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_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"], 0, true, true, "", "'ItemFuelcan' in magazines player"]; + 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"]; }; } else { player removeAction s_player_fillfuel5; @@ -325,6 +335,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_siphonfuel = -1; }; } else { + player removeAction s_player_fillfuel210; + s_player_fillfuel210 = -1; player removeAction s_player_fillfuel20; s_player_fillfuel20 = -1; player removeAction s_player_fillfuel5; @@ -1017,6 +1029,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_studybody; s_player_studybody = -1; //fuel + player removeAction s_player_fillfuel210; + s_player_fillfuel210 = -1; player removeAction s_player_fillfuel20; s_player_fillfuel20 = -1; player removeAction s_player_fillfuel5; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 625233155..757094902 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -175,6 +175,7 @@ dayz_resetSelfActions = { s_player_flipveh = -1; s_player_stats = -1; s_player_sleep = -1; + s_player_fillfuel210 = -1; s_player_fillfuel20 = -1; s_player_fillfuel5 = -1; s_player_siphonfuel = -1; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index c52d5e958..36a9b36c8 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -1349,22 +1349,6 @@ Un tuyau serait nécessaire pour ce faire. Dafür brauchst du einen Schlauch. - - You can only siphon the fuel from a vehicle! - Сливать топливо можно только из транспорта! - Sólo se puede desviar el combustible de un vehículo! - Palivo lze přečerpávat pouze z vozidla! - Vous ne pouvez siphonner du carburant que d'un véhicule! - Du kannst nur aus einem Fahrzeug Treibstoff abzapfen. - - - You can only refuel a vehicle! - Заправлять можно только транспорт! - Sólo se puede repostar un vehículo! - Můžete dotankovat pouze vozidla! - Vous ne pouvez faire le plein que d'un véhicule! - Du kannst nur ein Fahrzeug auftanken. - Unable to set on fire, missing matches. Нечем разжечь огонь. Может найти спички?