mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user