mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
1.0.2.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
private ["_item","_config","_onLadder","_create","_started","_finished","_animState","_isMedic","_qty","_box","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Copy key already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nCopy key already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_item = _this;
|
||||
@@ -14,16 +14,16 @@ _haskey = _this in weapons player;
|
||||
if (!_haskey) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_30"),_text] , "PLAIN DOWN"]};
|
||||
|
||||
_hastoolweapon = "ItemKeyKit" in weapons player;
|
||||
if (!_hastoolweapon) exitWith {TradeInprogress = false; cutText ["Need Keymakers kit to make a copy of a key." , "PLAIN DOWN"]};
|
||||
if (!_hastoolweapon) exitWith {TradeInprogress = false; cutText ["\n\nNeed Keymakers kit to make a copy of a key." , "PLAIN DOWN"]};
|
||||
|
||||
_isNear = {inflamed _x} count (position player nearObjects 2);
|
||||
if(_isNear == 0) exitWith {TradeInprogress = false; cutText ["Key crafting needs a fire within 2 meters." , "PLAIN DOWN"]};
|
||||
_isNear = {inflamed _x} count (position player nearObjects 3);
|
||||
if(_isNear == 0) exitWith {TradeInprogress = false; cutText ["\n\nKey crafting needs a fire within 3 meters." , "PLAIN DOWN"]};
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
// require one tin bar per key
|
||||
_hasTinBar = "ItemTinBar" in magazines player;
|
||||
if(!_hasTinBar) exitWith {TradeInprogress = false; cutText ["Key crafting requires a 1oz Tin Bar." , "PLAIN DOWN"]};
|
||||
if(!_hasTinBar) exitWith {TradeInprogress = false; cutText ["\n\nKey crafting requires a 1oz Tin Bar." , "PLAIN DOWN"]};
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
@@ -63,9 +63,9 @@ if(_finished) then {
|
||||
_qty = 1;
|
||||
_box = unitBackpack player;
|
||||
_box addWeaponCargoGlobal [_create,_qty];
|
||||
cutText ["Copied key has been added to your backpack." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCopied key has been added to your backpack." , "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText ["Canceled Key Crafting." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Key Crafting." , "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
@@ -73,6 +73,6 @@ if(_finished) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled Key Crafting." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Key Crafting." , "PLAIN DOWN"];
|
||||
};
|
||||
TradeInprogress = false;
|
||||
|
||||
Reference in New Issue
Block a user