From 301c4348e956e931225bf407d34b5d6db29a4793 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 19 May 2016 18:35:11 -0400 Subject: [PATCH] Remove vanilla generator fill actions --- .../Configs/CfgMagazines/Items/Generator.hpp | 1 + .../Configs/CfgVehicles/CfgVehicles.hpp | 35 ++++++++++--------- SQF/dayz_code/compile/fn_selfActions.sqf | 14 ++++---- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp index 315f98c98..1fc2a4180 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Generator.hpp @@ -8,6 +8,7 @@ class ItemGenerator : CA_Magazine picture = "\dayz_equip\textures\equip_generator_ca.paa"; displayName = $STR_EQUIP_NAME_31; descriptionShort = $STR_EQUIP_DESC_31; + weight = 30; // used in R3F weight class ItemActions { diff --git a/SQF/dayz_code/Configs/CfgVehicles/CfgVehicles.hpp b/SQF/dayz_code/Configs/CfgVehicles/CfgVehicles.hpp index dec777eb6..c4a327076 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/CfgVehicles.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/CfgVehicles.hpp @@ -593,7 +593,7 @@ class CfgVehicles { supplyRadius = 1; }; #include "gathered_plants.hpp" - class Generator_Base: BuiltItems //SkodaBase + class Generator_Base: BuiltItems //Vanilla generator uses SkodaBase but is currently not functional { model = "\dayz_equip\models\generator_gear.p3d"; picture = "\dayz_equip\textures\equip_generator_ca.paa"; @@ -601,23 +601,11 @@ class CfgVehicles { }; class Generator_DZ: Generator_Base { - scope = public; - destrType = "DestructNo"; - cost = 100; - offset[] = {0,1.5,0}; - model = "\dayz_equip\models\generator.p3d"; - icon = "\ca\data\data\Unknown_object.paa"; - mapSize = 2; - armor = 400; - displayName = "Generator"; - vehicleClass = "Fortifications"; - constructioncount = 1; - removeoutput[] = {{"ItemGenerator",1}}; - requireplot = 0; - nounderground = 0; + scope = public; // vanilla uses protected transportMaxWeapons=0; transportmaxbackpacks = 0; transportMaxMagazines=10; + displayName = "Generator"; weapons[] = {}; magazines[] = {}; class TransportBackpacks{}; @@ -629,11 +617,24 @@ class CfgVehicles { memoryPointSupply = ""; soundengineoffext[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-stop-1", 0.398107, 1, 250}; - soundengineonext[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-start-1", 0.398107, 1, 250}; + soundengineonext[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-start-1", 0.398107, 1, 250}; + // Epoch values + destrType = "DestructNo"; + cost = 100; + offset[] = {0,1.5,0}; + model = "\dayz_equip\models\generator.p3d"; + icon = "\ca\data\data\Unknown_object.paa"; + mapSize = 2; + armor = 400; + vehicleClass = "Fortifications"; + constructioncount = 1; + removeoutput[] = {{"ItemGenerator",1}}; + requireplot = 0; + nounderground = 0; class Turrets {}; - /* //Let's remove this because it apparently doesn't do anything + /* // Vanilla generator actions below are currently not functional, Epoch has these in fn_selfActions class UserActions { class EngineOn diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 71340f220..206f167be 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -297,7 +297,7 @@ 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 (_hasBarrel && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle} && {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"]; }; @@ -307,7 +307,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; //Allow player to fill vehicle 20L - if (_hasFuel20 && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle or _isGenerator} && {fuel _cursorTarget < 1} && {!a_player_jerryfilling} && {!_isDisallowRefuel}) then { + if (_hasFuel20 && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle} && {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",_cursorTarget], 0, true, true, "", "'ItemJerrycan' in magazines player"]; }; @@ -317,7 +317,7 @@ 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} && {!_isDisallowRefuel}) then { + if (_hasFuel5 && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle} && {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",_cursorTarget], 0, true, true, "", "'ItemFuelcan' in magazines player"]; }; @@ -326,12 +326,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_fillfuel5 = -1; }; /* - //power on Gen - if (_isGenerator && (fuel _cursorTarget > 0)) then { - player action["EngineOn", _cursorTarget]; - }; + Vanilla generator is currently not functional. + Vanilla generator refuel actions removed for now. + Epoch generator fill action is below. */ - // //Allow player to siphon vehicles if (_hasEmptyFuelCan && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle} && {!_isBicycle} && {!a_player_jerryfilling} && {fuel _cursorTarget > 0}) then { if (s_player_siphonfuel < 0) then {