mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fixed: #599
This commit is contained in:
@@ -163,7 +163,7 @@ _missing = "";
|
||||
_hasrequireditem = true;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = _x; }
|
||||
if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }
|
||||
} forEach _require;
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
|
||||
@@ -140,7 +140,7 @@ if ((count _upgrade) > 0) then {
|
||||
player reveal _object;
|
||||
|
||||
} else {
|
||||
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_itemOut], "PLAIN DOWN"];
|
||||
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,(getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"))], "PLAIN DOWN"];
|
||||
{
|
||||
[player,(_x select 0),(_x select 1)] call BIS_fnc_invRemove;
|
||||
} forEach _addedItems;
|
||||
|
||||
@@ -45,11 +45,17 @@ while {_isOk} do {
|
||||
_inVehicle = (_vehicle != player);
|
||||
if(_inVehicle) then {
|
||||
if(_vehicle isKindOf "Ship") then {
|
||||
_rnd = 25;
|
||||
// higher chance to catch if water is deeper than 25m
|
||||
if(((getPosATL _vehicle) select 2) > 25) then {
|
||||
_rnd = 12;
|
||||
} else {
|
||||
_rnd = 25;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// 1% chance to catch anything
|
||||
|
||||
// chance to catch anything
|
||||
if((random _rnd) <= 1) then {
|
||||
// Just the one fish for now
|
||||
_itemOut = ["ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemSeaBass","ItemSeaBass","ItemTuna"] call BIS_fnc_selectRandom;
|
||||
@@ -67,7 +73,7 @@ while {_isOk} do {
|
||||
} else {
|
||||
cutText ["\n\nNibble... Nibble...", "PLAIN DOWN"];
|
||||
_counter = _counter + 1;
|
||||
if(_counter == 5) then {
|
||||
if(_counter == 10) then {
|
||||
_isOk = false;
|
||||
sleep 2;
|
||||
cutText ["\n\nYou didn't catch anything.", "PLAIN DOWN"];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Usage: spawn player_harvestPlant;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_isOk","_i","_objName","_started","_finished","_animState","_isMedic","_proceed","_itemOut","_countOut","_tree","_trees","_findNearestTree","_index","_invResult","_treesOutput"];
|
||||
private ["_isOk","_i","_objName","_started","_finished","_animState","_isMedic","_proceed","_itemOut","_countOut","_tree","_trees","_findNearestTree","_index","_invResult","_treesOutput","_text"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nHarvest already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -101,6 +101,8 @@ if (count(_findNearestTree) >= 1) then {
|
||||
_i = _i + 1;
|
||||
};
|
||||
};
|
||||
|
||||
_text = getText (configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
if(_i != 0) then {
|
||||
// chop down tree
|
||||
@@ -109,9 +111,9 @@ if (count(_findNearestTree) >= 1) then {
|
||||
};
|
||||
//diag_log format["DEBUG TREE DAMAGE: %1", _tree];
|
||||
|
||||
cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _i,_itemOut], "PLAIN DOWN"];
|
||||
cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _i,_text], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_itemOut], "PLAIN DOWN"];
|
||||
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_text], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
|
||||
@@ -88,7 +88,7 @@ if(!(alive _item)) then {
|
||||
_control ctrlShow true;
|
||||
|
||||
|
||||
cutText [format[(localize "str_player_consumed"),_animalType], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_player_consumed"),(getText (configFile >> "CfgVehicles" >> _animalType >> "displayName"))], "PLAIN DOWN"];
|
||||
player switchmove "";
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
*/
|
||||
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding"];
|
||||
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Remove already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -59,7 +59,9 @@ if(_IsNearPlot >= 1) then {
|
||||
};
|
||||
};
|
||||
|
||||
cutText [format["Starting de-construction of %1.",_objType], "PLAIN DOWN"];
|
||||
_nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName");
|
||||
|
||||
cutText [format["Starting de-construction of %1.",_nameVehicle], "PLAIN DOWN"];
|
||||
|
||||
// Alert zombies once.
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
@@ -125,7 +127,7 @@ while {_isOk} do {
|
||||
_proceed = false;
|
||||
};
|
||||
|
||||
cutText [format["De-constructing %1 stage %2 of %3 walk away at anytime to cancel.",_objType, _counter,_limit], "PLAIN DOWN"];
|
||||
cutText [format["De-constructing %1 stage %2 of %3 walk away at anytime to cancel.", _nameVehicle, _counter,_limit], "PLAIN DOWN"];
|
||||
|
||||
if(_counter == _limit) exitWith {
|
||||
_isOk = false;
|
||||
@@ -134,6 +136,8 @@ while {_isOk} do {
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
if(_brokenTool) then {
|
||||
if(_isWreck) then {
|
||||
_removeTool = "ItemToolbox";
|
||||
@@ -141,7 +145,7 @@ if(_brokenTool) then {
|
||||
_removeTool = ["ItemCrowbar","ItemToolbox"] call BIS_fnc_selectRandom;
|
||||
};
|
||||
if(([player,_removeTool,1] call BIS_fnc_invRemove) > 0) then {
|
||||
cutText [format["Tool (%1) broke cannot remove %2.",_removeTool,_objType], "PLAIN DOWN"];
|
||||
cutText [format["%1 broke cannot remove %2.",getText(configFile >> "CfgWeapons" >> _removeTool >> "displayName"),_nameVehicle], "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -158,7 +162,7 @@ if (_proceed) then {
|
||||
publicVariableServer "PVDZE_obj_Delete";
|
||||
};
|
||||
|
||||
cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"];
|
||||
cutText [format["De-constructing %1.",_nameVehicle], "PLAIN DOWN"];
|
||||
|
||||
_preventRefund = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user