mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Remove excessive door management config variables
Too many config variables made this unnecessarily complicated. Most servers will want the defaults. For those that want to customize further they can easily overwrite these files. These seem like the most logical defaults to me. Allow all of these people to manage and unlock by default: - door owner - plot owner - plot friend - plot admin - door friend - door admin Door friends should be able to manage by default so they don't have to wait for the owner to come back online to add someone as a door friend. Plot friends and plot admins can get around the door by removing it and building another one anyway, so locking them out is pointless. It is still useful to have these as separate variables for servers that do not require plot poles though. Regular friendlies should not be included by default, since we have the more fine grained plot friends and door friends lists for that. Regular friendlies will probably be replaced by groups in the near future anyway. Please post a comment if there are any issues with these defaults I'm forgetting. Thanks.
This commit is contained in:
@@ -786,18 +786,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
};
|
||||
|
||||
// Allow manage door
|
||||
if( DZE_doorManagement && (_typeOfCursorTarget in DZE_DoorsLocked) ) then {
|
||||
if (DZE_doorManagement && (_typeOfCursorTarget in DZE_DoorsLocked)) then {
|
||||
// Check player access
|
||||
_isOwner = [player, _cursorTarget] call FNC_check_access;
|
||||
if( (s_player_manageDoor < 0) && (
|
||||
((_isOwner select 0) && DZE_doorManagementAllowManage_owner) // door owner
|
||||
|| ((_isOwner select 1) && DZE_doorManagementAllowManage_ownerFriendlies) // door owner's friendly tagged
|
||||
|| ((_isOwner select 2) && DZE_doorManagementAllowManage_plotOwner) // plot owner
|
||||
|| ((_isOwner select 3) && DZE_doorManagementAllowManage_plotFriends) // plot friends
|
||||
|| ((_isOwner select 4) && DZE_doorManagementAllowManage_plotAdmins) // plot management admins
|
||||
|| ((_isOwner select 5) && DZE_doorManagementAllowManage_doorFriends) // door friends
|
||||
|| ((_isOwner select 6) && DZE_doorManagementAllowManage_doorAdmins) // door management admins
|
||||
)) then {
|
||||
if (s_player_manageDoor < 0 && ((_isOwner select 0) or (_isOwner select 2) or (_isOwner select 3) or (_isOwner select 4) or (_isOwner select 5) or (_isOwner select 6))) then {
|
||||
s_player_manageDoor = player addAction [format["<t color='#0059FF'>%1</t>", localize "STR_EPOCH_ACTIONS_MANAGEDOOR"], "\z\addons\dayz_code\actions\doorManagement\initDoorManagement.sqf", _cursorTarget, 5, false];
|
||||
};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user