diff --git a/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp b/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp
index 7e47e9bc6..0a9cf78c8 100644
--- a/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp
+++ b/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp
@@ -299,7 +299,7 @@ class Land_DZE_WoodDoor: Land_DZE_WoodDoor_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -308,7 +308,7 @@ class Land_DZE_WoodDoor: Land_DZE_WoodDoor_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
condition="this animationPhase ""Open_door"" >= 0.5";
statement="this animate [""Open_door"", 0];";
};
@@ -340,7 +340,7 @@ class Land_DZE_WoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -350,31 +350,31 @@ class Land_DZE_WoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
statement="this animate [""Open_door"", 0]";
};
class Lock_Door : Open_Door
{
- displayName="Lock Door";
+ displayName=$STR_EPOCH_DOORS_LOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
statement="this animate [""Open_hinge"", 0]";
};
class Unlock_Door : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
statement="this animate [""Open_hinge"", 1]";
};
class Unlock_Door_Dialog : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition=" !keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
- statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
+ statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
};
@@ -399,7 +399,7 @@ class Land_DZE_LargeWoodDoor: Land_DZE_WoodDoor_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -408,7 +408,7 @@ class Land_DZE_LargeWoodDoor: Land_DZE_WoodDoor_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
condition="this animationPhase ""Open_door"" >= 0.5";
statement="this animate [""Open_door"", 0]";
};
@@ -440,7 +440,7 @@ class Land_DZE_LargeWoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -450,31 +450,31 @@ class Land_DZE_LargeWoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
statement="this animate [""Open_door"", 0]";
};
class Lock_Door : Open_Door
{
- displayName="Lock Door";
+ displayName=$STR_EPOCH_DOORS_LOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
statement="this animate [""Open_hinge"", 0]";
};
class Unlock_Door : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
statement="this animate [""Open_hinge"", 1]";
};
class Unlock_Door_Dialog : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition=" !keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
- statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
+ statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
};
@@ -499,7 +499,7 @@ class Land_DZE_GarageWoodDoor: Land_DZE_WoodDoor_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -508,7 +508,7 @@ class Land_DZE_GarageWoodDoor: Land_DZE_WoodDoor_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
condition="this animationPhase ""Open_door"" >= 0.5";
statement="this animate [""Open_door"", 0]";
};
@@ -540,7 +540,7 @@ class Land_DZE_GarageWoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -550,31 +550,31 @@ class Land_DZE_GarageWoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
statement="this animate [""Open_door"", 0]";
};
class Lock_Door : Open_Door
{
- displayName="Lock Door";
+ displayName=$STR_EPOCH_DOORS_LOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
statement="this animate [""Open_hinge"", 0]";
};
class Unlock_Door : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
statement="this animate [""Open_hinge"", 1]";
};
class Unlock_Door_Dialog : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition=" !keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
- statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
+ statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
};
@@ -605,7 +605,7 @@ class CinderWallDoorLocked_DZ: CinderWallDoorLocked_DZ_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -615,31 +615,31 @@ class CinderWallDoorLocked_DZ: CinderWallDoorLocked_DZ_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_latch"" == 1)";
statement="this animate [""Open_door"", 0]";
};
class Lock_Door : Open_Door
{
- displayName="Lock Door";
+ displayName=$STR_EPOCH_DOORS_LOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
statement="this animate [""Open_latch"", 0]";
};
class Unlock_Door : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 0)";
statement="this animate [""Open_latch"", 1]";
};
class Unlock_Door_Dialog : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition=" !keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
- statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
+ statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
};
@@ -665,7 +665,7 @@ class CinderWallDoor_DZ: CinderWallDoor_DZ_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -674,7 +674,7 @@ class CinderWallDoor_DZ: CinderWallDoor_DZ_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
condition="this animationPhase ""Open_door"" >= 0.5";
statement="this animate [""Open_door"", 0]";
};
@@ -708,7 +708,7 @@ class CinderWallDoorSmallLocked_DZ: CinderWallDoorLocked_DZ_Base {
{
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -718,31 +718,31 @@ class CinderWallDoorSmallLocked_DZ: CinderWallDoorLocked_DZ_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_latch"" == 1)";
statement="this animate [""Open_door"", 0]";
};
class Lock_Door : Open_Door
{
- displayName="Lock Door";
+ displayName=$STR_EPOCH_DOORS_LOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
statement="this animate [""Open_latch"", 0]";
};
class Unlock_Door : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition="( !keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 0)";
statement="this animate [""Open_latch"", 1]";
};
class Unlock_Door_Dialog : Open_Door
{
- displayName="Unlock Door";
+ displayName=$STR_EPOCH_DOORS_UNLOCK;
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
condition=" !keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
- statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
+ statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
};
@@ -765,10 +765,10 @@ class CinderWallDoorSmall_DZ: CinderWallDoor_DZ_Base {
/* The entry to the actionmenu */
class UserActions
- {
+ {
class Open_Door
{
- displayName="Open Door";
+ displayName=$STR_EPOCH_DOORS_OPEN;
onlyforplayer = true;
position="Door_knopf";
radius=3; /* visibility distance of the entry */
@@ -777,7 +777,7 @@ class CinderWallDoorSmall_DZ: CinderWallDoor_DZ_Base {
};
class Close_Door : Open_Door
{
- displayName="Close Door";
+ displayName=$STR_EPOCH_DOORS_CLOSE;
condition="this animationPhase ""Open_door"" >= 0.5";
statement="this animate [""Open_door"", 0]";
};
diff --git a/SQF/dayz_code/Configs/RscDisplay/doorManagement/doorAccess.hpp b/SQF/dayz_code/Configs/RscDisplay/doorManagement/doorAccess.hpp
new file mode 100644
index 000000000..01594b042
--- /dev/null
+++ b/SQF/dayz_code/Configs/RscDisplay/doorManagement/doorAccess.hpp
@@ -0,0 +1,85 @@
+class DoorAccess
+{
+ idd = 61144;
+ movingenable = 0;
+
+ onLoad = "keypadCancel = true;";
+ onUnload = "if(keypadCancel) then {DZE_Lock_Door = ''; [] spawn keyPadReset;} else {DZE_Lock_Door = dayz_playerUID;};";
+
+ class Controls
+ {
+ class ZupaBackground_1
+ {
+ access = 0;
+ type = 0;
+ colorText[] = {0.8784,0.8471,0.651,1};
+ text = "";
+ fixedWidth = 0;
+ style = 0;
+ shadow = 2;
+ font = "Zeppelin32";
+ SizeEx = 0.03921;
+ idc = -1;
+ x = 0.35 * safezoneW + safezoneX;
+ y = 0.30 * safezoneH + safezoneY;
+ w = 0.20 * safezoneW;
+ h = 0.50 * safezoneH;
+ colorBackground[] = {0,0,0,0.8};
+ };
+
+ class ZupaHeader_2: ZSC_RscTextT
+ {
+ idc = -1;
+ x = 0.35 * safezoneW + safezoneX;
+ y = 0.30 * safezoneH + safezoneY;
+ w = 0.20 * safezoneW;
+ h = 0.05 * safezoneH;
+ text = $STR_EPOCH_DOORACCESS_TITLE;
+ colorBackground[] = {0,0,0,0.8};
+ colorText[] = {1,1,1,1};
+ };
+
+
+ class ZupaButton_1 : ZSC_RscButtonMenuBlue
+ {
+ idc = -1;
+ text = $STR_EPOCH_DOORACCESS_SCAN;
+ x = 0.40 * safezoneW + safezoneX;
+ y = 0.40 * safezoneH + safezoneY;
+ style = 2;
+ w = 0.20;
+ onButtonClick = "keypadCancel = false; call player_unlockDoor";
+ };
+
+ class ZupaButton_4 : ZSC_RscButtonMenuBlue
+ {
+ idc = -1;
+ text = $STR_EPOCH_DOORACCESS_MANUAL;
+ x = 0.40 * safezoneW + safezoneX;
+ y = 0.50 * safezoneH + safezoneY;
+ style = 2;
+ w = 0.20;
+ onButtonClick = "call player_enterCode";
+ };
+
+ class ZupaButton_2: ZSC_RscButtonMenuBlue
+ {
+ idc = -1;
+ text = $STR_EPOCH_CANCEL;
+ x = 0.40 * safezoneW + safezoneX;
+ y = 0.70 * safezoneH + safezoneY;
+ w = 0.20;
+ onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 3000);";
+ };
+
+ class ZupaButton_3: ZSC_RscButtonMenuBlue
+ {
+ idc = -1;
+ text = $STR_EPOCH_ACTIONS_MANAGEDOOR;
+ x = 0.40 * safezoneW + safezoneX;
+ y = 0.60 * safezoneH + safezoneY;
+ w = 0.20;
+ onButtonClick = "[] call player_manageDoor";
+ };
+ };
+};
diff --git a/SQF/dayz_code/Configs/RscDisplay/doorManagement/doorManagement.hpp b/SQF/dayz_code/Configs/RscDisplay/doorManagement/doorManagement.hpp
new file mode 100644
index 000000000..895f0648d
--- /dev/null
+++ b/SQF/dayz_code/Configs/RscDisplay/doorManagement/doorManagement.hpp
@@ -0,0 +1,97 @@
+class DoorManagement
+{
+ idd = 711195;
+ onLoad = "uiNamespace setVariable ['DoorManagement', _this select 0]";
+ class Controls {
+ class RscText_7100: ZSC_RscTextT
+ {
+ idc = 7100;
+ x = 0.30 * safezoneW + safezoneX;
+ y = 0.30 * safezoneH + safezoneY;
+ w = 0.30 * safezoneW;
+ h = 0.5 * safezoneH;
+ colorBackground[] = {0,0,0,0.8};
+ };
+ class RscListbox_7101: RscListbox
+ {
+ idc = 7101;
+ x = 0.31* safezoneW + safezoneX;
+ y = 0.41 * safezoneH + safezoneY;
+ w = 0.13 * safezoneW;
+ h = 0.30 * safezoneH;
+ soundSelect[] = {"",0.1,1};
+ colorBackground[] = {0.1,0.1,0.1,0.8};
+ };
+ class RscListbox_7102: RscListbox
+ {
+ idc = 7102;
+ x = 0.45 * safezoneW + safezoneX;
+ y = 0.41* safezoneH + safezoneY;
+ w = 0.13 * safezoneW;
+ h = 0.30 * safezoneH;
+ soundSelect[] = {"",0.1,1};
+ colorBackground[] = {0.1,0.1,0.1,0.8};
+ };
+ class RscShortcutButton_7104: ZSC_RscButtonMenuBlue
+ {
+ idc = 7104;
+ text = $STR_EPOCH_ADD;
+ x = 0.33 * safezoneW + safezoneX;
+ y = 0.70 * safezoneH + safezoneY;
+ w = 0.08 * safezoneW;
+ //h = 0.06 * safezoneH;
+ onButtonClick = "[(lbCurSel 7101)] call DoorAddFriend;";
+ };
+ class RscShortcutButton_7105: ZSC_RscButtonMenuBlue
+ {
+ idc = 7105;
+ text = $STR_EPOCH_DELETE;
+ x = 0.47 * safezoneW + safezoneX;
+ y = 0.70 * safezoneH + safezoneY;
+ w = 0.08 * safezoneW;
+ //h = 0.06 * safezoneH;
+ onButtonClick = "[(lbCurSel 7102)] call DoorRemoveFriend;";
+ };
+ class RscShortcutButton_7106: ZSC_RscButtonMenuBlue
+ {
+ idc = 7106;
+ text = $STR_UI_CLOSE;
+ x = 0.40 * safezoneW + safezoneX;
+ y = 0.74 * safezoneH + safezoneY;
+ w = 0.08 * safezoneW;
+ //h = 0.06 * safezoneH;
+ onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 9000);";
+ };
+ class RscText_7107: ZSC_RscTextT
+ {
+ idc = 7107;
+ text = $STR_EPOCH_DOORMANAGEMENT_TITLE;
+ x = 0.30 * safezoneW + safezoneX;
+ y = 0.30 * safezoneH + safezoneY;
+ w = 0.30 * safezoneW;
+ h = 0.05 * safezoneH;
+ colorBackground[] = {0,0,0,0.8};
+ colorText[] = {1,1,1,1};
+ };
+ class RscText_7108: ZSC_RscTextT
+ {
+ idc = 7108;
+ text = $STR_EPOCH_HUMANS_NEARBY;
+ x = 0.31 * safezoneW + safezoneX;
+ y = 0.38 * safezoneH + safezoneY;
+ w = 0.13 * safezoneW;
+ h = 0.03 * safezoneH;
+ colorText[] = {1,1,1,1};
+ };
+ class RscText_7103: ZSC_RscTextT
+ {
+ idc = 71103;
+ text = $STR_EPOCH_DOORMANAGEMENT_FRIENDS;
+ x = 0.45 * safezoneW + safezoneX;
+ y = 0.38 * safezoneH + safezoneY;
+ w = 0.13 * safezoneW;
+ h = 0.03 * safezoneH;
+ colorText[] = {1,1,1,1};
+ };
+ };
+};
diff --git a/SQF/dayz_code/actions/doorManagement/doorAddFriend.sqf b/SQF/dayz_code/actions/doorManagement/doorAddFriend.sqf
new file mode 100644
index 000000000..b36c1d72b
--- /dev/null
+++ b/SQF/dayz_code/actions/doorManagement/doorAddFriend.sqf
@@ -0,0 +1,22 @@
+private ["_pos","_plots","_inList"];
+_pos = _this select 0;
+if (_pos < 0) exitWith {};
+_toAdd = (Humans select _pos);
+_friends = TheDoor getVariable ["doorfriends",[]];
+_inList = false;
+{
+ if((_x select 0) == (_toAdd select 0)) exitWith { _inList = true; };
+} forEach _friends;
+if(_inList) exitWith { localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST" call dayz_rollingMessages; };
+if(count _friends >= DZE_doorManagementMaxFriends) exitWith { format[localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_FRIENDLIMIT", DZE_doorManagementMaxFriends] call dayz_rollingMessages; };
+_friends set [count _friends, _toAdd];
+TheDoor setVariable ["doorfriends", _friends, true];
+PVDZ_veh_Save = [TheDoor,"gear"];
+if (isServer) then {
+ PVDZ_veh_Save call server_updateObject;
+} else {
+ publicVariableServer "PVDZ_veh_Save";
+};
+
+call DoorGetFriends;
+call DoorNearbyHumans;
diff --git a/SQF/dayz_code/actions/doorManagement/doorGetFriends.sqf b/SQF/dayz_code/actions/doorManagement/doorGetFriends.sqf
new file mode 100644
index 000000000..3676099d8
--- /dev/null
+++ b/SQF/dayz_code/actions/doorManagement/doorGetFriends.sqf
@@ -0,0 +1,6 @@
+private ["_plots","_friendlies","_thePlot"];
+lbClear 7102;
+_friends = TheDoor getVariable ["doorfriends",[]];
+{
+ lbAdd [7102, (_x select 1)];
+} forEach _friends;
diff --git a/SQF/dayz_code/actions/doorManagement/doorNearbyHumans.sqf b/SQF/dayz_code/actions/doorManagement/doorNearbyHumans.sqf
new file mode 100644
index 000000000..31b7c8df2
--- /dev/null
+++ b/SQF/dayz_code/actions/doorManagement/doorNearbyHumans.sqf
@@ -0,0 +1,13 @@
+private ["_close"];
+lbClear 7101;
+_closePeople = player nearEntities ["CAManBase", 10];
+if (!DZE_doorManagementMustBeClose) then {_closePeople = playableUnits};
+Humans = [];
+{
+ if (isPlayer _x) then {
+ _friendUID = [_x] call FNC_GetPlayerUID;
+ _friendName = name _x;
+ Humans set [count Humans, [_friendUID,_friendName]];
+ lbAdd [7101, _friendName];
+ };
+} forEach _closePeople;
diff --git a/SQF/dayz_code/actions/doorManagement/doorRemoveFriend.sqf b/SQF/dayz_code/actions/doorManagement/doorRemoveFriend.sqf
new file mode 100644
index 000000000..dda038bb6
--- /dev/null
+++ b/SQF/dayz_code/actions/doorManagement/doorRemoveFriend.sqf
@@ -0,0 +1,21 @@
+private ["_list","_plots","_thePlot","_friends"];
+_pos = _this select 0;
+if (_pos < 0) exitWith {};
+_friends = TheDoor getVariable ["doorfriends", []];
+_toRemove = (_friends select _pos);
+_newList = [];
+{
+ if(_x select 0 != _toRemove select 0) then {
+ _newList set [count _newList, _x ];
+ };
+} forEach _friends;
+TheDoor setVariable ["doorfriends", _newList, true];
+PVDZ_veh_Save = [TheDoor, "gear"];
+if (isServer) then {
+ PVDZ_veh_Save call server_updateObject;
+} else {
+ publicVariableServer "PVDZ_veh_Save";
+};
+
+call DoorGetFriends;
+call DoorNearbyHumans;
\ No newline at end of file
diff --git a/SQF/dayz_code/actions/doorManagement/initDoorManagement.sqf b/SQF/dayz_code/actions/doorManagement/initDoorManagement.sqf
new file mode 100644
index 000000000..658516797
--- /dev/null
+++ b/SQF/dayz_code/actions/doorManagement/initDoorManagement.sqf
@@ -0,0 +1,29 @@
+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) && 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 {
+ createDialog "DoorManagement";
+ call DoorNearbyHumans;
+ call DoorGetFriends;
+} else {
+ localize "STR_EPOCH_DOORMANAGEMENT_NORIGHTS" call dayz_rollingMessages;
+};
+
diff --git a/SQF/dayz_code/actions/doorManagement/player_enterCode.sqf b/SQF/dayz_code/actions/doorManagement/player_enterCode.sqf
new file mode 100644
index 000000000..1914a46c5
--- /dev/null
+++ b/SQF/dayz_code/actions/doorManagement/player_enterCode.sqf
@@ -0,0 +1,13 @@
+
+// Close DoorAccess
+_display = findDisplay 61144;
+_display closeDisplay 3000;
+if(DZE_doorManagementAllowManualCode) then {
+ //DZE_Lock_Door != (this getvariable['CharacterID','0']);
+ DZE_topCombo = 0;
+ DZE_midCombo = 0;
+ DZE_botCombo = 0;
+ createDialog "ComboLockUI";
+} else {
+ localize "STR_EPOCH_DOORACCESS_NOMANUAL" call dayz_rollingMessages;
+};
diff --git a/SQF/dayz_code/actions/plotManagement/plotNearbyHumans.sqf b/SQF/dayz_code/actions/plotManagement/plotNearbyHumans.sqf
index 2d5425944..1ce2ecbaf 100644
--- a/SQF/dayz_code/actions/plotManagement/plotNearbyHumans.sqf
+++ b/SQF/dayz_code/actions/plotManagement/plotNearbyHumans.sqf
@@ -5,9 +5,9 @@ if (!DZE_plotManagementMustBeClose) then {_closePeople = playableUnits};
Humans = [];
{
if (isPlayer _x) then {
- _friendUID = getPlayerUID _x;
+ _friendUID = [_x] call FNC_GetPlayerUID;
_friendName = name _x;
- Humans = Humans + [[_friendUID,_friendName]] ;
+ Humans = Humans + [[_friendUID,_friendName]];
lbAdd [7001, _friendName];
};
} forEach _closePeople; // count causes Error Type Number, expected Bool here
\ No newline at end of file
diff --git a/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner_friends.sqf b/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner_friends.sqf
index 98d4f6ad4..a60981c32 100644
--- a/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner_friends.sqf
+++ b/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner_friends.sqf
@@ -42,15 +42,23 @@ if (DZE_permanentPlot) then {
_playerUID = [_player] call FNC_GetPlayerUID;
_targetOwner = _target getVariable ["ownerPUID","0"];
- _owner = (_playerUID == _targetOwner);
+
+ // Check if player is a plot friend
+ if (_playerUID in _friendlies) then {
+ _friendly = true;
+ };
} else {
+ _playerUID = dayz_characterID;
_friendlies = _player getVariable ["friendlyTo",[]];
_targetOwner = _target getVariable ["CharacterID","0"];
- _owner = (_targetOwner == dayz_characterID);
+
+ // Check if target object owner is a friend of player
+ if (_targetOwner in _friendlies) then {
+ _friendly = true;
+ };
};
-if (_targetOwner in _friendlies) then {
- _friendly = true;
-};
+// Check if player is owner of target object
+_owner = (_playerUID == _targetOwner);
[_owner, _friendly]
\ No newline at end of file
diff --git a/SQF/dayz_code/compile/doorManagement/fn_check_access.sqf b/SQF/dayz_code/compile/doorManagement/fn_check_access.sqf
new file mode 100644
index 000000000..7445b2968
--- /dev/null
+++ b/SQF/dayz_code/compile/doorManagement/fn_check_access.sqf
@@ -0,0 +1,145 @@
+/*
+ Check object's ownership and friends (plot and door)
+ Original concept by RimBlock (github.com/RimBlock)
+
+ Extended by Bruce-LXXVI to support different target objects
+ and allow fine grained access policies
+
+ Parameters:
+ _this select 0: object - player calling this function
+ _this select 1: object - target to check ownership and friendlies of
+
+ Returns:
+ _return select 0: bool - player is owner of target object
+ _return select 1: bool - player is friends with owner of target object
+ _return select 2: bool - player is plot owner
+ _return select 3: bool - player is plot friend
+ _return select 4: bool - player is plot management admin
+ _return select 5: bool - player is target friend
+ _return select 6: bool - player is target management admin
+ _return select 7: string - detected target type
+
+
+ 2,3,4: always false if no plot nearby
+ 5,6: always false if _target is not a supported target
+*/
+
+private [
+ "_player" // Player, who wants to access the _target
+ ,"_target" // The target object the _player wants to access
+ ,"_isOwner" // return value
+ ,"_isFriendly" // return value
+ ,"_isPlotOwner" // return value
+ ,"_isPlotFriend" // return value
+ ,"_isPlotAdmin" // return value
+ ,"_isTargetFriend" // return value
+ ,"_isTargetAdmin" // return value
+ ,"_targetType" // return value
+ ,"_targetOwnerUID" // UID or characterID of the owner of _target
+ ,"_playerUID" // UID of the _player
+ ,"_characterID" // characterID of the _player
+ ,"_plotcheck" // takes return value of FNC_find_plots
+ ,"_isNearPlot" // player is in plot's reach
+ ,"_nearestPlot" // plot object
+ ,"_plotOwnerUID" // plot owner's UID
+ ,"_plotFriends" // list of plot friends [["UID", "Name"], ..]
+ ,"_targetFriends" // list of target friends [["UID", "Name"], ..]
+];
+
+
+// assign parameters
+_player = _this select 0;
+_target = _this select 1;
+
+// Initialize return values
+_isOwner = false;
+_isFriendly = false;
+_isPlotOwner = false;
+_isPlotFriend = false;
+_isPlotAdmin = false;
+_isTargetFriend = false;
+_isTargetAdmin = false;
+_targetType = "";
+
+
+// determine target type
+_targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GENERIC"; };
+
+
+// determine owner and player id
+// and check if player is owner of target object
+_playerUID = [_player] call FNC_GetPlayerUID;
+_characterID = dayz_characterID;
+if(DZE_permanentPlot) then {
+ _targetOwnerUID = _target getVariable ["ownerPUID","0"];
+ _isOwner = (_playerUID == _targetOwnerUID);
+} else {
+ _targetOwnerUID = _target getVariable ["characterID","0"];
+ _isOwner = (_characterID == _targetOwnerUID);
+};
+
+
+// determine _players friends (tagged)
+// and check if owner of _target is tagged friendly
+_friendlies = _player getVariable ["friendlyTo",[]];
+_isFriendly = (_targetOwnerUID in _friendlies);
+
+
+// find nearest plot
+_plotcheck = [_player, false] call FNC_find_plots;
+_isNearPlot = ((_plotcheck select 1) > 0);
+_nearestPlot = _plotcheck select 2;
+if(_isNearPlot) then {
+ // determine plot owner
+ // and check if player is owner of plot
+ if (DZE_permanentPlot) then {
+ _plotOwnerUID = _nearestPlot getVariable ["ownerPUID","0"];
+ _isPlotOwner = (_playerUID == _plotOwnerUID);
+ } else {
+ _plotOwnerUID = _nearestPlot getVariable ["characterID","0"];
+ _isPlotOwner = (_characterID == _plotOwnerUID);
+ };
+
+
+ // determine plot friends
+ // and check if player is one of them
+ _isPlotFriend = _isPlotOwner; // Plot owner is always a plot friend
+ _plotFriends = _nearestPlot getVariable ["plotfriends", []];
+ {
+ if( (_x select 0) == _playerUID ) then { _isPlotFriend = true; };
+ } count _plotFriends;
+
+
+ // determine plot management admins
+ // and check if player is one of them
+ if(_playerUID in DZE_PlotManagementAdmins) then { _isPlotAdmin = true; };
+};
+
+
+// Process target type DOOR
+if(_targetType == "DOOR") then {
+ // determine door friends
+ // and check if player is one of them
+ _isTargetFriend = _isOwner; // Door owner is always a door friend
+ _targetFriends = _target getVariable ["doorfriends",[]];
+ {
+ if( (_x select 0) == _playerUID ) then { _isTargetFriend = true; };
+ } count _targetFriends;
+
+
+ // determine door management admins
+ // and check if player is one of them
+ if(_playerUID in DZE_DoorManagementAdmins) then { _isTargetAdmin = true; };
+};
+
+
+// RESULT
+[ _isOwner
+, _isFriendly
+, _isPlotOwner
+, _isPlotFriend
+, _isPlotAdmin
+, _isTargetFriend
+, _isTargetAdmin
+, _targetType
+]
diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf
index b0948e78b..2ae2bec3a 100644
--- a/SQF/dayz_code/compile/fn_selfActions.sqf
+++ b/SQF/dayz_code/compile/fn_selfActions.sqf
@@ -767,6 +767,26 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_SurrenderedGear = -1;
};
+ // Allow manage door
+ 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 {
+ s_player_manageDoor = player addAction [format["%1", localize "STR_EPOCH_ACTIONS_MANAGEDOOR"], "\z\addons\dayz_code\actions\doorManagement\initDoorManagement.sqf", _cursorTarget, 5, false];
+ };
+ } else {
+ player removeAction s_player_manageDoor;
+ s_player_manageDoor = -1;
+ };
+
//Allow owner to unlock vault
if ((_typeOfCursorTarget in DZE_LockableStorage) && {_characterID != "0"} && {player distance _cursorTarget < 3} && {!keypadCancel}) then {
if (s_player_unlockvault < 0) then {
@@ -809,7 +829,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_lockvault = -1;
};
- //Player Deaths
+ //Player Deaths
if (_typeOfCursorTarget == "Info_Board_EP1") then {
if (s_player_information < 0) then {
s_player_information = player addAction [localize "STR_EPOCH_ACTIONS_MURDERS", "\z\addons\dayz_code\actions\list_playerDeaths.sqf",[], 7, false, true];
@@ -1170,6 +1190,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_fuelauto = -1;
player removeAction s_player_fuelauto2;
s_player_fuelauto2 = -1;
+ player removeAction s_player_manageDoor;
+ s_player_manageDoor = -1;
};
//Dog actions on player self
diff --git a/SQF/dayz_code/compile/player_unlockDoor.sqf b/SQF/dayz_code/compile/player_unlockDoor.sqf
index a568e71ca..c9240801e 100644
--- a/SQF/dayz_code/compile/player_unlockDoor.sqf
+++ b/SQF/dayz_code/compile/player_unlockDoor.sqf
@@ -2,6 +2,7 @@
DayZ Unlock Door
Usage: [_obj] call player_unlockDoor;
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
+ Modified for Zupa's DoorManagement.
*/
private ["_display","_obj","_objectCharacterID"];
@@ -9,6 +10,13 @@ if (!isNil "DZE_DYN_UnlockDoorInprogress") exitWith {localize "str_epoch_player_
DZE_DYN_UnlockDoorInprogress = true;
+// find display and check the door opening method
+_doorMethod = '';
+_displayCombo = findDisplay 41144;
+_displayEye = findDisplay 61144;
+if(!isNull _displayEye) then {_display = _displayEye; _doorMethod = "Eye";};
+if(!isNull _displayCombo) then {_display = _displayCombo; _doorMethod = "Combo";};
+
if (!isNull dayz_selectedDoor) then {
if (!isNil 'KeyCodeTryTimer') then {
if (diag_tickTime > KeyCodeTryTimer) then {
@@ -16,25 +24,40 @@ if (!isNull dayz_selectedDoor) then {
KeyCodeTryTimer = nil;
};
};
-
+
_obj = dayz_selectedDoor; // our target
_notNearestPlayer = _obj call dze_isnearest_player;
-
+
if (_notNearestPlayer) then {
// close display since another player is closer
- _display = findDisplay 41144;
_display closeDisplay 3000;
localize "STR_EPOCH_ACTIONS_16" call dayz_rollingMessages;
} else {
// get object combination
_objectCharacterID = _obj getVariable ["CharacterID","0"];
-
+
+ if(DZE_doorManagement) then {
+ // Check player access
+ _isowner = [player, _obj] call FNC_check_access;
+ if( ((_isowner select 0) && DZE_doorManagementAllowAccess_owner) // door owner
+ || ((_isowner select 1) && DZE_doorManagementAllowAccess_ownerFriendlies) // door owner's friendly tagged
+ || ((_isowner select 2) && DZE_doorManagementAllowAccess_plotOwner) // plot owner
+ || ((_isowner select 3) && DZE_doorManagementAllowAccess_plotFriends) // plot friends
+ || ((_isowner select 4) && DZE_doorManagementAllowAccess_plotAdmins) // plot management admins
+ || ((_isowner select 5) && DZE_doorManagementAllowAccess_doorFriends) // door friends
+ || ((_isowner select 6) && DZE_doorManagementAllowAccess_doorAdmins) // door management admins
+ ) then {
+ DZE_Lock_Door = dayz_selectedDoor getVariable['CharacterID','0'];
+ };
+ };
+
+
+
// Check combination
if (DZE_Lock_Door == _objectCharacterID) then {
[player,"combo_unlock",0,false] call dayz_zombieSpeak;
// close display
- _display = findDisplay 41144;
_display closeDisplay 3000;
// unlock if locked
@@ -44,6 +67,11 @@ if (!isNull dayz_selectedDoor) then {
if (_obj animationPhase "Open_latch" == 0) then {
_obj animate ["Open_latch", 1];
};
+
+ if(_doorMethod == "Eye") then {
+ localize "STR_EPOCH_DOORACCESS_SUCCESS" call dayz_rollingMessages;
+ };
+
KeyCodeTry = nil;
} else {
["Working",0,[100,15,10,0]] call dayz_NutritionSystem;
@@ -58,14 +86,17 @@ if (!isNull dayz_selectedDoor) then {
if (KeyCodeTry >= ((round(random 4)) + 4)) then {
if (isNil 'KeyCodeTryTimer') then {KeyCodeTryTimer = diag_tickTime+10;};
localize "str_epoch_player_19" call dayz_rollingMessages;
- _display = findDisplay 41144;
+ _display closeDisplay 3000;
+ };
+
+ if(_doorMethod == "Eye") then {
+ localize "STR_EPOCH_DOORACCESS_FAILURE" call dayz_rollingMessages;
_display closeDisplay 3000;
};
};
};
} else {
// close display since no target
- _display = findDisplay 41144;
_display closeDisplay 3000;
};
DZE_DYN_UnlockDoorInprogress = nil;
\ No newline at end of file
diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp
index ac21ae002..c219b5e37 100644
--- a/SQF/dayz_code/config.cpp
+++ b/SQF/dayz_code/config.cpp
@@ -115,4 +115,7 @@ class CfgAddons
#include "Configs\RscDisplay\plotManagement.hpp"
#include "Configs\RscDisplay\deathboards.hpp"
#include "Configs\CfgExtra\snappoints.hpp"
-#include "external\R3F_Realism\R3F_Weight\R3F_CfgWeight.hpp"
\ No newline at end of file
+#include "external\R3F_Realism\R3F_Weight\R3F_CfgWeight.hpp"
+#include "Configs\RscDisplay\doorManagement\doorManagement.hpp"
+#include "Configs\RscDisplay\doorManagement\doorAccess.hpp"
+
diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf
index 6abd95265..e28fb463b 100644
--- a/SQF/dayz_code/configVariables.sqf
+++ b/SQF/dayz_code/configVariables.sqf
@@ -75,6 +75,31 @@ DZE_buildMaxMoveDistance = 10; // Max distance player can walk from start positi
DZE_buildMaxHeightDistance = 10; // Max distance player can raise or lower object from start position when building.
+/////////// doorManagement Variables ///////////
+// Let owner and plot friends and door friends manage door access
+DZE_doorManagement = true;
+DZE_doorManagementMustBeClose = true; //Players must be within 10m of door to be added as a door friend.
+DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotations, UIDs in this list are able to access every door's management menu and open it
+DZE_doorManagementAllowManualCode = true; //Allows opening doors still using PIN
+DZE_doorManagementMaxFriends = 10; //Maximum number of friends allowed on a door. (default 10)
+// Set access rights (unlock) for doors
+DZE_doorManagementAllowAccess_owner = true;
+DZE_doorManagementAllowAccess_ownerFriendlies = false;
+DZE_doorManagementAllowAccess_plotOwner = false;
+DZE_doorManagementAllowAccess_plotFriends = false;
+DZE_doorManagementAllowAccess_plotAdmins = false;
+DZE_doorManagementAllowAccess_doorFriends = true;
+DZE_doorManagementAllowAccess_doorAdmins = true;
+// Set management rights for doors (beware that managers can add theirselves and others as door friends)
+DZE_doorManagementAllowManage_owner = true;
+DZE_doorManagementAllowManage_ownerFriendlies = false;
+DZE_doorManagementAllowManage_plotOwner = false;
+DZE_doorManagementAllowManage_plotFriends = false;
+DZE_doorManagementAllowManage_plotAdmins = false;
+DZE_doorManagementAllowManage_doorFriends = false;
+DZE_doorManagementAllowManage_doorAdmins = true;
+
+
/*
Developers:
diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf
index 4da47bb47..736a54bd6 100644
--- a/SQF/dayz_code/init/compiles.sqf
+++ b/SQF/dayz_code/init/compiles.sqf
@@ -96,7 +96,7 @@ if (!isDedicated) then {
fnc_SetPitchBankYaw = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\BuildVectors\fnc_SetPitchBankYaw.sqf";
FNC_check_owner_friends = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\A_Plot_for_Life\fn_check_owner_friends.sqf";
FNC_find_plots = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\A_Plot_for_Life\fn_find_plots.sqf";
-
+
player_buildVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_buildVanilla.sqf";
fn_buildCamera = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildCamera.sqf";
object_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_build.sqf";
@@ -190,7 +190,14 @@ if (!isDedicated) then {
PlotObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotObjects.sqf";
PlotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf";
MaintainPlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\maintain_area.sqf"; // use maintain_areaSC.sqf for single currency
-
+ DoorGetFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\doorGetFriends.sqf";
+ DoorNearbyHumans = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\doorNearbyHumans.sqf";
+ DoorAddFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\doorAddFriend.sqf";
+ DoorRemoveFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\doorRemoveFriend.sqf";
+ player_manageDoor = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\initDoorManagement.sqf";
+ player_enterCode = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\player_enterCode.sqf";
+ FNC_check_access = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\doorManagement\fn_check_access.sqf";
+
dayz_losChance = {
private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
_agent = _this select 0;
diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf
index 7450e46d4..531fd04de 100644
--- a/SQF/dayz_code/init/variables.sqf
+++ b/SQF/dayz_code/init/variables.sqf
@@ -240,9 +240,9 @@ dayz_resetSelfActions = {
s_player_lockUnlock_crtl = -1;
s_player_lockUnlockInside_ctrl = -1;
s_player_toggleSnap = -1;
- s_player_toggleSnapSelect = -1;
- s_player_toggleSnapSelectPoint = [];
- snapActions = -1;
+ s_player_toggleSnapSelect = -1;
+ s_player_toggleSnapSelectPoint = [];
+ snapActions = -1;
s_player_plot_boundary_on = -1;
s_player_plot_boundary_off = -1;
s_player_plot_take_ownership = -1;
@@ -253,6 +253,7 @@ dayz_resetSelfActions = {
s_player_toggleVector = -1;
s_player_toggleVectors=[];
vectorActions = -1;
+ s_player_manageDoor = -1;
};
call dayz_resetSelfActions;
diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml
index 56f779991..764398536 100644
--- a/SQF/dayz_code/stringtable.xml
+++ b/SQF/dayz_code/stringtable.xml
@@ -15955,10 +15955,12 @@
Already on the list
Уже в списке друзей
+ Schon auf der Liste
Only %1 friends allowed
Можно добавить друзей: %1
+ Nur %1 Freunde erlaubt
Trader
@@ -17584,6 +17586,7 @@
Humans Nearby
+ Spieler in der Nähe
Plot Friends
@@ -17600,5 +17603,75 @@
Object is placed too far away from where you started building (within %1 meters)
+
+ Manage Door
+ Tür verwalten
+
+
+
+ Door Access Terminal
+ Zutrittssystem
+
+
+ Eye Scan
+ Auge scannnen
+
+
+ Manual Code
+ PIN manuell eingeben
+
+
+ Eye Scan SUCCESS
+ Iris-Scan ERFOLGREICH
+
+
+ Eye Scan FAILED
+ Iris-Scan FEHLGESCHLAGEN
+
+
+ We do not allow manual codes.
+ Die manuelle Eingabe ist nicht erlaubt.
+
+
+
+ Door Management
+ Tür-Management
+
+
+ Door Friends
+ Tür-Freunde
+
+
+ You do not have the rights to manage.
+ Du darfst diese Tür nicht verwalten.
+
+
+
+ Open Door
+ Tür öffnen
+
+
+ Close Door
+ Tür schliessen
+
+
+ Unlock Door
+ Tür aufschliessen
+
+
+ Lock Door
+ Tür abschliessen
+
+
+ Cancel
+ Annuler
+ Cancelar
+ Annulla
+ Mégse
+ Anuluj
+ Отмена
+ Abbrechen
+ Zrušit
+
diff --git a/SQF/dayz_server/compile/server_updateObject.sqf b/SQF/dayz_server/compile/server_updateObject.sqf
index 43ab31b37..b8f6c8a1e 100644
--- a/SQF/dayz_server/compile/server_updateObject.sqf
+++ b/SQF/dayz_server/compile/server_updateObject.sqf
@@ -69,9 +69,19 @@ _object_inventory = {
if (_object isKindOf "TrapItems") then {
_inventory = [["armed",_object getVariable ["armed",false]]];
} else {
- if (DZE_permanentPlot && (typeOf _object == "Plastic_Pole_EP1_DZ")) then {
+ _isNormal = true;
+
+ if( DZE_permanentPlot && (typeOf (_object) == "Plastic_Pole_EP1_DZ") ) then {
+ _isNormal = false;
_inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
- } else {
+ };
+
+ if( DZE_doorManagement && (typeOf (_object) in DZE_DoorsLocked) ) then {
+ _isNormal = false;
+ _inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
+ };
+
+ if(_isNormal) then {
_inventory = [getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object];
};
};
diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf
index 5f25e4686..767e38e60 100644
--- a/SQF/dayz_server/system/server_monitor.sqf
+++ b/SQF/dayz_server/system/server_monitor.sqf
@@ -180,6 +180,10 @@ if (_status == "ObjectStreamStart") then {
_object setVariable ["plotfriends", _inventory, true];
};
+ if( DZE_doorManagement && (typeOf (_object) in DZE_DoorsLocked) ) then {
+ _object setVariable ["doorfriends", _inventory, true];
+ };
+
dayz_serverIDMonitor set [count dayz_serverIDMonitor,_idKey];
// Fix for leading zero issues on safe codes after restart
_lockable = if (isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {getNumber (configFile >> "CfgVehicles" >> _type >> "lockable")} else {0};
@@ -209,7 +213,7 @@ if (_status == "ObjectStreamStart") then {
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
clearBackpackCargoGlobal _object;
- if( (count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ") ) then {
+ if( (count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ") && !(typeOf( _object) in DZE_DoorsLocked) ) then {
if (_type in DZE_LockedStorage) then {
_object setVariable ["WeaponCargo",(_inventory select 0),true];
_object setVariable ["MagazineCargo",(_inventory select 1),true];