From e303e033b6389df78308f40f46a44ddf06674023 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Mon, 21 Oct 2013 21:58:58 -0500 Subject: [PATCH] Fixed: #599 --- SQF/dayz_code/actions/player_build.sqf | 2 +- SQF/dayz_code/actions/player_buildingDowngrade.sqf | 2 +- SQF/dayz_code/actions/player_goFishing.sqf | 12 +++++++++--- SQF/dayz_code/actions/player_harvestPlant.sqf | 8 +++++--- SQF/dayz_code/actions/pzombie/pz_feed.sqf | 2 +- SQF/dayz_code/actions/remove.sqf | 14 +++++++++----- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 92a07a9fa..b5d57e524 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -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; diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index 2f3b687d4..709dd46d5 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -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; diff --git a/SQF/dayz_code/actions/player_goFishing.sqf b/SQF/dayz_code/actions/player_goFishing.sqf index 695cc4e2e..4bd1a46ef 100644 --- a/SQF/dayz_code/actions/player_goFishing.sqf +++ b/SQF/dayz_code/actions/player_goFishing.sqf @@ -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"]; diff --git a/SQF/dayz_code/actions/player_harvestPlant.sqf b/SQF/dayz_code/actions/player_harvestPlant.sqf index 0c58e655a..0b5fc2915 100644 --- a/SQF/dayz_code/actions/player_harvestPlant.sqf +++ b/SQF/dayz_code/actions/player_harvestPlant.sqf @@ -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; diff --git a/SQF/dayz_code/actions/pzombie/pz_feed.sqf b/SQF/dayz_code/actions/pzombie/pz_feed.sqf index c713d16c5..0c42a8f84 100644 --- a/SQF/dayz_code/actions/pzombie/pz_feed.sqf +++ b/SQF/dayz_code/actions/pzombie/pz_feed.sqf @@ -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 ""; }; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 15abe09ae..0bab114a0 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -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;