mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
40% chance to payout gem on removal of mine ruins
This commit is contained in:
@@ -32,6 +32,7 @@ _isDestructable = _obj isKindOf "BuiltItems";
|
|||||||
_isWreck = _objType in DZE_isWreck;
|
_isWreck = _objType in DZE_isWreck;
|
||||||
_isRemovable = _objType in DZE_isRemovable;
|
_isRemovable = _objType in DZE_isRemovable;
|
||||||
_isWreckBuilding = _objType in DZE_isWreckBuilding;
|
_isWreckBuilding = _objType in DZE_isWreckBuilding;
|
||||||
|
_isMine = _objType in ["Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck"];
|
||||||
_isModular = _obj isKindOf "ModularItems";
|
_isModular = _obj isKindOf "ModularItems";
|
||||||
|
|
||||||
_limit = 3;
|
_limit = 3;
|
||||||
@@ -202,6 +203,14 @@ if (_proceed) then {
|
|||||||
|
|
||||||
_radius = 1;
|
_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
|
// give refund items
|
||||||
if((count _selectedRemoveOutput) > 0 and !_preventRefund) then {
|
if((count _selectedRemoveOutput) > 0 and !_preventRefund) then {
|
||||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
|
|||||||
Reference in New Issue
Block a user