mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-12 19:22:56 +03:00
Remove redundant function fn_check_owner_friends
Fn_check_access provides the same functionality and more. Removed folders that only contained a single file to clean things up. Also added epoch tag friendly code to vanilla player_updateGui for now.
This commit is contained in:
@@ -15,17 +15,17 @@ _changecount = 0;
|
||||
|
||||
// Check is owner of the plot pole.
|
||||
|
||||
_isowner = [player, _plotpole] call FNC_check_owner_friends;
|
||||
_isowner = [player, _plotpole] call FNC_check_access;
|
||||
_itemsExist = false;
|
||||
|
||||
if ((_isowner select 0 )) then {
|
||||
if (_isowner select 0) then {
|
||||
_findNearestObjects = (position _plotpole) nearEntities _distance;
|
||||
{
|
||||
_object = _x;
|
||||
_classname = typeOf _object;
|
||||
if (_classname in DZE_plotTakeOwnershipItems)then {
|
||||
|
||||
_isowner = [player, _object] call FNC_check_owner_friends;
|
||||
_isowner = [player, _object] call FNC_check_access;
|
||||
diag_log text "Plot Take Ownership: Object in DZE_plotTakeOwnershipItems";
|
||||
|
||||
if !( _isowner select 0 ) then{
|
||||
|
||||
@@ -27,9 +27,9 @@ if(_IsNearPlot == 0) then {
|
||||
_canBuildOnPlot = true;
|
||||
} else {
|
||||
if (DZE_permanentPlot) then {
|
||||
_buildcheck = [player, _nearestPole] call FNC_check_owner_friends;
|
||||
_buildcheck = [player, _nearestPole] call FNC_check_access;
|
||||
_isowner = _buildcheck select 0;
|
||||
_isfriendly = _buildcheck select 1;
|
||||
_isfriendly = ((_buildcheck select 1) or (_buildcheck select 3));
|
||||
if (_isowner || _isfriendly) then {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
|
||||
@@ -26,9 +26,9 @@ if(_IsNearPlot == 0) then {
|
||||
_canBuildOnPlot = true;
|
||||
} else {
|
||||
if (DZE_permanentPlot) then {
|
||||
_buildcheck = [player, _nearestPole] call FNC_check_owner_friends;
|
||||
_buildcheck = [player, _nearestPole] call FNC_check_access;
|
||||
_isowner = _buildcheck select 0;
|
||||
_isfriendly = _buildcheck select 1;
|
||||
_isfriendly = ((_buildcheck select 1) or (_buildcheck select 3));
|
||||
if (_isowner || _isfriendly) then {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ DZE_ActionInProgress = true;
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
*/
|
||||
private ["_activatingPlayer","_obj","_playerUID","_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","_isModular"];
|
||||
private ["_activatingPlayer","_obj","_playerUID","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"];
|
||||
|
||||
player removeAction s_player_deleteBuild;
|
||||
s_player_deleteBuild = 1;
|
||||
@@ -60,9 +60,9 @@ _nearestPole = _plotcheck select 2;
|
||||
|
||||
if(_IsNearPlot >= 1) then {
|
||||
// Since there are plot poles nearby we need to check ownership && friend status
|
||||
_buildcheck = [player, _nearestPole] call FNC_check_owner_friends;
|
||||
_buildcheck = [player, _nearestPole] call FNC_check_access;
|
||||
_isowner = _buildcheck select 0;
|
||||
_isfriendly = _buildcheck select 1;
|
||||
_isfriendly = ((_buildcheck select 1) or (_buildcheck select 3));
|
||||
if (!_isowner && !_isfriendly) then {
|
||||
_limit = round(_limit*2);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user