mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Move Repair and Salvage back to fn_selfActions
Partial revert of: 3aad4b6
Unfortunately this will not support loading external vehicle addons
(with custom UserActions) which we can not include in Epoch. Child
UserActions overwrite inherited UserActions.
This commit is contained in:
@@ -3,9 +3,9 @@ class MMT_Civ: MMT_base {
|
||||
typicalCargo[] = {};
|
||||
class TransportMagazines {};
|
||||
class TransportWeapons {};
|
||||
class UserActions
|
||||
/*class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 4;};
|
||||
delete Salvage;
|
||||
};
|
||||
};*/
|
||||
};
|
||||
@@ -3,11 +3,11 @@ class Old_bike_TK_CIV_EP1: Old_bike_base_EP1 {
|
||||
typicalCargo[] = {};
|
||||
class TransportMagazines {};
|
||||
class TransportWeapons {};
|
||||
class UserActions
|
||||
/*class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 4;};
|
||||
delete Salvage;
|
||||
};
|
||||
};*/
|
||||
};
|
||||
|
||||
class Old_bike_TK_INS_EP1: Old_bike_base_EP1 {
|
||||
@@ -15,9 +15,9 @@ class Old_bike_TK_INS_EP1: Old_bike_base_EP1 {
|
||||
typicalCargo[] = {};
|
||||
class TransportMagazines {};
|
||||
class TransportWeapons {};
|
||||
class UserActions
|
||||
/*class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 4;};
|
||||
delete Salvage;
|
||||
};
|
||||
};*/
|
||||
};
|
||||
@@ -5,11 +5,11 @@
|
||||
//class DefaultEventhandlers;
|
||||
class Ship : AllVehicles
|
||||
{
|
||||
class UserActions
|
||||
/*class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
};
|
||||
};*/
|
||||
transportMaxMagazines = 2000;
|
||||
transportMaxWeapons = 200;
|
||||
transportMaxBackpacks = 40;
|
||||
|
||||
@@ -137,11 +137,12 @@ class CfgVehicles {
|
||||
class ViewOptics;
|
||||
};
|
||||
};
|
||||
class UserActions
|
||||
//Won't support loading external vehicle addons (with custom UserActions) which we can not include in Epoch. Child UserActions overwrite inherited UserActions.
|
||||
/*class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
};
|
||||
};*/
|
||||
};
|
||||
class Plane: Air
|
||||
{
|
||||
@@ -155,8 +156,8 @@ class CfgVehicles {
|
||||
class AnimationSources;
|
||||
class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
//class Repair {ACTION_REPAIR; radius = 8;};
|
||||
//class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
class PushPlane {ACTION_PUSH;};
|
||||
};
|
||||
};
|
||||
@@ -191,11 +192,11 @@ class CfgVehicles {
|
||||
brightness = 0.5;
|
||||
};
|
||||
};
|
||||
class UserActions
|
||||
/*class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 4;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 4;};
|
||||
};
|
||||
};*/
|
||||
};
|
||||
class Car: LandVehicle {
|
||||
class HitPoints
|
||||
|
||||
@@ -112,8 +112,8 @@ class CSJ_GyroP: Plane
|
||||
condition = "(Count (Crew this)==0) and ((getpos this select 2) <1) and (!isengineon this)";
|
||||
statement = "this exec ""\CSJ_GyroAC\scripts\CSJ_moveGyro.sqs"" ";
|
||||
};
|
||||
class Repair {ACTION_REPAIR; radius = 4;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 4;};
|
||||
//class Repair {ACTION_REPAIR; radius = 4;};
|
||||
//class Salvage {ACTION_SALVAGE; radius = 4;};
|
||||
};
|
||||
class DefaultEventhandlers;
|
||||
class EventHandlers: DefaultEventhandlers
|
||||
@@ -223,8 +223,8 @@ class CSJ_GyroC: Helicopter
|
||||
class Reflectors{};
|
||||
class AnimationSources: AnimationSources{};
|
||||
class UserActions {
|
||||
class Repair {ACTION_REPAIR; radius = 4;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 4;};
|
||||
//class Repair {ACTION_REPAIR; radius = 4;};
|
||||
//class Salvage {ACTION_SALVAGE; radius = 4;};
|
||||
};
|
||||
class DefaultEventhandlers;
|
||||
class EventHandlers: DefaultEventhandlers
|
||||
|
||||
@@ -483,7 +483,7 @@ class M240Nest_DZ: USMC_WarfareBMGNest_M240
|
||||
transportMaxBackpacks = 1;
|
||||
constructioncount = 10;
|
||||
removeoutput[] = {{"m240_nest_kit",1}};
|
||||
class UserActions {delete Repair; delete Salvage;};
|
||||
//class UserActions {delete Repair; delete Salvage;};
|
||||
};
|
||||
class Land_covering_hut_EP1;
|
||||
class CanvasHut_DZ: Land_covering_hut_EP1
|
||||
|
||||
@@ -33,7 +33,7 @@ class CH53_DZE : USEC_ch53_E {
|
||||
init = "MonitorVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitor.sqf';MonitorSFXVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitorSFX.sqf';";
|
||||
killed = "_this spawn BIS_Effects_EH_Killed;";
|
||||
};
|
||||
class UserActions {
|
||||
/*class UserActions {
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
class RampOpen {
|
||||
@@ -110,5 +110,5 @@ class CH53_DZE : USEC_ch53_E {
|
||||
condition = "((this animationPhase 'cargo' == 0) OR (this animationPhase 'cargo2' == 0));";
|
||||
statement = "[this] execvm ""\usec_ch53\scripts\ch53_cargodrop.sqf"";";
|
||||
};
|
||||
};
|
||||
};*/
|
||||
};
|
||||
@@ -295,8 +295,8 @@ class Mi171Sh_CZ_EP1_DZ: Mi17_base {
|
||||
};
|
||||
|
||||
class UserActions {
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
//class Repair {ACTION_REPAIR; radius = 8;};
|
||||
//class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
class HUDoff {
|
||||
displayName = $STR_AM_HUDON;
|
||||
displayNameDefault = $STR_AM_HUDON;
|
||||
|
||||
@@ -89,8 +89,8 @@ class UH1Y_DZ: UH1_Base {
|
||||
};
|
||||
};*/
|
||||
class UserActions {
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
//class Repair {ACTION_REPAIR; radius = 8;};
|
||||
//class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
class HUDoff {
|
||||
displayName = $STR_AM_HUDON;
|
||||
displayNameDefault = $STR_AM_HUDON;
|
||||
|
||||
@@ -16,8 +16,8 @@ class MV22_DZ : MV22 {
|
||||
fuelCapacity = 6513;
|
||||
class UserActions
|
||||
{
|
||||
class Repair {ACTION_REPAIR; radius = 8;};
|
||||
class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
//class Repair {ACTION_REPAIR; radius = 8;};
|
||||
//class Salvage {ACTION_SALVAGE; radius = 8;};
|
||||
class PushPlane {ACTION_PUSH;};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -74,6 +74,7 @@ class zZombie_Base : Zed_Base {
|
||||
condition = "(['Butcher',this] call userActionConditions)";
|
||||
statement = "this spawn player_butcher;";
|
||||
};
|
||||
delete StudyBody;
|
||||
};
|
||||
|
||||
class HitPoints {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
||||
s_player_repair_crtl = -1;
|
||||
dayz_myCursorTarget = objNull;
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_part","_cancel","_color","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints","_damagePercent","_configVeh"];
|
||||
|
||||
_vehicle = _this;
|
||||
_vehicle = _this select 3;
|
||||
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
||||
dayz_myCursorTarget = _vehicle;
|
||||
|
||||
@@ -39,4 +39,5 @@ if (count _hitpoints > 0) then {
|
||||
// Localized in A2OA\Expansion\dta\languagecore
|
||||
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false];
|
||||
s_player_repairActions set [count s_player_repairActions,_cancel];
|
||||
s_player_repair_crtl = 1;
|
||||
};
|
||||
@@ -19,6 +19,7 @@ _namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
||||
|
||||
{_vehicle removeAction _x} count s_player_repairActions;
|
||||
s_player_repairActions = [];
|
||||
s_player_repair_crtl = 1;
|
||||
|
||||
if (_hasToolbox) then {
|
||||
player playActionNow "Medic";
|
||||
@@ -93,6 +94,7 @@ if (_hasToolbox) then {
|
||||
};
|
||||
|
||||
dayz_myCursorTarget = objNull;
|
||||
s_player_repair_crtl = -1;
|
||||
dayz_salvageInProgress = false;
|
||||
|
||||
//adding melee mags back if needed
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_part","_color","_vehicle","_PlayerNear","_hitpoints","_isATV","_is6WheelType","_HasNoGlassKind",
|
||||
"_6WheelTypeArray","_NoGlassArray","_NoExtraWheelsArray","_RemovedPartsArray","_damage","_cmpt","_configVeh","_damagePercent","_string","_handle","_cancel","_type"];
|
||||
|
||||
_vehicle = _this;
|
||||
_vehicle = _this select 3;
|
||||
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
||||
|
||||
_PlayerNear = {isPlayer _x} count ((getPosATL _vehicle) nearEntities ["CAManBase", 10]) > 1;
|
||||
@@ -73,4 +73,5 @@ if (count _hitpoints > 0 ) then {
|
||||
// Localized in A2OA\Expansion\dta\languagecore
|
||||
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false];
|
||||
s_player_repairActions set [count s_player_repairActions,_cancel];
|
||||
s_player_repair_crtl = 1;
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
#define CAN_DO (!r_drag_sqf && !r_player_unconscious && getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder") != 1)
|
||||
#define HAS_TOOLBOX ("ItemToolbox" in items player)
|
||||
//#define HAS_TOOLBOX ("ItemToolbox" in items player)
|
||||
#define IN_VEHICLE (vehicle player != player)
|
||||
#define IS_ALIVE (damage _object < 1)
|
||||
#define IS_PZOMBIE (player isKindOf "PZombie_VB")
|
||||
@@ -12,9 +12,9 @@ _object = _this select 1;
|
||||
_show = switch _action do {
|
||||
case "Butcher": {!IS_ALIVE && !IN_VEHICLE && CAN_DO && !(_object getVariable["meatHarvested",false]) && !IS_PZOMBIE};
|
||||
case "PushPlane": {IS_ALIVE && !IN_VEHICLE && CAN_DO && count crew _object == 0 && !isEngineOn _object && !IS_PZOMBIE};
|
||||
case "Repair": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX};
|
||||
case "Salvage": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX && (DZE_salvageLocked or !locked _object)};
|
||||
case "StudyBody": {!IS_ALIVE && !IN_VEHICLE && !(_object isKindOf "zZombie_base")};
|
||||
//case "Repair": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX};
|
||||
//case "Salvage": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX && (DZE_salvageLocked or !locked _object)};
|
||||
case "StudyBody": {!IS_ALIVE};
|
||||
default {false};
|
||||
};
|
||||
|
||||
|
||||
@@ -506,6 +506,30 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
s_player_attach_bomb = -1;
|
||||
};
|
||||
*/
|
||||
//Repairing Vehicles
|
||||
if (_isVehicle && {!_isMan} && {dayz_myCursorTarget != _cursorTarget} && {_hasToolbox} && {damage _cursorTarget < 1} && {_typeOfCursorTarget != "M240Nest_DZ"}) then {
|
||||
if (s_player_repair_crtl < 0) then {
|
||||
dayz_myCursorTarget = _cursorTarget;
|
||||
_menu = dayz_myCursorTarget addAction [localize "str_actions_repairveh", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
if (!_isBicycle) then { //Bike wheels should not give full size tires. Also model does not update to show removed wheels.
|
||||
if (!DZE_salvageLocked) then {
|
||||
if (!locked _cursorTarget) then {
|
||||
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
s_player_repairActions set [count s_player_repairActions,_menu1];
|
||||
};
|
||||
} else {
|
||||
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
s_player_repairActions set [count s_player_repairActions,_menu1];
|
||||
};
|
||||
};
|
||||
s_player_repairActions set [count s_player_repairActions,_menu];
|
||||
s_player_repair_crtl = 1;
|
||||
} else {
|
||||
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;
|
||||
s_player_repairActions = [];
|
||||
s_player_repair_crtl = -1;
|
||||
};
|
||||
};
|
||||
/* //Vanilla base building currently not used in Epoch
|
||||
// House locking and unlocking
|
||||
_isHouse = _typeOfCursorTarget in ["SurvivorWorkshopAStage5", "SurvivorWorkshopBStage5", "SurvivorWorkshopCStage5"];
|
||||
@@ -1024,6 +1048,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
s_player_plot_take_ownership = -1;
|
||||
player removeAction s_player_plotManagement;
|
||||
s_player_plotManagement = -1;
|
||||
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
|
||||
player removeAction s_player_repair_crtl;
|
||||
s_player_repair_crtl = -1;
|
||||
dayz_myCursorTarget = objNull;
|
||||
player removeAction s_player_flipveh;
|
||||
s_player_flipveh = -1;
|
||||
player removeAction s_player_sleep;
|
||||
|
||||
@@ -127,8 +127,8 @@ if (!isDedicated) then {
|
||||
player_sharpen = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sharpen.sqf";
|
||||
player_butcher = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\gather_meat.sqf";
|
||||
player_pushPlane = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_pushPlane.sqf";
|
||||
player_repairVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\repair_vehicle.sqf";
|
||||
player_salvageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\salvage_vehicle.sqf";
|
||||
//player_repairVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\repair_vehicle.sqf";
|
||||
//player_salvageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\salvage_vehicle.sqf";
|
||||
player_studyBody = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\study_body.sqf";
|
||||
|
||||
//ui
|
||||
|
||||
@@ -141,7 +141,7 @@ pickupInit = false;
|
||||
mouseOverCarry = false; //for carry slot since determining mouse pos doesn't work right
|
||||
dayZ_partClasses = ["PartFueltank","PartWheel","PartEngine"]; //No need to add PartGeneric, it is default for everything
|
||||
dayZ_explosiveParts = ["palivo","motor"];
|
||||
if (isNil "infectedWaterHoles") then {infectedWaterHoles = [];};
|
||||
if (isNil "infectedWaterHoles") then {infectedWaterHoles = [];}; //Needed for non-cherno maps
|
||||
|
||||
//Survival Variables
|
||||
SleepFood = 2160; //minutes (48 hours)
|
||||
@@ -190,6 +190,7 @@ dayz_resetSelfActions = {
|
||||
s_player_fillfuel20 = -1;
|
||||
s_player_fillfuel5 = -1;
|
||||
s_player_siphonfuel = -1;
|
||||
s_player_repair_crtl = -1;
|
||||
s_player_fishing = -1;
|
||||
s_player_fishing_veh = -1;
|
||||
s_player_gather = -1;
|
||||
|
||||
Reference in New Issue
Block a user