From 82dc097f464ef12ee3d238450dd3d636a11b1555 Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 21 Feb 2013 12:01:33 -0600 Subject: [PATCH] 0.975a + remove repair and salvage menus when performing action. --- dayz_code/actions/repair.sqf | 7 +++++-- dayz_code/actions/salvage.sqf | 9 +++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dayz_code/actions/repair.sqf b/dayz_code/actions/repair.sqf index 036e7edb9..f0cd2f8f3 100644 --- a/dayz_code/actions/repair.sqf +++ b/dayz_code/actions/repair.sqf @@ -14,6 +14,9 @@ _section = _part in magazines player; _nameType = getText(configFile >> "cfgVehicles" >> _type >> "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 { _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"]; }; -{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = []; -dayz_myCursorTarget = objNull; //check if repaired fully _hitpoints = _vehicle call vehicle_getHitpoints; @@ -63,4 +64,6 @@ if (_allFixed) then { _vehicle setDamage 0; ["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure; }; + +dayz_myCursorTarget = objNull; s_player_repair_crtl = -1; \ No newline at end of file diff --git a/dayz_code/actions/salvage.sqf b/dayz_code/actions/salvage.sqf index 4f8abfbb9..ee9c8e0d5 100644 --- a/dayz_code/actions/salvage.sqf +++ b/dayz_code/actions/salvage.sqf @@ -13,10 +13,15 @@ _hasToolbox = "ItemToolbox" in items player; _nameType = getText(configFile >> "cfgVehicles" >> _type >> "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 { + + _damage = [_vehicle,_hitpoint] call object_getHit; - _vehicle removeAction _id; + // _vehicle removeAction _id; //dont allow removal of damaged parts if (_damage < 1) then { @@ -70,6 +75,6 @@ if (_hasToolbox) then { 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; s_player_repair_crtl = -1; \ No newline at end of file