Add medic anim function with proper interrupt

Closes #1386

Vanilla commits
applied:
f99a3deced
731b957e8e

Removed
two unused files and a few variables made redundant by actionInProgress
This commit is contained in:
ebayShopper
2017-06-06 15:24:59 -04:00
parent 36b67affee
commit 48858b2e6c
61 changed files with 507 additions and 1341 deletions

View File

@@ -13,8 +13,6 @@ if ((isNil "_cursorTarget") or {(isNull _cursorTarget)}) then {
if(isNull _cursorTarget) exitWith { localize "str_disassembleNoOption" call dayz_rollingMessages; };
if (player getVariable["alreadyBuilding",0] == 1) exitWith { localize "str_upgradeInProgress" call dayz_rollingMessages; };
//Normal blocked stuff
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
@@ -23,6 +21,9 @@ if(_isWater or _onLadder) exitWith { localize "str_water_ladder_cant_do" call da
_alreadyRemoving = _cursorTarget getVariable["ObjectLocked",0];
if (_alreadyRemoving == 1) exitWith { localize "str_disassembleInProgress" call dayz_rollingMessages; };
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
_cursorTarget setVariable["ObjectLocked",1,true];
_characterID = _cursorTarget getVariable ["characterID","0"];
_objectID = _cursorTarget getVariable ["ObjectID","0"];
@@ -39,7 +40,7 @@ _entry = configFile >> "CfgVehicles" >> _upgrade;
r_interrupt = false;
_disassemblyParts = [] + (getArray (_entry >> "Disassembly" >> "removedParts"));
_disassemblyReturnChance = [] + (getNumber (_entry >> "Disassembly" >> "removedChance"));
_disassemblyReturnChance = getNumber (_entry >> "Disassembly" >> "removedChance");
for "_i" from 1 to 20 do {
_parent = inheritsFrom _entry;
@@ -161,4 +162,4 @@ if (!_realObjectStillThere) then {
localize "str_disassembleDone" call dayz_rollingMessages;
_cursorTarget setVariable["ObjectLocked",0,true];
dayz_actionInProgress = false;