Remove no longer used code from dayz fences

This commit is contained in:
AirwavesMan
2020-06-18 20:26:33 +02:00
parent 3724a1f385
commit 9bf7cd3219
11 changed files with 121 additions and 395 deletions

View File

@@ -9,7 +9,7 @@ private ["_canPickLight","_text","_unlock","_lock","_totalKeys","_temp_keys","_t
"_player_lockUnlock_crtl","_displayName","_hasIgnitors","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached",
"_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget",
"_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan",
"_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isDisallowRefuel","_isDog",
"_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_isDisallowRefuel","_isDog",
"_isModular","_isModularDoor","_isHouse","_isGateOperational","_isGateLockable","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock",
"_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo",
"_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance","_id","_upgrade","_weaponsPlayer","_hasCrowbar",
@@ -66,16 +66,6 @@ if (s_player_equip_carry < 0) then {
};
};
/*if (dayz_onBack != "" /*&& !dayz_onBackActive && !_inVehicle && !_onLadder && !r_player_unconscious) then {
if (s_player_equip_carry < 0) then {
_text = getText (configFile >> "CfgWeapons" >> dayz_onBack >> "displayName");
s_player_equip_carry = player addAction [format[localize "STR_ACTIONS_WEAPON", _text], "\z\addons\dayz_code\actions\player_switchWeapon_action.sqf", nil, 0.5, false, true];
};
} else {
player removeAction s_player_equip_carry;
s_player_equip_carry = -1;
};*/
//fishing
if ((_currentWeapon in Dayz_fishingItems) && {!dayz_fishingInprogress} && {!_inVehicle} && {!dayz_isSwimming}) then {
if (s_player_fishing < 0) then {
@@ -238,7 +228,6 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance
_text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName");
_isPlant = _typeOfCursorTarget in Dayz_plants;
_istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent");
_upgradeItems = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3"];
_characterID = _cursorTarget getVariable ["CharacterID","0"];
if (DZE_permanentPlot) then {
@@ -252,7 +241,7 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance
_isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"];
_isDog = (_cursorTarget isKindOf "Pastor" || _cursorTarget isKindOf "Fin");
_isModular = _cursorTarget isKindOf "ModularItems";
_isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ"];
_isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ","WoodenGate_foundation_DZ","WoodenGate_1_DZ","WoodenGate_2_DZ","WoodenGate_3_DZ","WoodenGate_4_DZ"];
_player_deleteBuild = false;
_player_lockUnlock_crtl = false;
@@ -496,100 +485,7 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance
s_player_repair_crtl = -1;
};
};
/* //Vanilla base building currently not used in Epoch
// House locking and unlocking
_isHouse = _typeOfCursorTarget in ["SurvivorWorkshopAStage5", "SurvivorWorkshopBStage5", "SurvivorWorkshopCStage5"];
_isGateOperational = _typeOfCursorTarget in ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","MetalGate_1","MetalGate_2","MetalGate_3","MetalGate_4"];
_isGateLockable = _typeOfCursorTarget in ["WoodenGate_1","WoodenGate_2","WoodenGate_3","MetalGate_1","MetalGate_2","MetalGate_3"];
_isFence = _typeOfCursorTarget in ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","MetalFence_1","MetalFence_2","MetalFence_3","MetalFence_4","MetalFence_5","MetalFence_6","MetalFence_7"];
//Only the owners can lock the gates
_isLockableGate = _typeOfCursorTarget in ["WoodenGate_2","WoodenGate_3","WoodenGate_4","MetalGate_2","MetalGate_3","MetalGate_4"];
_isUnlocked = _cursorTarget getVariable ["isOpen","0"] == "1";
_isActionInProgress = _cursorTarget getVariable ["actionInProgress",false];
//Allow the gates to be opened when not locked by anyone
_isOpen = ((_cursorTarget animationPhase "DoorL") == 1) || ((_cursorTarget animationPhase "DoorR") == 1);
_isClosed = ((_cursorTarget animationPhase "DoorL") == 0) || ((_cursorTarget animationPhase "DoorR") == 0);
//[["ownerArray",["PID"]]]
_ownerArray = _cursorTarget getVariable ["ownerArray",["0"]];
_ownerBuildLock = _cursorTarget getVariable ["BuildLock",false];
_ownerPID = (_ownerArray select 0);
// open Gate
if (_isGateOperational && _isClosed && _isUnlocked) then {
if (s_player_openGate < 0) then {
s_player_openGate = player addAction [localize "STR_DN_OUT_O_GATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Open"], 1, true, true];
};
} else {
player removeAction s_player_openGate;
s_player_openGate = -1;
};
// Close Gate
if (_isGateOperational && _isOpen && _isUnlocked) then {
if (s_player_CloseGate < 0) then {
s_player_CloseGate = player addAction [localize "STR_DN_OUT_C_GATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Close"], 1, true, true];
};
} else {
player removeAction s_player_CloseGate;
s_player_CloseGate = -1;
};
// Set
if ((_isHouse or _isLockableGate) && (_ownerPID == _uid) && !_isUnlocked && _isClosed) then {
if (s_player_setCode < 0) then {
s_player_setCode = player addAction [localize "STR_BLD_ACTIONS_SETLOCKCODE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Set"], 1, true, true];
};
} else {
player removeAction s_player_setCode;
s_player_setCode = -1;
};
//Lock Build point
if ((_isFence or _isGateLockable) && (_ownerPID == _uid) && !_ownerBuildLock) then {
if (s_player_BuildLock < 0) then {
s_player_BuildLock = player addAction [localize "STR_BLD_ACTIONS_LOCKBUILD", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"BuildLock"], 1, true, true];
};
} else {
player removeAction s_player_BuildLock;
s_player_BuildLock = -1;
};
//UnLock Build point
if ((_isFence or _isGateLockable) && (_ownerPID == _uid) && _ownerBuildLock) then {
if (s_player_BuildUnLock < 0) then {
s_player_BuildUnLock = player addAction [localize "STR_BLD_ACTIONS_UNLOCKBUILD", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"BuildUnLock"], 1, true, true];
};
} else {
player removeAction s_player_BuildUnLock;
s_player_BuildUnLock = -1;
};
// Unlock Gate/House
if ((_isHouse or _isLockableGate) && !_isUnlocked && _isClosed) then {
if (s_player_unlockhouse < 0) then {
s_player_unlockhouse = player addAction [localize "STR_BLD_ACTIONS_UNLOCKGATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Unlock"], 1, true, true];
};
} else {
player removeAction s_player_unlockhouse;
s_player_unlockhouse = -1;
};
// Lock Gate/House
if ((_isHouse or _isLockableGate) && _isUnlocked && _isClosed) then {
if (s_player_lockhouse < 0) then {
s_player_lockhouse = player addAction [localize "STR_BLD_ACTIONS_LOCKGATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Lock"], 1, true, true];
};
} else {
player removeAction s_player_lockhouse;
s_player_lockhouse = -1;
};
//Break In
if ((_isHouse or _isLockableGate) && (_ownerPID != _uid) && !_isUnlocked && !_isActionInProgress) then {
if (s_player_breakinhouse < 0) then {
s_player_breakinhouse = player addAction [localize "STR_BLD_ACTIONS_BREAKIN", "\z\addons\dayz_code\actions\player_breakin.sqf",_cursorTarget, 1, true, true];
};
} else {
player removeAction s_player_breakinhouse;
s_player_breakinhouse = -1;
};*/
if ((_typeOfCursorTarget == "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
_allowed = ((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3} || {_hasAccess select 4});
@@ -806,7 +702,7 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance
};
// inplace upgrade tool
if (((_cursorTarget isKindOf "ModularItems") || (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") || (_cursorTarget isKindOf "CinderWallDoor_DZ_Base") || (_cursorTarget isKindOf "DZ_storage_base") || (_typeOfCursorTarget in DZE_isNewStorage)) && !(_typeOfCursorTarget in DZE_DisableUpgrade)) then {
if (((_cursorTarget isKindOf "ModularItems") || (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") || (_cursorTarget isKindOf "CinderWallDoor_DZ_Base") || (_cursorTarget isKindOf "DZE_Housebase") || (_cursorTarget isKindOf "DZ_storage_base") || (_typeOfCursorTarget in DZE_isNewStorage)) && !(_typeOfCursorTarget in DZE_DisableUpgrade)) then {
if ((s_player_lastTarget select 0) != _cursorTarget) then {
if (s_player_upgrade_build > 0) then {
player removeAction s_player_upgrade_build;
@@ -1044,23 +940,6 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance
s_player_destroytent = -1;
// player removeAction s_player_attach_bomb;
// s_player_attach_bomb = -1;
/* //Unlock,Lock // Vanilla base building currently not used in Epoch
player removeAction s_player_setCode;
s_player_setCode = -1;
player removeAction s_player_lockhouse;
s_player_lockhouse = -1;
player removeAction s_player_unlockhouse;
s_player_unlockhouse = -1;
player removeAction s_player_openGate;
s_player_openGate = -1;
player removeAction s_player_CloseGate;
s_player_CloseGate = -1;
player removeAction s_player_breakinhouse;
s_player_breakinhouse = -1;
player removeAction s_player_BuildUnLock;
s_player_BuildUnLock = -1;
player removeAction s_player_BuildLock;
s_player_BuildLock = -1;*/
{player removeAction _x} count s_player_combi;s_player_combi = [];
s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];
{player removeAction _x} count s_player_parts;s_player_parts = [];

View File

@@ -9,8 +9,7 @@ if (!isDedicated) then {
//"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
//"filmic" setToneMappingParams [0.07, 0.31, 0.23, 0.37, 0.011, 3.750, 6, 4]; setToneMapping "filmic"; //DayZ Vanilla
"filmic" setToneMappingParams [0.4, 0.35, 0.18, 0.1, 0.1, 5, 6, 3.8]; setToneMapping "filmic";
call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_padlock.sqf";
call compile preprocessFileLineNumbers "\z\addons\dayz_code\util\compile.sqf";
call compile preprocessFileLineNumbers "\z\addons\dayz_code\loot\init.sqf";

View File

@@ -1,7 +1,6 @@
// Both client and server
"PVDZ_hlt_Bleed" addPublicVariableEventHandler {(_this select 1) spawn fnc_usec_damageBleed};
"PVCDZ_veh_SH" addPublicVariableEventHandler {(_this select 1) call fnc_veh_handleDam}; // set damage to vehicle part
//"PVCDZ_obj_Damage" addPublicVariableEventHandler {(_this select 1) call fnc_Obj_FenceHandleDam}; // set damage to object. //Vanilla fences not used in Epoch
"PVDZ_veh_SF" addPublicVariableEventHandler {(_this select 1) call fnc_veh_handleRepair}; // repair a part from a vehicle
"PVCDZ_obj_HideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
"PVCDZ_obj_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
@@ -78,7 +77,6 @@ if (isServer) then {
"PVDZ_plr_SwitchMove" addPublicVariableEventHandler {((_this select 1) select 0) switchMove ((_this select 1) select 1);}; //Needed to execute switchMove on server machine. rSwitchMove only executes on other clients
"PVDZ_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj}; //Used by built items (Epoch and Vanilla)
"PVDZ_veh_Save" addPublicVariableEventHandler {(_this select 1) call server_updateObject};
//"PVDZ_fence_Update" addPublicVariableEventHandler {(_this select 1) call server_addtoFenceUpdateArray};
"PVDZ_plr_Login1" addPublicVariableEventHandler {_id = (_this select 1) call server_playerLogin};
"PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
"PVDZ_plr_LoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
@@ -101,20 +99,6 @@ if (isServer) then {
};
"PVDZE_PingSend" addPublicVariableEventHandler {PVDZE_PingReceived = 1; (owner (_this select 1)) publicVariableClient "PVDZE_PingReceived";};
//Added as part of the maintenance system to allow the server to replace the damaged model with a normal model.
/*"PVDZ_object_replace" addPublicVariableEventHandler {
_object = _this select 1;
_vars = _object getVariable "MaintenanceVars";
_ownerArray = _object getVariable ["ownerArray",[]];
if (!isNil "_vars" && _object isKindOf "DZ_buildables") then {
deleteVehicle _object;
_object = createVehicle [(_vars select 0), (_vars select 1), [], 0, if ((_vars select 0) in DayZ_nonCollide) then {"NONE"} else {"CAN_COLLIDE"}];
_object setVariable["Maintenance",false,true];
_object setVariable["ownerArray", _ownerArray, true];
};
};*/
"PVDZ_Server_Simulation" addPublicVariableEventHandler {
_agent = (_this select 1) select 0;
_control = (_this select 1) select 1;
@@ -180,49 +164,6 @@ if (isServer) then {
};
*/
};
//"PVDZ_Server_processSetAccessCode" addPublicVariableEventHandler {(_this select 1) call pvs_processSetAccessCode};
//"PVDZ_Server_processCode" addPublicVariableEventHandler {(_this select 1) call pvs_processAccessCode};
/*
"PVDZ_Server_processSetAccessCode" addPublicVariableEventHandler {
private ["_unitSending","_object","_object","_code"];
_unitSending = (_this select 1) select 0;
_object = (_this select 1) select 1;
_code = (_this select 1) select 2;
//diag_log format["%1, %2-%3",_unitSending,_object,_code];
_ownerID = owner _unitSending;
_ownerArray = _object getVariable ["ownerArray",["0"]];
if ((_ownerArray select 0) == (getPlayerUID _unitSending)) then {
if (_unitSending distance _object < 5) then {
_object setVariable ["dayz_padlockCombination",_code,false];
PVCDZ_Client_processAccessCode = [_code];
_ownerID publicVariableClient "PVCDZ_Client_processAccessCode";
[_object,"accessCode",_code] call server_updateObject;
_object setVariable ["dayz_padlockHistory", [], true];
_object setVariable ["dayz_padlockLockStatus", true,true];
diag_log format["INFO: %1, %5 has changed the access code for %2 with %3 at time %4",(name _unitSending),(typeof _object),_code,time,(getPlayerUID _unitSending)];
} else {
diag_log format["WARNING: %1, %5 is asking to change access code of %2 from a distance of %3 at time %4",(name _unitSending),(typeof _object),(_unit distance _object),time,(getPlayerUID _unitSending)];
};
} else {
diag_log format["WARNING: %1, %2 is trying to set a code for a gate he does not own.",(name _unitSending),(getPlayerUID _unitSending)];
};
};
*/
/*"PVDZ_Server_buildLock" addPublicVariableEventHandler {
_object = (_this select 1) select 0;
[_object,"buildLock"] call server_updateObject;
};*/
};
//Client only
@@ -246,7 +187,7 @@ if (!isDedicated) then {
"PVDZ_drg_RaUW" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\load\unload_wounded.sqf"};
"PVDZ_obj_Fire" addPublicVariableEventHandler {(_this select 1) spawn BIS_Effects_Burn};
"PVCDZ_plr_Humanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
"PVDZE_plr_FriendRQ" addPublicVariableEventHandler {if (player == ((_this select 1) select 0)) then {localize "str_epoch_player_2" call dayz_rollingMessages;};};
"PVDZE_plr_FriendRQ" addPublicVariableEventHandler {if (player == ((_this select 1) select 0)) then {localize "str_epoch_player_2" call dayz_rollingMessages;};};
//Medical
"PVCDZ_hlt_Morphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine};
@@ -275,27 +216,6 @@ if (!isDedicated) then {
_unit setVariable ["NORRN_unconscious", true, true];
};
/*"PVCDZ_Client_processCode" addPublicVariableEventHandler {
_object = (_this select 1) select 0;
_result = (_this select 1) select 1;
_codeGuess = (_this select 1) select 2;
if (_result) then {
_object setVariable ["dayz_padlockLockStatus", false,true];
_object setVariable ["isOpen", "1", true];
_object setVariable ["dayz_padlockHistory", [], true];
format[localize "STR_BLD_UNLOCKED",typeOf _object] call dayz_rollingMessages;
} else {
format[localize "STR_BLD_WRONG_COMBO",typeOf _object] call dayz_rollingMessages;
_object setVariable ["dayz_padlockHistory", _codeGuess, true];
};
};*/
/*"PVCDZ_Client_processAccessCode" addPublicVariableEventHandler {
_codeGuess = (_this select 1) select 0;
format[localize "STR_BLD_COMBO_SET",_codeGuess] call dayz_rollingMessages;
};*/
if (toLower DZE_DeathMsgChat != "none" or DZE_DeathMsgRolling or DZE_DeathMsgDynamicText) then {
"PVDZE_deathMessage" addPublicVariableEventHandler {(_this select 1) call dze_deathMessage};
};

View File

@@ -107,7 +107,6 @@ if (isServer) then {
dayz_traps = [];
dead_bodyCleanup = [];
needUpdate_objects = [];
needUpdate_FenceObjects = [];
dayz_choppedTrees = [];
dayz_ghostPlayers = [];
dayz_activePlayers = [];
@@ -117,9 +116,6 @@ if (isServer) then {
PlayerDeaths = [];
//Objects to remove when killed.
DayZ_nonCollide = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3", "StashMedium4", "DomeTentStorage", "DomeTentStorage0", "DomeTentStorage1", "DomeTentStorage2", "DomeTentStorage3", "DomeTentStorage4", "CamoNet_DZ", "DesertTentStorage", "DesertTentStorage0", "DesertTentStorage1", "DesertTentStorage2", "DomeTentStorage3", "DesertTentStorage4"];
DayZ_WoodenFence = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7"];
DayZ_WoodenGates = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"];
DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"];
// Epoch Additions
@@ -229,14 +225,6 @@ if (!isDedicated) then {
s_player_destroytent = -1;
//s_player_attach_bomb = -1;
//s_player_Drinkfromhands = -1;
/*s_player_lockhouse = -1; //Vanilla base building currently not used in Epoch
s_player_unlockhouse = -1;
s_player_openGate = -1;
s_player_CloseGate = -1;
s_player_breakinhouse = -1;
s_player_setCode = -1;
s_player_BuildUnLock = -1;
s_player_BuildLock = -1;*/
// Epoch Additions
s_player_packvault = -1;

View File

@@ -23,4 +23,5 @@ Folder for old scripts that are no longer used by epoch. All scripts can still b
//curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_curTimeStr.sqf";
//fn_niceSpot = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_niceSpot.sqf";
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\achievements_init.sqf";
//fnc_Obj_FenceHandleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fence_handleDam.sqf";
//fnc_Obj_FenceHandleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fence_handleDam.sqf";
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_padlock.sqf";