+ remove repair and salvage menus when performing action.
This commit is contained in:
vbawol
2013-02-21 12:01:33 -06:00
parent 68481f75b4
commit 82dc097f46
2 changed files with 12 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;