Cleanup code #1320

This commit is contained in:
Skaronator.com
2014-06-18 14:27:54 +02:00
parent a5452ab019
commit 919e65d19e
3 changed files with 24 additions and 29 deletions

View File

@@ -153,7 +153,7 @@ if(_IsNearPlot == 0) then {
_nearestPole = _findNearestPole select 0;
// Find owner
_ownerID = _nearestPole getVariable["CharacterID","0"];
_ownerID = _nearestPole getVariable ["CharacterID","0"];
// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
@@ -183,7 +183,7 @@ _missing = "";
_hasrequireditem = true;
{
_hastoolweapon = _x in weapons player;
if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }
if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); };
} count _require;
_hasbuilditem = _this in magazines player;

View File

@@ -5,18 +5,19 @@ _caller = _this select 1;
call fnc_usec_medic_removeActions;
r_action = false;
_callerID = _caller getVariable "CharacterID";
_targetID = _target getVariable "CharacterID";
_callerID = _caller getVariable ["CharacterID", "0"];
_targetID = _target getVariable ["CharacterID", "0"];
if ((_callerID != 0) && (_callerID != 0)) then {
_friendlies = _caller getVariable ["friendlies", []];
_friendlies set [count _friendlies, _targetID];
_caller setVariable ["friendlies", _friendlies, true];
_friendlies = _caller getVariable ["friendlies", []];
_friendlies set [count _friendlies, _targetID];
_caller setVariable ["friendlies", _friendlies, true];
_rfriendlies = _target getVariable ["friendlies", []];
_rfriendlies = _target getVariable ["friendlies", []];
if !(_callerID in _rfriendlies) then {
titleText [(localize "STR_EPOCH_ACTIONS_8"), "PLAIN DOWN"]; //To Caller
/* PVS/PVC - Skaronator */
PVDZE_send = [_target,"tagFriendly",[_target]]; //To Target
publicVariableServer "PVDZE_send";
};
if !(_callerID in _rfriendlies) then {
titleText [(localize "STR_EPOCH_ACTIONS_8"), "PLAIN DOWN"]; //To Caller
/* PVS/PVC - Skaronator */
PVDZE_send = [_target,"tagFriendly",[_target]]; //To Target
publicVariableServer "PVDZE_send";
};
};