mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Remove unused player_chopWood
This commit is contained in:
@@ -12,13 +12,7 @@ class MeleeHatchet : MeleeWeapon
|
|||||||
droppeditem = "ItemHatchet";
|
droppeditem = "ItemHatchet";
|
||||||
|
|
||||||
class ItemActions
|
class ItemActions
|
||||||
{
|
{
|
||||||
/* class Use
|
|
||||||
{
|
|
||||||
text = $STR_ACTIONS_CHOPWOOD;
|
|
||||||
script = "spawn player_chopWood;";
|
|
||||||
}; */ //removed in favor of actually needing to use the hatchet as a weapon
|
|
||||||
|
|
||||||
class Toolbelt
|
class Toolbelt
|
||||||
{
|
{
|
||||||
text = $STR_ACTIONS_2TB;
|
text = $STR_ACTIONS_2TB;
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ class ItemHatchet : ItemCore
|
|||||||
descriptionShort = $STR_EQUIP_DESC_HATCHET;
|
descriptionShort = $STR_EQUIP_DESC_HATCHET;
|
||||||
|
|
||||||
class ItemActions
|
class ItemActions
|
||||||
{
|
{
|
||||||
/* class Use
|
|
||||||
{
|
|
||||||
text = $STR_ACTIONS_CHOPWOOD;
|
|
||||||
script = "spawn player_chopWood;";
|
|
||||||
}; */ //removed in favor of actually needing to use the hatchet as a weapon
|
|
||||||
|
|
||||||
class ToBack
|
class ToBack
|
||||||
{
|
{
|
||||||
text = $STR_ACTIONS_2BACK;
|
text = $STR_ACTIONS_2BACK;
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
|
||||||
dayz_actionInProgress = true;
|
|
||||||
|
|
||||||
private ["_dis","_sfx","_breaking","_countOut","_counter","_isOk","_proceed","_finished","_itemOut","_tree","_distance2d","_chanceResult","_weapons"];
|
|
||||||
|
|
||||||
call gear_ui_init;
|
|
||||||
closeDialog 1;
|
|
||||||
_countOut = floor(random 3) + 2;
|
|
||||||
|
|
||||||
_tree = objNull;
|
|
||||||
{
|
|
||||||
if (typeOf _x in dayz_treeTypes && {alive _x} && {(_x call fn_getModelName) in dayz_trees}) exitWith {
|
|
||||||
// Exit since we found a tree
|
|
||||||
_tree = _x;
|
|
||||||
};
|
|
||||||
} count nearestObjects [getPosATL player, [], 20];
|
|
||||||
|
|
||||||
//if (["forest",dayz_surfaceType] call fnc_inString) then {// Need tree object for PVDZ_objgather_Knockdown
|
|
||||||
if (!isNull _tree) then {
|
|
||||||
_distance2d = [player, _tree] call BIS_fnc_distance2D;
|
|
||||||
if (_distance2d > 5) exitWith {localize "str_player_23" call dayz_rollingMessages;};
|
|
||||||
|
|
||||||
// Start chop tree loop
|
|
||||||
_counter = 0;
|
|
||||||
_isOk = true;
|
|
||||||
_proceed = false;
|
|
||||||
|
|
||||||
//check chance before loop, for a maximum amount of 5 loops allowing 5 possiable chances
|
|
||||||
_chanceResult = dayz_HarvestingChance call fn_chance;
|
|
||||||
|
|
||||||
while {_isOk} do {
|
|
||||||
_dis=20;
|
|
||||||
_sfx = "chopwood";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
|
||||||
|
|
||||||
//play action
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
|
||||||
_weapons = weapons player;
|
|
||||||
_weapons set [count _weapons,dayz_onBack];
|
|
||||||
|
|
||||||
//Make sure player did not drop hatchet
|
|
||||||
if (!_finished or !("MeleeHatchet" in _weapons or ("ItemHatchet" in _weapons))) exitWith {
|
|
||||||
_isOk = false;
|
|
||||||
_proceed = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_finished) then {
|
|
||||||
["Working",0,[50,10,5,0]] call dayz_NutritionSystem;
|
|
||||||
_breaking = false;
|
|
||||||
if (dayz_toolBreaking && _chanceResult) then {
|
|
||||||
_breaking = true;
|
|
||||||
if ("MeleeHatchet" in weapons player) then {
|
|
||||||
player removeWeapon "MeleeHatchet";
|
|
||||||
} else {
|
|
||||||
if ("ItemHatchet" in weapons player) then {
|
|
||||||
player removeWeapon "ItemHatchet";
|
|
||||||
} else {
|
|
||||||
if (dayz_onBack == "MeleeHatchet") then {
|
|
||||||
dayz_onBack = "";
|
|
||||||
if (!isNull findDisplay 106) then {findDisplay 106 displayCtrl 1209 ctrlSetText "";};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if (!("ItemHatchetBroken" in weapons player)) then {
|
|
||||||
player addWeapon "ItemHatchetBroken";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
_counter = _counter + 1;
|
|
||||||
_itemOut = "PartWoodPile";
|
|
||||||
//Drop Item to ground
|
|
||||||
[_itemOut,1,1] call fn_dropItem;
|
|
||||||
};
|
|
||||||
|
|
||||||
if ((_counter == _countOut) || _breaking) exitWith {
|
|
||||||
if (_breaking) then {
|
|
||||||
localize "str_HatchetHandleBreaks" call dayz_rollingMessages;
|
|
||||||
} else {
|
|
||||||
localize "str_player_24_Stoped" call dayz_rollingMessages;
|
|
||||||
};
|
|
||||||
_isOk = false;
|
|
||||||
_proceed = true;
|
|
||||||
uiSleep 1;
|
|
||||||
};
|
|
||||||
format[localize "str_player_24_progress", _counter,_countOut] call dayz_rollingMessages;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_proceed || (_counter > 0)) then {
|
|
||||||
//localize "str_choppingTree" call dayz_rollingMessages;
|
|
||||||
//localize "str_player_25" call dayz_rollingMessages;
|
|
||||||
if (typeOf _tree == "") then {
|
|
||||||
// Ask server to setDamage on tree and sync for JIP
|
|
||||||
PVDZ_objgather_Knockdown = [_tree,player];
|
|
||||||
publicVariableServer "PVDZ_objgather_Knockdown";
|
|
||||||
} else {
|
|
||||||
deleteVehicle _tree;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if !(_proceed) then {
|
|
||||||
localize "str_player_24_Stoped" call dayz_rollingMessages;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
localize "str_player_23" call dayz_rollingMessages;
|
|
||||||
};
|
|
||||||
|
|
||||||
dayz_actionInProgress = false;
|
|
||||||
@@ -85,7 +85,6 @@ if (!isDedicated) then {
|
|||||||
player_removeAttachment = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_removeAttachment.sqf";
|
player_removeAttachment = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_removeAttachment.sqf";
|
||||||
player_fillWater = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\water_fill.sqf";
|
player_fillWater = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\water_fill.sqf";
|
||||||
player_makeFire = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_makefire.sqf";
|
player_makeFire = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_makefire.sqf";
|
||||||
player_chopWood = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_chopWood.sqf";
|
|
||||||
player_mineStone = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_mineStone.sqf";
|
player_mineStone = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_mineStone.sqf";
|
||||||
if (DZE_modularBuild) then {
|
if (DZE_modularBuild) then {
|
||||||
player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\modular_build.sqf";
|
player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\modular_build.sqf";
|
||||||
|
|||||||
@@ -1016,14 +1016,6 @@
|
|||||||
<French>Préparer un feu de camp</French>
|
<French>Préparer un feu de camp</French>
|
||||||
<Czech>Vytvořit ohniště</Czech>
|
<Czech>Vytvořit ohniště</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACTIONS_CHOPWOOD">
|
|
||||||
<English>Harvest Wood</English>
|
|
||||||
<German>Holz hacken</German>
|
|
||||||
<Russian>Нарубить дров</Russian>
|
|
||||||
<Spanish>Recoger Leña</Spanish>
|
|
||||||
<French>Ramasser du bois</French>
|
|
||||||
<Czech>Nasekat dřevo</Czech>
|
|
||||||
</Key>
|
|
||||||
<Key ID="STR_ACTIONS_MINE_STONE">
|
<Key ID="STR_ACTIONS_MINE_STONE">
|
||||||
<English>Harvest Stone</English>
|
<English>Harvest Stone</English>
|
||||||
<Russian>Добыть камень</Russian>
|
<Russian>Добыть камень</Russian>
|
||||||
|
|||||||
Reference in New Issue
Block a user