From 1b69ce68e33699558cc60c39f618fe2e98f945d7 Mon Sep 17 00:00:00 2001 From: Rysik5318 <72207886+Rysik5318@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:23:30 +0400 Subject: [PATCH 1/4] Add Repair Door --- EXILED/Exiled.API/Features/Doors/BreakableDoor.cs | 8 ++++++++ EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs | 8 ++++++++ EXILED/Exiled.API/Features/Doors/Door.cs | 11 ++++++----- EXILED/Exiled.API/Interfaces/IDamageableDoor.cs | 5 +++++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs b/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs index 9148067ddd..82b72d3544 100644 --- a/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs @@ -92,6 +92,14 @@ public bool IgnoreRemoteAdmin set => Base._nonInteractable = value; } + /// + /// Repair the door. + /// + public void Repair() + { + Base.ServerRepair(); + } + /// /// Damages the door. /// diff --git a/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs b/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs index 9681290d8c..d0f1e1163f 100644 --- a/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs @@ -133,6 +133,14 @@ public DoorDamageType IgnoredDamage /// internal List SubDoorsValue { get; } = new(); + /// + /// Repair the door. + /// + public void Repair() + { + Base.ServerRepair(); + } + /// /// Toggles the state of the doors from . /// diff --git a/EXILED/Exiled.API/Features/Doors/Door.cs b/EXILED/Exiled.API/Features/Doors/Door.cs index bfdede33d0..312fd656cd 100644 --- a/EXILED/Exiled.API/Features/Doors/Door.cs +++ b/EXILED/Exiled.API/Features/Doors/Door.cs @@ -14,17 +14,13 @@ namespace Exiled.API.Features.Doors using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features.Core; - using Exiled.API.Features.Hazards; using Exiled.API.Interfaces; - using global::Hazards; using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; using MEC; using Mirror; using UnityEngine; - using static Interactables.Interobjects.ElevatorManager; - using BaseBreakableDoor = Interactables.Interobjects.BreakableDoor; using BaseKeycardPermissions = Interactables.Interobjects.DoorUtils.KeycardPermissions; using Breakable = BreakableDoor; @@ -134,6 +130,11 @@ public bool IsOpen set => Base.NetworkTargetState = value; } + /// + /// Gets or sets a value indicating whether the door is open. + /// + public bool IsVisibleThrough => Base.IsVisibleThrough; + /// /// Gets a value indicating whether this door is a gate. /// @@ -640,7 +641,6 @@ private DoorType GetDoorType() "NUKE_ARMORY" => DoorType.NukeArmory, "LCZ_ARMORY" => DoorType.LczArmory, "SURFACE_NUKE" => DoorType.NukeSurface, - "HID_CHAMBER" => DoorType.HIDChamber, "HCZ_ARMORY" => DoorType.HczArmory, "096" => DoorType.Scp096, "049_ARMORY" => DoorType.Scp049Armory, @@ -653,6 +653,7 @@ private DoorType GetDoorType() "SERVERS_BOTTOM" => DoorType.ServersBottom, "173_CONNECTOR" => DoorType.Scp173Connector, "LCZ_WC" => DoorType.LczWc, + "HID_CHAMBER" => DoorType.HIDChamber, "HID_UPPER" => DoorType.HIDUpper, "HID_LOWER" => DoorType.HIDLower, "173_ARMORY" => DoorType.Scp173Armory, diff --git a/EXILED/Exiled.API/Interfaces/IDamageableDoor.cs b/EXILED/Exiled.API/Interfaces/IDamageableDoor.cs index d5de3d1062..f98eebde91 100644 --- a/EXILED/Exiled.API/Interfaces/IDamageableDoor.cs +++ b/EXILED/Exiled.API/Interfaces/IDamageableDoor.cs @@ -39,6 +39,11 @@ public interface IDamageableDoor /// public DoorDamageType IgnoredDamage { get; set; } + /// + /// Repair the door. + /// + public void Repair(); + /// /// Damages the door. /// From 2074f1e1e6ee76938e4791deb9479bd71ed35de2 Mon Sep 17 00:00:00 2001 From: Rysik5318 <72207886+Rysik5318@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:39:14 +0400 Subject: [PATCH 2/4] Update Door.cs --- EXILED/Exiled.API/Features/Doors/Door.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/EXILED/Exiled.API/Features/Doors/Door.cs b/EXILED/Exiled.API/Features/Doors/Door.cs index 312fd656cd..5334419c05 100644 --- a/EXILED/Exiled.API/Features/Doors/Door.cs +++ b/EXILED/Exiled.API/Features/Doors/Door.cs @@ -130,11 +130,6 @@ public bool IsOpen set => Base.NetworkTargetState = value; } - /// - /// Gets or sets a value indicating whether the door is open. - /// - public bool IsVisibleThrough => Base.IsVisibleThrough; - /// /// Gets a value indicating whether this door is a gate. /// From ee1985667b714c51e56d5a37b265942abbe0a530 Mon Sep 17 00:00:00 2001 From: Rysik5318 <72207886+Rysik5318@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:53:52 +0400 Subject: [PATCH 3/4] Update EXILED/Exiled.API/Features/Doors/BreakableDoor.cs Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> --- EXILED/Exiled.API/Features/Doors/BreakableDoor.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs b/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs index 82b72d3544..862332c893 100644 --- a/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/BreakableDoor.cs @@ -95,10 +95,7 @@ public bool IgnoreRemoteAdmin /// /// Repair the door. /// - public void Repair() - { - Base.ServerRepair(); - } + public void Repair() => Base.ServerRepair(); /// /// Damages the door. From a43fdf5805841ac79e92767fd4a930edb135a01f Mon Sep 17 00:00:00 2001 From: Rysik5318 <72207886+Rysik5318@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:54:05 +0400 Subject: [PATCH 4/4] Update EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs Co-authored-by: VALERA771 <72030575+VALERA771@users.noreply.github.com> --- EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs b/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs index d0f1e1163f..837bd5ff72 100644 --- a/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/CheckpointDoor.cs @@ -136,10 +136,7 @@ public DoorDamageType IgnoredDamage /// /// Repair the door. /// - public void Repair() - { - Base.ServerRepair(); - } + public void Repair() => Base.ServerRepair(); /// /// Toggles the state of the doors from .