mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 20:12:20 +03:00
fixes
This commit is contained in:
@@ -52,7 +52,7 @@ if (_finished) then {
|
||||
_i = 0;
|
||||
// determine where the object name starts
|
||||
{
|
||||
if (ASCII_COLON == _objInfo select _i) exitWith {};
|
||||
if (58 == _objInfo select _i) exitWith {};
|
||||
_i = _i + 1;
|
||||
} forEach _objInfo;
|
||||
_i = _i + 2; // skip the ": " part
|
||||
@@ -60,7 +60,7 @@ if (_finished) then {
|
||||
_objName = _objName + [_objInfo select _k];
|
||||
};
|
||||
_objName = toLower(toString(_objName));
|
||||
|
||||
|
||||
// Exit since we found a tree
|
||||
if (_objName in _trees) exitWith {
|
||||
_findNearestTree set [(count _findNearestTree),_x];
|
||||
|
||||
@@ -121,21 +121,21 @@ if (_proceed) then {
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
_isWreck = typeOf _obj in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
|
||||
_isWreck = (typeOf _obj) in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
_selectedRemoveOutput = [];
|
||||
if(_isWreck) then {
|
||||
// Find one random part to give back
|
||||
_refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom;
|
||||
_selectedRemoveOutput = [_refundpart];
|
||||
_selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]];
|
||||
} else {
|
||||
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
||||
};
|
||||
|
||||
// give refund items
|
||||
if((count _selectedRemoveOutput) > 0) then {
|
||||
// Put items
|
||||
// Put itemsg
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
|
||||
Reference in New Issue
Block a user