Remove vanilla generator fill actions

This commit is contained in:
ebaydayz
2016-05-19 18:35:11 -04:00
parent 62700f37e4
commit 301c4348e9
3 changed files with 25 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ class ItemGenerator : CA_Magazine
picture = "\dayz_equip\textures\equip_generator_ca.paa"; picture = "\dayz_equip\textures\equip_generator_ca.paa";
displayName = $STR_EQUIP_NAME_31; displayName = $STR_EQUIP_NAME_31;
descriptionShort = $STR_EQUIP_DESC_31; descriptionShort = $STR_EQUIP_DESC_31;
weight = 30; // used in R3F weight
class ItemActions class ItemActions
{ {

View File

@@ -593,7 +593,7 @@ class CfgVehicles {
supplyRadius = 1; supplyRadius = 1;
}; };
#include "gathered_plants.hpp" #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"; model = "\dayz_equip\models\generator_gear.p3d";
picture = "\dayz_equip\textures\equip_generator_ca.paa"; picture = "\dayz_equip\textures\equip_generator_ca.paa";
@@ -601,23 +601,11 @@ class CfgVehicles {
}; };
class Generator_DZ: Generator_Base class Generator_DZ: Generator_Base
{ {
scope = public; scope = public; // vanilla uses protected
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;
transportMaxWeapons=0; transportMaxWeapons=0;
transportmaxbackpacks = 0; transportmaxbackpacks = 0;
transportMaxMagazines=10; transportMaxMagazines=10;
displayName = "Generator";
weapons[] = {}; weapons[] = {};
magazines[] = {}; magazines[] = {};
class TransportBackpacks{}; class TransportBackpacks{};
@@ -630,10 +618,23 @@ class CfgVehicles {
soundengineoffext[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-stop-1", 0.398107, 1, 250}; 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 {}; 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 UserActions
{ {
class EngineOn class EngineOn

View File

@@ -297,7 +297,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
if (damage _cursorTarget < 1) then { if (damage _cursorTarget < 1) then {
//Allow player to fill vehicle 210L //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 { 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"]; 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 //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 { 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"]; 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 //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 { 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"]; 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; s_player_fillfuel5 = -1;
}; };
/* /*
//power on Gen Vanilla generator is currently not functional.
if (_isGenerator && (fuel _cursorTarget > 0)) then { Vanilla generator refuel actions removed for now.
player action["EngineOn", _cursorTarget]; Epoch generator fill action is below.
};
*/ */
//
//Allow player to siphon vehicles //Allow player to siphon vehicles
if (_hasEmptyFuelCan && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle} && {!_isBicycle} && {!a_player_jerryfilling} && {fuel _cursorTarget > 0}) then { if (_hasEmptyFuelCan && {!_isZombie} && {!_isAnimal} && {!_isMan} && {_isVehicle} && {!_isBicycle} && {!a_player_jerryfilling} && {fuel _cursorTarget > 0}) then {
if (s_player_siphonfuel < 0) then { if (s_player_siphonfuel < 0) then {