From bc8083b4ed5028cb2b2f67f405c4f028def272f3 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Tue, 21 Jan 2014 17:58:38 -0600 Subject: [PATCH] 40% chance to payout gem on removal of mine ruins --- SQF/dayz_code/actions/remove.sqf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index bb42e387c..be97b9a6c 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -32,6 +32,7 @@ _isDestructable = _obj isKindOf "BuiltItems"; _isWreck = _objType in DZE_isWreck; _isRemovable = _objType in DZE_isRemovable; _isWreckBuilding = _objType in DZE_isWreckBuilding; +_isMine = _objType in ["Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck"]; _isModular = _obj isKindOf "ModularItems"; _limit = 3; @@ -202,6 +203,14 @@ if (_proceed) then { _radius = 1; + if (_isMine) then { + if((random 10) <= 4) then { + _gems = ["ItemTopaz","ItemObsidian","ItemSapphire","ItemAmethyst","ItemEmerald","ItemCitrine","ItemRuby"]; + _gem = _gems select (floor(random (count _gems))); + _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; + }; + }; + // give refund items if((count _selectedRemoveOutput) > 0 and !_preventRefund) then { _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];