mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
0.975a
+ remove repair and salvage menus when performing action.
This commit is contained in:
@@ -14,6 +14,9 @@ _section = _part in magazines player;
|
|||||||
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
|
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
|
||||||
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
||||||
|
|
||||||
|
{_vehicle removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
|
||||||
|
s_player_repair_crtl = 1;
|
||||||
|
|
||||||
if (_section and _hasToolbox) then {
|
if (_section and _hasToolbox) then {
|
||||||
|
|
||||||
_damage = [_vehicle,_hitpoint] call object_getHit;
|
_damage = [_vehicle,_hitpoint] call object_getHit;
|
||||||
@@ -45,8 +48,6 @@ if (_section and _hasToolbox) then {
|
|||||||
cutText [format["You need %1 to repair this",_namePart], "PLAIN DOWN"];
|
cutText [format["You need %1 to repair this",_namePart], "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
|
|
||||||
dayz_myCursorTarget = objNull;
|
|
||||||
|
|
||||||
//check if repaired fully
|
//check if repaired fully
|
||||||
_hitpoints = _vehicle call vehicle_getHitpoints;
|
_hitpoints = _vehicle call vehicle_getHitpoints;
|
||||||
@@ -63,4 +64,6 @@ if (_allFixed) then {
|
|||||||
_vehicle setDamage 0;
|
_vehicle setDamage 0;
|
||||||
["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
|
["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dayz_myCursorTarget = objNull;
|
||||||
s_player_repair_crtl = -1;
|
s_player_repair_crtl = -1;
|
||||||
@@ -13,10 +13,15 @@ _hasToolbox = "ItemToolbox" in items player;
|
|||||||
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
|
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
|
||||||
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
|
||||||
|
|
||||||
|
{_vehicle removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
|
||||||
|
s_player_repair_crtl = 1;
|
||||||
|
|
||||||
if (_hasToolbox) then {
|
if (_hasToolbox) then {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_damage = [_vehicle,_hitpoint] call object_getHit;
|
_damage = [_vehicle,_hitpoint] call object_getHit;
|
||||||
_vehicle removeAction _id;
|
// _vehicle removeAction _id;
|
||||||
|
|
||||||
//dont allow removal of damaged parts
|
//dont allow removal of damaged parts
|
||||||
if (_damage < 1) then {
|
if (_damage < 1) then {
|
||||||
@@ -70,6 +75,6 @@ if (_hasToolbox) then {
|
|||||||
cutText [format["You need %1 to remove this part.",_namePart], "PLAIN DOWN"];
|
cutText [format["You need %1 to remove this part.",_namePart], "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
|
|
||||||
dayz_myCursorTarget = objNull;
|
dayz_myCursorTarget = objNull;
|
||||||
s_player_repair_crtl = -1;
|
s_player_repair_crtl = -1;
|
||||||
Reference in New Issue
Block a user