mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
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.
30 lines
723 B
Plaintext
30 lines
723 B
Plaintext
private ["_display","_isOwner"];
|
|
disableSerialization;
|
|
|
|
if (count(_this) > 0) then
|
|
{
|
|
TheDoor = _this select 3;
|
|
} else {
|
|
TheDoor = dayz_selectedDoor;
|
|
};
|
|
|
|
// close DoorAccess if open
|
|
_display = findDisplay 61144;
|
|
_display closeDisplay 3000;
|
|
|
|
// Check player access
|
|
_isOwner = [player, TheDoor] call FNC_check_access;
|
|
if (
|
|
(_isOwner select 0) or // door owner
|
|
(_isOwner select 2) or // plot owner
|
|
(_isOwner select 3) or // plot friend
|
|
(_isOwner select 4) or // plot admin
|
|
(_isOwner select 5) or // door friend
|
|
(_isOwner select 6) // door admin
|
|
) then {
|
|
createDialog "DoorManagement";
|
|
call DoorNearbyHumans;
|
|
call DoorGetFriends;
|
|
} else {
|
|
localize "STR_EPOCH_DOORMANAGEMENT_NORIGHTS" call dayz_rollingMessages;
|
|
}; |