mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Remove unused object_dismantle
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
/*class CamoNet_DZ: BuiltItems { //Duplicate of Epoch camo net in DZE\Prop_Defs.hpp
|
|
||||||
armor = 3;
|
|
||||||
destrtype = "DestructTent";
|
|
||||||
displayName = $STR_ITEM_NAME_CAMONET;
|
|
||||||
descriptionShort = $STR_ITEM_DESC_CAMONET;
|
|
||||||
icon = "\Ca\misc3\data\Icons\icon_camoNet_ca.paa";
|
|
||||||
mapsize = 13.5;
|
|
||||||
model = "\Ca\misc3\CamoNet_EAST";
|
|
||||||
scope = public;
|
|
||||||
vehicleclass = "Military";
|
|
||||||
class dismantle {
|
|
||||||
requiredtools[] =
|
|
||||||
{
|
|
||||||
//{"Item","Chance","ReturnedPart"}
|
|
||||||
{"ItemShovel",0.08,"ItemShovelBroken"}
|
|
||||||
}; //Tools needed
|
|
||||||
dismantleToo = "ItemCamoNet"; //Returned magazine item
|
|
||||||
attemps = 2; //Random number
|
|
||||||
};
|
|
||||||
|
|
||||||
class UserActions {
|
|
||||||
class Dismantle {
|
|
||||||
displayNameDefault = $STR_BUILT_CAMONET_Dismantle;
|
|
||||||
showWindow = 0;
|
|
||||||
hideOnUse = 1;
|
|
||||||
displayName = $STR_BUILT_CAMONET_Dismantle;
|
|
||||||
position="action";
|
|
||||||
radius = 3.0;
|
|
||||||
onlyForPlayer = 1;
|
|
||||||
condition = "!dayz_actionInProgress && (alive this)";
|
|
||||||
statement = "this spawn object_dismantle;";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};*/
|
|
||||||
@@ -499,12 +499,6 @@ class CfgVehicles
|
|||||||
#include "Buildings\WaterSources.hpp"
|
#include "Buildings\WaterSources.hpp"
|
||||||
#include "Buildings\Land_houseV_2T2.hpp"
|
#include "Buildings\Land_houseV_2T2.hpp"
|
||||||
|
|
||||||
//Duplicates of Epoch items in DZE\Prop_Defs.hpp
|
|
||||||
//#include "CamoNetting.hpp"
|
|
||||||
//#include "Hedgehog.hpp"
|
|
||||||
//#include "Sandbag.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
//WeaponHolder
|
//WeaponHolder
|
||||||
#include "WeaponHolder.hpp"
|
#include "WeaponHolder.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
/*class Hedgehog_DZ : BuiltItems { //Duplicate of Epoch item in DZE\Prop_Defs.hpp
|
|
||||||
scope = public;
|
|
||||||
destrType = "DestructNo";
|
|
||||||
cost = 100;
|
|
||||||
model = "\ca\misc\jezek_kov";
|
|
||||||
icon = "\ca\data\data\Unknown_object.paa";
|
|
||||||
mapSize = 2;
|
|
||||||
armor = 400;
|
|
||||||
displayName = $STR_BUILT_HEDGEHOG;
|
|
||||||
vehicleClass = "Fortifications";
|
|
||||||
class dismantle {
|
|
||||||
requiredtools[] =
|
|
||||||
{
|
|
||||||
//{"Item","Chance","ReturnedPart"}
|
|
||||||
{"ItemSledgeHammer",0.02,"ItemSledgeHammerBroken"},
|
|
||||||
{"ItemCrowbar",0.04,"ItemCrowbarBent"}
|
|
||||||
}; //Tools needed
|
|
||||||
dismantleToo = "ItemTankTrap"; //Returned magazine item
|
|
||||||
attemps = 3; //Random number
|
|
||||||
};
|
|
||||||
|
|
||||||
class UserActions {
|
|
||||||
class Dismantle {
|
|
||||||
displayNameDefault = $STR_BUILT_HEDGEHOG_Dismantle;
|
|
||||||
showWindow = 0;
|
|
||||||
hideOnUse = 1;
|
|
||||||
displayName = $STR_BUILT_HEDGEHOG_Dismantle;
|
|
||||||
position="action";
|
|
||||||
radius = 2.7;
|
|
||||||
onlyForPlayer = 1;
|
|
||||||
condition = "!dayz_actionInProgress && (alive this)";
|
|
||||||
statement = "this spawn object_dismantle;";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};*/
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*class Sandbag1_DZ : BuiltItems { //Duplicate of Epoch item in DZE\Prop_Defs.hpp
|
|
||||||
scope = public;
|
|
||||||
destrType = "DestructNo";
|
|
||||||
cost = 100;
|
|
||||||
model = "\ca\misc2\BagFenceLong.p3d";
|
|
||||||
icon = "\Ca\misc3\data\Icons\icon_fortBagFenceLong_ca.paa";
|
|
||||||
mapSize = 2;
|
|
||||||
armor = 400;
|
|
||||||
displayName = $STR_BUILT_SANDBAG;
|
|
||||||
vehicleClass = "Fortifications";
|
|
||||||
class dismantle {
|
|
||||||
requiredtools[] =
|
|
||||||
{
|
|
||||||
//{"Item","Chance","ReturnedPart"}
|
|
||||||
{"ItemShovel",0.02,"ItemShovelBroken"}
|
|
||||||
}; //Tools needed
|
|
||||||
dismantleToo = "ItemSandbag"; //Returned magazine item
|
|
||||||
attemps = 4; //Random number
|
|
||||||
};
|
|
||||||
class UserActions {
|
|
||||||
class Dismantle {
|
|
||||||
displayNameDefault = $STR_BUILT_SANDBAG_Dismantle;
|
|
||||||
showWindow = 0;
|
|
||||||
hideOnUse = 1;
|
|
||||||
displayName = $STR_BUILT_SANDBAG_Dismantle;
|
|
||||||
position="action";
|
|
||||||
radius = 3.0;
|
|
||||||
onlyForPlayer = 1;
|
|
||||||
condition = "!dayz_actionInProgress && (alive this)";
|
|
||||||
statement = "this spawn object_dismantle;";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};*/
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
|
||||||
dayz_actionInProgress = true;
|
|
||||||
|
|
||||||
private ["_object","_proceed","_rndattemps","_limit","_dismantleToo","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools","_exit","_end","_onLadder","_isWater","_isOk","_counter","_text","_dis","_sfx","_finished"];
|
|
||||||
|
|
||||||
_object = _this;
|
|
||||||
_proceed = false;
|
|
||||||
_exit = false;
|
|
||||||
|
|
||||||
//Random times to run
|
|
||||||
_rndattemps = getNumber (configFile >> "CfgVehicles" >> (typeOf _object) >> "dismantle" >> "attempts");
|
|
||||||
_limit = 1 + round(random _rndattemps);
|
|
||||||
|
|
||||||
//Dismantle magazine type
|
|
||||||
_dismantleToo = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "dismantle" >> "dismantleToo");
|
|
||||||
|
|
||||||
//Object info
|
|
||||||
_ownerID = _object getVariable["CharacterID","0"];
|
|
||||||
_objectID = _object getVariable["ObjectID","0"];
|
|
||||||
_objectUID = _object getVariable["ObjectUID","0"];
|
|
||||||
//Playerinfo
|
|
||||||
_playerID = getPlayerUID player;
|
|
||||||
|
|
||||||
//Block
|
|
||||||
_claimedBy = _object getVariable "claimed";
|
|
||||||
|
|
||||||
if (isnil "claimed") then {
|
|
||||||
_object setVariable["claimed",_playerID,true];
|
|
||||||
};
|
|
||||||
|
|
||||||
//Tools
|
|
||||||
_tools = getArray (configFile >> "CfgVehicles" >> (typeOf _object) >> "dismantle" >> "requiredtools");
|
|
||||||
|
|
||||||
{
|
|
||||||
private ["_end"];
|
|
||||||
if ((_x select 0) in items player) then {_end = false;} else { format [localize "STR_BLD_DISMANTLE_MISSING",(_x select 0)] call dayz_rollingMessages; _end = true; _proceed = false; };
|
|
||||||
|
|
||||||
if (_end) exitwith { _exit = true; };
|
|
||||||
} foreach _tools;
|
|
||||||
|
|
||||||
//End missing tools
|
|
||||||
if (_exit) exitwith {dayz_actionInProgress = false;};
|
|
||||||
|
|
||||||
|
|
||||||
//Normal blocked stuff
|
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
|
||||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
|
||||||
|
|
||||||
if(_isWater or _onLadder) exitWith {dayz_actionInProgress = false; localize "str_water_ladder_cant_do" call dayz_rollingMessages;};
|
|
||||||
|
|
||||||
//Start loop
|
|
||||||
_isOk = true;
|
|
||||||
//Counter
|
|
||||||
_counter = 0;
|
|
||||||
|
|
||||||
while {_isOk} do {
|
|
||||||
//Check if we have the tools to start
|
|
||||||
{
|
|
||||||
private ["_end"];
|
|
||||||
if ((_x select 0) in items player) then {_end = false;} else { format [localize "STR_BLD_DISMANTLE_MISSING",_x] call dayz_rollingMessages; _end = true; _proceed = false; };
|
|
||||||
|
|
||||||
if (_end) exitwith { _exit = true; };
|
|
||||||
}foreach _tools;
|
|
||||||
if (_exit) exitwith {};
|
|
||||||
|
|
||||||
_claimedBy = _object getVariable["claimed","0"];
|
|
||||||
|
|
||||||
if (_claimedBy != _playerID) exitWith { format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; };
|
|
||||||
|
|
||||||
//Run SFX
|
|
||||||
_dis=20;
|
|
||||||
_sfx = "repair";
|
|
||||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
||||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
||||||
|
|
||||||
//Run animation loop
|
|
||||||
_finished = ["Medic",1,{player getVariable["combattimeout",0] >= diag_tickTime}] call fn_loopAction;
|
|
||||||
|
|
||||||
//Interrupt and end
|
|
||||||
if(!_finished) exitWith {
|
|
||||||
_isOk = false;
|
|
||||||
_proceed = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Everything happened as it should
|
|
||||||
if(_finished) then {
|
|
||||||
// Working-Factor for chopping wood.
|
|
||||||
["Working",0,[100,15,10,0]] call dayz_NutritionSystem;
|
|
||||||
//Add to Counter
|
|
||||||
_counter = _counter + 1;
|
|
||||||
//Try to dismantle
|
|
||||||
if ([0.01] call fn_chance) then {
|
|
||||||
//stop loop
|
|
||||||
_isOk = false;
|
|
||||||
//Set Done var
|
|
||||||
_proceed = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (dayz_toolBreaking) then {
|
|
||||||
//Chances to damage tools
|
|
||||||
{
|
|
||||||
if ([(_x select 1)] call fn_chance) then {
|
|
||||||
player removeWeapon (_x select 0);
|
|
||||||
player addWeapon (_x select 2);
|
|
||||||
localize "STR_BLD_DISMANTLE_DAMAGED" call dayz_rollingMessages;
|
|
||||||
};
|
|
||||||
}foreach _tools;
|
|
||||||
};
|
|
||||||
|
|
||||||
if(_counter == _limit) exitWith {
|
|
||||||
//stop loop
|
|
||||||
_isOk = false;
|
|
||||||
//Set Done var
|
|
||||||
_proceed = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
format [localize "STR_BLD_DISMANTLE_ATTEMPT",_counter,_limit] call dayz_rollingMessages;
|
|
||||||
uiSleep 0.10;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Completed and successful
|
|
||||||
if (_proceed) then {
|
|
||||||
_claimedBy = _object getVariable["claimed","0"];
|
|
||||||
|
|
||||||
if (_claimedBy != _playerID) exitWith { format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; };
|
|
||||||
|
|
||||||
format [localize "STR_BLD_DISMANTLED",typeOf _object] call dayz_rollingMessages;
|
|
||||||
|
|
||||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_object,dayz_authKey];
|
|
||||||
publicVariableServer "PVDZ_obj_Destroy";
|
|
||||||
|
|
||||||
[_dismantleToo,1,1] call fn_dropItem;
|
|
||||||
};
|
|
||||||
|
|
||||||
dayz_actionInProgress = false;
|
|
||||||
@@ -60,10 +60,10 @@ if (!isDedicated) then {
|
|||||||
//Objects
|
//Objects
|
||||||
object_setpitchbank = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_setpitchbank.sqf";
|
object_setpitchbank = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_setpitchbank.sqf";
|
||||||
object_monitorGear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_monitorGear.sqf";
|
object_monitorGear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_monitorGear.sqf";
|
||||||
object_dismantle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_dismantle.sqf";
|
//object_dismantle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_dismantle.sqf";
|
||||||
|
|
||||||
//Collisions
|
//Collisions
|
||||||
fn_collisions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_collisions.sqf";
|
//fn_collisions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_collisions.sqf";
|
||||||
|
|
||||||
//Zombies
|
//Zombies
|
||||||
zombie_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_findTargetAgent.sqf";
|
zombie_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_findTargetAgent.sqf";
|
||||||
|
|||||||
Reference in New Issue
Block a user