From 2c12dde8214b494a291f3940ffae800d619384f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Tue, 12 May 2026 01:44:17 +0300 Subject: [PATCH 01/16] refactor edr --- EXILED/Exiled.API/Features/Toys/CameraToy.cs | 11 +- EXILED/Exiled.API/Features/Toys/Capybara.cs | 7 +- .../Features/Toys/InteractableToy.cs | 32 ++--- EXILED/Exiled.API/Features/Toys/Light.cs | 58 ++++++-- EXILED/Exiled.API/Features/Toys/Primitive.cs | 129 +++++------------- .../Features/Toys/ShootingTargetToy.cs | 64 ++++----- EXILED/Exiled.API/Features/Toys/Text.cs | 42 ++---- EXILED/Exiled.API/Features/Toys/Waypoint.cs | 17 ++- 8 files changed, 137 insertions(+), 223 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/CameraToy.cs b/EXILED/Exiled.API/Features/Toys/CameraToy.cs index 85727a176f..70718892a7 100644 --- a/EXILED/Exiled.API/Features/Toys/CameraToy.cs +++ b/EXILED/Exiled.API/Features/Toys/CameraToy.cs @@ -124,10 +124,10 @@ public string Name /// Creates a new . /// /// The transform to create this on. - /// The of the camera. /// The local position of the camera. /// The local rotation of the camera. /// The local scale of the camera. + /// The of the camera. /// The name (label) of the camera. /// The room associated with this camera. /// The vertical limits. Leave null to use prefab default. @@ -135,7 +135,7 @@ public string Name /// The zoom limits. Leave null to use prefab default. /// Whether the camera should be initially spawned. /// The new . - public static CameraToy Create(Transform parent = null, CameraType type = CameraType.EzArmCameraToy, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, string name = "New Camera", Room room = null, Vector2? verticalConstraint = null, Vector2? horizontalConstraint = null, Vector2? zoomConstraint = null, bool spawn = true) + public static CameraToy Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, CameraType type = CameraType.EzArmCameraToy, string name = "New Camera", Room room = null, Vector2? verticalConstraint = null, Vector2? horizontalConstraint = null, Vector2? zoomConstraint = null, bool spawn = true) { Scp079CameraToy prefab = type switch { @@ -156,12 +156,11 @@ public static CameraToy Create(Transform parent = null, CameraType type = Camera CameraToy toy = new(Object.Instantiate(prefab, parent)) { Name = name, + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, + Scale = scale ?? Vector3.one, }; - toy.Transform.localPosition = position ?? Vector3.zero; - toy.Transform.localRotation = rotation ?? Quaternion.identity; - toy.Transform.localScale = scale ?? Vector3.one; - if (verticalConstraint.HasValue) toy.VerticalConstraint = verticalConstraint.Value; diff --git a/EXILED/Exiled.API/Features/Toys/Capybara.cs b/EXILED/Exiled.API/Features/Toys/Capybara.cs index d615b25a1b..664282901a 100644 --- a/EXILED/Exiled.API/Features/Toys/Capybara.cs +++ b/EXILED/Exiled.API/Features/Toys/Capybara.cs @@ -83,12 +83,11 @@ public static Capybara Create(Transform parent = null, Vector3? position = null, Capybara toy = new(Object.Instantiate(Prefab, parent)) { Collidable = collidable, + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, + Scale = scale ?? Vector3.one, }; - toy.Transform.localPosition = position ?? Vector3.zero; - toy.Transform.localRotation = rotation ?? Quaternion.identity; - toy.Transform.localScale = scale ?? Vector3.one; - if (spawn) toy.Spawn(); diff --git a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs index 1653e69b78..c89fea9c7c 100644 --- a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs +++ b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs @@ -66,22 +66,7 @@ public bool IsLocked } /// - /// Creates a new at the specified position. - /// - /// The local position of the . - /// The new . - public static InteractableToy Create(Vector3 position) => Create(position: position, spawn: true); - - /// - /// Creates a new with a specific position and shape. - /// - /// The local position of the . - /// The shape of the collider. - /// The new . - public static InteractableToy Create(Vector3 position, ColliderShape shape) => Create(position: position, shape: shape, spawn: true); - - /// - /// Creates a new with a specific position, shape, and interaction duration. + /// Creates a new . /// /// The local position of the . /// The shape of the collider. @@ -90,16 +75,16 @@ public bool IsLocked public static InteractableToy Create(Vector3 position, ColliderShape shape, float duration) => Create(position: position, shape: shape, interactionDuration: duration, spawn: true); /// - /// Creates a new from a Transform. + /// Creates a new . /// - /// The transform to create this on. + /// The local position of the . /// The shape of the collider. /// How long the interaction takes. /// Whether the object is locked. /// Whether the should be initially spawned. /// The new . - public static InteractableToy Create(Transform transform, ColliderShape shape = ColliderShape.Sphere, float interactionDuration = 1f, bool isLocked = false, bool spawn = true) - => Create(parent: transform, shape: shape, interactionDuration: interactionDuration, isLocked: isLocked, spawn: spawn); + public static InteractableToy Create(Vector3 position, ColliderShape shape = ColliderShape.Sphere, float interactionDuration = 1f, bool isLocked = false, bool spawn = true) + => Create(position: position, shape: shape, interactionDuration: interactionDuration, isLocked: isLocked, spawn: spawn); /// /// Creates a new . @@ -120,12 +105,11 @@ public static InteractableToy Create(Transform parent = null, Vector3? position Shape = shape, IsLocked = isLocked, InteractionDuration = interactionDuration, + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, + Scale = scale ?? Vector3.one, }; - toy.Transform.localPosition = position ?? Vector3.zero; - toy.Transform.localRotation = rotation ?? Quaternion.identity; - toy.Transform.localScale = scale ?? Vector3.one; - if (spawn) toy.Spawn(); diff --git a/EXILED/Exiled.API/Features/Toys/Light.cs b/EXILED/Exiled.API/Features/Toys/Light.cs index 4dad774de2..beda646358 100644 --- a/EXILED/Exiled.API/Features/Toys/Light.cs +++ b/EXILED/Exiled.API/Features/Toys/Light.cs @@ -17,6 +17,8 @@ namespace Exiled.API.Features.Toys using UnityEngine; + using Object = UnityEngine.Object; + /// /// A wrapper class for . /// @@ -128,36 +130,62 @@ public LightShadows ShadowType /// Creates a new . /// /// The position of the . - /// The rotation of the . - /// The scale of the . - /// Whether the should be initially spawned. + /// The color of the . /// The new . - public static Light Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true) - => Create(position, rotation, scale, spawn, null); + public static Light Create(Vector3 position, Color color) => Create(position: position, color: color, spawn: true); /// /// Creates a new . /// - /// The position of the . - /// The rotation of the . + /// The transform to create this on. + /// The local position of the . + /// The local rotation of the . /// The scale of the . - /// Whether the should be initially spawned. /// The color of the . + /// The intensity of the light. + /// The range of the light. + /// The angle of the light. + /// The inner angle of the light. + /// The shadow strength of the light. + /// The type of light the Light emits. + /// The type of shadows the light casts. + /// Whether the should be initially spawned. /// The new . - public static Light Create(Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/) + public static Light Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, Color? color = null, float? intensity = null, float? range = null, float? spotAngle = null, float? innerSpotAngle = null, float? shadowStrength = null, LightType? lightType = null, LightShadows? shadowType = null, bool spawn = true) { - Light light = new(UnityEngine.Object.Instantiate(Prefab)) + Light toy = new(Object.Instantiate(Prefab, parent)) { - Position = position ?? Vector3.zero, - Rotation = Quaternion.Euler(rotation ?? Vector3.zero), + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, Scale = scale ?? Vector3.one, - Color = color ?? Color.gray, + Color = color ?? Color.white, }; + if (intensity.HasValue) + toy.Intensity = intensity.Value; + + if (range.HasValue) + toy.Range = range.Value; + + if (spotAngle.HasValue) + toy.SpotAngle = spotAngle.Value; + + if (innerSpotAngle.HasValue) + toy.InnerSpotAngle = innerSpotAngle.Value; + + if (shadowStrength.HasValue) + toy.ShadowStrength = shadowStrength.Value; + + if (lightType.HasValue) + toy.LightType = lightType.Value; + + if (shadowType.HasValue) + toy.ShadowType = shadowType.Value; + if (spawn) - light.Spawn(); + toy.Spawn(); - return light; + return toy; } /// diff --git a/EXILED/Exiled.API/Features/Toys/Primitive.cs b/EXILED/Exiled.API/Features/Toys/Primitive.cs index 9ca95036da..5b577c73ff 100644 --- a/EXILED/Exiled.API/Features/Toys/Primitive.cs +++ b/EXILED/Exiled.API/Features/Toys/Primitive.cs @@ -89,128 +89,63 @@ public PrimitiveFlags Flags /// /// Creates a new . /// + /// The type of primitive to spawn. /// The position of the . - /// The rotation of the . - /// The scale of the . - /// Whether the should be initially spawned. /// The new . - public static Primitive Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true) - => Create(position, rotation, scale, spawn, null); + public static Primitive Create(PrimitiveType type, Vector3 position) => Create(type: type, position: position, spawn: true); /// /// Creates a new . /// - /// The type of primitive to spawn. - /// The position of the . - /// The rotation of the . + /// The transform to create this on. + /// The local position of the . + /// The local rotation of the . /// The scale of the . - /// Whether the should be initially spawned. - /// The new . - public static Primitive Create(PrimitiveType primitiveType = PrimitiveType.Sphere, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true) - => Create(primitiveType, position, rotation, scale, spawn, null); - - /// - /// Creates a new . - /// - /// The position of the . - /// The rotation of the . - /// The scale of the . - /// Whether the should be initially spawned. - /// The color of the . - /// The new . - public static Primitive Create(Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/) - { - Primitive primitive = new(Object.Instantiate(Prefab)); - - primitive.Position = position ?? Vector3.zero; - primitive.Rotation = Quaternion.Euler(rotation ?? Vector3.zero); - primitive.Scale = scale ?? Vector3.one; - primitive.Color = color ?? Color.gray; - - if (spawn) - primitive.Spawn(); - - return primitive; - } - - /// - /// Creates a new . - /// - /// The type of primitive to spawn. - /// The position of the . - /// The rotation of the . - /// The scale of the . - /// Whether the should be initially spawned. - /// The color of the . - /// The new . - public static Primitive Create(PrimitiveType primitiveType /*= PrimitiveType.Sphere*/, Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/) - { - Primitive primitive = new(Object.Instantiate(Prefab)); - - primitive.Position = position ?? Vector3.zero; - primitive.Rotation = Quaternion.Euler(rotation ?? Vector3.zero); - primitive.Scale = scale ?? Vector3.one; - - primitive.Base.NetworkPrimitiveType = primitiveType; - primitive.Color = color ?? Color.gray; - - if (spawn) - primitive.Spawn(); - - return primitive; - } - - /// - /// Creates a new . - /// - /// The type of primitive to spawn. + /// The type of primitive to spawn. /// The primitive flags. - /// The position of the . - /// The rotation of the . - /// The scale of the . - /// Whether the should be initially spawned. /// The color of the . + /// Whether the should be initially spawned. /// The new . - public static Primitive Create(PrimitiveType primitiveType /*= PrimitiveType.Sphere*/, PrimitiveFlags flags, Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/) + public static Primitive Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, PrimitiveType type = PrimitiveType.Sphere, PrimitiveFlags flags = PrimitiveFlags.Visible | PrimitiveFlags.Collidable, Color? color = null, bool spawn = true) { - Primitive primitive = new(Object.Instantiate(Prefab)); - - primitive.Position = position ?? Vector3.zero; - primitive.Rotation = Quaternion.Euler(rotation ?? Vector3.zero); - primitive.Scale = scale ?? Vector3.one; - primitive.Flags = flags; - - primitive.Base.NetworkPrimitiveType = primitiveType; - primitive.Color = color ?? Color.gray; + Primitive toy = new(Object.Instantiate(Prefab, parent)) + { + Type = type, + Flags = flags, + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, + Scale = scale ?? Vector3.one, + Color = color ?? Color.gray, + }; if (spawn) - primitive.Spawn(); + toy.Spawn(); - return primitive; + return toy; } /// - /// Creates a new . + /// Creates a new with using . /// /// The settings of the . /// The new . public static Primitive Create(PrimitiveSettings primitiveSettings) { - Primitive primitive = new(Object.Instantiate(Prefab)); - - primitive.Position = primitiveSettings.Position; - primitive.Rotation = Quaternion.Euler(primitiveSettings.Rotation); - primitive.Scale = primitiveSettings.Scale; - primitive.Flags = primitiveSettings.Flags; - - primitive.Base.NetworkPrimitiveType = primitiveSettings.PrimitiveType; - primitive.Color = primitiveSettings.Color; - primitive.IsStatic = primitiveSettings.IsStatic; + Primitive toy = new(Object.Instantiate(Prefab)) + { + Type = primitiveSettings.PrimitiveType, + Flags = primitiveSettings.Flags, + LocalPosition = primitiveSettings.Position, + LocalRotation = Quaternion.Euler(primitiveSettings.Rotation), + Scale = primitiveSettings.Scale, + Color = primitiveSettings.Color, + IsStatic = primitiveSettings.IsStatic, + }; if (primitiveSettings.Spawn) - primitive.Spawn(); + toy.Spawn(); - return primitive; + return toy; } /// diff --git a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs index 86246ffd28..c43eb9360f 100644 --- a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs +++ b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs @@ -133,20 +133,6 @@ public int AutoResetTime } } - /// - /// Gets or sets the size scale of the target. - /// - public new Vector3 Scale - { - get => GameObject.transform.localScale; - set - { - NetworkServer.UnSpawn(GameObject); - GameObject.transform.localScale = value; - NetworkServer.Spawn(GameObject); - } - } - /// /// Gets or sets a value indicating whether the target is in sync mode. /// @@ -166,43 +152,39 @@ public bool IsSynced /// /// The of the . /// The position of the . + /// The new . + public static ShootingTargetToy Create(ShootingTargetType type, Vector3 position) => Create(type: type, position: position, spawn: true); + + /// + /// Creates a new . + /// + /// The transform to create this on. + /// The position of the . /// The rotation of the . /// The scale of the . + /// The of the . /// Whether the should be initially spawned. /// The new . - public static ShootingTargetToy Create(ShootingTargetType type, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true) + public static ShootingTargetToy Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, ShootingTargetType type = ShootingTargetType.Sport, bool spawn = true) { - ShootingTargetToy shootingTargetToy; - - switch (type) + ShootingTarget prefab = type switch { - case ShootingTargetType.ClassD: - { - shootingTargetToy = new(Object.Instantiate(DboyShootingTargetPrefab)); - break; - } - - case ShootingTargetType.Binary: - { - shootingTargetToy = new(Object.Instantiate(BinaryShootingTargetPrefab)); - break; - } - - default: - { - shootingTargetToy = new(Object.Instantiate(SportShootingTargetPrefab)); - break; - } - } + ShootingTargetType.ClassD => DboyShootingTargetPrefab, + ShootingTargetType.Binary => BinaryShootingTargetPrefab, + _ => SportShootingTargetPrefab, + }; - shootingTargetToy.Position = position ?? Vector3.zero; - shootingTargetToy.Rotation = Quaternion.Euler(rotation ?? Vector3.zero); - shootingTargetToy.Scale = scale ?? Vector3.one; + ShootingTargetToy toy = new(Object.Instantiate(prefab, parent)) + { + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, + Scale = scale ?? Vector3.one, + }; if (spawn) - shootingTargetToy.Spawn(); + toy.Spawn(); - return shootingTargetToy; + return toy; } /// diff --git a/EXILED/Exiled.API/Features/Toys/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 055993e4a7..71066b22c3 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -55,7 +55,7 @@ public Vector2 DisplaySize } /// - /// Creates a new at the specified position. + /// Creates a new . /// /// The local position of the . /// The text content to display. @@ -63,7 +63,7 @@ public Vector2 DisplaySize public static Text Create(Vector3 position, string text) => Create(position: position, text: text, spawn: true); /// - /// Creates a new with a specific position, text, and display size. + /// Creates a new . /// /// The local position of the . /// The text content to display. @@ -71,50 +71,34 @@ public Vector2 DisplaySize /// The new . public static Text Create(Vector3 position, string text, Vector2 displaySize) => Create(position: position, text: text, displaySize: displaySize, spawn: true); - /// - /// Creates a new based on a Transform. - /// - /// The transform to spawn at. - /// The text content to display. - /// The new . - public static Text Create(Transform transform, string text) => Create(parent: transform, text: text, spawn: true); - - /// - /// Creates a new based on a Transform with custom size. - /// - /// The transform to spawn at. - /// The text content to display. - /// The display size of the text. - /// The new . - public static Text Create(Transform transform, string text, Vector2 displaySize) => Create(parent: transform, text: text, displaySize: displaySize, spawn: true); - /// /// Creates a new . /// + /// The transform to create this on. /// The local position of the . /// The local rotation of the . /// The local scale of the . /// The text content to display. /// The display size of the text. - /// The transform to create this on. /// Whether the should be initially spawned. /// The new . - public static Text Create(Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, string text = "Default Text", Vector2? displaySize = null, Transform parent = null, bool spawn = true) + public static Text Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, string text = null, Vector2? displaySize = null, bool spawn = true) { - Text textToy = new(Object.Instantiate(Prefab, parent)) + Text toy = new(Object.Instantiate(Prefab, parent)) { - TextFormat = text, - DisplaySize = displaySize ?? new Vector3(50, 50), + DisplaySize = displaySize ?? new Vector2(50, 50), + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, + Scale = scale ?? Vector3.one, }; - textToy.Transform.localPosition = position ?? Vector3.zero; - textToy.Transform.localRotation = rotation ?? Quaternion.identity; - textToy.Transform.localScale = scale ?? Vector3.one; + if (!string.IsNullOrEmpty(text)) + toy.TextFormat = text; if (spawn) - textToy.Spawn(); + toy.Spawn(); - return textToy; + return toy; } } } diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 0de33936a7..73a6500faf 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -60,7 +60,11 @@ public bool VisualizeBounds public Bounds Bounds { get => new(Position, Base.NetworkBoundsSize); - set => Base.NetworkBoundsSize = value.size; + set + { + Position = value.center; + Base.NetworkBoundsSize = value.size; + } } /// @@ -78,7 +82,7 @@ public Vector3 BoundsSize public byte WaypointId => Base._waypointId; /// - /// Creates a new with a specific position and size (bounds). + /// Creates a new . /// /// The position of the . /// The size of the bounds (Applied to NetworkBoundsSize). @@ -86,7 +90,7 @@ public Vector3 BoundsSize public static Waypoint Create(Vector3 position, Vector3 size) => Create(position: position, scale: size, spawn: true); /// - /// Creates a new based on a Transform. + /// Creates a new . /// /// The transform to spawn at (LocalScale is applied to Bounds). /// The size of the bounds (Applied to NetworkBoundsSize). @@ -109,13 +113,12 @@ public static Waypoint Create(Transform parent = null, Vector3? position = null, Waypoint toy = new(Object.Instantiate(Prefab, parent)) { Priority = priority, - BoundsSize = scale ?? Vector3.one * 255.9961f, VisualizeBounds = visualizeBounds, + BoundsSize = scale ?? Vector3.one * WaypointToy.MaxBounds, + LocalPosition = position ?? Vector3.zero, + LocalRotation = rotation ?? Quaternion.identity, }; - toy.Transform.localPosition = position ?? Vector3.zero; - toy.Transform.localRotation = rotation ?? Quaternion.identity; - if (spawn) toy.Spawn(); From 2aa1366295406ce7a1f0c2a295909e61685aa505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Tue, 12 May 2026 01:59:55 +0300 Subject: [PATCH 02/16] / --- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index 6f8fe5555a..4330c1876d 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -167,7 +167,7 @@ public byte MovementSmoothing /// public bool IsStatic { - get => AdminToyBase.IsStatic; + get => AdminToyBase.NetworkIsStatic; set => AdminToyBase.NetworkIsStatic = value; } From f9b95af230a5daedfaea188f02c187e346d9bdae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Tue, 12 May 2026 02:00:34 +0300 Subject: [PATCH 03/16] n --- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index 4330c1876d..f03d412826 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -158,7 +158,7 @@ public Vector3 Scale /// public byte MovementSmoothing { - get => AdminToyBase.MovementSmoothing; + get => AdminToyBase.NetworkMovementSmoothing; set => AdminToyBase.NetworkMovementSmoothing = value; } From 5f260d47f89e7e0e02bbe192721f6a3585a0f948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Wed, 13 May 2026 23:31:16 +0300 Subject: [PATCH 04/16] pitch refactor --- EXILED/Exiled.API/Features/Toys/Speaker.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index a1e320c002..2a827b5d18 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -73,6 +73,7 @@ public class Speaker : AdminToy, IWrapper /// public const bool DefaultSpatial = true; + private const float PitchTolerance = 0.0001f; private const int FrameSize = VoiceChatSettings.PacketSizePerChannel; private const float FrameTime = (float)FrameSize / VoiceChatSettings.SampleRate; @@ -324,18 +325,17 @@ public float Pitch if (field == value) return; - if (Mathf.Abs(value - 1f) > 0.0001f && CurrentSource is ILiveSource) + field = Mathf.Max(0.1f, Mathf.Abs(value)); + isPitchDefault = Mathf.Abs(field - 1f) < PitchTolerance; + + if (!isPitchDefault && CurrentSource is ILiveSource) { field = 1f; isPitchDefault = true; - resampleTime = 0.0; - resampleBufferFilled = 0; - Log.Warn("[Speaker] Pitch adjustment is not supported for live sources. Pitch has been reset to default (1.0)."); + Log.Warn("[Speaker] Pitch adjustment is not supported for live sources. Pitch has been reset to default value (1)."); return; } - field = Mathf.Max(0.1f, Mathf.Abs(value)); - isPitchDefault = Mathf.Abs(field - 1.0f) < 0.0001f; if (isPitchDefault) { resampleTime = 0.0; From d22dd731c2e16869b99f91e8cf17a28b49584230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 00:28:10 +0300 Subject: [PATCH 05/16] idk why did this first time, i remember i was trying fix some bug but i dont remember wwhat bug soo --- EXILED/Exiled.API/Features/Toys/Speaker.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index 2a827b5d18..b755c392f5 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -1041,12 +1041,7 @@ public void ReturnToPool() Stop(); - if (Transform.parent != null || AdminToyBase._clientParentId != 0) - { - Transform.parent = null; - Base.RpcChangeParent(0); - } - + Transform.SetParent(null); LocalPosition = SpeakerParkPosition; Volume = DefaultVolume; From 4f4bb7cf371f6ca9f4a4ead8a4151e15ee9e382e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 00:31:56 +0300 Subject: [PATCH 06/16] simple check --- EXILED/Exiled.API/Features/Toys/Speaker.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index b755c392f5..59c3fe36d5 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -358,7 +358,9 @@ public float Volume get => Base.NetworkVolume; set { - StopFade(); + if (isPlayBackInitialized) + StopFade(); + Base.NetworkVolume = value; } } From 411f9cbe96a17b8a0b9938bb888f01e80cd60ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 00:42:20 +0300 Subject: [PATCH 07/16] no magic number + array clear --- EXILED/Exiled.API/Features/Toys/Speaker.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index 59c3fe36d5..cd2b182499 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -73,6 +73,7 @@ public class Speaker : AdminToy, IWrapper /// public const bool DefaultSpatial = true; + private const int ResampleBufferPadding = 10; private const float PitchTolerance = 0.0001f; private const int FrameSize = VoiceChatSettings.PacketSizePerChannel; private const float FrameTime = (float)FrameSize / VoiceChatSettings.SampleRate; @@ -1375,18 +1376,15 @@ private void ResampleFrame() { if (resampleBufferFilled == 0) { - int toRead = resampleBuffer.Length - 4; - int actualRead = CurrentSource.Read(resampleBuffer, 0, toRead); + int actualRead = CurrentSource.Read(resampleBuffer, 0, resampleBuffer.Length - ResampleBufferPadding); if (actualRead == 0) { - while (outputIdx < FrameSize) - frame[outputIdx++] = 0f; + Array.Clear(frame, outputIdx, FrameSize - outputIdx); return; } resampleBufferFilled = actualRead; - resampleTime = 0.0; } int currentSample = (int)resampleTime; @@ -1397,13 +1395,11 @@ private void ResampleFrame() { resampleBuffer[0] = resampleBuffer[resampleBufferFilled - 1]; - int toRead = resampleBuffer.Length - 5; - int actualRead = CurrentSource.Read(resampleBuffer, 1, toRead); + int actualRead = CurrentSource.Read(resampleBuffer, 1, resampleBuffer.Length - ResampleBufferPadding - 1); if (actualRead == 0) { - while (outputIdx < FrameSize) - frame[outputIdx++] = 0f; + Array.Clear(frame, outputIdx, FrameSize - outputIdx); return; } From c5374ad9f5ae9411e67f662c2aa1e1c7321abee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 00:43:07 +0300 Subject: [PATCH 08/16] Revert "Merge branch 'toys' of https://github.com/MS-crew/EXILEDPR into toys" This reverts commit 4104382d1afd9e33c3e3eb0e99eb7b2933514e6e, reversing changes made to 411f9cbe96a17b8a0b9938bb888f01e80cd60ad4. --- .../localization/GettingStarted-BR.md | 142 ++++++++---------- .../documentation/localization/README-BR.md | 126 +++++++--------- .../documentation/localization/README-FR.md | 22 +-- EXILED/.editorconfig | 31 +--- EXILED/EXILED.props | 3 +- EXILED/Exiled.API/Enums/AmmoType.cs | 4 +- EXILED/Exiled.API/Enums/AspectRatioType.cs | 2 +- EXILED/Exiled.API/Enums/CameraType.cs | 2 +- EXILED/Exiled.API/Enums/DamageType.cs | 4 +- EXILED/Exiled.API/Enums/DanceType.cs | 2 +- .../Exiled.API/Enums/DecontaminationState.cs | 4 +- EXILED/Exiled.API/Enums/DoorLockType.cs | 2 +- EXILED/Exiled.API/Enums/DoorType.cs | 1 - EXILED/Exiled.API/Enums/EffectCategory.cs | 2 +- EXILED/Exiled.API/Enums/EffectType.cs | 112 +++++++------- .../Enums/FacilityLayouts/EzFacilityLayout.cs | 2 +- .../FacilityLayouts/HczFacilityLayout.cs | 2 +- .../FacilityLayouts/LczFacilityLayout.cs | 2 +- EXILED/Exiled.API/Enums/FirearmType.cs | 2 +- EXILED/Exiled.API/Enums/GlassType.cs | 2 +- EXILED/Exiled.API/Enums/HazardType.cs | 2 +- EXILED/Exiled.API/Enums/LayerMasks.cs | 2 +- EXILED/Exiled.API/Enums/LeadingTeam.cs | 2 +- EXILED/Exiled.API/Enums/LockerType.cs | 2 +- EXILED/Exiled.API/Enums/PingType.cs | 2 +- EXILED/Exiled.API/Enums/RespawnEffectType.cs | 4 + .../Exiled.API/Enums/RevolverChamberState.cs | 2 +- EXILED/Exiled.API/Enums/ScenesType.cs | 6 +- ...lityState.cs => Scp939VisibilityStates.cs} | 16 +- EXILED/Exiled.API/Enums/SpawnLocationType.cs | 10 +- EXILED/Exiled.API/Enums/UncuffReason.cs | 2 +- EXILED/Exiled.API/Enums/UsableRippleType.cs | 2 +- EXILED/Exiled.API/Enums/ZoneType.cs | 1 - .../Exiled.API/Extensions/CommonExtensions.cs | 2 +- .../Extensions/DamageTypeExtensions.cs | 6 +- .../Extensions/DangerTypeExtensions.cs | 1 - .../Extensions/EffectTypeExtension.cs | 7 +- .../Exiled.API/Extensions/FloatExtensions.cs | 2 +- .../Exiled.API/Extensions/ItemExtensions.cs | 3 +- .../Exiled.API/Extensions/LockerExtensions.cs | 5 +- .../Exiled.API/Extensions/MirrorExtensions.cs | 52 ++----- .../Exiled.API/Extensions/RoleExtensions.cs | 13 +- .../Exiled.API/Extensions/StringExtensions.cs | 2 +- .../Attributes/ValidateChildrenAttribute.cs | 19 --- .../Validators/AvailableValuesAttribute.cs | 37 ----- .../Validators/CustomValidatorAttribute.cs | 49 ------ .../Validators/GreaterOrEqualAttribute.cs | 38 ----- .../Validators/GreaterThanAttribute.cs | 38 ----- .../Validators/LessOrEqualAttribute.cs | 38 ----- .../Validators/LessThanAttribute.cs | 38 ----- .../Validators/NonNegativeAttribute.cs | 23 --- .../Validators/NonPositiveAttribute.cs | 23 --- .../Attributes/Validators/RangeAttribute.cs | 57 ------- .../Features/Audio/AudioDataStorage.cs | 3 +- .../Exiled.API/Features/Audio/WavUtility.cs | 2 +- EXILED/Exiled.API/Features/Camera.cs | 4 - EXILED/Exiled.API/Features/Cassie.cs | 14 +- EXILED/Exiled.API/Features/Coffee.cs | 3 +- .../Features/ComponentsEqualityComparer.cs | 2 +- EXILED/Exiled.API/Features/Core/EActor.cs | 1 - .../Features/Core/Generic/EBehaviour.cs | 2 + .../Features/Core/StateMachine/State.cs | 1 + .../Exiled.API/Features/Core/StaticActor.cs | 4 +- .../Core/UserSettings/ButtonSetting.cs | 1 - .../Core/UserSettings/DropdownSetting.cs | 1 - .../Core/UserSettings/HeaderSetting.cs | 1 - .../Core/UserSettings/KeybindSetting.cs | 2 - .../Features/Core/UserSettings/SettingBase.cs | 7 +- .../Core/UserSettings/SliderSetting.cs | 1 - .../Core/UserSettings/TextInputSetting.cs | 2 - .../Core/UserSettings/TwoButtonsSetting.cs | 1 - .../Core/UserSettings/UserTextInputSetting.cs | 2 - .../CustomStats/CustomHumeShieldStat.cs | 4 - .../Features/DamageHandlers/DamageHandler.cs | 1 - .../DamageHandlers/DamageHandlerBase.cs | 7 +- .../DamageHandlers/GenericDamageHandler.cs | 19 ++- EXILED/Exiled.API/Features/Doors/BasicDoor.cs | 2 - EXILED/Exiled.API/Features/Doors/Door.cs | 12 +- .../Exiled.API/Features/Doors/ElevatorDoor.cs | 2 - .../Features/Doors/EmergencyReleaseButton.cs | 1 - EXILED/Exiled.API/Features/Doors/Gate.cs | 2 - EXILED/Exiled.API/Features/Draw.cs | 1 + EXILED/Exiled.API/Features/Generator.cs | 3 - .../Features/GlobalPatchProcessor.cs | 42 +++--- .../Features/Hazards/AmnesticCloudHazard.cs | 1 - EXILED/Exiled.API/Features/Hazards/Hazard.cs | 17 +-- .../Features/Hazards/SinkholeHazard.cs | 1 - .../Features/Hazards/TantrumHazard.cs | 4 - EXILED/Exiled.API/Features/Items/Ammo.cs | 1 - EXILED/Exiled.API/Features/Items/Armor.cs | 2 +- .../Exiled.API/Features/Items/Consumable.cs | 2 +- .../Features/Items/ExplosiveGrenade.cs | 1 - EXILED/Exiled.API/Features/Items/Firearm.cs | 27 ++-- .../Barrel/AutomaticBarrelMagazine.cs | 8 +- .../FirearmModules/Barrel/BarrelMagazine.cs | 2 +- .../Barrel/PumpBarrelMagazine.cs | 8 +- .../Features/Items/FirearmModules/Magazine.cs | 8 +- .../Primary/CylinderMagazine.cs | 4 +- .../FirearmModules/Primary/NormalMagazine.cs | 2 +- .../FirearmModules/Primary/PrimaryMagazine.cs | 3 +- .../Exiled.API/Features/Items/Flashlight.cs | 6 +- EXILED/Exiled.API/Features/Items/Item.cs | 8 +- EXILED/Exiled.API/Features/Items/Jailbird.cs | 3 - EXILED/Exiled.API/Features/Items/Keycard.cs | 2 - .../Items/Keycards/CustomKeycardItem.cs | 7 +- .../Items/Keycards/PermissionsProvider.cs | 2 - .../Items/Keycards/SingleUseKeycard.cs | 2 - .../Exiled.API/Features/Items/Marshmallow.cs | 9 +- EXILED/Exiled.API/Features/Items/MicroHid.cs | 5 + EXILED/Exiled.API/Features/Items/Radio.cs | 1 - EXILED/Exiled.API/Features/Items/Scp127.cs | 5 +- EXILED/Exiled.API/Features/Items/Scp1344.cs | 7 +- EXILED/Exiled.API/Features/Items/Scp1509.cs | 4 +- EXILED/Exiled.API/Features/Items/Scp1576.cs | 2 +- EXILED/Exiled.API/Features/Items/Scp330.cs | 2 +- EXILED/Exiled.API/Features/Items/Throwable.cs | 4 +- EXILED/Exiled.API/Features/Items/Usable.cs | 1 + EXILED/Exiled.API/Features/Lift.cs | 7 +- EXILED/Exiled.API/Features/Lockers/Chamber.cs | 5 +- EXILED/Exiled.API/Features/Lockers/Locker.cs | 4 +- EXILED/Exiled.API/Features/Map.cs | 13 +- EXILED/Exiled.API/Features/Npc.cs | 16 +- .../Features/Objectives/EscapeObjective.cs | 2 - .../Objectives/GeneratorActivatedObjective.cs | 1 - .../Objectives/HumanDamageObjective.cs | 1 - .../Features/Objectives/HumanKillObjective.cs | 2 - .../Features/Objectives/HumanObjective.cs | 1 - .../Features/Objectives/Objective.cs | 9 +- .../Objectives/ScpItemPickupObjective.cs | 2 - .../Exiled.API/Features/Pickups/AmmoPickup.cs | 2 +- .../Features/Pickups/BodyArmorPickup.cs | 4 +- .../Features/Pickups/FirearmPickup.cs | 27 +--- .../Features/Pickups/FlashGrenadePickup.cs | 2 +- .../Features/Pickups/GrenadePickup.cs | 2 +- .../Features/Pickups/JailbirdPickup.cs | 2 +- .../Features/Pickups/KeycardPickup.cs | 2 +- .../Pickups/Keycards/CustomKeycardPickup.cs | 7 +- .../Keycards/ManagementKeycardPickup.cs | 3 - .../Pickups/Keycards/MetalKeycardPickup.cs | 3 - .../Keycards/SingleUseKeycardPickup.cs | 1 - .../Pickups/Keycards/Site02KeycardPickup.cs | 3 - .../Keycards/TaskForceKeycardPickup.cs | 3 - .../Features/Pickups/MicroHIDPickup.cs | 4 +- EXILED/Exiled.API/Features/Pickups/Pickup.cs | 7 +- .../Projectiles/EffectGrenadeProjectile.cs | 2 +- .../Projectiles/ExplosionGrenadeProjectile.cs | 2 +- .../Projectiles/FlashbangProjectile.cs | 2 +- .../Pickups/Projectiles/Projectile.cs | 4 +- .../Pickups/Projectiles/Scp018Projectile.cs | 4 +- .../Pickups/Projectiles/Scp2176Projectile.cs | 2 +- .../Projectiles/TimeGrenadeProjectile.cs | 2 +- .../Features/Pickups/RadioPickup.cs | 2 +- .../Features/Pickups/Scp1509Pickup.cs | 3 +- .../Features/Pickups/Scp1576Pickup.cs | 2 +- .../Features/Pickups/Scp244Pickup.cs | 6 +- .../Features/Pickups/Scp330Pickup.cs | 2 +- .../Features/Pickups/UsablePickup.cs | 2 +- EXILED/Exiled.API/Features/Player.cs | 38 ++--- EXILED/Exiled.API/Features/Plugin.cs | 8 +- .../Features/Pools/DictionaryPool.cs | 2 +- .../Exiled.API/Features/Pools/HashSetPool.cs | 2 +- EXILED/Exiled.API/Features/Pools/IPool.cs | 2 +- EXILED/Exiled.API/Features/Pools/ListPool.cs | 2 +- EXILED/Exiled.API/Features/Pools/QueuePool.cs | 2 +- .../Features/Pools/StringBuilderPool.cs | 2 +- EXILED/Exiled.API/Features/PrefabHelper.cs | 7 +- EXILED/Exiled.API/Features/Ragdoll.cs | 9 +- EXILED/Exiled.API/Features/Recontainer.cs | 5 - EXILED/Exiled.API/Features/Respawn.cs | 111 +++++--------- .../Features/Roles/DestroyedRole.cs | 9 +- .../Features/Roles/FilmMakerRole.cs | 1 - EXILED/Exiled.API/Features/Roles/FpcRole.cs | 6 +- EXILED/Exiled.API/Features/Roles/HumanRole.cs | 2 +- .../Features/Roles/IHumeShieldRole.cs | 2 +- EXILED/Exiled.API/Features/Roles/NoneRole.cs | 2 +- .../Features/Roles/OverwatchRole.cs | 2 +- EXILED/Exiled.API/Features/Roles/Role.cs | 8 +- .../Exiled.API/Features/Roles/Scp049Role.cs | 7 +- .../Exiled.API/Features/Roles/Scp079Role.cs | 8 +- .../Exiled.API/Features/Roles/Scp096Role.cs | 2 +- .../Exiled.API/Features/Roles/Scp106Role.cs | 2 - .../Exiled.API/Features/Roles/Scp1507Role.cs | 2 +- .../Exiled.API/Features/Roles/Scp173Role.cs | 5 +- .../Exiled.API/Features/Roles/Scp3114Role.cs | 1 - .../Exiled.API/Features/Roles/Scp939Role.cs | 2 +- .../Features/Roles/SpectatorRole.cs | 3 +- EXILED/Exiled.API/Features/Room.cs | 24 +-- EXILED/Exiled.API/Features/Round.cs | 2 +- EXILED/Exiled.API/Features/Scp3114Ragdoll.cs | 3 +- EXILED/Exiled.API/Features/Scp559.cs | 2 - EXILED/Exiled.API/Features/Scp914.cs | 4 +- EXILED/Exiled.API/Features/Scp956.cs | 1 - EXILED/Exiled.API/Features/Server.cs | 2 + .../Features/Spawn/LockerSpawnPoint.cs | 4 +- .../Features/Spawn/RoomSpawnPoint.cs | 2 +- .../Features/Spawn/SpawnLocation.cs | 3 +- .../Exiled.API/Features/Spawn/SpawnPoint.cs | 1 - EXILED/Exiled.API/Features/TeslaGate.cs | 8 +- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 3 - EXILED/Exiled.API/Features/Toys/Light.cs | 1 - EXILED/Exiled.API/Features/Toys/Primitive.cs | 5 +- .../Features/Toys/ShootingTargetToy.cs | 3 +- EXILED/Exiled.API/Features/Toys/Speaker.cs | 2 +- EXILED/Exiled.API/Features/Toys/Text.cs | 2 +- EXILED/Exiled.API/Features/Toys/Waypoint.cs | 2 +- EXILED/Exiled.API/Features/Warhead.cs | 10 +- EXILED/Exiled.API/Features/Waves/TimedWave.cs | 8 +- EXILED/Exiled.API/Features/Waves/WaveTimer.cs | 2 + EXILED/Exiled.API/Features/Window.cs | 3 - EXILED/Exiled.API/Features/Workstation.cs | 4 +- .../Interfaces/Audio/IAudioFilter.cs | 2 +- .../Interfaces/Audio/ILiveSource.cs | 2 +- .../Exiled.API/Interfaces/Audio/IPcmSource.cs | 2 +- EXILED/Exiled.API/Interfaces/IPosition.cs | 2 +- EXILED/Exiled.API/Interfaces/IRotation.cs | 2 +- EXILED/Exiled.API/Interfaces/IValidator.cs | 22 --- EXILED/Exiled.API/Interfaces/IWorldSpace.cs | 2 +- .../Interfaces/Keycards/ILabelKeycard.cs | 1 - EXILED/Exiled.API/Structs/Audio/TrackData.cs | 2 +- .../Exiled.API/Structs/PrimitiveSettings.cs | 1 - EXILED/Exiled.CreditTags/Enums/InfoSide.cs | 2 +- .../Events/CreditsHandler.cs | 1 - .../Features/DatabaseHandler.cs | 3 +- .../Features/ThreadSafeRequest.cs | 2 - .../API/EventArgs/OwnerEscapingEventArgs.cs | 7 + EXILED/Exiled.CustomItems/API/Extensions.cs | 4 +- .../API/Features/CustomArmor.cs | 1 - .../API/Features/CustomGoggles.cs | 2 +- .../API/Features/CustomGrenade.cs | 5 +- .../API/Features/CustomItem.cs | 9 +- .../API/Features/CustomKeycard.cs | 2 - .../API/Features/CustomWeapon.cs | 2 +- EXILED/Exiled.CustomItems/Commands/Give.cs | 4 +- EXILED/Exiled.CustomItems/Commands/Main.cs | 2 +- .../Exiled.CustomItems/Events/MapHandler.cs | 1 - .../Patches/PlayerInventorySee.cs | 2 +- EXILED/Exiled.CustomRoles/API/Extensions.cs | 2 +- .../API/Features/ActiveAbility.cs | 2 +- .../API/Features/CustomAbility.cs | 8 +- .../API/Features/CustomRole.cs | 11 +- .../API/Features/Enums/CheckType.cs | 2 +- ...iggerType.cs => KeypressActivationType.cs} | 2 +- EXILED/Exiled.CustomRoles/Commands/Get.cs | 2 +- EXILED/Exiled.CustomRoles/Commands/Parent.cs | 2 +- EXILED/Exiled.CustomRoles/CustomRoles.cs | 2 +- .../Events/PlayerHandlers.cs | 1 + EXILED/Exiled.Events/Commands/Config/Merge.cs | 9 +- EXILED/Exiled.Events/Commands/Config/Split.cs | 9 +- .../Commands/PluginManager/Disable.cs | 4 +- .../Commands/PluginManager/Enable.cs | 6 +- .../Commands/PluginManager/PluginManager.cs | 2 +- .../Commands/PluginManager/Show.cs | 5 +- .../Exiled.Events/Commands/Reload/Configs.cs | 5 +- .../Commands/Reload/Translations.cs | 3 +- EXILED/Exiled.Events/Commands/TpsCommand.cs | 3 +- EXILED/Exiled.Events/Config.cs | 4 +- .../Cassie/SendingCassieMessageEventArgs.cs | 3 - .../EventArgs/Interfaces/IAttackerEvent.cs | 4 +- .../EventArgs/Interfaces/ICameraEvent.cs | 2 +- .../EventArgs/Interfaces/IConsumableEvent.cs | 2 +- .../EventArgs/Interfaces/IFirearmEvent.cs | 2 +- .../EventArgs/Interfaces/IGeneratorEvent.cs | 2 +- .../EventArgs/Interfaces/IItemEvent.cs | 2 +- .../EventArgs/Interfaces/IMicroHIDEvent.cs | 2 +- .../EventArgs/Interfaces/IPlayerEvent.cs | 2 +- .../EventArgs/Interfaces/IRagdollEvent.cs | 2 +- .../EventArgs/Interfaces/IRoomEvent.cs | 2 +- .../EventArgs/Interfaces/ITeslaEvent.cs | 2 +- .../EventArgs/Item/CacklingEventArgs.cs | 1 - .../EventArgs/Item/ChangingAmmoEventArgs.cs | 2 +- .../Item/ChangingAttachmentsEventArgs.cs | 7 +- .../ChangingMicroHIDPickupStateEventArgs.cs | 1 - .../Item/ChargingJailbirdEventArgs.cs | 2 +- .../Item/DisruptorFiringEventArgs.cs | 3 +- .../EventArgs/Item/InspectedItemEventArgs.cs | 3 +- .../EventArgs/Item/InspectingItemEventArgs.cs | 3 +- .../Item/JailbirdChangedWearStateEventArgs.cs | 3 +- .../JailbirdChangingWearStateEventArgs.cs | 3 +- .../Item/JailbirdChargeCompleteEventArgs.cs | 2 +- .../Item/KeycardInteractingEventArgs.cs | 1 - .../EventArgs/Item/PunchingEventArgs.cs | 1 - .../Item/ReceivingPreferenceEventArgs.cs | 5 +- .../EventArgs/Item/SwingingEventArgs.cs | 2 +- .../Map/AnnouncingChaosEntranceEventArgs.cs | 3 +- .../Map/AnnouncingNtfEntranceEventArgs.cs | 2 - .../Map/AnnouncingScpTerminationEventArgs.cs | 7 +- .../Map/ChangedIntoGrenadeEventArgs.cs | 3 +- .../Map/ElevatorSequencesUpdatedEventArgs.cs | 3 +- .../EventArgs/Map/FillingLockerEventArgs.cs | 2 - .../EventArgs/Map/GeneratingEventArgs.cs | 3 +- .../Map/GeneratorActivatingEventArgs.cs | 2 +- .../EventArgs/Map/PickupAddedEventArgs.cs | 3 +- .../EventArgs/Map/PickupDestroyedEventArgs.cs | 3 +- .../Map/PlacingBulletHoleEventArgs.cs | 3 +- ...acingPickupIntoPocketDimensionEventArgs.cs | 1 - .../EventArgs/Map/Scp244SpawningEventArgs.cs | 5 +- .../EventArgs/Map/SpawningItemEventArgs.cs | 2 - .../Map/SpawningRoomConnectorEventArgs.cs | 3 +- .../Map/SpawningTeamVehicleEventArgs.cs | 2 +- .../Player/ActivatingGeneratorEventArgs.cs | 2 +- .../Player/ActivatingWarheadPanelEventArgs.cs | 2 +- .../Player/ActivatingWorkstationEventArgs.cs | 2 +- .../Player/AimingDownSightEventArgs.cs | 4 +- .../EventArgs/Player/BannedEventArgs.cs | 2 +- .../EventArgs/Player/BanningEventArgs.cs | 3 +- .../Player/CancelledItemUseEventArgs.cs | 3 +- .../Player/CancellingItemUseEventArgs.cs | 3 +- .../Player/ChangedEmotionEventArgs.cs | 1 - .../EventArgs/Player/ChangedItemEventArgs.cs | 6 +- .../EventArgs/Player/ChangedRatioEventArgs.cs | 2 +- .../Player/ChangingDangerStateEventArgs.cs | 1 - .../Player/ChangingDisruptorModeEventArgs.cs | 3 +- .../Player/ChangingEmotionEventArgs.cs | 1 - .../Player/ChangingGroupEventArgs.cs | 2 +- .../EventArgs/Player/ChangingItemEventArgs.cs | 4 +- .../Player/ChangingMicroHIDStateEventArgs.cs | 6 +- .../Player/ChangingMoveStateEventArgs.cs | 2 +- .../Player/ChangingRadioPresetEventArgs.cs | 3 +- .../EventArgs/Player/ChangingRoleEventArgs.cs | 8 +- .../ChangingSpectatedPlayerEventArgs.cs | 2 +- .../Player/ClosingGeneratorEventArgs.cs | 5 +- .../Player/ConsumingItemEventArgs.cs | 6 +- .../EventArgs/Player/DamagingDoorEventArgs.cs | 3 - .../Player/DamagingShootingTargetEventArgs.cs | 6 +- .../Player/DamagingWindowEventArgs.cs | 10 +- .../DeactivatingWorkstationEventArgs.cs | 2 +- .../EventArgs/Player/DestroyingEventArgs.cs | 4 +- .../EventArgs/Player/DiedEventArgs.cs | 4 +- .../EventArgs/Player/DroppedAmmoEventArgs.cs | 7 +- .../EventArgs/Player/DroppedItemEventArgs.cs | 4 +- .../EventArgs/Player/DroppingAmmoEventArgs.cs | 7 +- .../EventArgs/Player/DroppingItemEventArgs.cs | 4 +- .../Player/DroppingNothingEventArgs.cs | 2 +- .../Player/DryfiringWeaponEventArgs.cs | 4 +- .../EventArgs/Player/DyingEventArgs.cs | 8 +- .../Player/EarningAchievementEventArgs.cs | 2 - .../EnteringEnvironmentalHazardEventArgs.cs | 2 - .../EnteringKillerCollisionEventArgs.cs | 2 +- .../EnteringPocketDimensionEventArgs.cs | 2 +- .../EventArgs/Player/EscapingEventArgs.cs | 5 +- .../EscapingPocketDimensionEventArgs.cs | 2 +- .../ExitingEnvironmentalHazardEventArgs.cs | 2 - .../Player/ExplodingMicroHIDEventArgs.cs | 1 - .../FailingEscapePocketDimensionEventArgs.cs | 4 +- .../EventArgs/Player/FlippingCoinEventArgs.cs | 6 +- .../EventArgs/Player/HandcuffingEventArgs.cs | 2 +- .../EventArgs/Player/HitEventArgs.cs | 6 +- .../EventArgs/Player/HurtEventArgs.cs | 4 +- .../EventArgs/Player/HurtingEventArgs.cs | 6 +- .../EventArgs/Player/InteractedEventArgs.cs | 2 +- .../Player/InteractingDoorEventArgs.cs | 6 +- .../InteractingEmergencyButtonEventArgs.cs | 3 +- .../Player/InteractingLockerEventArgs.cs | 3 +- .../InteractingShootingTargetEventArgs.cs | 6 +- .../Player/IntercomSpeakingEventArgs.cs | 2 +- .../EventArgs/Player/IssuingMuteEventArgs.cs | 2 +- .../EventArgs/Player/JoinedEventArgs.cs | 2 +- .../EventArgs/Player/JumpingEventArgs.cs | 2 +- .../EventArgs/Player/KickedEventArgs.cs | 2 +- .../EventArgs/Player/KickingEventArgs.cs | 4 +- .../EventArgs/Player/LandingEventArgs.cs | 2 +- .../EventArgs/Player/LeftEventArgs.cs | 2 +- .../EventArgs/Player/MakingNoiseEventArgs.cs | 2 +- .../Player/MicroHIDOpeningDoorEventArgs.cs | 1 - .../Player/OpeningGeneratorEventArgs.cs | 2 +- .../Player/PickingUpItemEventArgs.cs | 2 +- .../Player/PlayingAudioLogEventArgs.cs | 2 +- .../Player/ReceivingEffectEventArgs.cs | 4 +- .../Player/ReceivingGunSoundEventArgs.cs | 7 +- .../Player/ReceivingVoiceMessageEventArgs.cs | 4 +- .../Player/ReloadedWeaponEventArgs.cs | 4 +- .../Player/ReloadingWeaponEventArgs.cs | 6 +- .../Player/RemovedHandcuffsEventArgs.cs | 6 +- .../Player/RemovingHandcuffsEventArgs.cs | 4 +- .../Player/ReservedSlotsCheckEventArgs.cs | 2 +- .../EventArgs/Player/RevokingMuteEventArgs.cs | 2 +- .../EventArgs/Player/RoomChangedEventArgs.cs | 2 +- .../Player/RotatingRevolverEventArgs.cs | 8 +- .../Player/SavingByAntiScp207EventArgs.cs | 3 +- .../Scp1576TransmissionEndedEventArgs.cs | 8 +- .../SendingAdminChatMessageEventsArgs.cs | 6 +- .../Player/SendingGunSoundEventArgs.cs | 7 +- .../Player/SendingValidCommandEventArgs.cs | 6 +- .../Player/SentValidCommandEventArgs.cs | 6 +- .../EventArgs/Player/ShootingEventArgs.cs | 5 +- .../EventArgs/Player/ShotEventArgs.cs | 7 +- .../EventArgs/Player/SpawnedEventArgs.cs | 2 +- .../Player/SpawnedRagdollEventArgs.cs | 5 +- .../EventArgs/Player/SpawningEventArgs.cs | 4 +- .../Player/SpawningRagdollEventArgs.cs | 6 +- .../StayingOnEnvironmentalHazardEventArgs.cs | 2 - .../Player/StoppingGeneratorEventArgs.cs | 3 +- .../Player/ThrowingRequestEventArgs.cs | 2 +- .../Player/ThrownProjectileEventArgs.cs | 2 +- .../Player/TogglingFlashlightEventArgs.cs | 5 +- .../Player/TogglingNoClipEventArgs.cs | 2 +- .../Player/TogglingRadioEventArgs.cs | 7 +- .../TogglingWeaponFlashlightEventArgs.cs | 4 +- .../Player/TriggeringTeslaEventArgs.cs | 2 +- .../Player/UnloadedWeaponEventArgs.cs | 4 +- .../Player/UnloadingWeaponEventArgs.cs | 6 +- .../Player/UnlockingGeneratorEventArgs.cs | 2 +- .../EventArgs/Player/UsedItemEventArgs.cs | 4 +- .../Player/UsingItemCompletedEventArgs.cs | 3 +- .../EventArgs/Player/UsingItemEventArgs.cs | 3 +- .../Player/UsingMicroHIDEnergyEventArgs.cs | 4 +- .../Player/UsingRadioBatteryEventArgs.cs | 4 +- .../EventArgs/Player/VerifiedEventArgs.cs | 2 +- .../Player/VoiceChattingEventArgs.cs | 2 +- .../Scp049/ActivatingSenseEventArgs.cs | 4 +- .../Scp049/FinishingRecallEventArgs.cs | 4 +- .../Scp049/FinishingSenseEventArgs.cs | 2 +- .../EventArgs/Scp049/SendingCallEventArgs.cs | 3 +- .../Scp049/StartingRecallEventArgs.cs | 5 +- .../Scp0492/ConsumedCorpseEventArgs.cs | 5 +- .../Scp0492/ConsumingCorpseEventArgs.cs | 3 +- .../Scp079/ChangingSpeakerStatusEventArgs.cs | 2 +- .../Scp079/GainingExperienceEventArgs.cs | 3 +- .../EventArgs/Scp079/GainingLevelEventArgs.cs | 3 +- .../EventArgs/Scp079/LosingSignalEventArgs.cs | 2 +- .../EventArgs/Scp079/LostSignalEventArgs.cs | 2 +- .../EventArgs/Scp079/PingingEventArgs.cs | 4 +- .../EventArgs/Scp079/RecontainedEventArgs.cs | 5 +- .../EventArgs/Scp079/RecontainingEventArgs.cs | 2 +- .../EventArgs/Scp079/RoomBlackoutEventArgs.cs | 1 + .../Scp079/TriggeringDoorEventArgs.cs | 3 +- .../EventArgs/Scp079/ZoneBlackoutEventArgs.cs | 6 +- .../EventArgs/Scp096/AddingTargetEventArgs.cs | 2 +- .../EventArgs/Scp096/CalmingDownEventArgs.cs | 2 +- .../EventArgs/Scp096/ChargingEventArgs.cs | 3 +- .../EventArgs/Scp096/EnragingEventArgs.cs | 3 +- .../Scp096/RemovingTargetEventArgs.cs | 4 +- .../Scp096/StartPryingGateEventArgs.cs | 5 +- .../Scp096/TryingNotToCryEventArgs.cs | 4 +- .../EventArgs/Scp106/ExitStalkingEventArgs.cs | 3 +- .../EventArgs/Scp106/StalkingEventArgs.cs | 4 +- .../EventArgs/Scp106/TeleportingEventArgs.cs | 3 +- .../Scp127/GainedExperienceEventArgs.cs | 1 - .../Scp127/GainingExperienceEventArgs.cs | 3 +- .../EventArgs/Scp127/TalkedEventArgs.cs | 3 +- .../EventArgs/Scp127/TalkingEventArgs.cs | 1 - .../Scp1344/ChangedStatusEventArgs.cs | 2 +- .../Scp1344/ChangingStatusEventArgs.cs | 3 +- .../EventArgs/Scp1344/DeactivatedEventArgs.cs | 2 +- .../Scp1344/DeactivatingEventArgs.cs | 2 +- .../Scp1507/AttackingDoorEventArgs.cs | 1 - .../Scp1507/SpawningFlamingosEventArgs.cs | 4 +- .../EventArgs/Scp1507/UsingTapeEventArgs.cs | 1 - .../Scp1509/ResurrectingEventArgs.cs | 4 +- .../Scp1509/TriggeringAttackEventArgs.cs | 3 +- .../Scp173/AddingObserverEventArgs.cs | 1 - .../Scp173/BeingObservedEventArgs.cs | 2 +- .../EventArgs/Scp173/BlinkingEventArgs.cs | 4 +- .../Scp173/BlinkingRequestEventArgs.cs | 7 +- .../Scp173/PlacingTantrumEventArgs.cs | 1 - .../Scp173/RemovedObserverEventArgs.cs | 1 - .../Scp173/UsingBreakneckSpeedsEventArgs.cs | 5 +- .../Scp244/OpeningScp244EventArgs.cs | 2 +- .../EventArgs/Scp244/UsingScp244EventArgs.cs | 6 +- .../Scp2536/FindingPositionEventArgs.cs | 1 - .../Scp2536/FoundPositionEventArgs.cs | 3 +- .../Scp2536/GrantingGiftEventArgs.cs | 1 - .../EventArgs/Scp2536/OpeningGiftEventArgs.cs | 1 + .../EventArgs/Scp3114/DancingEventArgs.cs | 1 + .../EventArgs/Scp3114/DisguisedEventArgs.cs | 3 +- .../EventArgs/Scp3114/DisguisingEventArgs.cs | 3 +- .../EventArgs/Scp3114/RevealedEventArgs.cs | 3 +- .../EventArgs/Scp3114/RevealingEventArgs.cs | 3 +- .../EventArgs/Scp3114/SlappedEventArgs.cs | 4 +- .../EventArgs/Scp3114/StranglingEventArgs.cs | 6 +- .../EventArgs/Scp3114/TryUseBodyEventArgs.cs | 3 +- .../EventArgs/Scp3114/VoiceLinesEventArgs.cs | 3 +- .../Scp330/DroppingScp330EventArgs.cs | 4 +- .../EventArgs/Scp330/EatenScp330EventArgs.cs | 3 +- .../EventArgs/Scp330/EatingScp330EventArgs.cs | 3 +- .../Scp330/InteractingScp330EventArgs.cs | 8 +- .../EventArgs/Scp559/SpawningEventArgs.cs | 1 - .../EventArgs/Scp914/ActivatingEventArgs.cs | 2 +- .../Scp914/ChangingKnobSettingEventArgs.cs | 2 +- .../Scp914/UpgradedInventoryItemEventArgs.cs | 8 +- .../Scp914/UpgradedPickupEventArgs.cs | 3 - .../Scp914/UpgradingInventoryItemEventArgs.cs | 7 +- .../Scp914/UpgradingPickupEventArgs.cs | 3 - .../Scp914/UpgradingPlayerEventArgs.cs | 2 +- .../Scp939/ChangingFocusEventArgs.cs | 3 +- .../EventArgs/Scp939/ClawedEventArgs.cs | 2 +- .../EventArgs/Scp939/LungingEventArgs.cs | 6 +- .../Scp939/PlacedAmnesticCloudEventArgs.cs | 6 +- .../Scp939/PlacingAmnesticCloudEventArgs.cs | 3 +- .../Scp939/PlacingMimicPointEventArgs.cs | 1 - .../Scp939/PlayingFootstepEventArgs.cs | 6 +- .../EventArgs/Scp939/PlayingSoundEventArgs.cs | 4 +- .../EventArgs/Scp939/PlayingVoiceEventArgs.cs | 3 +- .../EventArgs/Scp939/SavingVoiceEventArgs.cs | 3 +- .../Scp939/UpdatedCloudStateEventArgs.cs | 5 +- .../Scp939/ValidatingVisibilityEventArgs.cs | 10 +- .../Server/ChoosingStartTeamQueueEventArgs.cs | 2 - .../Server/CompletingObjectiveEventArgs.cs | 3 +- .../EventArgs/Server/EndingRoundEventArgs.cs | 3 +- .../Server/LocalReportingEventArgs.cs | 2 +- .../Server/ReportingCheaterEventArgs.cs | 2 +- .../Server/RespawnedTeamEventArgs.cs | 4 +- .../Server/RespawningTeamEventArgs.cs | 6 +- .../EventArgs/Server/RoundEndedEventArgs.cs | 2 +- .../Server/RoundStartingEventArgs.cs | 8 +- .../Server/SelectingRespawnTeamEventArgs.cs | 1 - .../Warhead/ChangingLeverStatusEventArgs.cs | 2 +- .../DeadmanSwitchInitiatingEventArgs.cs | 2 +- .../EventArgs/Warhead/DetonatingEventArgs.cs | 2 +- .../EventArgs/Warhead/StoppingEventArgs.cs | 2 +- EXILED/Exiled.Events/Events.cs | 18 +-- EXILED/Exiled.Events/Exiled.Events.csproj | 2 +- EXILED/Exiled.Events/Features/Event.cs | 43 +++--- EXILED/Exiled.Events/Features/Event{T}.cs | 43 +++--- EXILED/Exiled.Events/Features/Patcher.cs | 3 +- .../Handlers/Internal/AdminToyList.cs | 2 +- .../Handlers/Internal/ClientStarted.cs | 9 +- .../Handlers/Internal/ExplodingGrenade.cs | 3 +- .../Handlers/Internal/MapGenerated.cs | 4 +- .../Handlers/Internal/PickupEvent.cs | 3 +- .../Handlers/Internal/RagdollList.cs | 2 +- .../Exiled.Events/Handlers/Internal/Round.cs | 9 +- .../Handlers/Internal/SceneUnloaded.cs | 4 +- EXILED/Exiled.Events/Handlers/Item.cs | 2 +- EXILED/Exiled.Events/Handlers/Player.cs | 7 +- EXILED/Exiled.Events/Handlers/Scp049.cs | 2 +- EXILED/Exiled.Events/Handlers/Scp0492.cs | 4 +- EXILED/Exiled.Events/Handlers/Scp127.cs | 1 - EXILED/Exiled.Events/Handlers/Scp1344.cs | 2 +- EXILED/Exiled.Events/Handlers/Scp173.cs | 2 +- EXILED/Exiled.Events/Handlers/Server.cs | 3 +- .../Events/Cassie/SendingCassieMessage.cs | 7 +- .../Patches/Events/Item/Cackling.cs | 3 +- .../Patches/Events/Item/ChangingAmmo.cs | 9 ++ .../Events/Item/ChangingAttachments.cs | 6 +- .../Patches/Events/Item/DisruptorFiring.cs | 5 +- .../Patches/Events/Item/Inspect.cs | 4 +- .../Patches/Events/Item/JailbirdPatch.cs | 53 +++---- .../Patches/Events/Item/JailbirdWearState.cs | 2 - .../Patches/Events/Item/KeycardInteracting.cs | 8 +- .../Patches/Events/Item/Punching.cs | 3 +- .../Events/Item/ReceivingPreference.cs | 2 +- .../Events/Item/UsingRadioPickupBattery.cs | 2 - .../Events/Map/AnnouncingChaosEntrance.cs | 5 +- .../Events/Map/AnnouncingDecontamination.cs | 4 +- .../Events/Map/AnnouncingNtfEntrance.cs | 8 +- .../Events/Map/AnnouncingNtfMiniEntrance.cs | 8 +- .../Events/Map/AnnouncingScpTermination.cs | 8 +- .../Patches/Events/Map/BreakingScp2176.cs | 8 +- .../Patches/Events/Map/ChangingIntoGrenade.cs | 2 +- .../Patches/Events/Map/Decontaminating.cs | 4 +- .../Events/Map/ElevatorSequencesUpdated.cs | 4 +- .../Events/Map/ExplodingFlashGrenade.cs | 7 +- .../Events/Map/ExplodingFragGrenade.cs | 5 +- .../Patches/Events/Map/FillingLocker.cs | 2 +- .../Patches/Events/Map/Generating.cs | 10 +- .../Patches/Events/Map/GeneratorActivating.cs | 2 +- .../Patches/Events/Map/PlacingBulletHole.cs | 8 +- .../Map/PlacingPickupIntoPocketDimension.cs | 7 +- .../Patches/Events/Map/Scp244Spawning.cs | 7 +- .../Patches/Events/Map/SpawningItem.cs | 6 +- .../Events/Map/SpawningRoomConnector.cs | 2 - .../Patches/Events/Map/TurningOffLights.cs | 2 +- .../Events/Player/ActivatingWarheadPanel.cs | 8 +- .../Events/Player/ActivatingWorkstation.cs | 5 +- .../Patches/Events/Player/Aiming.cs | 5 +- .../Patches/Events/Player/Banned.cs | 4 +- .../Patches/Events/Player/Banning.cs | 5 +- .../Events/Player/ChangedAspectRatio.cs | 7 +- .../Patches/Events/Player/ChangedItem.cs | 6 +- .../Patches/Events/Player/ChangedRoom.cs | 6 +- .../Events/Player/ChangingDangerState.cs | 2 - .../Events/Player/ChangingDisruptorMode.cs | 4 +- .../Patches/Events/Player/ChangingGroup.cs | 6 +- .../Patches/Events/Player/ChangingItem.cs | 6 +- .../Events/Player/ChangingMicroHIDState.cs | 8 +- .../Events/Player/ChangingMoveState.cs | 2 +- .../Events/Player/ChangingRadioPreset.cs | 6 +- .../Events/Player/ChangingRoleAndSpawned.cs | 18 +-- .../Player/ChangingSpectatedPlayerPatch.cs | 3 +- .../Patches/Events/Player/ConsumingItem.cs | 2 +- .../Patches/Events/Player/DamagingDoor.cs | 6 +- .../Events/Player/DamagingShootingTarget.cs | 4 +- .../Patches/Events/Player/DamagingWindow.cs | 4 +- .../Events/Player/DeactivatingWorkstation.cs | 2 +- .../Patches/Events/Player/Destroying.cs | 4 +- .../Patches/Events/Player/DrinkingCoffee.cs | 1 - .../Patches/Events/Player/DroppingAmmo.cs | 4 +- .../Patches/Events/Player/DroppingItem.cs | 2 +- .../Patches/Events/Player/DryFire.cs | 4 +- .../Patches/Events/Player/DyingAndDied.cs | 8 +- .../Events/Player/EarningAchievement.cs | 6 +- .../Patches/Events/Player/Emotion.cs | 6 +- .../Events/Player/EnteringKillerCollision.cs | 2 +- .../Events/Player/EnteringPocketDimension.cs | 4 +- .../EnteringSinkholeEnvironmentalHazard.cs | 2 +- .../EnteringTantrumEnvironmentalHazard.cs | 2 +- .../Events/Player/EscapingAndEscaped.cs | 7 +- .../Events/Player/EscapingPocketDimension.cs | 7 +- .../ExitingSinkholeEnvironmentalHazard.cs | 2 +- .../ExitingTantrumEnvironmentalHazard.cs | 2 +- .../Events/Player/ExplodingMicroHID.cs | 2 - .../Player/FailingEscapePocketDimension.cs | 6 +- .../Patches/Events/Player/FlippingCoin.cs | 8 +- .../Patches/Events/Player/Healing.cs | 4 +- .../Patches/Events/Player/Hit.cs | 11 +- .../Patches/Events/Player/Hurting.cs | 5 +- .../Patches/Events/Player/Interacted.cs | 7 +- .../Patches/Events/Player/InteractingDoor.cs | 9 +- .../Events/Player/InteractingElevator.cs | 4 +- .../Player/InteractingEmergencyButton.cs | 4 +- .../Events/Player/InteractingGenerator.cs | 2 +- .../Events/Player/InteractingLocker.cs | 8 +- .../Player/InteractingShootingTarget.cs | 4 +- .../Patches/Events/Player/IntercomSpeaking.cs | 5 +- .../Patches/Events/Player/IssuingMute.cs | 4 +- .../Patches/Events/Player/Joined.cs | 4 +- .../Patches/Events/Player/Jumping.cs | 2 +- .../Patches/Events/Player/Kicked.cs | 4 +- .../Patches/Events/Player/Kicking.cs | 1 - .../Patches/Events/Player/Landing.cs | 5 +- .../Patches/Events/Player/Left.cs | 6 +- .../Patches/Events/Player/MakingNoise.cs | 2 - .../Events/Player/MicroHIDOpeningDoor.cs | 4 +- .../Patches/Events/Player/PickingUp330.cs | 4 +- .../Patches/Events/Player/PickingUpAmmo.cs | 4 +- .../Patches/Events/Player/PickingUpArmor.cs | 3 +- .../Patches/Events/Player/PickingUpItem.cs | 3 +- .../Patches/Events/Player/PickingUpScp244.cs | 2 +- .../Patches/Events/Player/PlayingAudioLog.cs | 6 +- .../Events/Player/PreAuthenticating.cs | 8 +- .../Events/Player/ProcessDisarmMessage.cs | 6 +- .../Events/Player/ReceivingGunSound.cs | 2 +- .../Events/Player/ReceivingStatusEffect.cs | 7 +- .../Events/Player/ReceivingVoiceMessage.cs | 2 +- .../Events/Player/ReloadedAndUnloaded.cs | 12 +- .../Events/Player/ReservedSlotPatch.cs | 2 +- .../Patches/Events/Player/RevokingMute.cs | 4 +- .../Patches/Events/Player/RotatingRevolver.cs | 4 +- .../Events/Player/SavingByAntiScp207.cs | 3 +- .../Events/Player/Scp1576TransmissionEnded.cs | 46 +++--- .../Events/Player/SearchingPickupEvent.cs | 6 +- .../Events/Player/SendingAdminChatMessage.cs | 7 +- .../Patches/Events/Player/SendingGunSound.cs | 2 +- .../Player/SendingValidGameConsoleCommand.cs | 10 +- .../Events/Player/SendingValidRACommand.cs | 9 +- .../Patches/Events/Player/Shooting.cs | 13 +- .../Patches/Events/Player/Shot.cs | 8 +- .../Patches/Events/Player/Spawning.cs | 5 +- .../Patches/Events/Player/SpawningRagdoll.cs | 5 +- .../Player/StayingOnEnvironmentalHazard.cs | 12 +- .../StayingOnSinkholeEnvironmentalHazard.cs | 12 +- .../StayingOnTantrumEnvironmentalHazard.cs | 13 +- .../Patches/Events/Player/ThrowingRequest.cs | 5 +- .../Patches/Events/Player/ThrownProjectile.cs | 5 +- .../Events/Player/TogglingFlashlight.cs | 5 +- .../Patches/Events/Player/TogglingNoClip.cs | 5 +- .../Events/Player/TogglingOverwatch.cs | 3 +- .../Patches/Events/Player/TogglingRadio.cs | 2 +- .../Events/Player/TogglingWeaponFlashlight.cs | 1 + .../Patches/Events/Player/TriggeringTesla.cs | 8 +- .../Events/Player/UsedItemByHolstering.cs | 7 +- .../Player/UsingAndCancellingItemUse.cs | 6 +- .../Events/Player/UsingItemCompleted.cs | 6 +- .../Events/Player/UsingMicroHIDEnergy.cs | 6 +- .../Events/Player/UsingRadioBattery.cs | 3 +- .../Patches/Events/Player/Verified.cs | 6 +- .../Patches/Events/Player/VoiceChatting.cs | 2 +- .../Patches/Events/Scp049/ActivatingSense.cs | 6 +- .../Patches/Events/Scp049/Attacking.cs | 3 +- .../Patches/Events/Scp049/FinishingRecall.cs | 4 +- .../Patches/Events/Scp049/FinishingSense.cs | 5 +- .../Patches/Events/Scp049/SendingCall.cs | 1 + .../Patches/Events/Scp049/StartingRecall.cs | 8 +- .../Patches/Events/Scp0492/Consumed.cs | 10 +- .../Patches/Events/Scp0492/Consuming.cs | 9 +- .../Scp0492/TriggeringBloodlustEvent.cs | 2 +- .../Patches/Events/Scp079/ChangingCamera.cs | 5 +- .../Events/Scp079/ChangingSpeakerStatus.cs | 4 +- .../Events/Scp079/ElevatorTeleporting.cs | 5 +- .../Events/Scp079/GainingExperience.cs | 2 +- .../Patches/Events/Scp079/GainingLevel.cs | 2 +- .../Patches/Events/Scp079/InteractingTesla.cs | 2 +- .../Patches/Events/Scp079/LockingDown.cs | 4 +- .../Patches/Events/Scp079/Lost.cs | 2 +- .../Patches/Events/Scp079/Pinging.cs | 10 +- .../Patches/Events/Scp079/Recontain.cs | 6 +- .../Patches/Events/Scp079/Recontaining.cs | 2 +- .../Patches/Events/Scp079/RoomBlackout.cs | 6 +- .../Patches/Events/Scp079/TriggeringDoor.cs | 6 +- .../Patches/Events/Scp079/ZoneBlackout.cs | 3 +- .../Patches/Events/Scp096/AddingTarget.cs | 4 +- .../Patches/Events/Scp096/CalmingDown.cs | 4 +- .../Patches/Events/Scp096/Charging.cs | 4 +- .../Patches/Events/Scp096/Enraging.cs | 4 +- .../Patches/Events/Scp096/RemovingTarget.cs | 10 +- .../Patches/Events/Scp096/StartPryingGate.cs | 4 +- .../Patches/Events/Scp096/TryingNotToCry.cs | 4 +- .../Patches/Events/Scp106/Attacking.cs | 3 +- .../Patches/Events/Scp106/ExitStalking.cs | 5 +- .../Patches/Events/Scp106/Stalking.cs | 6 +- .../Patches/Events/Scp106/Teleporting.cs | 7 +- .../Patches/Events/Scp1344/Deactivating.cs | 6 +- .../Patches/Events/Scp1344/Status.cs | 4 +- .../Patches/Events/Scp1507/AttackingDoor.cs | 2 - .../Patches/Events/Scp1507/Scream.cs | 2 - .../Events/Scp1507/SpawningFlamingos.cs | 2 - .../Patches/Events/Scp1507/TapeUsing.cs | 2 - .../Scp1509/InspectingAndTriggeringAttack.cs | 2 - .../Patches/Events/Scp1509/Resurrecting.cs | 4 +- .../Patches/Events/Scp173/BeingObserved.cs | 6 +- .../Patches/Events/Scp173/Blinking.cs | 4 +- .../Patches/Events/Scp173/BlinkingRequest.cs | 6 +- .../Patches/Events/Scp173/Observers.cs | 11 +- .../Patches/Events/Scp173/PlacingTantrum.cs | 2 +- .../Events/Scp173/UsingBreakneckSpeeds.cs | 6 +- .../Patches/Events/Scp244/DamagingScp244.cs | 4 +- .../Patches/Events/Scp244/UpdateScp244.cs | 2 +- .../Patches/Events/Scp244/UsingScp244.cs | 3 +- .../Patches/Events/Scp2536/FindingPosition.cs | 4 +- .../Patches/Events/Scp2536/FoundPosition.cs | 4 +- .../Patches/Events/Scp2536/GrantingGift.cs | 2 - .../Patches/Events/Scp2536/OpeningGift.cs | 2 - .../Patches/Events/Scp3114/Dancing.cs | 6 +- .../Patches/Events/Scp3114/Disguising.cs | 2 +- .../Patches/Events/Scp3114/Slapped.cs | 4 +- .../Patches/Events/Scp3114/Strangling.cs | 4 +- .../Patches/Events/Scp3114/TryUseBody.cs | 2 +- .../Patches/Events/Scp330/DroppingCandy.cs | 8 +- .../Patches/Events/Scp330/EatingScp330.cs | 2 +- .../Events/Scp330/InteractingScp330.cs | 11 +- .../Patches/Events/Scp559/Interacting.cs | 1 - .../Patches/Events/Scp559/Spawning.cs | 1 - .../Events/Scp914/InteractingEvents.cs | 5 +- .../Patches/Events/Scp914/UpgradedPickup.cs | 5 +- .../Patches/Events/Scp914/UpgradedPlayer.cs | 13 +- .../Patches/Events/Scp914/UpgradingPickup.cs | 3 +- .../Patches/Events/Scp914/UpgradingPlayer.cs | 11 +- .../Patches/Events/Scp939/Clawed.cs | 4 +- .../Patches/Events/Scp939/Focus.cs | 1 - .../Patches/Events/Scp939/Lunge.cs | 5 +- .../Events/Scp939/PlacedAmnesticCloud.cs | 2 - .../Events/Scp939/PlacingAmnesticCloud.cs | 4 +- .../Events/Scp939/PlacingMimicPoint.cs | 4 +- .../Patches/Events/Scp939/PlayingFootstep.cs | 3 +- .../Patches/Events/Scp939/PlayingSound.cs | 6 +- .../Patches/Events/Scp939/PlayingVoice.cs | 2 +- .../Patches/Events/Scp939/SavingVoice.cs | 2 - .../Events/Scp939/ValidatingVisibility.cs | 12 +- .../Patches/Events/Server/AddingUnitName.cs | 7 +- .../Events/Server/ChoosingStartTeamQueue.cs | 5 +- .../Events/Server/CompletingObjective.cs | 4 +- .../Patches/Events/Server/Reporting.cs | 5 +- .../Patches/Events/Server/RespawningTeam.cs | 8 +- .../Patches/Events/Server/RestartingRound.cs | 14 +- .../Patches/Events/Server/RoundEnd.cs | 1 - .../Patches/Events/Server/RoundStarting.cs | 6 +- .../Events/Server/SelectingRespawnTeam.cs | 2 - .../Patches/Events/Server/Unban.cs | 1 - .../Events/Server/WaitingForPlayers.cs | 4 +- .../Events/Warhead/ChangingLeverStatus.cs | 6 +- .../Events/Warhead/DeadmanSwitchStart.cs | 5 +- .../Patches/Events/Warhead/Detonation.cs | 5 +- .../Patches/Events/Warhead/Starting.cs | 5 +- .../Patches/Events/Warhead/Stopping.cs | 5 +- .../Fixes/Fix106RegenerationWithScp244.cs | 6 +- .../Patches/Fixes/Fix1344Dupe.cs | 4 +- .../Patches/Fixes/FixCapturePosition.cs | 6 +- .../Patches/Fixes/FixEffectOrder.cs | 11 +- .../Patches/Fixes/FixElevatorChamberAwake.cs | 2 +- .../Patches/Fixes/FixNWFlashbangDuration.cs | 7 +- .../FixOnAddedBeingCallAfterOnRemoved.cs | 11 +- .../Patches/Fixes/FixPickupPreviousOwner.cs | 9 +- .../Patches/Fixes/FixScp1507DestroyingDoor.cs | 10 +- .../Patches/Fixes/FootprintConstructorFix.cs | 6 +- .../Patches/Fixes/GetAmmoLimitFix.cs | 9 +- .../Patches/Fixes/GrenadePropertiesFix.cs | 8 +- .../Exiled.Events/Patches/Fixes/HurtingFix.cs | 4 +- .../Patches/Fixes/Jailbird914CoarseFix.cs | 5 +- .../Exiled.Events/Patches/Fixes/KillPlayer.cs | 6 +- .../Patches/Fixes/LockerFixes.cs | 2 +- .../Patches/Fixes/NWFixDetonationTimer.cs | 3 +- .../Patches/Fixes/NWFixScp096BreakingDoor.cs | 9 +- .../Patches/Fixes/NameTagDetailFix.cs | 5 +- ...RemoteAdminNpcCommandAddToDictionaryFix.cs | 7 +- .../Patches/Fixes/RoleChangedPatch.cs | 5 +- .../Patches/Fixes/Scp3114AttackAhpFix.cs | 6 +- .../Patches/Fixes/Scp3114FriendlyFireFix.cs | 10 +- .../Patches/Fixes/ServerHubMicroHidFix.cs | 7 +- .../Patches/Fixes/ThrownCustomKeycardFix.cs | 5 +- .../Patches/Fixes/TryRaycastRoomFix.cs | 5 +- .../Patches/Fixes/VoiceChatMutesClear.cs | 4 +- .../Patches/Generic/AirlockListAdd.cs | 1 - .../Patches/Generic/AmmoDrain.cs | 4 + .../Patches/Generic/CameraList.cs | 2 +- .../Patches/Generic/CanScp049SenseTutorial.cs | 4 +- .../Patches/Generic/CoffeeListAdd.cs | 1 - .../Patches/Generic/CommandLogging.cs | 4 +- .../Patches/Generic/CurrentHint.cs | 2 +- .../Generic/DestroyRecontainerInstance.cs | 4 +- .../Exiled.Events/Patches/Generic/DoorList.cs | 2 +- .../Patches/Generic/GeneratorList.cs | 4 +- .../Patches/Generic/GetCustomAmmoLimit.cs | 3 - .../Patches/Generic/GetCustomCategoryLimit.cs | 5 +- .../Patches/Generic/GhostModePatch.cs | 10 +- .../Patches/Generic/HazardList.cs | 2 - .../Patches/Generic/IndividualFriendlyFire.cs | 7 +- .../Generic/InitRecontainerInstance.cs | 4 +- .../CustomItemNameDetailData.cs | 4 +- .../KeycardDetails/CustomLabelDetailData.cs | 2 - .../KeycardDetails/CustomPermsDetailData.cs | 2 - .../KeycardDetails/CustomRankDetailData.cs | 3 - .../CustomSerialNumberDetailData.cs | 2 - .../KeycardDetails/CustomTintDetailData.cs | 2 - .../KeycardDetails/CustomWearDetailData.cs | 2 - .../KeycardDetails/NameTagDetailData.cs | 2 - .../Patches/Generic/LastTarget.cs | 2 - .../Exiled.Events/Patches/Generic/LiftList.cs | 3 +- .../Patches/Generic/LockerList.cs | 7 +- .../Patches/Generic/MapLayoutGetter.cs | 4 +- .../Patches/Generic/OfflineModeIds.cs | 4 +- .../Patches/Generic/ParseVisionInformation.cs | 4 +- .../Patches/Generic/PickupControlPatch.cs | 13 +- .../Generic/PocketDimensionTeleportList.cs | 2 +- .../Exiled.Events/Patches/Generic/RoomList.cs | 2 +- .../Patches/Generic/RoundTargetCount.cs | 3 +- .../Patches/Generic/Scp079Recontain.cs | 2 +- .../Patches/Generic/Scp079Scan.cs | 4 +- .../Patches/Generic/Scp127MaxHs.cs | 2 - .../Patches/Generic/Scp173BeingLooked.cs | 2 +- .../Patches/Generic/Scp559List.cs | 3 +- .../Patches/Generic/Scp956Capybara.cs | 1 - .../Generic/SingleUseKeycardRemainingUses.cs | 4 +- .../Patches/Generic/SpeakerInRoom.cs | 2 +- .../Patches/Generic/StaminaRegen.cs | 2 - .../Patches/Generic/StaminaRegenArmor.cs | 2 +- .../Patches/Generic/StaminaUsage.cs | 2 - .../Patches/Generic/TeslaList.cs | 2 +- .../Patches/Generic/WorkstationListAdd.cs | 1 - EXILED/Exiled.Example/Commands/Test.cs | 1 - EXILED/Exiled.Example/Events/PlayerHandler.cs | 7 +- EXILED/Exiled.Example/Exiled.Example.csproj | 2 +- EXILED/Exiled.Installer/CommandSettings.cs | 20 +-- EXILED/Exiled.Installer/Program.cs | 32 ++-- .../Properties/Resources.Designer.cs | 6 +- EXILED/Exiled.Loader/Config.cs | 11 +- EXILED/Exiled.Loader/ConfigManager.cs | 104 +------------ .../Configs/CommentGatheringTypeInspector.cs | 2 +- .../Configs/CommentsObjectGraphVisitor.cs | 2 +- .../AttachmentIdentifiersConverter.cs | 2 +- .../CustomConverters/ColorConverter.cs | 2 - .../CustomConverters/VectorsConverter.cs | 2 - .../Configs/TypeAssigningEventEmitter.cs | 2 +- .../Configs/UnderscoredNamingConvention.cs | 1 - .../Features/PluginPriorityComparer.cs | 2 +- EXILED/Exiled.Loader/Loader.cs | 10 +- EXILED/Exiled.Loader/LoaderPlugin.cs | 1 - EXILED/Exiled.Loader/PathExtensions.cs | 2 +- EXILED/Exiled.Loader/TranslationManager.cs | 12 +- EXILED/Exiled.Loader/Updater.cs | 3 +- EXILED/Exiled.Permissions/Config.cs | 3 +- .../Extensions/Permissions.cs | 3 - .../Properties/Resources.Designer.cs | 4 +- 863 files changed, 1815 insertions(+), 2984 deletions(-) rename EXILED/Exiled.API/Enums/{Scp939VisibilityState.cs => Scp939VisibilityStates.cs} (63%) delete mode 100644 EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs delete mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs delete mode 100644 EXILED/Exiled.API/Interfaces/IValidator.cs rename EXILED/Exiled.CustomRoles/API/Features/Enums/{AbilityKeypressTriggerType.cs => KeypressActivationType.cs} (93%) diff --git a/.github/documentation/localization/GettingStarted-BR.md b/.github/documentation/localization/GettingStarted-BR.md index 157aaad4ac..37b5f5b4f8 100644 --- a/.github/documentation/localization/GettingStarted-BR.md +++ b/.github/documentation/localization/GettingStarted-BR.md @@ -1,28 +1,21 @@ -# Tutorial do EXILED -*(Escrito por [KadeDev](https://github.com/KadeDev) para a comunidade, revisado e traduzido por [Unbistrackted](https://github.com/Unbistrackted) e [Firething](https://github.com/Firething))* +# Documento de Baixo Nível do Exiled +*(Escrito por [KadeDev](https://github.com/KadeDev) para a comunidade) (Traduzido por [Firething](https://github.com/Firething))* ## Manual de Instruções ### Introdução -Como dito anteriormente, o EXILED é um framework de alto nível que nos permite chamar funções do jogo sem ter nenhum tipo de complicação ou quase nenhuma perda de performance. +Exiled é uma API de baixo nível, o que significa que você pode chamar funções do jogo sem precisar de vários bloatwares de API. -Isso permite que o projeto seja atualizado de forma mais simples, sem precisar que desenvolvedores atualizem seus plugins toda vez que o jogo atualizar. (Isso se não houver códigos que foram alterados/tornados obsoletos em versões majors do EXILED) +Isso permite com que o Exiled atualize-se facilmente, e ele pode ser atualizado antes mesmo da atualização chegar ao jogo. -O guia a seguir irá te ensinar o básico de como criar seu primeiro plugin! +Isso também permite que desenvolvedores de plug-in não precisem atualizar seus códigos sempre que houver uma atualização do Exiled ou SCP:SL. Na realidade, eles nem precisarão atualizar seus plug-ins! -### Guia -O [Plug-in de Exemplo](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Example) mostra o que são eventos e como criar eles de forma correta. Usar esse exemplo ajudará você a aprender a como usar o Exiled apropriadamente. Dentro desse existem elementos que são importantes, portanto acompanhe o código durante o tutorial. +Esse documento mostrará a você os básicos de como se fazer um Plug-in para o Exiled. A partir daqui, você poderá mostrar ao mundo as coisas criativas que você pode criar com essa framework! -#### ``OnEnable`` e ``OnDisable``+ Atualizações Dinâmicas -O EXILED possuí um comando chamado **Reload**, que recarrega todos os plug-ins instalados. +### Exemplo de Plug-in +Um [Exemplo de Plug-in](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Example) que é um plug-in simples que mostra eventos e como fazer eles adequadamente. Usar esse exemplo ajudará você a aprender a como usar o Exiled apropriadamente. Há alguns aspectos nesse plug-in que são importantes, falaremos sobre eles. -Ele funciona desativando o plugin e ativando-o novamente, além de chamar a função ``OnReload`` que entraremos em detalhes abaixo. - -Lembrando que toda variável, evento, corrotina, etc. *deve* ser atribuído ou criado quando o plugin é ativado e anulada quando o mesmo é desativado. - -> [!IMPORTANT] -> Você **DEVE** usar o método ``OnEnable`` para ativar o Plug-in, e ``OnDisable`` desativa-lo. - -Mas talvez você deve estar se perguntando: "Mas então para que serve o ``OnReload``?" Essa função tem como objetivo recarregar as variáveis estáticas de dentro do seu plugin. Então você poderia fazer algo assim: +#### Atualizações Dinâmicas em On Enable + On Disable +Exiled é uma framework que tem um comando de **Reload** que pode ser usado para recarregar todos os plug-ins e obter novos. Isso significa que você deve fazer com que seus plug-ins sejam **Dinamicamente Atualizáveis.** Isso significa que toda variável, evento, corrotina, etc *deve* ser atribuída quando ativada e anulada quando desativada. O método **On Enable** deve ativar todos, e o método **On Disable** deve desativar todos. Mas talvez você esteja se perguntando 'E o **On Reload**'? Essa função tem como objetivo carregar variáveis estáticas para que toda constante estática que você fizer não seja apagada. Então você poderia fazer algo assim: ```csharp public static int StaticCount = 0; public int counter = 0; @@ -31,13 +24,13 @@ public override void OnEnable() { counter = StaticCount; counter++; - Log.Info(counter); + Info(counter); } public override void OnDisable() { counter++; - Log.Info(counter); + Info(counter); } public override void OnReload() @@ -48,46 +41,34 @@ public override void OnReload() E o resultado seria: ```bash -# O servidor é iniciado... -# OnEnable é chamado. +# On enable fires 1 -# Comando Reload é executado por alguém... -# OnDisable é chamado. +# Reload command +# On Disable fires 2 -# OnReload é chamado. -"counter" é guardado dentro de "StaticCount" -# E então OnEnabled é chamado novamente. +# On Reload fires +# On Enable fires again 3 ``` -Sem fazer isso, teria apenas mostrado no console ``1`` e então para o ``2`` novamente. +(Claro, excluindo qualquer coisa além das respostas reais) +Sem fazer isso, teria ido apenas para o 1 e então para o 2 novamente. ### Jogadores + Eventos -Agora que entendemos como os métodos de entrada/inicializaçãos dos plug-ins funcionam, podemos focar em como interagir com jogadores por meio de eventos! - -Um evento é uma forma do jogo notificar seu plug-in quando algo acontece, por exemplo quando um jogador entrar, tomar dano, morrer, etc. +Agora que terminamos de fazer com que nossos plug-ins sejam **Dinamicamente Atualizáveis**, podemos focar em tentar interagir com jogadores por meio de eventos! -> [!IMPORTANT] -> Você **PRECISA** referenciar o arquivo `Exiled.Events.dll` para que você consiga usar os eventos. (Ou apenas baixe o pacote [Nuget do Exiled](https://www.nuget.org/packages/ExMod.Exiled)!) - -Para começar a ouvir um evento, iremos utilizar uma nova classe chamada "EventHandlers", que irá gerenciar nossos eventos. - -Na classe EventHandlers: +Um evento é bem interessante, ele permite com que o SCP:SL se comunique com o Exiled e depois com o Exiled para todos os plug-ins! +Você pode ouvir os eventos do seu plug-in adicionando isso à parte superior do arquivo de origem do plug-in principal: ```csharp -public class EventHandlers -{ - public void PlayerVerified(VerifiedEventArgs ev) - { - // Códigos 1 - // Códigos 2 - // Códigos 3 - } -} +using EXILED; ``` +E então você precisa referenciar o arquivo `Exiled.Events.dll` para que você realmente obtenha eventos. +Para referenciar um evento, nós estaremos utilizando uma nova classe que criamos; denominada "EventHandlers". O gerenciador de eventos não é fornecido por padrão; você deve criá-lo. -E depois nós podemos referenciá-lo no ``OnEnable`` e ``OnDisable`` desse jeito: + +Nós podemos referenciá-lo no void OnEnable e OnDisable assim: `MainClass.cs` ```csharp @@ -95,37 +76,50 @@ using Player = Exiled.Events.Handlers.Player; public EventHandlers EventHandler; -public override void OnEnable() +public override OnEnable() { + // Registre a classe de gerenciador de evento. E adicione o evento + // ao ouvinte de eventos 'EXILED_Events' para que obtenhamos o evento. EventHandler = new EventHandlers(); - // += significa que você vai estar se atribuindo ao evento, que nesse caso você vai ouvir toda vez que ele for chamado. Player.Verified += EventHandler.PlayerVerified; } -public override void OnDisable() +public override OnDisable() { - // Precisamos desatribuir o evento e depois, anular o gerenciador de eventos. - // A linha abaixo deve ser repetida para cada evento. + // Torne-o dinamicamente atualizável. + // Fazemos isso ao remover o ouvinte para o evento e então anulando o gerenciador de eventos. + // Esse processo deve ser repetido para cada evento. Player.Verified -= EventHandler.PlayerVerified; EventHandler = null; } ``` -Agora toda vez que um jogador é autenticado após entrar no servidor podemos executar nosso código customizado! É importante destacar que todos eventos têm diferentes argumentos, e cada tipo tem propriedades diferentes associadas. +E na classe EventHandlers, faríamos: -O EXILED já fornece uma função para enviar um broadcast, então a usaremos em nosso exemplo: +```csharp +public class EventHandlers +{ + public void PlayerVerified(VerifiedEventArgs ev) + { + + } +} +``` +Agora conseguimos nos conectar a um evento de jogador verificado que é executado sempre que um jogador é autenticado após entrar no servidor! É importante destacar que todos eventos têm diferentes argumentos de evento, e cada tipo de argumento de evento tem propriedades diferentes associadas. + +O EXILED já fornece uma função de aviso (broadcast), então a usaremos em nosso evento: ```csharp public class EventHandlers { public void PlayerVerified(VerifiedEventArgs ev) { - ev.Player.Broadcast(5, "Bem-vindo(a) ao meu servidor!"); + ev.Player.Broadcast(5, "Bem-vindo ao meu servidor maneiro!"); } } ``` -Outro exemplo seria um evento que desliga as Teslas para todos os MTFs. (Incluindo guardas) +Como destacado acima, todo evento tem diferentes argumentos. Abaixo há um evento diferente que desliga os portões de Tesla para jogadores da Nine-Tailed Fox. `MainClass.cs` ```csharp @@ -133,15 +127,15 @@ using Player = Exiled.Events.Handlers.Player; public EventHandlers EventHandler; -public override void OnEnable() +public override OnEnable() { EventHandler = new EventHandlers(); Player.TriggeringTesla += EventHandler.TriggeringTesla; } -public override void OnDisable() +public override OnDisable() { - // Não se esqueça, eventos devem ser desatribuídos e anulados nesse metódo! + // Não se esqueça, eventos devem ser desconectados e anulados no metódo Disable. Player.TriggeringTesla -= EventHandler.TriggeringTesla; EventHandler = null; } @@ -156,10 +150,10 @@ public class EventHandlers public void TriggeringTesla(TriggeringTeslaEventArgs ev) { // Desativa o evento para jogadores da equipe da Fundação. - // Isso pode ser feito ao verificar o lado da classe (Player::Role.Side) do jogador. + // Isso pode ser feito ao verificar o lado (side) do jogador. if (ev.Player.Role.Side == Side.Mtf) { - // Desative o acionamento da Tesla mudando o valor de 'ev.IsTriggerable' para 'false'. - // Lembrando que isso desabilita para todos os MTFs, incluindo Guardas! + // Desative o acionamento da Tesla ao definir o ev.IsTriggerable para 'false'. + // Jogadores que tiverem uma patente na FTM não irão mais ativar portões de Tesla. ev.IsTriggerable = false; } } @@ -168,37 +162,33 @@ public class EventHandlers ### Configurações -Grande partes dos plug-ins precisam de configurações, isso permite que os donos de servidores modifiquem-os livremente. +A maioria dos plug-ins do Exiled contém configurações. As configurações permitem que os gerentes de servidor modifiquem os plug-ins livremente, embora sejam limitadas à configuração que o desenvolvedor do plug-in fornece. -Primeiro crie uma classe chmada `Config` e mude a herança do seu plug-in de `Plugin<>` para `Plugin` +Primeiro crie uma classe `config.cs` e mude a herança do seu plug-in de `Plugin<>` para `Plugin` -Agora você precisa fazer essa classe herdar `IConfig`, e depois implementar o contrato dela criando `IsEnabled` e `Debug`. Sua classe de Configuração agora deve se assemelhar a isso: +Agora você precisa fazer essa configuração herdar `IConfig`. Após herdar de `IConfig`, adicione uma propriedade para a classe titulada como `IsEnabled` e `Debug`. Sua classe de Configuração agora deve se assemelhar a isso: ```csharp public class Config : IConfig { - public bool IsEnabled { get; set; } = true; // Se você não colocar "= true", o seu plugin não sera habilitado quando o servidor iniciar! + public bool IsEnabled { get; set; } public bool Debug { get; set; } } ``` -Você pode adicionar qualquer opção de configuração e referenciá-la assim: +Você pode adicionar qualquer opção de configuração ali e referenciá-la assim: `Config.cs` ```csharp public class Config : IConfig { - public bool IsEnabled { get; set; } = true; + public bool IsEnabled { get; set; } public bool Debug { get; set; } - public string TextThatINeed { get; set; } = "Texto para testes"; + public string TextThatINeed { get; set; } = "esse é o padrão"; } ``` -> [!NOTE] -> Você não precisa verificar se `IsEnabled == true` ou não, o Loader do Exiled já faz isso automaticamente. - `MainClass.cs` - ```csharp public override OnEnabled() { @@ -206,11 +196,11 @@ Você pode adicionar qualquer opção de configuração e referenciá-la assim: } ``` -Pronto, você está preparado para fazer Plug-ins usando o Exiled! +E parabéns! Você fez o seu primeiro Plug-in para o Exiled! É importante destacar que todos os plug-ins **devem** ter uma configuração IsEnabled. Essa configuração permite que donos de servidor ativem e desativem o plug-in quando quiserem. A configuração IsEnabled será lida pelo carregador do Exiled (seu plug-in não precisa verificar se `IsEnabled == true` ou não). ### E agora? -Se você quiser mais informações, entre no nosso [Servidor do Discord!](https://discord.gg/PyUkWTg) +Se você quiser mais informações, você deve entrar no nosso [discord!](https://discord.gg/PyUkWTg) -Nós temos um canal de recursos chamado ``#resources`` que você pode considerar útil, assim como vários outros desenvolvedores que iram te ajudar a desenvolver seus plug-ins! +Nós temos um canal de #resources que você pode considerar útil, assim como colaboradores do EXILED e desenvolvedores de plug-in que estariam dispostos a ajudá-lo na criação de seus plug-ins. -Ou você poderia ler sobre todos os eventos que nós temos! Bem [aqui](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Events/EventArgs)! +Ou você poderia ler sobre todos os eventos que nós temos! Se você deseja verificá-los, veja [aqui!](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Events/EventArgs) diff --git a/.github/documentation/localization/README-BR.md b/.github/documentation/localization/README-BR.md index 410a92e58d..e6f6102b89 100644 --- a/.github/documentation/localization/README-BR.md +++ b/.github/documentation/localization/README-BR.md @@ -11,114 +11,98 @@ -EXILED é um Framework de alto nível para a criação de plug-ins direcionado a servidores de SCP: Secret Laboratory. Ele oferece um sistema de eventos para os desenvolvedores, com o objetivo de manipular, alterar ou implementar suas próprias funcionalidades no jogo. -Todos os eventos do EXILED são feitos com [Harmony](https://harmony.pardeike.net/articles/intro.html), o que significa que não requerem edição direta dos Assemblies/Código Base do servidor para funcionar, permitindo dois benefícios: +O EXILED é uma estrutura para plug-ins de alto nível aos servidores de SCP: Secret Laboratory. Ele oferece um sistema de eventos para os desenvolvedores usarem com o intuito de manipular, alterar o código do jogo ou implementar suas próprias funções. +Todos os eventos do EXILED são codificados com Harmony, o que significa que não requerem edição direta dos Assemblies do servidor para funcionar, o que permite dois benefícios exclusivos. - - Todo o código do Framework pode ser publicado e compartilhado livremente, permitindo que os desenvolvedores entendam melhor *como* funciona, além de poderem sugerir adições ou alterações. - - Todo o código relacionado ao framework é executado fora do assembly do servidor, significando que pequenas atualizações do jogo provavelmente não causarão efeitos colaterais. Isso torna o projeto mais compatível, além de facilitar quando for necessário atualizá-lo. + - Em primeiro lugar, todo o código da estrutura pode ser publicado e compartilhado livremente, permitindo que os desenvolvedores entendam melhor *como* ele funciona, além de oferecer sugestões para adicionar ou alterar suas funções. + - Em segundo lugar, como todo o código relacionado à estrutura é feito fora da Assembly do servidor, coisas como pequenas atualizações do jogo terão pouco ou nenhum efeito na framework, tornando-a mais compatível com futuras atualizações do jogo, além de facilitar a atualização quando *for* necessário fazê-la. # Instalação -A instalação do EXILED é bem simples e você pode escolher entre dois tipos: ``Automática`` e ``Manual``. +A instalação do EXILED é bastante simples. Ele se carrega por meio da API de plug-in da NW. É por isso que existem duas pastas dentro de ``Exiled.tar.gz`` nos arquivos de lançamento. ``SCP Secret Laboratory`` contém os arquivos necessários para carregar os recursos do EXILED na pasta ``EXILED``. Com isso dito, tudo o que você precisa fazer é mover essas duas pastas para o caminho adequado que é explicado abaixo, e pronto! -Na instalação automática, o instalador cuidará de baixar todos os recursos e arquivos para que o EXILED funcione. - -Já na manual, você faz o download do ``Exiled.tar.gz`` nos arquivos do release, e há duas pastas dentro. -``SCP Secret Laboratory`` contém os arquivos necessários para carregar os recursos do EXILED de dentro da pasta ``EXILED``. Com isso em mente, tudo o que você precisa fazer é mover essas duas para o caminho adequado e pronto! - -Abaixo entraremos em mais detalhes... +Se você optar por usar o instalador, se executado corretamente, ele cuidará de instalar todos os recursos do EXILED. # Windows -> [!IMPORTANT] -> Verifique se você está conectado no mesmo usuário do Windows que está executando o servidor ou se possui privilégios de administrador antes de executar o Instalador. - ### Instalação automática ([mais informações](https://github.com/ExMod-Team/EXILED/blob/master/EXILED/Exiled.Installer/README.md)) - - Baixe **`Exiled.Installer-Win.exe` [aqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> clique no instalador) - - Coloque-o na pasta do seu servidor (Ele precisa estar dentro da pasta de um servidor "dedicado", caso não tenha siga [esse guia](https://techwiki.scpslgame.com/books/server-guides/page/1-how-to-create-a-dedicated-server)) +**Nota**: Verifique se você está conectado ao usuário que executa o servidor ou se possui privilégios de administrador antes de executar o Instalador. + + - Baixe o **`Exiled.Installer-Win.exe` [daqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> clique no Instalador) + - Coloque-o na pasta do seu servidor (baixe o servidor dedicado, caso não o tenha feito) - Clique duas vezes em **`Exiled.Installer.exe`** ou **[baixe este .bat](https://www.dropbox.com/scl/fi/7yh0r3q0vdn6ic4rhuu3l/install-prerelease.bat?rlkey=99fwjbwy1xg61qgtak0qzb9rd&st=8xs4xks8&dl=1)** e coloque-o na pasta do servidor para instalar o pré-lançamento mais recente - - Para instalar e obter plug-ins, confira a secção [Instalando plug-ins](https://github.com/ExMod-Team/EXILED/edit/master/.github/documentation/localization/README-BR.md#instala%C3%A7%C3%A3o-manual). + - Para instalar e obter plug-ins, confira a seção [Instalando plug-ins](#installing-plugins) abaixo. +**Nota:** Se você estiver instalando o EXILED em um servidor remoto, certifique-se de executar o .exe como o mesmo usuário que executa seus servidores de SCP:SL (ou um com privilégios de administrador) ### Instalação manual - - Baixe o **`Exiled.tar.gz` [aqui](https://github.com/ExMod-Team/EXILED/releases)** - - Extraia o conteúdo com [7Zip](https://www.7-zip.org/) ou [WinRar](https://www.win-rar.com/download.html?&L=6) - > [!CAUTION] - > As pastas a seguir precisam estar em ``C:\Users\%NomeDoUsuário%\AppData\Roaming``, e ***NÃO*** ``C:\Users\%NomeDoUsuário%\AppData\Roaming\SCP Secret Laboratory``. - - Mova a pasta **``EXILED``** para **`%appdata%`** + - Baixe o **`Exiled.tar.gz` [daqui](https://github.com/ExMod-Team/EXILED/releases)** + - Extraia seus conteúdos com [7Zip](https://www.7-zip.org/) ou [WinRar](https://www.win-rar.com/download.html?&L=6) + - Mova a pasta **``EXILED``** para **`%appdata%`** *Note: Esta pasta precisa ir ao diretório ``C:\Users\%NomeDoUsuário%\AppData\Roaming``, e ***NÃO*** ao ``C:\Users\%NomeDoUsuário%\AppData\Roaming\SCP Secret Laboratory``, e **DEVE** estar em (...)\AppData\Roaming, não (...)\AppData\!* - Mova **``SCP Secret Laboratory``** para **`%appdata%`**. - - **Windows 10 e 11**: - Escreva `%appdata%` na Cortana, no ícone de pesquisa ou na barra do Windows Explorer - - **Outras versões do Windows**: + - Windows 10 e 11: + Escreva `%appdata%` na Cortana / no ícone de pesquisa ou na barra do Windows Explorer + - Qualquer outra versão do Windows: Pressione Win + R e digite `%appdata%` ### Instalando plug-ins -O EXILED agora deve estar instalado e ativo na próxima vez que você iniciar o seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins em **[nosso servidor do Discord](https://discord.gg/PyUkWTg)!** +É isso, o EXILED agora deve estar instalado e ativo na próxima vez que você inicializar seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins no **[nosso servidor do Discord](https://discord.gg/PyUkWTg)** - Para instalar um plug-in, basta: - - Baixar um plug-in da [página de lançamentos *deles*](https://i.imgur.com/u34wgPD.jpg) (**PRECISA ser um `.dll`!**) - - Mova-o para: ``C:\Users\%NomeDoUsuário%\AppData\Roaming\EXILED\Plugins`` + - Baixar um plug-in da [página de lançamentos *deles*](https://i.imgur.com/u34wgPD.jpg) (**DEVE ser um `.dll`!**) + - Mova-o para: ``C:\Users\%NomeDoUsuário%\AppData\Roaming\EXILED\Plugins`` (mova-se para cá pressionando Win + R e, em seguida, escrevendo `%appdata%`) # Linux -> [!IMPORTANT] -> Certifique-se de executar o instalador como o mesmo usuário (ou root) que executa seus servidores de SCP:SL. - ### Instalação automática ([mais informações](https://github.com/ExMod-Team/EXILED/blob/master/EXILED/Exiled.Installer/README.md)) -> [!CAUTION] -> Não esqueça de usar o ``chmod`` para dar as permissões necessárias para o instalador e executar o servidor dedicado pelo menos uma vez! - - Baixe o **`Exiled.Installer-Linux` [aqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> baixe o Instalador) - - Mova-o diretamente para dentro da pasta do servidor e digite: **`./Exiled.Installer-Linux`** ou, passe diretamente o caminho usando o comando: **`./Exiled.Installer-Linux --path /path/to/server`** - - Para instalar e obter plug-ins, confira a secção [Instalando plug-ins](https://github.com/ExMod-Team/EXILED/edit/master/.github/documentation/localization/README-BR.md#instalando-plug-ins-1). + +**Nota:** Se você estiver instalando o EXILED em um servidor remoto, certifique-se de executar o instalador como o mesmo usuário que executa seus servidores de SCP:SL (ou root) + + - Baixe o **`Exiled.Installer-Linux` [daqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> baixe o Instalador) + - Instale-o digitando **`./Exiled.Installer-Linux --path /path/to/server`** ou mova-o diretamente para dentro da pasta do servidor, mova para ele com o terminal(`cd`) e digite: **`./Exiled.Installer-Linux`**. + - Se você quiser o último pré-lançamento, simplesmente adicione **`--pre-releases`**. Exemplo: **`./Exiled.Installer-Linux /home/scp/server --pre-releases`** + - Outro exemplo, se você colocou `Exiled.Installer-Linux` na pasta do seu servidor: **`/home/scp/server/Exiled.Installer-Linux --pre-releases`** + - Para instalar e obter plug-ins, confira a seção [Instalando plug-ins](#installing-plugins-1) abaixo. ### Instalação manual - - Baixe o **`Exiled.tar.gz` [aqui](https://github.com/ExMod-Team/EXILED/releases)** (SSH: clique com o botão direito do mouse para copiar o link do `Exiled.tar.gz` e então digite: **`wget (link_para_baixar)`**) + - **Tenha certeza** de que você está conectado ao usuário que executa os servidores de SCP. + - Baixe o **`Exiled.tar.gz` [daqui](https://github.com/ExMod-Team/EXILED/releases)** (SSH: clique com o botão direito do mouse para receber o link do `Exiled.tar.gz` e então digite: **`wget (link_para_baixar)`**) - Para extraí-lo à sua pasta atual, digite **``tar -xzvf EXILED.tar.gz``** - -> [!CAUTION] -> As pastas precisam ir para o diretório ``~/.config``, e ***NÃO*** ``~/.config/SCP Secret Laboratory``* - - - Mova a pasta **`EXILED`** para **``~/.config``**. (SSH: **`mv EXILED ~/.config/`**) - - Mova a pasta **`SCP Secret Laboratory`** para **``~/.config``**. (SSH: **`mv "SCP Secret Laboratory" ~/.config/`**) + - Mova a pasta **`EXILED`** para **``~/.config``**. *Nota: Esta pasta precisa ir ao diretório ``~/.config``, e ***NÃO*** ``~/.config/SCP Secret Laboratory``* (SSH: **`mv EXILED ~/.config/`**) + - Mova a pasta **`SCP Secret Laboratory`** para **``~/.config``**. *Nota: Esta pasta precisa ir ao diretório ``~/.config``, e ***NÃO*** ``~/.config/SCP Secret Laboratory``* (SSH: **`mv SCP Secret Laboratory ~/.config/`**) ### Instalando plug-ins -O EXILED agora deve estar instalado e ativo na próxima vez que você inicializar seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins em **[nosso servidor do Discord](https://discord.gg/PyUkWTg)!** +É isso, o EXILED agora deve estar instalado e ativo na próxima vez que você inicializar seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins no **[nosso servidor do Discord](https://discord.gg/PyUkWTg)** - Para instalar um plug-in, basta: - Baixar um plug-in da [página de lançamento *deles*](https://i.imgur.com/u34wgPD.jpg) (**DEVE ser um `.dll`!**) - - Mova-o para: ``~/.config/EXILED/Plugins`` (se você utiliza SSH como root, procure pela `.config` correta, que estará dentro de `/home/(Usuário do Servidor de SCP)`) + - Mova-o para: ``~/.config/EXILED/Plugins`` (se você utiliza SSH como root, então procure pela `.config` correta, que estará dentro de `/home/(Usuário do Servidor de SCP)`) # Configuração O EXILED por si só oferece algumas opções de configuração. Todas elas são geradas automaticamente na inicialização do servidor e estão localizadas no arquivo ``~/.config/EXILED/Configs/(PortaDoServidorAqui)-config.yml`` (``%AppData%\EXILED\Configs\(PortaDoServidorAqui)-config.yml`` no Windows). -As configurações dos plug-ins ***NÃO*** estarão no arquivo ``config_gameplay.txt``! -Em vez disso, você encontrará no arquivo ``~/.config/EXILED/Configs/(porta_do_servidor)-config.yml`` (``%AppData%\EXILED\Configs\(porta_do_servidor)-config.yml`` no Windows). - -> [!NOTE] -> Em versões mais recentes do EXILED, as configs dos plug-ins foram movidas para pastas próprias: ``EXILED\Configs\(nome_do_plugin)``. Você pode mudar esse comportamento -> editando a configuração do Loader em: ``SCP Secret Laboratory\LabAPI\configs\global\Exiled.Loader`` (ou ``SCP Secret Laboratory\LabAPI\configs\(porta_do_servidor)\Exiled.Loader``) - -No entanto, alguns plug-ins podem gerar suas configurações em outros locais por conta própria. Este é simplesmente o local padrão do EXILED para esses arquivos, portanto, consulte o criador do plug-in se houver problemas. +As configurações do plug-in ***NÃO*** estarão no arquivo ``config_gameplay.txt`` supracitado, em vez disso, as configurações do plug-in são definidas no arquivo ``~/.config/EXILED/Configs/(PortaDoServidor)-config.yml`` (``%AppData%\EXILED\(PortaDoServidor)-config.yml`` no Windows). +No entanto, alguns plug-ins podem obter suas configurações de outros locais por conta própria. Esta é simplesmente a localização padrão do EXILED para eles, portanto, consulte o criador do plug-in se houver problemas. # Para Desenvolvedores -Se você deseja fazer um plug-in com o EXILED, é bem simples. Caso queira ver um tutorial, visite nosso [Manual de Instruções.](GettingStarted-BR.md) +Se você deseja fazer um plug-in ao EXILED, é bem simples de fazê-lo. Se você quiser ver algum tipo de tutorial, visite nosso [Manual de Instruções.](GettingStarted-BR.md) Para tutoriais mais abrangentes e ativamente atualizados, consulte [o site da EXILED](https://exmod-team.github.io/EXILED/). Mas certifique-se de seguir estas regras ao publicar seus plug-ins: - Seu plug-in deve conter uma classe herdada de ``Exiled.API.Features.Plugin<>``, caso contrário, o EXILED não carregará seu plug-in quando o servidor iniciar. - - Quando um plug-in é carregado, o código dentro do método ``OnEnabled()`` da classe é chamado imediatamente (Dependendo do ``Exiled.API.Features.Plugin<>::PluginPriority``) - - Se você precisar acessar algo que ainda não foi inicializado antes do carregamento do plug-in, recomendamos simplesmente ouvir o evento ``WaitingForPlayers``. Se por algum motivo você precisar fazer isso antes, coloque o código dentro de um loop ```while (!x)``` onde verifica se a variável/objeto que você precisa não é mais *null* antes de continuar. + - Quando um plug-in é carregado, o código dentro do método ``OnEnabled()`` da classe supracitada é acionado imediatamente, ele não espera que outros plug-ins sejam carregados. Ele não espera a conclusão do processo de inicialização do servidor. ***Ele não espera por nada.*** Ao configurar seu método ``OnEnable()``, certifique-se de não estar acessando coisas que ainda não foram inicializadas pelo servidor, como ``ServerConsole.Port``, ou ``PlayerManager.localPlayer``. + - Se você precisar acessar coisas que não foram inicializadas antes do carregamento do plug-in, é recomendável simplesmente aguardar o evento ``WaitingForPlayers`` para fazê-lo, se por algum motivo precisar fazer as coisas antes, envolva o código em um loop ``` while(!x)``` que verifica se a variável/objeto que você precisa não é mais *null* antes de continuar. - O EXILED suporta o recarregamento dinâmico de Assemblies de plug-ins no meio da execução. Isso significa que, se você precisar atualizar um plug-in, isso pode ser feito sem reiniciar o servidor, no entanto, se você estiver atualizando um plug-in no meio da execução, o plug-in precisa ser configurado corretamente para suportá-lo, ou você terá um sério problema. Consulte a seção ``Atualizações Dinâmicas`` para mais informações e orientações a seguir. - - **NÃO** há evento OnUpdate, OnFixedUpdate ou OnLateUpdate no EXILED. Se você precisar, por algum motivo, executar o código com frequência, poderá usar uma corrotina MEC que espera por um quadro, 0.01f, ou usar um segmento de Timing como ``Timing.FixedUpdate``. + - **NÃO** há evento OnUpdate, OnFixedUpdate ou OnLateUpdate no EXILED. Se você precisar, por algum motivo, executar o código com frequência, poderá usar uma corrotina MEC que espera por um quadro, 0.01f, ou usar uma camada de Timing como Timing.FixedUpdate. ### Desativando patches de evento do EXILED ***Atualmente, esta função não está mais implementada.*** -### Corrotinas do MEC +### Corrotinas MEC Se você não estiver familiarizado com o MEC, este será um guia muito breve e simples para você começar. -As corrotinas do MEC são basicamente métodos temporizados que suportam períodos de espera antes de continuar a execução, sem interromper/suspender a thread principal do jogo. -Elas são seguras para usar com o Unity, ao contrário do threading tradicional. ***NÃO tente criar NOVAS THREADS para interagir com o Unity, isso irá travar o servidor!!!*** +Corrotinas MEC são basicamente métodos cronometrados que suportam períodos de espera antes de continuar a execução, sem interromper/suspender o alinhamento (thread) principal do jogo. +As corrotinas MEC são seguras para usar com o Unity, ao contrário do alinhamento tradicional. ***NÃO tente criar novos alinhamentos para interagir com o Unity, eles VÃO travar o servidor.*** Para usar o MEC, você precisará referenciar ``Assembly-CSharp-firstpass.dll`` dos arquivos do servidor e incluir ``using MEC;``. -Exemplo de criação de uma corrotina simples, que se repete com um atraso a cada ciclo: +Exemplo de chamada de uma corrotina simples, que se repete com um atraso entre cada ciclo: ```cs using MEC; using Exiled.API.Features; @@ -132,24 +116,24 @@ public IEnumerator MyCoroutine() { for (;;) //Repete o evento seguinte por tempo indefinido { - Log.Info("Ei, eu sou um ciclo infinito!"); // Usado para reproduzir uma linha nos registros do console/servidor do jogo. + Log.Info("Ei, eu sou um ciclo infinito!"); //Designar Log.Info para reproduzir uma linha nos registros do console/servidor do jogo. yield return Timing.WaitForSeconds(5f); //Diz à corrotina para esperar 5 segundos antes de continuar, e quando está no final do ciclo, efetivamente interrompe a repetição do ciclo por 5 segundos. } } ``` -É **altamente** recomendável que você pesquise no Google ou pergunte no Discord se não estiver familiarizado com o MEC e quiser aprender mais, obter conselhos ou precisar de ajuda. As perguntas, não importa o quão 'estúpidas' sejam, sempre serão respondidas da maneira mais útil e clara possível. Um bom código é melhor para todos. +É **altamente** recomendável que você pesquise no Google ou pergunte no Discord se não estiver familiarizado com o MEC e quiser aprender mais, obter conselhos ou precisar de ajuda. As perguntas, não importa o quão 'estúpidas' sejam, sempre serão respondidas da maneira mais útil e clara possível para que os desenvolvedores de plug-ins se destaquem. Um bom código é melhor para todos. ### Atualizações Dinâmicas -O EXILED como uma estrutura suporta o recarregamento dinâmico de Assemblies de plug-ins sem precisar reiniciar o servidor. -Por exemplo, apenas com `Exiled.Events` como o único plug-in e depois você deseja adicionar um novo, não será necessário reiniciar o servidor. Você pode simplesmente usar o comando do RemoteAdmin/ServerConsole `reload plugins` para recarregar todos os plug-ins do EXILED, incluindo os novos que não foram carregados antes. +O EXILED como uma estrutura suporta o recarregamento dinâmico de Assemblies de plug-ins sem exigir uma reinicialização do servidor. +Por exemplo, se você iniciar o servidor apenas com `Exiled.Events` como o único plug-in e desejar adicionar um novo, não será necessário reiniciar o servidor para concluir esta tarefa. Você pode simplesmente usar o comando do RemoteAdmin/ServerConsole `reload plugins` para recarregar todos os plug-ins do EXILED, incluindo os novos que não foram carregados antes. Isso também significa que você pode *atualizar* os plug-ins sem precisar reinicializar totalmente o servidor. No entanto, existem algumas diretrizes que devem ser seguidas pelo desenvolvedor do plug-in para que isso seja realizado corretamente: ***Para Hosters*** - Se você estiver atualizando um plug-in, certifique-se de que o nome do Assembly não seja o mesmo da versão atual que você instalou (se houver uma). O plug-in deve ser construído pelo desenvolvedor com atualizações dinâmicas em mente para que isso funcione, simplesmente renomear o arquivo não basta. - Se o plug-in suporta Atualizações Dinâmicas, certifique-se de que, ao colocar a versão mais recente do plug-in na pasta "Plugins", você também remova a versão mais antiga da pasta, antes de recarregar o EXILED; a falha em garantir isso resultará em muitos problemas indesejados. - - Quaisquer problemas decorrentes da Atualização Dinâmica de um plug-in são de sua exclusiva responsabilidade e do desenvolvedor do plug-in em questão. Embora o EXILED suporte e incentive totalmente as Atualizações Dinâmicas, a única maneira de isso falhar ou dar errado é se o dono do servidor ou o desenvolvedor do plug-in fizer algo errado. Verifique três vezes se tudo foi feito corretamente por ambas as partes antes de relatar um erro aos desenvolvedores da EXILED em relação às Atualizações Dinâmicas. + - Quaisquer problemas decorrentes da Atualização Dinâmica de um plug-in são de sua exclusiva responsabilidade e do desenvolvedor do plug-in em questão. Embora o EXILED suporte e incentive totalmente as Atualizações Dinâmicas, a única maneira de isso falhar ou dar errado é se o anfitrião do servidor ou o desenvolvedor do plug-in fizer algo errado. Verifique três vezes se tudo foi feito corretamente por ambas as partes antes de relatar um erro aos desenvolvedores da EXILED em relação às Atualizações Dinâmicas. ***Para Desenvolvedores*** @@ -157,14 +141,14 @@ Isso também significa que você pode *atualizar* os plug-ins sem precisar reini - Os plug-ins que possuem patches personalizados do Harmony devem usar algum tipo de variável mutável no nome da instância do Harmony e devem usar UnPatchAll() em sua instância do Harmony quando o plug-in for desativado ou recarregado. - Quaisquer corrotinas iniciadas pelo plug-in em ``OnEnabled()`` também devem ser eliminadas quando o plug-in for desativado ou recarregado. -Tudo isso pode ser realizado nos métodos ``OnReloaded()`` ou ``OnDisabled()`` na classe do plug-in. Quando o EXILED recarrega os plug-ins, ele chama ``OnDisabled()``, então ``OnReloaded()``, então ele carregará nos novos Assemblies, e então executará ``OnEnabled()``. +Tudo isso pode ser realizado nos métodos ``OnReloaded()`` ou ``OnDisabled()`` na classe do plug-in. Quando o EXILED recarrega os plug-ins, ele designa OnDisabled(), então ``OnReloaded()``, então ele carregará nos novos Assemblies, e então executará ``OnEnabled()``. Observe que eu disse *novos* Assemblies. Se você substituir um Assembly por outro com o mesmo nome, ele ***NÃO*** será atualizado. Isso se deve ao GAC (Global Assembly Cache), se você tentar 'carregar' um Assembly que já está no cache, ele sempre usará o Assembly em cache. Por esse motivo, se o seu plug-in oferecer suporte a Atualizações Dinâmicas, você deverá criar cada versão com um nome de Assembly diferente nas opções de compilação (renomear o arquivo não funcionará). Além disso, como o Assembly antigo não é "destruído" quando não é mais necessário, se você não cancelar a assinatura de eventos, desfazer o patch de sua instância de Harmony, eliminar corrotinas, etc., esse código continuará a ser executado, bem como o código da nova versão. -Esta é uma situação muito ruim para se deixar acontecer. +Esta é uma péssima, bem péssima situação para se deixar ocorrer. -Como tal, os plug-ins que oferecem suporte a Atualizações Dinâmicas ***DEVEM*** seguir estas diretrizes ou serão removidos do servidor do Discord devido ao risco potencial para os donos de servidor. +Como tal, os plug-ins que oferecem suporte a Atualizações Dinâmicas ***DEVEM*** seguir estas diretrizes ou serão removidos do servidor do Discord devido ao risco potencial para os anfitriões de servidor. -Mas nem todo plug-in tem de oferecer suporte a Atualizações Dinâmicas. Se você não pretende oferecer suporte a Atualizações Dinâmicas, tudo bem, simplesmente não altere o nome do Assembly do seu plug-in ao criar uma nova versão e não precisará se preocupar com nada disso, apenas certifique-se de que os donos de servidor saibam que eles precisarão reinicializar completamente seus servidores para atualizar seu plug-in. +Mas nem todo plug-in tem de oferecer suporte a Atualizações Dinâmicas. Se você não pretende oferecer suporte a Atualizações Dinâmicas, tudo bem, simplesmente não altere o nome do Assembly do seu plug-in ao criar uma nova versão e não precisará se preocupar com nada disso, apenas certifique-se de que os anfitriões de servidor saibam que eles precisarão reinicializar completamente seus servidores para atualizar seu plug-in. -**Tradução para o português feita por**: *Unbistrackted* e *Firething* +**Tradução brasileira feita por**: *Firething* diff --git a/.github/documentation/localization/README-FR.md b/.github/documentation/localization/README-FR.md index 8e24f5f5b5..33ce9dbc25 100644 --- a/.github/documentation/localization/README-FR.md +++ b/.github/documentation/localization/README-FR.md @@ -30,7 +30,7 @@ Si vous choisissez d'utiliser l'installateur, il se chargera, s'il est exécuté - Placez-le dans le dossier de votre serveur (téléchargez le serveur dédié si vous ne l'avez pas encore fait) - Double-cliquez sur **`Exiled.Installer.exe`** ou **[téléchargez ce .bat](https://www.dropbox.com/scl/fi/7yh0r3q0vdn6ic4rhuu3l/install-prerelease.bat?rlkey=99fwjbwy1xg61qgtak0qzb9rd&st=8xs4xks8&dl=1)** et placez-le dans le dossier du serveur pour installer la dernière pré-version - Pour obtenir et installer des plugins, consultez la section [installation de plugin](#installation-de-plugin) ci-dessous. -**Note:** Si vous installez EXILED sur un serveur distant, assurez-vous d'exécuter le .exe avec le même utilisateur qui exécute vos serveurs SCP:SL (ou un utilisateur avec des privilèges d'administration) +**Note:** Si vous installez EXILED sur un serveur distant, assurez-vous d'exécuter le .exe avec même utilisateur qui exécute vos serveurs SCP:SL (ou un utilisateur avec des privilèges d'administration) ### Installation manuelle - Téléchargez **`Exiled.tar.gz` [ici](https://github.com/ExMod-Team/EXILED/releases)** @@ -67,13 +67,13 @@ C'est tout, EXILED devrait maintenant être installé et actif la prochaine fois - Déplacez le dossier **`SCP Secret Laboratory`** vers **``~/.config``**. *Remarque : Ce dossier doit être placé dans ``~/.config``, et ***NON*** ``~/.config/SCP Secret Laboratory``* (SSH: **`mv SCP Secret Laboratory ~/.config/`**) ### Installation de plugins -C'est tout, EXILED devrait maintenant être installé et actif la prochaine fois que vous démarrez votre serveur. Notez qu'EXILED par lui-même ne fera presque rien, alors assurez-vous d'obtenir des plugins depuis **[notre serveur Discord](https://discord.gg/PyUkWTg)** +C'est tout, EXILED devrait maintenant être installé et actif la prochaine fois que vous démarrez votre serveur. Notez qu'EXILED par lui-même ne fera presque rien, alors assurez-vous d'obtenir des plugins depuis **[depuis notre serveur Discord](https://discord.gg/PyUkWTg)** - Pour installer un plugin, simplement : - Téléchargez un plugin depuis [*sa page de release*](https://i.imgur.com/u34wgPD.jpg) (**il DOIT s'agir d'un fichier `.dll`!**) - Déplacez-le vers: ``~/.config/EXILED/Plugins`` (si vous utilisez SSH en tant que root, alors recherchez le `.config` correct qui sera à l'intérieur de `/home/(SCP Server User)`) # Config -EXILED offre quelques options de configuration. +EXILED quelques options de configuration. Toutes sont générées automatiquement au démarrage du serveur et se trouvent dans le fichier ``~/.config/EXILED/Configs/(ServerPortHere)-config.yml`` (``%AppData%\EXILED\Configs\(ServerPortHere)-config.yml`` sur Windows). Les configurations des plugins ***NE seront PAS*** dans le fichier ``config_gameplay.txt`` mentionné précédemment. Au lieu de cela, les configurations des plugins sont définies dans le fichier ``~/.config/EXILED/Configs/(ServerPortHere)-config.yml`` (``%AppData%\EXILED\(ServerPortHere)-config.yml`` sur Windows). @@ -87,14 +87,14 @@ Pour des tutoriels plus complets et régulièrement mis à jour, consultez [le s Mais veuillez faire attention à suivre les règles suivantes lorsque vous publiez vos plugins : -- Votre plugin doit contenir une classe héritant de ``Exiled.API.Features.Plugin<>``, sinon EXILED ne chargera pas votre plugin lorsque le serveur démarrera. +- Votre plugin doit contenir une classe appartenant à ``Exiled.API.Features.Plugin<>``, sinon EXILED ne chargera pas votre plugin lorsque le serveur démarrera. - Lorsqu'un plugin est chargé, le code de la classe mentionnée précédemment dans ``OnEnabled()`` est immédiatement exécuté et n'attend pas que les autres plugins soient chargés. Il n'attend pas non plus que le démarrage du serveur soit terminé. ***Il n'attend rien du tout.*** Lors de la mise en place de votre méthode ``OnEnabled()``, assurez-vous de ne pas accéder à des choses qui ne devraient pas être démarrées par le serveur à ce moment-là, comme par exemple ``ServerConsole.Port``, ou ``PlayerManager.localPlayer``. - Si vous avez besoin d'accéder à certaines choses avant que votre plugin ne soit chargé, il est recommandé d'attendre l'événement ``WaitingForPlayers`` pour cela. Sinon, encadrez votre code d'une boucle ``while(!x)`` qui vérifie si votre variable/objet qui a besoin de ne plus être ``NULL`` avant de continuer. -- EXILED prend en charge le rechargement dynamique des assembly de plugins en cours d'exécution, ce qui signifie que si vous devez mettre à jour un plugin, cela peut être fait sans redémarrer le serveur. Cependant, si vous mettez à jour un plugin en cours d'exécution, le plugin doit être correctement configuré pour le prendre en charge, sinon vous rencontrerez des problèmes. Consultez la section [Mises à jour dynamiques](#mises-à-jour-dynamiques) pour plus d'informations et de directives à suivre. +- EXILED prend en charge le rechargement dynamique des assembly de plugins en cours d'exécution, ce qui signifie que si vous devez mettre à jour un plugin, cela peut être fait sans redémarrer le serveur. Cependant, si vous mettez à jour un plugin en cours d'exécution, le plugin doit être correctement configuré pour le prendre en charge, sinon vous rencontrerez des problèmes. Consultez la section [Mise à jour Dynamiques](#mise-a-jour-dynamiques) pour plus d'informations et de directives à suivre. - Il n'y a ***AUCUN*** événement ``OnUpdate``, ``OnFixedUpdate`` ou ``OnLateUpdate`` dans EXILED. Si vous devez exécuter du code aussi souvent, vous pouvez utiliser des coroutines de MEC (ou More Effective Coroutines) qui attendent une frame, 0.01f, ou utiliser une couche de synchronisation comme ``Timing.FixedUpdate`` à la place. ### Les coroutines de MEC -Si vous n'êtes pas familier avec MEC, voici une brève et simple introduction pour vous aider à démarrer. -Les coroutines MEC sont essentiellement des méthodes chronométrées qui prennent en charge des périodes d'attente avant de poursuivre l'exécution, sans interrompre ni mettre en pause le thread principal du jeu. +Si vous n'êtes pas familier avec MEC, voici une breve et simple explication pour vous aider à démarrer. +Les coroutines MEC sont essentiellement des méthodes chronométrées qui prennent en charge des périodes d'attente avant de poursuivre l'exécution, sans interrompre/pausé le thread principal du jeu. Les coroutines MEC sont sûres à utiliser avec Unity, contrairement au threading traditionnel. ***NE TENTEZ PAS de créer de nouveaux threads pour interagir avec Unity, cela FERA planter le serveur.*** Pour utiliser MEC, vous devrez référencer ``Assembly-CSharp-firstpass.dll`` depuis les fichiers du serveur et inclure ``using MEC;``. @@ -111,9 +111,9 @@ public void SomeMethod() public IEnumerator MyCoroutine() { - for (;;) //répète ce qui suit indéfiniment + for (;;) //fonctione infinie { - Log.Info("Hey, je suis une boucle infinie!"); //appel à Log.Info pour écrire une ligne sur la console du serveur. + Log.Info("Hey Je suis une boucle infini!"); //appel à Log.Info pour écrire une ligne sur la console du serveur. yield return Timing.WaitForSeconds(5f); //Dit à la coroutine d'attendre 5 secondes avant de continuer. Comme c'est à la fin de la boucle, cela empêche effectivement la boucle de se répéter pendant 5 secondes. } } @@ -121,7 +121,7 @@ public IEnumerator MyCoroutine() Il est ***fortement*** recommandé de faire quelques recherches sur Google ou de demander autour de vous sur Discord si vous n'êtes pas familier avec MEC et que vous souhaitez en apprendre d'avantage, obtenir des conseils ou de l'aide. Les questions, aussi 'bêtes' soient-elles, seront toujours répondues de manière aussi utile et claire que possible pour aider les développeurs de plugins à exceller. Un meilleur code profite à tout le monde. -### Mises à jour dynamiques +### Mise a jour Dynamiques EXILED en tant que framework prend en charge le rechargement dynamique des assembly de plugins sans nécessité de redémarrage du serveur. Par exemple, si vous démarrez le serveur avec juste ``Exiled.Events`` comme seul plugin, et que vous souhaitez en ajouter un nouveau, vous n'avez pas besoin de redémarrer le serveur pour accomplir cette tâche. Vous pouvez simplement utiliser la commande de la console à distance ou de la console du serveur ``reload plugins`` pour recharger tous les plugins EXILED, y compris les nouveaux qui n'ont pas été chargés auparavant. @@ -137,7 +137,7 @@ Cela signifie également que vous pouvez *mettre à jour* les plugins sans avoir - Les plugins comportant des patches ``Harmony`` personnalisés doivent utiliser une sorte de variable changeante dans le nom de l'instance ``Harmony``, et doivent appeler ``UnPatchAll()`` sur leur instance Harmony lorsque le plugin est désactivé ou rechargé. - Toutes les coroutines démarrées par le plugin dans ``OnEnabled()`` doivent également être arrêtées lorsque le plugin est désactivé ou rechargé. -Tout cela peut être réalisé dans les méthodes ``OnReloaded()`` ou ``OnDisabled()`` de la classe du plugin. Lorsque EXILED recharge les plugins, il appelle ``OnDisabled()``, puis ``OnReloaded()``, puis il chargera les nouvelles assembly, et ensuite exécutera ``OnEnabled()``. +Tout cela peut être réalisé dans les méthodes ``OnReloaded()`` ou ``OnDisabled()`` de la classe du plugin. Lorsque EXILED, recharge les plugins, il appelle ``OnDisabled()``, puis ``OnReloaded()``, puis il chargera les nouvelles assembly, et ensuite exécutera ``OnEnabled()``. Notez qu'il s'agit de *nouvelles* assembly. Si vous remplacez une ``assembly`` par une autre portant le même nom, elle ne sera ***PAS*** mise à jour. Cela est dû au GAC (Global Assembly Cache) ; si vous tentez de "charger" une ``assembly`` qui est déjà en cache, elle utilisera toujours l'``assembly`` mise en cache. Pour cette raison, si votre plugin prend en charge les mises à jour dynamiques, vous devez construire chaque version avec un nom d'``assembly`` différent dans les options choisis (renommer le fichier ne fonctionnera pas). De plus, étant donné que l'ancienne ``assembly`` n'est pas "supprimé" lorsqu'elle n'est plus nécessaire, si vous ne vous désabonnez pas des événements, ne démontez pas votre instance ``Harmony``, n'arrêtez pas les coroutines, etc. Ce code continuera également à s'exécuter ainsi que celui de la nouvelle version. diff --git a/EXILED/.editorconfig b/EXILED/.editorconfig index e5ab37f77f..b64d58c275 100644 --- a/EXILED/.editorconfig +++ b/EXILED/.editorconfig @@ -19,37 +19,10 @@ ij_wrap_on_typing = false csharp_style_var_for_built_in_types = false:error csharp_style_var_when_type_is_apparent = false:error csharp_style_var_elsewhere = false:error -dotnet_diagnostic.IDE0005.severity = warning -dotnet_diagnostic.IDE0017.severity = warning -dotnet_diagnostic.IDE0019.severity = warning -dotnet_diagnostic.IDE0031.severity = warning -dotnet_diagnostic.IDE0048.severity = warning -dotnet_diagnostic.IDE0055.severity = warning -dotnet_diagnostic.IDE0060.severity = warning -dotnet_diagnostic.IDE0074.severity = warning -dotnet_diagnostic.IDE0079.severity = warning -dotnet_diagnostic.IDE0090.severity = warning -dotnet_diagnostic.IDE0200.severity = warning -dotnet_diagnostic.IDE0350.severity = warning -dotnet_diagnostic.IDE0370.severity = warning - -dotnet_diagnostic.IDE0028.severity = none -dotnet_diagnostic.IDE0034.severity = none -dotnet_diagnostic.IDE0056.severity = none -dotnet_diagnostic.IDE0057.severity = none -dotnet_diagnostic.IDE0290.severity = none -dotnet_diagnostic.IDE0300.severity = none -dotnet_diagnostic.IDE0301.severity = none -dotnet_diagnostic.IDE0302.severity = none -dotnet_diagnostic.IDE0303.severity = none -dotnet_diagnostic.IDE0304.severity = none dotnet_diagnostic.IDE0305.severity = none -dotnet_diagnostic.IDE0306.severity = none -dotnet_diagnostic.IDE0340.severity = none -dotnet_sort_system_directives_first = true -dotnet_separate_import_directive_groups = true -csharp_using_directive_placement = inside_namespace +# ReSharper properties +resharper_csharp_max_line_length = 400 [*.properties] ij_properties_align_group_field_declarations = false diff --git a/EXILED/EXILED.props b/EXILED/EXILED.props index 9b69d1bb48..052935a2c5 100644 --- a/EXILED/EXILED.props +++ b/EXILED/EXILED.props @@ -20,7 +20,7 @@ false 2.4.2 - 1.2.0-beta.556 + 1.1.118 2.0.2 Copyright © $(Authors) 2020 - $([System.DateTime]::Now.ToString("yyyy")) @@ -35,7 +35,6 @@ True True - True Portable diff --git a/EXILED/Exiled.API/Enums/AmmoType.cs b/EXILED/Exiled.API/Enums/AmmoType.cs index 5a9b19f74a..506d3067de 100644 --- a/EXILED/Exiled.API/Enums/AmmoType.cs +++ b/EXILED/Exiled.API/Enums/AmmoType.cs @@ -40,13 +40,13 @@ public enum AmmoType /// /// 12 gauge shotgun ammo. - /// Used by . + /// Used by /// Ammo12Gauge, /// /// 44 Caliber Revolver Ammo - /// Used by . + /// Used by /// Ammo44Cal, } diff --git a/EXILED/Exiled.API/Enums/AspectRatioType.cs b/EXILED/Exiled.API/Enums/AspectRatioType.cs index 65d6005749..79e4f4c96e 100644 --- a/EXILED/Exiled.API/Enums/AspectRatioType.cs +++ b/EXILED/Exiled.API/Enums/AspectRatioType.cs @@ -57,4 +57,4 @@ public enum AspectRatioType : byte /// Ratio32_9, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/CameraType.cs b/EXILED/Exiled.API/Enums/CameraType.cs index eb18b59633..292da90b2d 100644 --- a/EXILED/Exiled.API/Enums/CameraType.cs +++ b/EXILED/Exiled.API/Enums/CameraType.cs @@ -166,4 +166,4 @@ public enum CameraType HczLoadingBayStairwell, #endregion } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/DamageType.cs b/EXILED/Exiled.API/Enums/DamageType.cs index 28c399b4e3..bb6f2524d5 100644 --- a/EXILED/Exiled.API/Enums/DamageType.cs +++ b/EXILED/Exiled.API/Enums/DamageType.cs @@ -240,7 +240,7 @@ public enum DamageType A7, /// - /// Damage caused by . + /// Damage caused by /// Scp3114, @@ -289,4 +289,4 @@ public enum DamageType /// Scp1509, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/DanceType.cs b/EXILED/Exiled.API/Enums/DanceType.cs index 94f5eaac16..685c01ed00 100644 --- a/EXILED/Exiled.API/Enums/DanceType.cs +++ b/EXILED/Exiled.API/Enums/DanceType.cs @@ -48,7 +48,7 @@ public enum DanceType : byte Swing, /// - /// None. + /// Dance1 /// None = byte.MaxValue, } diff --git a/EXILED/Exiled.API/Enums/DecontaminationState.cs b/EXILED/Exiled.API/Enums/DecontaminationState.cs index d821f75a5d..c415a6750e 100644 --- a/EXILED/Exiled.API/Enums/DecontaminationState.cs +++ b/EXILED/Exiled.API/Enums/DecontaminationState.cs @@ -7,6 +7,8 @@ namespace Exiled.API.Enums { + using System; + using Features; /// @@ -55,4 +57,4 @@ public enum DecontaminationState /// Finish, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/DoorLockType.cs b/EXILED/Exiled.API/Enums/DoorLockType.cs index 28b5e5447f..b876c24c11 100644 --- a/EXILED/Exiled.API/Enums/DoorLockType.cs +++ b/EXILED/Exiled.API/Enums/DoorLockType.cs @@ -74,4 +74,4 @@ public enum DoorLockType /// Lockdown2176 = 512, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/DoorType.cs b/EXILED/Exiled.API/Enums/DoorType.cs index 2df0eb8973..5e99c32a22 100644 --- a/EXILED/Exiled.API/Enums/DoorType.cs +++ b/EXILED/Exiled.API/Enums/DoorType.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Enums using System; using Exiled.API.Features.Doors; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.API/Enums/EffectCategory.cs b/EXILED/Exiled.API/Enums/EffectCategory.cs index cb8af3a988..c340fca101 100644 --- a/EXILED/Exiled.API/Enums/EffectCategory.cs +++ b/EXILED/Exiled.API/Enums/EffectCategory.cs @@ -39,4 +39,4 @@ public enum EffectCategory /// Harmful = 8, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/EffectType.cs b/EXILED/Exiled.API/Enums/EffectType.cs index 0d2117d223..dc79e7c481 100644 --- a/EXILED/Exiled.API/Enums/EffectType.cs +++ b/EXILED/Exiled.API/Enums/EffectType.cs @@ -24,7 +24,7 @@ public enum EffectType None, /// - /// Prevents the affected player from reloading weapons and using medical items. + /// Prevents the player from reloading weapons and using medical items. /// AmnesiaItems, @@ -34,142 +34,142 @@ public enum EffectType AmnesiaVision, /// - /// Drains the affected player's stamina and then health. + /// Drains the player's stamina and then health. /// Asphyxiated, /// - /// Damages the affected player over time. + /// Damages the player over time. /// Bleeding, /// - /// Blurs the affected player's screen. + /// Make the player screen darker. /// Blindness, /// - /// Increases damage the affected player receives. Does not apply any standalone damage. + /// Increases damage the player receives. Does not apply any standalone damage. /// Burned, /// - /// Blurs the affected player's screen while rotating. + /// Blurs the player's screen while rotating. /// Concussed, /// - /// Effect given to the affected player after being hurt by SCP-106. + /// Effect given to player after being hurt by SCP-106. /// Corroding, /// - /// Muffles the affected player's audio. Does not scale with intensity. + /// Deafens the player. /// Deafened, /// - /// Removes 10% of the affected player's health per second. + /// Removes 10% of the player's health per second. /// Decontaminating, /// - /// Slows down the affected player's movement. + /// Slows down the player's movement. /// Disabled, /// - /// Prevents the affected player from moving. + /// Prevents the player from moving. /// Ensnared, /// - /// Halves the affected player's maximum stamina and stamina regeneration rate. + /// Halves the player's maximum stamina and stamina regeneration rate. /// Exhausted, /// - /// Flashes the affected player. + /// Flashes the player. /// Flashed, /// - /// Drains the affected player's health while sprinting. + /// Drains the player's health while sprinting. /// Hemorrhage, /// - /// Increases the affected player's FOV very slightly, gives infinite stamina and gives the effect of underwater sound. + /// Reduces the player's FOV, gives infinite stamina and gives the effect of underwater sound. /// Invigorated, /// - /// Reduces the affected player's damage taken by body shots. + /// Reduces damage taken by body shots. /// BodyshotReduction, /// - /// Damages the affected player every 5 seconds, starting low and increasing over time, capping out at 20 hp every 5 seconds. + /// Damages the player every 5 seconds, starting low and increasing over time. /// Poisoned, /// - /// Increases the speed of the affected player while also draining health, dependent on how fast the player is moving. + /// Increases the speed of the player while also draining health. /// Scp207, /// - /// Makes the affected player invisible. + /// Makes the player invisible. /// Invisible, /// - /// Slows the affected player's movement speed, adds vignette, and makes the affected player's footsteps the same as SCP106's. + /// Slows down the player's movement with the SCP-106 sinkhole effect. /// SinkHole, /// - /// Reduces the affected player's overall damage taken. + /// Reduces overall damage taken. /// DamageReduction, /// - /// Increases the affected player's movement speed. + /// Increases movement speed. /// MovementBoost, /// - /// Reduces the severity of the affected player's negative effects. + /// Reduces the severity of negative effects. /// RainbowTaste, /// - /// Drops the affected player's current item, disables interaction with objects, spawns hands that drop to the floor, and deals damage while effect is active. + /// Drops the player's current item, disables interaction with objects, and deals damage while effect is active. /// SeveredHands, /// - /// Prevents the affected player from sprinting, plays a sound alongside their every footstep, reduces movement speed by 20%. + /// Prevents the player from sprinting and reduces movement speed by 20%. /// Stained, /// - /// Causes the affected player to gain immunity to certain negative status effects. + /// Causes the player to become gain immunity to certain negative status effects. /// Vitality, /// - /// Cause the affected player to slowly take damage, reduces bullet accuracy, applies a blue vignette, plays a sound effect spanning the entire effect's length, and increases item pickup time. + /// Cause the player to slowly take damage, reduces bullet accuracy, and increases item pickup time. /// Hypothermia, /// - /// Increases the affected player's motor function, causing the affected player to reduce the weapon draw time, reload speed, item pickup speed, and medical item usage. + /// Increases the player's motor function, causing the player to reduce the weapon draw time, reload spead, item pickup speed, and medical item usage. /// Scp1853, /// - /// Effect given to a player after being hurt by SCP-049. Deals 8 damage per second, after an initial 16 damage for the first second. + /// Effect given to player after being hurt by SCP-049. /// CardiacArrest, @@ -184,90 +184,90 @@ public enum EffectType SoundtrackMute, /// - /// Protects the affected player from enemy damage if the config is enabled. + /// Protects players from enemy damage if the config is enabled. /// SpawnProtected, /// - /// All players with the Scp106 role will be able to see the affected player whilst stalking. Causes the affected player's screens to become monochromatic when seeing Scp106. The affected player is instantly killed if attacked by Scp106. + /// Make Scp106 able to see you when he is in the ground (stalking), causes the player's screens to become monochromatic when seeing Scp106, and instantly killed if attacked by Scp106. /// Traumatized, /// - /// Slows the affected player, provides passive health regeneration and passive AHP gain up to 75, and can save the affected player from fatal damage once per effect. + /// It slows down the player, providing a passive health regeneration and saving the player from death once. /// AntiScp207, /// - /// The effect applied by SCP-079's breach scanner. Mutes the affected player's soundtrack. + /// The effect that SCP-079 gives the scanned player with the Breach Scanner. /// Scanned, /// - /// Teleports the affected player to the pocket dimension and drains their health until the affected player escapes the pocket dimension or is killed. The amount of damage received increases the longer the effect is applied. + /// Teleports the player to the pocket dimension and drains health until the player escapes or is killed. The amount of damage recieved increases the longer the effect is applied. /// PocketCorroding, /// - /// Reduces the affected player's own movement sounds by 10% per intensity level. + /// Reduces walking sound by 10%. /// SilentWalk, /// /// Makes you a marshmallow guy. /// - [Obsolete("Only availaible for Halloween")] + // [Obsolete("Not functional in-game")] Marshmallow, /// - /// The effect that is given to the player while getting attacked by SCP-3114's Strangle ability. + /// The effect that is given to the player when getting attacked by SCP-3114's Strangle ability. /// Strangled, /// - /// Allows the affected player to pass through doors. + /// Makes the player nearly invisible, and allows them to pass through doors. /// Ghostly, /// - /// Manipulate which fog type the affected player will have. + /// Manipulate wish Fog player will have. /// You can choose fog with and putting it on intensity. /// FogControl, /// - /// Slows the affected player down by 1% per intensity. + /// . /// Slowness, /// - /// Allows the affected player to see other players through walls, with a slight delay between spurts of viewability. + /// . /// Scp1344, /// - /// Does not blind the affected player. Spawns eyeballs that drop to the floor, and does 10 damage per second. + /// . /// SeveredEyes, /// - /// Immediately kills the affected player with death message "Fatal blunt trauma; the body is badly mutilated and pupled.", and "Reason: Crushed" through console. + /// . /// PitDeath, /// - /// Blurs the affected player's vision. Does not scale with intensity. + /// Blurs the player's screen. /// Blurred, /// - /// Makes the affected player a flamingo . + /// Makes you a flamingo . /// [Obsolete("Only availaible for Christmas and AprilFools.")] BecomingFlamingo, /// - /// Makes the affected player a Child after eating Cake . + /// Makes you a Child after eating Cake . /// [Obsolete("Only availaible for Christmas and AprilFools.")] Scp559, @@ -285,32 +285,32 @@ public enum EffectType Snowed, /// - /// Plays a sound effect to the affected player, and adds purple vignette to the affected player's vision. + /// . /// Scp1344Detected, /// - /// Allows the affected player to speak with players in spectator or overwatch. + /// . /// Scp1576, /// - /// Increases the affected player's jump height. + /// . /// Lightweight, /// - /// Decreases the affected player's jump height. + /// . /// HeavyFooted, /// - /// Makes the affected player transparent, 255 being completely transparent. + /// . /// Fade, /// - /// Allows the affected player to see in dark areas. Does not extend the viewing range. Scales with intensity. + /// . /// NightVision, @@ -387,7 +387,7 @@ public enum EffectType WhiteCandy, /// - /// Gives the affected player 25 non-decaying AHP, and sets their HP to 75 if it was above or at 75, otherwise if <75 keeps current HP. Clearing this effect does not reset their AHP nor HP maximum. + /// . /// Scp1509Resurrected, @@ -397,13 +397,13 @@ public enum EffectType FocusedVision, /// - /// If the affected player has a maximum hume shield, this sets the hume shield to the maximum value. + /// . /// AnomalousRegeneration, /// - /// Allows SCPs to see the affected player from a certain distance. Works on SCPs. + /// . /// AnomalousTarget, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs b/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs index 58ca2ed445..6428cdbc00 100644 --- a/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs +++ b/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs @@ -18,7 +18,7 @@ namespace Exiled.API.Enums public enum EzFacilityLayout { /// - /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occurred. + /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occured. /// Unknown, diff --git a/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs b/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs index 243d0be928..e67bcdbf89 100644 --- a/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs +++ b/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs @@ -18,7 +18,7 @@ namespace Exiled.API.Enums public enum HczFacilityLayout { /// - /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occurred. + /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occured. /// Unknown, diff --git a/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs b/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs index afeadaf22a..0f2f2b027e 100644 --- a/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs +++ b/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs @@ -18,7 +18,7 @@ namespace Exiled.API.Enums public enum LczFacilityLayout { /// - /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occurred. + /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occured. /// Unknown, diff --git a/EXILED/Exiled.API/Enums/FirearmType.cs b/EXILED/Exiled.API/Enums/FirearmType.cs index 7992265e71..05cccf2388 100644 --- a/EXILED/Exiled.API/Enums/FirearmType.cs +++ b/EXILED/Exiled.API/Enums/FirearmType.cs @@ -95,4 +95,4 @@ public enum FirearmType /// Scp127, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/GlassType.cs b/EXILED/Exiled.API/Enums/GlassType.cs index 70056bf02c..fef4d59f44 100644 --- a/EXILED/Exiled.API/Enums/GlassType.cs +++ b/EXILED/Exiled.API/Enums/GlassType.cs @@ -86,7 +86,7 @@ public enum GlassType GateAArmory, /// - /// Represents the window in . + /// Represents the window in /// HczLoadingBay, } diff --git a/EXILED/Exiled.API/Enums/HazardType.cs b/EXILED/Exiled.API/Enums/HazardType.cs index f13dc69d60..43d16dac41 100644 --- a/EXILED/Exiled.API/Enums/HazardType.cs +++ b/EXILED/Exiled.API/Enums/HazardType.cs @@ -30,7 +30,7 @@ public enum HazardType Tantrum, /// - /// Should never happen. + /// Should never happen /// Unknown, } diff --git a/EXILED/Exiled.API/Enums/LayerMasks.cs b/EXILED/Exiled.API/Enums/LayerMasks.cs index 53137d47de..e13683a3a1 100644 --- a/EXILED/Exiled.API/Enums/LayerMasks.cs +++ b/EXILED/Exiled.API/Enums/LayerMasks.cs @@ -84,4 +84,4 @@ public enum LayerMasks InteractionAnticheatMask = Default | Glass | Door | InteractableNoPlayerCollision, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/LeadingTeam.cs b/EXILED/Exiled.API/Enums/LeadingTeam.cs index 23644058ee..b136e854f0 100644 --- a/EXILED/Exiled.API/Enums/LeadingTeam.cs +++ b/EXILED/Exiled.API/Enums/LeadingTeam.cs @@ -45,4 +45,4 @@ public enum LeadingTeam : byte /// Draw, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/LockerType.cs b/EXILED/Exiled.API/Enums/LockerType.cs index 21dbe9f78f..755da9d18f 100644 --- a/EXILED/Exiled.API/Enums/LockerType.cs +++ b/EXILED/Exiled.API/Enums/LockerType.cs @@ -126,4 +126,4 @@ public enum LockerType /// Scp1509Pedestal, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/PingType.cs b/EXILED/Exiled.API/Enums/PingType.cs index 50949d3b93..ab9f8f5fd6 100644 --- a/EXILED/Exiled.API/Enums/PingType.cs +++ b/EXILED/Exiled.API/Enums/PingType.cs @@ -47,4 +47,4 @@ public enum PingType : byte /// Default, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/RespawnEffectType.cs b/EXILED/Exiled.API/Enums/RespawnEffectType.cs index 34ce495b51..672abb1976 100644 --- a/EXILED/Exiled.API/Enums/RespawnEffectType.cs +++ b/EXILED/Exiled.API/Enums/RespawnEffectType.cs @@ -7,6 +7,10 @@ namespace Exiled.API.Enums { + using Features; + + using PlayerRoles; + /// /// Layers game respawn effects. /// diff --git a/EXILED/Exiled.API/Enums/RevolverChamberState.cs b/EXILED/Exiled.API/Enums/RevolverChamberState.cs index 13c0095162..421f18587d 100644 --- a/EXILED/Exiled.API/Enums/RevolverChamberState.cs +++ b/EXILED/Exiled.API/Enums/RevolverChamberState.cs @@ -30,4 +30,4 @@ public enum RevolverChamberState /// Discharged, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/ScenesType.cs b/EXILED/Exiled.API/Enums/ScenesType.cs index c69874f0d0..60691443f9 100644 --- a/EXILED/Exiled.API/Enums/ScenesType.cs +++ b/EXILED/Exiled.API/Enums/ScenesType.cs @@ -19,7 +19,7 @@ public enum ScenesType /// /// The current main menu. - /// ! Will cause crash when trying joining servers !. + /// ! Will cause crash when trying joining servers ! /// NewMainMenu, @@ -35,7 +35,7 @@ public enum ScenesType /// /// The loading Screen. - /// ! Will cause crash when trying joining servers !. + /// ! Will cause crash when trying joining servers ! /// PreLoader, @@ -44,4 +44,4 @@ public enum ScenesType /// Loader, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/Scp939VisibilityState.cs b/EXILED/Exiled.API/Enums/Scp939VisibilityStates.cs similarity index 63% rename from EXILED/Exiled.API/Enums/Scp939VisibilityState.cs rename to EXILED/Exiled.API/Enums/Scp939VisibilityStates.cs index 7d6a9b2811..d9be0eadc8 100644 --- a/EXILED/Exiled.API/Enums/Scp939VisibilityState.cs +++ b/EXILED/Exiled.API/Enums/Scp939VisibilityStates.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. // @@ -15,33 +15,33 @@ namespace Exiled.API.Enums public enum Scp939VisibilityState { /// - /// SCP-939 doesn't see another player, by default FPC role logic. + /// SCP-939 doesnt see an other player, by default FPC role logic. /// None, /// - /// SCP-939 doesn't see a player, by basic SCP-939 logic. + /// SCP-939 doesnt see an player, by basic SCP-939 logic. /// NotSeen, /// - /// SCP-939 sees another player, who is teammate SCP. + /// SCP-939 sees an other player, who is teammate SCP. /// SeenAsScp, /// - /// SCP-939 sees another player due the Alpha Warhead detonation. + /// SCP-939 sees an other player due the Alpha Warhead detonation. /// SeenByDetonation, /// - /// SCP-939 sees another player, due the base-game vision range logic. + /// SCP-939 sees an other player, due the base-game vision range logic. /// SeenByRange, /// - /// SCP-939 sees another player for a while, after it's out of range. + /// SCP-939 sees an other player for a while, after it's out of range. /// SeenByLastTime, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/SpawnLocationType.cs b/EXILED/Exiled.API/Enums/SpawnLocationType.cs index 4752396e34..2fc9d2a780 100644 --- a/EXILED/Exiled.API/Enums/SpawnLocationType.cs +++ b/EXILED/Exiled.API/Enums/SpawnLocationType.cs @@ -152,27 +152,27 @@ public enum SpawnLocationType InsideGr18Glass, /// - /// Inside 106's Primary Door. + /// Inside 106's Primary Door /// Inside106Primary, /// - /// Inside 106's Secondary Door. + /// Inside 106's Secondary Door /// Inside106Secondary, /// - /// Inside 939 Cryo Chamber. + /// Inside 939 Cryo Chamber /// Inside939Cryo, /// - /// Inside SCP-079's Armory. + /// Inside SCP-079's Armory /// Inside079Armory, /// - /// Inside SCP-127's Lab. + /// Inside SCP-127's Lab /// Inside127Lab, diff --git a/EXILED/Exiled.API/Enums/UncuffReason.cs b/EXILED/Exiled.API/Enums/UncuffReason.cs index 1cf4bd6961..977ad09fe1 100644 --- a/EXILED/Exiled.API/Enums/UncuffReason.cs +++ b/EXILED/Exiled.API/Enums/UncuffReason.cs @@ -27,4 +27,4 @@ public enum UncuffReason /// CufferDied, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/UsableRippleType.cs b/EXILED/Exiled.API/Enums/UsableRippleType.cs index cef62046c7..1abc6936f8 100644 --- a/EXILED/Exiled.API/Enums/UsableRippleType.cs +++ b/EXILED/Exiled.API/Enums/UsableRippleType.cs @@ -23,4 +23,4 @@ public enum UsableRippleType /// Footstep, } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Enums/ZoneType.cs b/EXILED/Exiled.API/Enums/ZoneType.cs index ab2e7f38a2..382833528c 100644 --- a/EXILED/Exiled.API/Enums/ZoneType.cs +++ b/EXILED/Exiled.API/Enums/ZoneType.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Enums using System; using Exiled.API.Features.Doors; - using Features; /// diff --git a/EXILED/Exiled.API/Extensions/CommonExtensions.cs b/EXILED/Exiled.API/Extensions/CommonExtensions.cs index f44f9a14ab..6b175fc281 100644 --- a/EXILED/Exiled.API/Extensions/CommonExtensions.cs +++ b/EXILED/Exiled.API/Extensions/CommonExtensions.cs @@ -80,4 +80,4 @@ public static AnimationCurve Add(this AnimationCurve curve, float amount) return curve; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs b/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs index dc32e86cf6..8c06d82d0d 100644 --- a/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs +++ b/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs @@ -11,14 +11,10 @@ namespace Exiled.API.Extensions using System.Linq; using Enums; - using Features; - using InventorySystem.Items.Scp1509; - using PlayerRoles.PlayableScps.Scp1507; using PlayerRoles.PlayableScps.Scp3114; - using PlayerStatsSystem; /// @@ -215,4 +211,4 @@ public static DamageType GetDamageType(DamageHandlerBase damageHandlerBase) return DamageType.Unknown; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs b/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs index 2715e726dc..86c4c27099 100644 --- a/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs +++ b/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs @@ -13,7 +13,6 @@ namespace Exiled.API.Extensions using System.Linq; using CustomPlayerEffects.Danger; - using Exiled.API.Enums; /// diff --git a/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs b/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs index 8ceb671037..69677e71c7 100644 --- a/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs +++ b/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs @@ -13,16 +13,11 @@ namespace Exiled.API.Extensions using System.Linq; using CustomPlayerEffects; - using CustomRendering; - using Enums; - using Exiled.API.Features; - using InventorySystem.Items.MarshmallowMan; using InventorySystem.Items.Usables.Scp244.Hypothermia; - using PlayerRoles.FirstPersonControl; /// @@ -247,4 +242,4 @@ public static EffectCategory GetCategories(this EffectType effect) return category; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/FloatExtensions.cs b/EXILED/Exiled.API/Extensions/FloatExtensions.cs index f9608626c0..b7a32af87f 100644 --- a/EXILED/Exiled.API/Extensions/FloatExtensions.cs +++ b/EXILED/Exiled.API/Extensions/FloatExtensions.cs @@ -53,4 +53,4 @@ public static AspectRatioType GetAspectRatioLabel(this float ratio) return closestRatio; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/ItemExtensions.cs b/EXILED/Exiled.API/Extensions/ItemExtensions.cs index 3a4bb791cc..80c77a4c37 100644 --- a/EXILED/Exiled.API/Extensions/ItemExtensions.cs +++ b/EXILED/Exiled.API/Extensions/ItemExtensions.cs @@ -20,7 +20,6 @@ namespace Exiled.API.Extensions using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Pickups; - using Structs; /// @@ -354,4 +353,4 @@ public static uint GetBaseCode(this FirearmType type) /// true if weapon has the specified attachment. Otherwise, false. public static bool HasAttachment(this Firearm firearm, AttachmentName attachment) => firearm.Attachments.FirstOrDefault(x => x.Name == attachment)?.IsEnabled ?? false; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/LockerExtensions.cs b/EXILED/Exiled.API/Extensions/LockerExtensions.cs index 3bf7edf51b..fbd60ec2a6 100644 --- a/EXILED/Exiled.API/Extensions/LockerExtensions.cs +++ b/EXILED/Exiled.API/Extensions/LockerExtensions.cs @@ -7,8 +7,9 @@ namespace Exiled.API.Extensions { - using Exiled.API.Enums; + using System; + using Exiled.API.Enums; using MapGeneration.Distributors; /// @@ -52,4 +53,4 @@ public static class LockerExtensions _ => LockerType.Unknown, }; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/MirrorExtensions.cs b/EXILED/Exiled.API/Extensions/MirrorExtensions.cs index bbd3258782..ca7742fda5 100644 --- a/EXILED/Exiled.API/Extensions/MirrorExtensions.cs +++ b/EXILED/Exiled.API/Extensions/MirrorExtensions.cs @@ -13,6 +13,7 @@ namespace Exiled.API.Extensions using System.Linq; using System.Reflection; using System.Reflection.Emit; + using System.Text; using AdminToys; @@ -23,16 +24,17 @@ namespace Exiled.API.Extensions using CustomPlayerEffects; using Exiled.API.Enums; + using Exiled.API.Features.Items; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups.Keycards; using Features; - - using HarmonyLib; + using Features.Pools; using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Autosync; + using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Keycards; @@ -50,7 +52,7 @@ namespace Exiled.API.Extensions using RelativePositioning; - using Unity.Collections.LowLevel.Unsafe; + using Respawning; using UnityEngine; @@ -113,38 +115,19 @@ public static ReadOnlyDictionary SyncVarDirtyBits if (setMethod is null) continue; - ulong bit = GetBit(setMethod); + MethodBody methodBody = setMethod.GetMethodBody(); + + if (methodBody is null) + continue; + + byte[] bytecodes = methodBody.GetILAsByteArray(); if (!SyncVarDirtyBitsValue.ContainsKey($"{property.ReflectedType.Name}.{property.Name}")) - SyncVarDirtyBitsValue.Add($"{property.ReflectedType.Name}.{property.Name}", bit); + SyncVarDirtyBitsValue.Add($"{property.ReflectedType.Name}.{property.Name}", bytecodes[bytecodes.LastIndexOf((byte)OpCodes.Ldc_I8.Value) + 1]); } } return ReadOnlySyncVarDirtyBitsValue; - - static ulong GetBit(MethodInfo setter) - { - List instructions = PatchProcessor.GetOriginalInstructions(setter); - - object operand = null; - ulong bit; - try - { - operand = instructions.Single(c => c.opcode == OpCodes.Ldc_I8).operand; - long casted = (long)operand; - - // Standard casting doesn't work here because IL doesn't have a specific instruction for unsigned ulongs, it just loads it as a long and uses that. - // Because of that, harmony here gives it back as a long, and standard casting would clamp the value if it was ever big enough, so we need an unsafe cast. - bit = UnsafeUtility.As(ref casted); - } - catch (Exception ex) - { - Log.Error($"Error finding dirty bit in method {setter.ReflectedType.Name}.{setter.Name}! Found operand type: {operand?.GetType().Name ?? "Null"}. Exception: {ex}"); - return 0; - } - - return bit; - } } } @@ -271,9 +254,7 @@ public static void PlayGunSound(this Player player, Vector3 position, FirearmTyp /// The direction of the blood decal. /// The RoleTypeId from who blood come from. /// The sound than player get when getting shot. -#pragma warning disable IDE0060 // TODO: Deleted the unused param public static void PlaceBlood(this Player player, Vector3 position, Vector3 origin, RoleTypeId roleTypeId, int gettingShotSoundIndex) -#pragma warning restore IDE0060 { if (!roleTypeId.TryGetRoleBase(out PlayerRoleBase playerRoleBase) || playerRoleBase is not IBleedableRole) return; @@ -310,8 +291,7 @@ public static void PlaceBlood(this Player player, Vector3 position, Vector3 orig writer.WriteRelativePosition(new RelativePosition(origin)); writer.WriteByte(255); writer.WriteRoleType(RoleTypeId.ClassD); - }, - true); + }, true); #pragma warning restore SA1116 // Split parameters should start on line after declaration } @@ -561,9 +541,7 @@ public static void PlayCassieAnnouncement(this Player player, string words, bool /// Same on 's isHeld. /// Same on 's isNoisy. /// Same on 's isSubtitles. -#pragma warning disable IDE0060 // TODO: Deleted the unused param public static void MessageTranslated(this Player player, string words, string translation, string customSubtitles, bool makeHold = false, bool makeNoise = true, bool isSubtitles = true) -#pragma warning restore IDE0060 { CassieAnnouncement announcement = new(new CassieTtsPayload(words, customSubtitles, makeHold), 0, makeNoise ? 1 : 0); @@ -1010,7 +988,7 @@ private static void MakeCustomSyncWriter(NetworkIdentity behaviorOwner, Type tar // Write syncdata position data int position3 = owner.Position; owner.Position = position; - owner.WriteByte((byte)((position3 - position2) & 255)); + owner.WriteByte((byte)(position3 - position2 & 255)); owner.Position = position3; // Copy owner to observer @@ -1018,4 +996,4 @@ private static void MakeCustomSyncWriter(NetworkIdentity behaviorOwner, Type tar observer.WriteBytes(owner.ToArraySegment().Array, position, owner.Position - position); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/RoleExtensions.cs b/EXILED/Exiled.API/Extensions/RoleExtensions.cs index 14e1c4dd59..db1a7c99a9 100644 --- a/EXILED/Exiled.API/Extensions/RoleExtensions.cs +++ b/EXILED/Exiled.API/Extensions/RoleExtensions.cs @@ -12,19 +12,14 @@ namespace Exiled.API.Extensions using System.Linq; using Enums; - using Features.Spawn; - using Footprinting; - using InventorySystem; using InventorySystem.Configs; - using PlayerRoles; using PlayerRoles.FirstPersonControl; - + using Respawning; using Respawning.Waves; - using UnityEngine; using Team = PlayerRoles.Team; @@ -89,7 +84,7 @@ public static class RoleExtensions RoleTypeId.ChaosConscript or RoleTypeId.ChaosMarauder or RoleTypeId.ChaosRepressor or RoleTypeId.ChaosRifleman or RoleTypeId.ChaosFlamingo => Team.ChaosInsurgency, RoleTypeId.Scientist => Team.Scientists, RoleTypeId.ClassD => Team.ClassD, - RoleTypeId.Scp049 or RoleTypeId.Scp939 or RoleTypeId.Scp0492 or RoleTypeId.Scp079 or RoleTypeId.Scp096 or RoleTypeId.Scp106 or RoleTypeId.Scp173 or RoleTypeId.Scp3114 or RoleTypeId.ZombieFlamingo => Team.SCPs, + RoleTypeId.Scp049 or RoleTypeId.Scp939 or RoleTypeId.Scp0492 or RoleTypeId.Scp079 or RoleTypeId.Scp096 or RoleTypeId.Scp106 or RoleTypeId.Scp173 or RoleTypeId.Scp3114 or RoleTypeId.ZombieFlamingo=> Team.SCPs, RoleTypeId.FacilityGuard or RoleTypeId.NtfCaptain or RoleTypeId.NtfPrivate or RoleTypeId.NtfSergeant or RoleTypeId.NtfSpecialist or RoleTypeId.NtfFlamingo => Team.FoundationForces, RoleTypeId.Tutorial => Team.OtherAlive, RoleTypeId.Flamingo or RoleTypeId.AlphaFlamingo => Team.Flamingos, @@ -248,7 +243,7 @@ public static Dictionary GetStartingAmmo(this RoleTypeId roleT NtfMiniWave => SpawnableFaction.NtfMiniWave, ChaosSpawnWave => SpawnableFaction.ChaosWave, ChaosMiniWave => SpawnableFaction.ChaosMiniWave, - _ => SpawnableFaction.None, + _ => SpawnableFaction.None }; /// @@ -288,4 +283,4 @@ public static bool TryGetSpawnableFaction(this Faction faction, out SpawnableFac return true; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Extensions/StringExtensions.cs b/EXILED/Exiled.API/Extensions/StringExtensions.cs index c6ccc67202..1cc8dc7c32 100644 --- a/EXILED/Exiled.API/Extensions/StringExtensions.cs +++ b/EXILED/Exiled.API/Extensions/StringExtensions.cs @@ -67,7 +67,7 @@ public static int GetDistance(this string firstString, string secondString) /// /// The to extract from. /// Returns a containing the exctracted command name and arguments. - public static (string CommandName, string[] Arguments) ExtractCommand(this string commandLine) + public static (string commandName, string[] arguments) ExtractCommand(this string commandLine) { string[] extractedArguments = commandLine.Split(' '); diff --git a/EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs b/EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs deleted file mode 100644 index b31fe9f6e4..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes -{ - using System; - - /// - /// Checks all properties in the target object for validators. - /// - [AttributeUsage(AttributeTargets.Property)] - public class ValidateChildrenAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs deleted file mode 100644 index a92da9244a..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs +++ /dev/null @@ -1,37 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Checks if value is in list of available values. - /// - [AttributeUsage(AttributeTargets.Property)] - public class AvailableValuesAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// - public AvailableValuesAttribute(params object[] values) - { - Values = values; - } - - /// - /// Gets the array of possible values. - /// - public object[] Values { get; } - - /// - public bool Check(object other) => Values.Contains(other); - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs deleted file mode 100644 index 611b416070..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs +++ /dev/null @@ -1,49 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - using System.Collections.Generic; - - using Exiled.API.Interfaces; - - /// - /// Check a value with custom function. - /// - [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] - public class CustomValidatorAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// The type of the custom check validator. - /// - /// The from customFunctionType must be a class inheriting IValidator with a parameterless constructor. - /// - public CustomValidatorAttribute(Type customFunctionType) - { - if (!customFunctionType.IsClass || customFunctionType.IsAbstract || !customFunctionType.GetInterfaces().Contains(typeof(IValidator))) - throw new ArgumentException($"{nameof(customFunctionType)} must be a type inheriting IValidator!"); - - CustomFunctionType = customFunctionType; - } - - /// - /// Gets a from a type inheriting , to an instance of that class. - /// - public static Dictionary ValidatorInstances { get; } = new(); - - /// - /// Gets the type of the custom check validator. - /// - public Type CustomFunctionType { get; } - - /// - public bool Check(object other) => ValidatorInstances.GetOrAdd(CustomFunctionType, () => (IValidator)Activator.CreateInstance(CustomFunctionType)).Check(other); - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs deleted file mode 100644 index b31d3cbc83..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs +++ /dev/null @@ -1,38 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Checks if value greater or equal. - /// - [AttributeUsage(AttributeTargets.Property)] - public class GreaterOrEqualAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// - /// value must be able to convert to your target type via . - public GreaterOrEqualAttribute(object value) - { - Value = value; - } - - /// - /// Gets the minimum value. - /// - public object Value { get; } - - /// - public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable min && min.CompareTo(other) <= 0; - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs deleted file mode 100644 index 5bb1025bd9..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs +++ /dev/null @@ -1,38 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Interfaces; - - /// - /// Check if value is greater. - /// - [AttributeUsage(AttributeTargets.Property)] - public class GreaterThanAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// - /// value must be able to convert to your target type via . - public GreaterThanAttribute(object value) - { - Value = value; - } - - /// - /// Gets the minimum value. - /// - public object Value { get; } - - /// - public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable min && min.CompareTo(other) < 0; - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs deleted file mode 100644 index e521a47bd1..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs +++ /dev/null @@ -1,38 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Checks if value less or equal. - /// - [AttributeUsage(AttributeTargets.Property)] - public class LessOrEqualAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// - /// value must be able to convert to your target type via . - public LessOrEqualAttribute(object value) - { - Value = value; - } - - /// - /// Gets the maximum value. - /// - public object Value { get; } - - /// - public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable max && max.CompareTo(other) >= 0; - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs deleted file mode 100644 index 5497a99fa6..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs +++ /dev/null @@ -1,38 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Checks if value is less. - /// - [AttributeUsage(AttributeTargets.Property)] - public class LessThanAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// - /// value must be able to convert to your target type via . - public LessThanAttribute(object value) - { - Value = value; - } - - /// - /// Gets the maximum value. - /// - public object Value { get; } - - /// - public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable max && max.CompareTo(other) > 0; - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs deleted file mode 100644 index 914ce09d59..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Checks if value is 0 or greater. - /// - [AttributeUsage(AttributeTargets.Property)] - public class NonNegativeAttribute : Attribute, IValidator - { - /// - public bool Check(object other) => Convert.ToDecimal(other) >= 0; - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs deleted file mode 100644 index a473405e49..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Check if value is 0 or less. - /// - [AttributeUsage(AttributeTargets.Property)] - public class NonPositiveAttribute : Attribute, IValidator - { - /// - public bool Check(object other) => Convert.ToDecimal(other) <= 0; - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs deleted file mode 100644 index ebf0c1d10d..0000000000 --- a/EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs +++ /dev/null @@ -1,57 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Features.Attributes.Validators -{ - using System; - - using Exiled.API.Interfaces; - - /// - /// Check if an is inside a specific range. - /// - [AttributeUsage(AttributeTargets.Property)] - public class RangeAttribute : Attribute, IValidator - { - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// min and max must inherit . - public RangeAttribute(object min, object max, bool inclusive = false) - { - Min = min; - Max = max; - Inclusive = inclusive; - } - - /// - /// Gets the maximum value. - /// - public object Max { get; } - - /// - /// Gets the minimum value. - /// - public object Min { get; } - - /// - /// Gets a value indicating whether check is inclusive. - /// - public bool Inclusive { get; } - - /// - public bool Check(object other) => - Convert.ChangeType(Min, other.GetType()) is IComparable min && - Convert.ChangeType(Max, other.GetType()) is IComparable max && - (Inclusive - ? min.CompareTo(other) <= 0 && max.CompareTo(other) >= 0 - : min.CompareTo(other) < 0 && max.CompareTo(other) > 0); - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs b/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs index 10db73bbb4..17ea91b02f 100644 --- a/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs +++ b/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Audio { using System; + using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; @@ -209,4 +210,4 @@ private static void OnRoundRestart() Clear(); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Audio/WavUtility.cs b/EXILED/Exiled.API/Features/Audio/WavUtility.cs index 7e8df6dbea..9be12fa6b8 100644 --- a/EXILED/Exiled.API/Features/Audio/WavUtility.cs +++ b/EXILED/Exiled.API/Features/Audio/WavUtility.cs @@ -129,7 +129,7 @@ public static AudioData ParseWavSpanToPcm(Stream stream, ReadOnlySpan audi /// A struct containing the parsed file information. public static TrackData SkipHeader(Stream stream) { - TrackData trackData = default(TrackData); + TrackData trackData = new(); if (stream.Length < 12) { diff --git a/EXILED/Exiled.API/Features/Camera.cs b/EXILED/Exiled.API/Features/Camera.cs index 0c949f124b..4eedc693dd 100644 --- a/EXILED/Exiled.API/Features/Camera.cs +++ b/EXILED/Exiled.API/Features/Camera.cs @@ -12,14 +12,10 @@ namespace Exiled.API.Features using System.Linq; using Enums; - using Exiled.API.Extensions; using Exiled.API.Interfaces; - using MapGeneration; - using PlayerRoles.PlayableScps.Scp079.Cameras; - using UnityEngine; using CameraType = Enums.CameraType; diff --git a/EXILED/Exiled.API/Features/Cassie.cs b/EXILED/Exiled.API/Features/Cassie.cs index ab7b490451..475e68ad4e 100644 --- a/EXILED/Exiled.API/Features/Cassie.cs +++ b/EXILED/Exiled.API/Features/Cassie.cs @@ -13,16 +13,12 @@ namespace Exiled.API.Features using System.Text; using Exiled.API.Features.Pools; - using global::Cassie; using global::Cassie.Interpreters; - using MEC; - using PlayerRoles; - using PlayerStatsSystem; - + using Respawning; using Respawning.NamingRules; using CustomFirearmHandler = DamageHandlers.FirearmDamageHandler; @@ -61,9 +57,7 @@ public static void Message(string message, bool isHeld = false, bool isNoisy = t /// Indicates whether C.A.S.S.I.E has to hold the message. /// Indicates whether C.A.S.S.I.E has to make noises during the message. /// Indicates whether C.A.S.S.I.E has to make subtitles. -#pragma warning disable IDE0060 // TODO: Deleted the unused param public static void MessageTranslated(string message, string translation, bool isHeld = false, bool isNoisy = true, bool isSubtitles = true) -#pragma warning restore IDE0060 { new CassieAnnouncement(new CassieTtsPayload(message, translation, isHeld), 0f, isNoisy ? 1 : 0).AddToQueue(); } @@ -123,7 +117,7 @@ public static float CalculateDuration(string message) float value = 0; string[] lines = message.Split(' ', StringSplitOptions.RemoveEmptyEntries); - CassiePlaybackModifiers modifiers = default(CassiePlaybackModifiers); + CassiePlaybackModifiers modifiers = new(); StringBuilder builder = StringBuilderPool.Pool.Get(); for (int i = 0; i < lines.Length; i++) @@ -173,7 +167,7 @@ public static string ConvertNumber(int num) return string.Empty; } - NumberInterpreter numberInterpreter = (NumberInterpreter)CassieTtsAnnouncer.Interpreters.FirstOrDefault(x => x is NumberInterpreter); + NumberInterpreter numberInterpreter = (NumberInterpreter)CassieTtsAnnouncer.Interpreters.FirstOrDefault((CassieInterpreter x) => x is NumberInterpreter); if (numberInterpreter == null) { return string.Empty; @@ -228,7 +222,7 @@ public static void CustomScpTermination(string scpName, CustomHandlerBase info) /// /// The word to check. /// if the word is valid; otherwise, . - public static bool IsValid(string word) => CassieTtsAnnouncer.TryGetDatabase(out CassieLineDatabase cassieLineDatabase) && cassieLineDatabase.AllLines.Any(line => line.ApiName.ToUpper() == word.ToUpper()); + public static bool IsValid(string word) => CassieTtsAnnouncer.TryGetDatabase(out CassieLineDatabase cassieLineDatabase) ? cassieLineDatabase.AllLines.Any(line => line.ApiName.ToUpper() == word.ToUpper()) : false; /// /// Gets a value indicating whether the given sentence is all valid C.A.S.S.I.E word. diff --git a/EXILED/Exiled.API/Features/Coffee.cs b/EXILED/Exiled.API/Features/Coffee.cs index 5874d66245..adabb2387e 100644 --- a/EXILED/Exiled.API/Features/Coffee.cs +++ b/EXILED/Exiled.API/Features/Coffee.cs @@ -13,7 +13,6 @@ namespace Exiled.API.Features using Exiled.API.Extensions; using Exiled.API.Interfaces; - using UnityEngine; using BaseCoffee = global::Coffee; @@ -119,4 +118,4 @@ public string TranslationAuthor /// The player who interacts. If , it will be chosen randomly. public void Interact(Player player = null) => Base.ServerInteract((player ?? Player.Get(x => x.IsHuman).GetRandomValue()).ReferenceHub, byte.MaxValue); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs b/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs index e2db497289..a61a7f1602 100644 --- a/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs +++ b/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs @@ -22,4 +22,4 @@ internal class ComponentsEqualityComparer : IEqualityComparer /// public int GetHashCode(Component obj) => obj == null ? 0 : obj.GetHashCode(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Core/EActor.cs b/EXILED/Exiled.API/Features/Core/EActor.cs index 31a8911725..b051974788 100644 --- a/EXILED/Exiled.API/Features/Core/EActor.cs +++ b/EXILED/Exiled.API/Features/Core/EActor.cs @@ -15,7 +15,6 @@ namespace Exiled.API.Features.Core using Exiled.API.Features.DynamicEvents; using Exiled.API.Features.Pools; using Exiled.API.Interfaces; - using MEC; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs b/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs index 0ac6098b9b..7bd14fb6e2 100644 --- a/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs +++ b/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs @@ -7,6 +7,8 @@ namespace Exiled.API.Features.Core.Generic { + using System; + using Exiled.API.Features; /// diff --git a/EXILED/Exiled.API/Features/Core/StateMachine/State.cs b/EXILED/Exiled.API/Features/Core/StateMachine/State.cs index dee7f4cd49..e790e61a8d 100644 --- a/EXILED/Exiled.API/Features/Core/StateMachine/State.cs +++ b/EXILED/Exiled.API/Features/Core/StateMachine/State.cs @@ -14,6 +14,7 @@ namespace Exiled.API.Features.Core.StateMachine using Exiled.API.Features; using Exiled.API.Features.Core.Attributes; + using UnityEngine; /// /// The base class which handles in-context states. diff --git a/EXILED/Exiled.API/Features/Core/StaticActor.cs b/EXILED/Exiled.API/Features/Core/StaticActor.cs index 3323ec1a70..e6c4cc08b0 100644 --- a/EXILED/Exiled.API/Features/Core/StaticActor.cs +++ b/EXILED/Exiled.API/Features/Core/StaticActor.cs @@ -76,7 +76,7 @@ public static T Get() /// /// Gets a given the specified type. /// - /// The type of the to look for. + /// The the type of the to look for. /// The type to cast the to. /// The corresponding of type , or if not found. public static T Get(Type type) @@ -96,7 +96,7 @@ public static T Get(Type type) /// /// Gets a given the specified type. /// - /// The type of the to look for. + /// The the type of the to look for. /// The corresponding . public static StaticActor Get(Type type) { diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs index dfccf71d77..46938d13b4 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs @@ -11,7 +11,6 @@ namespace Exiled.API.Features.Core.UserSettings using System.Diagnostics; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs index 8876f74b96..ada19ec63a 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs @@ -12,7 +12,6 @@ namespace Exiled.API.Features.Core.UserSettings using System.Linq; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs index 5944a682fd..4b13238b65 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs index 98c168adaa..e3b40e8f0c 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs @@ -10,9 +10,7 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs b/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs index 9286c5b409..38b5132ec7 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs @@ -14,7 +14,6 @@ namespace Exiled.API.Features.Core.UserSettings using Exiled.API.Features.Pools; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; /// @@ -206,7 +205,7 @@ public static bool TryGetSetting(Player player, int id, out T setting) SSTwoButtonsSetting twoButtonsSetting => new TwoButtonsSetting(twoButtonsSetting), SSPlaintextSetting plainTextSetting => new UserTextInputSetting(plainTextSetting), SSSliderSetting sliderSetting => new SliderSetting(sliderSetting), - _ => new SettingBase(settingBase), + _ => new SettingBase(settingBase) }; /// @@ -420,7 +419,7 @@ internal static void OnSettingUpdated(ReferenceHub hub, ServerSpecificSettingBas setting = list.Find(x => x.Id == settingBase.SettingId); - invoke: + invoke: if (setting.OriginalDefinition == null) { @@ -430,4 +429,4 @@ internal static void OnSettingUpdated(ReferenceHub hub, ServerSpecificSettingBas setting.OriginalDefinition?.OnChanged?.Invoke(player, setting); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs index 3a88ab477c..abb522fd76 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs index d1c9aa7eb5..69c7875ad1 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs @@ -10,9 +10,7 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; - using TMPro; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs index d921ede5a4..18233e6ffc 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs index fe773e8021..99c163581e 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs @@ -10,9 +10,7 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; - using global::UserSettings.ServerSpecific; - using TMPro; /// diff --git a/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs b/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs index f366ba01bf..e19ce970f5 100644 --- a/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs +++ b/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs @@ -8,13 +8,9 @@ namespace Exiled.API.Features.CustomStats { using Mirror; - using PlayerRoles.PlayableScps.HumeShield; - using PlayerStatsSystem; - using UnityEngine; - using Utils.Networking; /// diff --git a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs index 7b4720f6d3..1103ed138e 100644 --- a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs +++ b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs @@ -12,7 +12,6 @@ namespace Exiled.API.Features.DamageHandlers using Footprinting; using PlayerStatsSystem; - using UnityEngine; using BaseHandler = PlayerStatsSystem.DamageHandlerBase; diff --git a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs index 0c1bd95076..6a9b8f4562 100644 --- a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs +++ b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs @@ -13,17 +13,12 @@ namespace Exiled.API.Features.DamageHandlers using System.Linq; using Enums; - using Exiled.API.Features.Items; - using Extensions; - using InventorySystem.Items.Scp1509; - using PlayerRoles.PlayableScps.Scp1507; using PlayerRoles.PlayableScps.Scp3114; using PlayerRoles.PlayableScps.Scp939; - using PlayerStatsSystem; using BaseHandler = PlayerStatsSystem.DamageHandlerBase; @@ -271,7 +266,7 @@ protected DamageType GetDamageType(BaseHandler damageHandler = null) FirearmType.E11SR => DamageType.E11Sr, FirearmType.FSP9 => DamageType.Fsp9, FirearmType.FRMG0 => DamageType.Frmg0, - _ => DamageType.Firearm, + _ => DamageType.Firearm }; case PlayerStatsSystem.AttackerDamageHandler attackerDamageHandler: diff --git a/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs b/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs index 776aa1943f..4ea1909b72 100644 --- a/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs +++ b/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs @@ -12,13 +12,19 @@ namespace Exiled.API.Features.DamageHandlers using Enums; using Exiled.API.Extensions; + using Exiled.API.Features.Pickups.Projectiles; using Footprinting; using InventorySystem; + using InventorySystem.Items; + using InventorySystem.Items.Firearms; + using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Firearms.ShotEvents; using InventorySystem.Items.Scp1509; + using Items; + using PlayerRoles; using PlayerRoles.PlayableScps.Scp096; using PlayerRoles.PlayableScps.Scp1507; @@ -29,6 +35,8 @@ namespace Exiled.API.Features.DamageHandlers using UnityEngine; + using Object = UnityEngine.Object; + /// /// Allows generic damage to a player. /// @@ -62,7 +70,8 @@ public GenericDamageHandler(Player player, Player attacker, float damage, Damage cassieAnnouncement ??= DamageHandlerBase.CassieAnnouncement.Default; customCassieAnnouncement = cassieAnnouncement; - customCassieAnnouncement?.Announcement ??= $"{player.Nickname} killed by {attacker.Nickname} utilizing {damageType}"; + if (customCassieAnnouncement is not null) + customCassieAnnouncement.Announcement ??= $"{player.Nickname} killed by {attacker.Nickname} utilizing {damageType}"; Attacker = attacker != null ? attacker.Footprint : Server.Host.Footprint; AllowSelfDamage = true; @@ -183,14 +192,16 @@ public GenericDamageHandler(Player player, Player attacker, float damage, Damage case DamageType.Scp096: Scp096Role curr096 = attacker.ReferenceHub.roleManager.CurrentRole as Scp096Role ?? new Scp096Role(); - curr096?._lastOwner = attacker.ReferenceHub; + if (curr096 != null) + curr096._lastOwner = attacker.ReferenceHub; Base = new Scp096DamageHandler(curr096, damage, Scp096DamageHandler.AttackType.SlapRight); break; case DamageType.Scp939: Scp939Role curr939 = attacker.ReferenceHub.roleManager.CurrentRole as Scp939Role ?? new Scp939Role(); - curr939?._lastOwner = attacker.ReferenceHub; + if (curr939 != null) + curr939._lastOwner = attacker.ReferenceHub; Base = new Scp939DamageHandler(curr939, damage, Scp939DamageType.LungeTarget); break; @@ -333,4 +344,4 @@ private void GenericFirearm(float amount, ItemType itemType) }; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Doors/BasicDoor.cs b/EXILED/Exiled.API/Features/Doors/BasicDoor.cs index a0c184b22a..5a53caa738 100644 --- a/EXILED/Exiled.API/Features/Doors/BasicDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/BasicDoor.cs @@ -10,9 +10,7 @@ namespace Exiled.API.Features.Doors using System.Collections.Generic; using Exiled.API.Enums; - using PlayerRoles; - using UnityEngine; using Basegame = Interactables.Interobjects.BasicDoor; diff --git a/EXILED/Exiled.API/Features/Doors/Door.cs b/EXILED/Exiled.API/Features/Doors/Door.cs index 8518be4a9c..0e27b6daae 100644 --- a/EXILED/Exiled.API/Features/Doors/Door.cs +++ b/EXILED/Exiled.API/Features/Doors/Door.cs @@ -15,15 +15,11 @@ namespace Exiled.API.Features.Doors using Exiled.API.Extensions; using Exiled.API.Features.Core; using Exiled.API.Interfaces; - using Interactables.Interobjects; using Interactables.Interobjects.DoorButtons; using Interactables.Interobjects.DoorUtils; - using MEC; - using Mirror; - using UnityEngine; using BaseBreakableDoor = Interactables.Interobjects.BreakableDoor; @@ -425,7 +421,7 @@ public static void LockAll(float duration, ZoneType zoneType = ZoneType.Unspecif { door.IsOpen = false; door.ChangeLock(lockType); - Timing.CallDelayed(duration, door.Unlock); + Timing.CallDelayed(duration, () => door.Unlock()); } } @@ -452,7 +448,7 @@ public static void LockAll(float duration, DoorLockType lockType = DoorLockType. { door.IsOpen = false; door.ChangeLock(lockType); - Timing.CallDelayed(duration, door.Unlock); + Timing.CallDelayed(duration, () => door.Unlock()); } } @@ -597,7 +593,7 @@ internal static Door Create(DoorVariant doorVariant, List rooms) PryableDoor prbl => new Gate(prbl, rooms), Interactables.Interobjects.BasicNonInteractableDoor nonInteractableDoor => new BasicNonInteractableDoor(nonInteractableDoor, rooms), Interactables.Interobjects.BasicDoor basicDoor => new BasicDoor(basicDoor, rooms), - _ => new Door(doorVariant, rooms), + _ => new Door(doorVariant, rooms) }; } @@ -713,4 +709,4 @@ private DoorType GetDoorType() }; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs b/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs index 9f5643cb04..8d455e6653 100644 --- a/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs @@ -11,9 +11,7 @@ namespace Exiled.API.Features.Doors using System.Linq; using Exiled.API.Enums; - using Interactables.Interobjects; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs b/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs index e115b4416a..4fb094f639 100644 --- a/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs +++ b/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs @@ -12,7 +12,6 @@ namespace Exiled.API.Features.Doors using System.Linq; using Exiled.API.Interfaces; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.API/Features/Doors/Gate.cs b/EXILED/Exiled.API/Features/Doors/Gate.cs index 050c635ef6..89cbc3ced0 100644 --- a/EXILED/Exiled.API/Features/Doors/Gate.cs +++ b/EXILED/Exiled.API/Features/Doors/Gate.cs @@ -10,10 +10,8 @@ namespace Exiled.API.Features.Doors using System.Collections.Generic; using Exiled.API.Enums; - using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Draw.cs b/EXILED/Exiled.API/Features/Draw.cs index 8eb2127d3f..5eb7361b91 100644 --- a/EXILED/Exiled.API/Features/Draw.cs +++ b/EXILED/Exiled.API/Features/Draw.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features { using System; + using System.Buffers; using System.Collections.Generic; using DrawableLine; diff --git a/EXILED/Exiled.API/Features/Generator.cs b/EXILED/Exiled.API/Features/Generator.cs index e494184cd0..8f3d6f41be 100644 --- a/EXILED/Exiled.API/Features/Generator.cs +++ b/EXILED/Exiled.API/Features/Generator.cs @@ -12,11 +12,8 @@ namespace Exiled.API.Features using System.Linq; using Enums; - using Exiled.API.Interfaces; - using Interactables.Interobjects.DoorUtils; - using MapGeneration.Distributors; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs b/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs index f7844678c4..f14d8feac8 100644 --- a/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs +++ b/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs @@ -86,7 +86,7 @@ public static Harmony PatchAll(string id = "", string groupId = null) } if (string.IsNullOrEmpty(patchGroup.GroupId)) - throw new ArgumentNullException(nameof(patchGroup.GroupId)); + throw new ArgumentNullException("GroupId"); if (string.IsNullOrEmpty(groupId) || patchGroup.GroupId != groupId) continue; @@ -147,40 +147,44 @@ public static void UnpatchAll(string id = "", string groupId = null) goto Unpatch; if (string.IsNullOrEmpty(patchGroup.GroupId)) - throw new ArgumentNullException(nameof(patchGroup.GroupId)); + throw new ArgumentNullException("GroupId"); if (string.IsNullOrEmpty(groupId) || patchGroup.GroupId != groupId) continue; - Unpatch: + Unpatch: bool hasMethodBody = methodBase.HasMethodBody(); if (hasMethodBody) { - patchInfo.Postfixes.Do((patchInfo) => - { - harmony.Unpatch(methodBase, patchInfo.PatchMethod); - }); - patchInfo.Prefixes.Do((patchInfo) => + patchInfo.Postfixes.Do( + delegate(Patch patchInfo) + { + harmony.Unpatch(methodBase, patchInfo.PatchMethod); + }); + patchInfo.Prefixes.Do( + delegate(Patch patchInfo) + { + harmony.Unpatch(methodBase, patchInfo.PatchMethod); + }); + } + + patchInfo.Transpilers.Do( + delegate(Patch patchInfo) { harmony.Unpatch(methodBase, patchInfo.PatchMethod); }); - } - - patchInfo.Transpilers.Do((patchInfo) => - { - harmony.Unpatch(methodBase, patchInfo.PatchMethod); - }); if (hasMethodBody) { - patchInfo.Finalizers.Do((patchInfo) => - { - harmony.Unpatch(methodBase, patchInfo.PatchMethod); - }); + patchInfo.Finalizers.Do( + delegate(Patch patchInfo) + { + harmony.Unpatch(methodBase, patchInfo.PatchMethod); + }); } PatchedGroupMethodsValue.Remove(methodBase); } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs b/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs index 9a1cc7e110..3c2a982ab7 100644 --- a/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Hazards { using Exiled.API.Enums; - using PlayerRoles.PlayableScps.Scp939; /// diff --git a/EXILED/Exiled.API/Features/Hazards/Hazard.cs b/EXILED/Exiled.API/Features/Hazards/Hazard.cs index c0c82a3aea..22d620092a 100644 --- a/EXILED/Exiled.API/Features/Hazards/Hazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/Hazard.cs @@ -14,11 +14,8 @@ namespace Exiled.API.Features.Hazards using Exiled.API.Enums; using Exiled.API.Features.Core; using Exiled.API.Interfaces; - using global::Hazards; - using PlayerRoles.PlayableScps.Scp939; - using UnityEngine; /// @@ -124,13 +121,13 @@ public Vector3 Position public static Hazard Get(EnvironmentalHazard environmentalHazard) => EnvironmentalHazardToHazard.TryGetValue(environmentalHazard, out Hazard hazard) ? hazard : environmentalHazard switch - { - TantrumEnvironmentalHazard tantrumEnvironmentalHazard => new TantrumHazard(tantrumEnvironmentalHazard), - Scp939AmnesticCloudInstance scp939AmnesticCloudInstance => new AmnesticCloudHazard(scp939AmnesticCloudInstance), - SinkholeEnvironmentalHazard sinkholeEnvironmentalHazard => new SinkholeHazard(sinkholeEnvironmentalHazard), - global::Hazards.TemporaryHazard temporaryHazard => new TemporaryHazard(temporaryHazard), - _ => new Hazard(environmentalHazard), - }; + { + TantrumEnvironmentalHazard tantrumEnvironmentalHazard => new TantrumHazard(tantrumEnvironmentalHazard), + Scp939AmnesticCloudInstance scp939AmnesticCloudInstance => new AmnesticCloudHazard(scp939AmnesticCloudInstance), + SinkholeEnvironmentalHazard sinkholeEnvironmentalHazard => new SinkholeHazard(sinkholeEnvironmentalHazard), + global::Hazards.TemporaryHazard temporaryHazard => new TemporaryHazard(temporaryHazard), + _ => new Hazard(environmentalHazard) + }; /// /// Gets the by . diff --git a/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs b/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs index 86f924c0d0..5e368dfd25 100644 --- a/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Hazards { using Exiled.API.Enums; - using global::Hazards; /// diff --git a/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs b/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs index 733096ae26..1660ba4dc9 100644 --- a/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs @@ -8,13 +8,9 @@ namespace Exiled.API.Features.Hazards { using Exiled.API.Enums; - using global::Hazards; - using Mirror; - using RelativePositioning; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Items/Ammo.cs b/EXILED/Exiled.API/Features/Items/Ammo.cs index 54210cc6d2..d6cf394750 100644 --- a/EXILED/Exiled.API/Features/Items/Ammo.cs +++ b/EXILED/Exiled.API/Features/Items/Ammo.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Items { using Enums; - using Exiled.API.Interfaces; using InventorySystem.Items.Firearms.Ammo; diff --git a/EXILED/Exiled.API/Features/Items/Armor.cs b/EXILED/Exiled.API/Features/Items/Armor.cs index 43676a2e97..344b7a0118 100644 --- a/EXILED/Exiled.API/Features/Items/Armor.cs +++ b/EXILED/Exiled.API/Features/Items/Armor.cs @@ -15,10 +15,10 @@ namespace Exiled.API.Features.Items using Exiled.API.Interfaces; using InventorySystem.Items.Armor; - using PlayerRoles; using Structs; + using UnityEngine; /// /// A wrapper class for . diff --git a/EXILED/Exiled.API/Features/Items/Consumable.cs b/EXILED/Exiled.API/Features/Items/Consumable.cs index 0927474fe0..6b4ec6c5ce 100644 --- a/EXILED/Exiled.API/Features/Items/Consumable.cs +++ b/EXILED/Exiled.API/Features/Items/Consumable.cs @@ -49,4 +49,4 @@ internal override void ChangeOwner(Player oldOwner, Player newOwner) Base.Owner = newOwner.ReferenceHub; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs b/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs index e9b7b0ce95..b550c13456 100644 --- a/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs +++ b/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs @@ -15,7 +15,6 @@ namespace Exiled.API.Features.Items using InventorySystem.Items; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; - using UnityEngine; using Object = UnityEngine.Object; diff --git a/EXILED/Exiled.API/Features/Items/Firearm.cs b/EXILED/Exiled.API/Features/Items/Firearm.cs index 00630fad35..56215591af 100644 --- a/EXILED/Exiled.API/Features/Items/Firearm.cs +++ b/EXILED/Exiled.API/Features/Items/Firearm.cs @@ -7,11 +7,11 @@ namespace Exiled.API.Features.Items { + using System; using System.Collections.Generic; using System.Linq; using CameraShaking; - using Enums; using Exiled.API.Features.Items.FirearmModules; @@ -20,9 +20,7 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; using Exiled.API.Structs; - using Extensions; - using InventorySystem.Items.Autosync; using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Attachments.Components; @@ -111,7 +109,8 @@ public static IReadOnlyDictionary>> playerPreferences = AttachmentsServerHandler.PlayerPreferences.Where( - kvp => kvp.Key is not null).Select(keyValuePair => + kvp => kvp.Key is not null).Select( + (KeyValuePair> keyValuePair) => { return new KeyValuePair>( Player.Get(keyValuePair.Key), @@ -170,7 +169,12 @@ public int MagazineAmmo public int BarrelAmmo { get => BarrelMagazine?.Ammo ?? 0; - set => BarrelMagazine?.Ammo = value; + + set + { + if (BarrelMagazine != null) + BarrelMagazine.Ammo = value; + } } /// @@ -247,7 +251,12 @@ public float DamageFalloffDistance public int MaxBarrelAmmo { get => BarrelMagazine?.MaxAmmo ?? 0; - set => BarrelMagazine?.MaxAmmo = value; + + set + { + if (BarrelMagazine != null) + BarrelMagazine.MaxAmmo = value; + } } /// @@ -805,11 +814,7 @@ internal override void ReadPickupInfoBefore(Pickup pickup) { PrimaryMagazine.MaxAmmo = firearmPickup.MaxAmmo; AmmoDrain = firearmPickup.AmmoDrain; - Damage = firearmPickup.Damage; - Inaccuracy = firearmPickup.Inaccuracy; - Penetration = firearmPickup.Penetration; - DamageFalloffDistance = firearmPickup.DamageFalloffDistance; } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs index 0ddbd8bf54..db8992d720 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs @@ -7,6 +7,12 @@ namespace Exiled.API.Features.Items.FirearmModules.Barrel { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using InventorySystem.Items.Firearms.Modules; using UnityEngine; @@ -96,4 +102,4 @@ public bool BoltLocked /// public override void Resync() => AutomaticBarrel.ServerResync(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs index d189df088f..b1e11f7580 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs @@ -28,4 +28,4 @@ public BarrelMagazine(IAmmoContainerModule module) /// public abstract bool IsCocked { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs index 141cacbab8..afeb1f3248 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs @@ -7,6 +7,12 @@ namespace Exiled.API.Features.Items.FirearmModules.Barrel { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using InventorySystem.Items.Firearms.Modules; using UnityEngine; @@ -82,4 +88,4 @@ public override bool IsCocked /// public override void Resync() => PumpBarrel.ServerResync(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs index a0633f46c0..8fb2688bb7 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs @@ -7,12 +7,12 @@ namespace Exiled.API.Features.Items.FirearmModules { + using System; + using Exiled.API.Features.Items.FirearmModules.Barrel; using Exiled.API.Features.Items.FirearmModules.Primary; - using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Firearms.Modules.Scp127; - using UnityEngine; /// @@ -69,7 +69,7 @@ public static Magazine Get(IAmmoContainerModule module) MagazineModule magazine => magazine switch { Scp127MagazineModule scp127MagazineModule => new Scp127Magazine(scp127MagazineModule), - _ => new NormalMagazine(magazine), + _ => new NormalMagazine(magazine) }, _ => null, }, @@ -111,4 +111,4 @@ public int ModifyAmmo(int delta, bool useBorders = true) /// public abstract void Resync(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs index 652d71250e..2beedd7bb7 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs @@ -7,6 +7,8 @@ namespace Exiled.API.Features.Items.FirearmModules.Primary { + using System; + using System.Collections; using System.Collections.Generic; using System.Linq; @@ -100,4 +102,4 @@ public RevolverChamberState State } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs index 0421ec1f0e..6c4bb19c28 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs @@ -95,4 +95,4 @@ public bool MagazineInserted /// public override void Resync() => MagazineModule.ServerResyncData(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs index 85a294f5d8..39ff428556 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Items.FirearmModules.Primary using System; using Exiled.API.Enums; + using Exiled.API.Extensions; using InventorySystem.Items.Firearms.Modules; @@ -59,4 +60,4 @@ public override int Ammo /// public abstract AmmoType AmmoType { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Flashlight.cs b/EXILED/Exiled.API/Features/Items/Flashlight.cs index 4030d1a358..93a3876ca6 100644 --- a/EXILED/Exiled.API/Features/Items/Flashlight.cs +++ b/EXILED/Exiled.API/Features/Items/Flashlight.cs @@ -7,12 +7,12 @@ namespace Exiled.API.Features.Items { - using Exiled.API.Interfaces; + using System; + using Exiled.API.Interfaces; using InventorySystem.Items.ToggleableLights; using InventorySystem.Items.ToggleableLights.Flashlight; using InventorySystem.Items.ToggleableLights.Lantern; - using Utils.Networking; /// @@ -80,4 +80,4 @@ public float NextAllowedTime /// A string containing item-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{IsEmittingLight}| /{NextAllowedTime}/"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Item.cs b/EXILED/Exiled.API/Features/Items/Item.cs index 6446dd8cf6..6e9a20d66f 100644 --- a/EXILED/Exiled.API/Features/Items/Item.cs +++ b/EXILED/Exiled.API/Features/Items/Item.cs @@ -15,7 +15,6 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; - using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Armor; @@ -35,7 +34,6 @@ namespace Exiled.API.Features.Items using InventorySystem.Items.Usables.Scp1576; using InventorySystem.Items.Usables.Scp244; using InventorySystem.Items.Usables.Scp330; - using UnityEngine; using BaseConsumable = InventorySystem.Items.Usables.Consumable; @@ -237,7 +235,7 @@ public static Item Get(ItemBase itemBase) ItemType.KeycardCustomManagement => new ManagementKeycard(keycard), ItemType.KeycardCustomMetalCase => new MetalKeycard(keycard), _ => new Keycard(keycard), - }, + } }, UsableItem usable => usable switch { @@ -342,7 +340,7 @@ public static T Get(ushort serial) ItemType.KeycardCustomManagement => new ManagementKeycard(type), ItemType.KeycardCustomMetalCase => new MetalKeycard(type), _ => new Keycard(type, owner), - }, + } }, UsableItem usable => usable switch { @@ -524,4 +522,4 @@ internal virtual void ReadPickupInfoAfter(Pickup pickup) { } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Jailbird.cs b/EXILED/Exiled.API/Features/Items/Jailbird.cs index d4d5c60302..4cc9a59c86 100644 --- a/EXILED/Exiled.API/Features/Items/Jailbird.cs +++ b/EXILED/Exiled.API/Features/Items/Jailbird.cs @@ -11,13 +11,10 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; - using InventorySystem.Items; using InventorySystem.Items.Autosync; using InventorySystem.Items.Jailbird; - using Mirror; - using UnityEngine; using JailbirdPickup = Pickups.JailbirdPickup; diff --git a/EXILED/Exiled.API/Features/Items/Keycard.cs b/EXILED/Exiled.API/Features/Items/Keycard.cs index 92d424cd98..e153ebdbda 100644 --- a/EXILED/Exiled.API/Features/Items/Keycard.cs +++ b/EXILED/Exiled.API/Features/Items/Keycard.cs @@ -9,9 +9,7 @@ namespace Exiled.API.Features.Items { using Exiled.API.Enums; using Exiled.API.Interfaces; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs b/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs index 20334bb7f1..7497cfef56 100644 --- a/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs +++ b/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs @@ -14,13 +14,10 @@ namespace Exiled.API.Features.Items.Keycards using Exiled.API.Extensions; using Exiled.API.Features.Pools; using Exiled.API.Interfaces.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Keycards; - using UnityEngine; /// @@ -202,10 +199,10 @@ public ItemType FindMatch(bool matchDesign, bool matchPerms, bool matchColors) goto add; - cont: + cont: continue; - add: + add: matches.Add(type); } diff --git a/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs b/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs index 37ca31f796..bbf6b31de7 100644 --- a/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs +++ b/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs @@ -8,11 +8,9 @@ namespace Exiled.API.Features.Items.Keycards { using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items; using InventorySystem.Items.Autosync; using InventorySystem.Items.Keycards; - using Mirror; /// diff --git a/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs b/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs index e0a6b4676b..0caff46af8 100644 --- a/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs +++ b/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs @@ -12,9 +12,7 @@ namespace Exiled.API.Features.Items.Keycards using Exiled.API.Enums; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pickups.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items; using InventorySystem.Items.Keycards; diff --git a/EXILED/Exiled.API/Features/Items/Marshmallow.cs b/EXILED/Exiled.API/Features/Items/Marshmallow.cs index 9390c1b331..349fe342fb 100644 --- a/EXILED/Exiled.API/Features/Items/Marshmallow.cs +++ b/EXILED/Exiled.API/Features/Items/Marshmallow.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -8,14 +8,9 @@ namespace Exiled.API.Features.Items { using CustomPlayerEffects; - using Exiled.API.Interfaces; - using InventorySystem.Items.MarshmallowMan; - using InventorySystem.Items.Usables; - using PlayerStatsSystem; - using UnityEngine; /// @@ -101,7 +96,7 @@ public void MakeEvil(AhpStat.AhpProcess evilProcess = null) if (Evil) return; - Base.ReleaseEvil(evilProcess ?? EvilAhpProcess ?? Owner.GetModule().ServerAddProcess(Scp021J.MaxEvilAHP, Scp021J.MaxEvilAHP, 0F, 1F, 0F, true)); + Base.ReleaseEvil(evilProcess ?? EvilAhpProcess ?? Owner.GetModule().ServerAddProcess(450F, 450F, 0F, 1F, 0F, true)); } } } \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/MicroHid.cs b/EXILED/Exiled.API/Features/Items/MicroHid.cs index 07cad32048..0495a3b3bc 100644 --- a/EXILED/Exiled.API/Features/Items/MicroHid.cs +++ b/EXILED/Exiled.API/Features/Items/MicroHid.cs @@ -7,9 +7,14 @@ namespace Exiled.API.Features.Items { + using System; + using System.Reflection; + + using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; using InventorySystem.Items.Autosync; + using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.MicroHID; using InventorySystem.Items.MicroHID.Modules; diff --git a/EXILED/Exiled.API/Features/Items/Radio.cs b/EXILED/Exiled.API/Features/Items/Radio.cs index 449bc6bb21..d54abae2d9 100644 --- a/EXILED/Exiled.API/Features/Items/Radio.cs +++ b/EXILED/Exiled.API/Features/Items/Radio.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Items { using Enums; - using Exiled.API.Interfaces; using InventorySystem.Items.Radio; diff --git a/EXILED/Exiled.API/Features/Items/Scp127.cs b/EXILED/Exiled.API/Features/Items/Scp127.cs index 31177095a4..2c71fbe4bb 100644 --- a/EXILED/Exiled.API/Features/Items/Scp127.cs +++ b/EXILED/Exiled.API/Features/Items/Scp127.cs @@ -12,7 +12,6 @@ namespace Exiled.API.Features.Items using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Firearms.Modules.Scp127; - using UnityEngine; /// @@ -20,12 +19,12 @@ namespace Exiled.API.Features.Items /// public class Scp127 : Firearm { -#pragma warning disable SA1401 + #pragma warning disable SA1401 /// /// Custom amount of max HS. /// internal float? CustomHsMax; -#pragma warning restore SA1401 + #pragma warning restore SA1401 /// /// Initializes a new instance of the class. diff --git a/EXILED/Exiled.API/Features/Items/Scp1344.cs b/EXILED/Exiled.API/Features/Items/Scp1344.cs index cd824fc3f0..7f96da8903 100644 --- a/EXILED/Exiled.API/Features/Items/Scp1344.cs +++ b/EXILED/Exiled.API/Features/Items/Scp1344.cs @@ -11,7 +11,6 @@ namespace Exiled.API.Features.Items using InventorySystem.Items.Usables; using InventorySystem.Items.Usables.Scp1344; - using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers.Wearables; /// @@ -67,8 +66,10 @@ public Scp1344Status Status /// Whether or not 1344 should be dropped. public void Deactivate(bool dropItem = false) { - if (Status is not (Scp1344Status.Active or Scp1344Status.Stabbing or Scp1344Status.Dropping)) + if (Status is not(Scp1344Status.Active or Scp1344Status.Stabbing or Scp1344Status.Dropping)) + { return; + } Base.Owner.DisableWearables(WearableElements.Scp1344Goggles); Base.ActivateFinalEffects(); @@ -85,4 +86,4 @@ public void Deactivate(bool dropItem = false) /// public void Actived() => Status = Scp1344Status.Stabbing; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Scp1509.cs b/EXILED/Exiled.API/Features/Items/Scp1509.cs index 7cd4a6eef1..010aaf666e 100644 --- a/EXILED/Exiled.API/Features/Items/Scp1509.cs +++ b/EXILED/Exiled.API/Features/Items/Scp1509.cs @@ -12,9 +12,7 @@ namespace Exiled.API.Features.Items using Exiled.API.Enums; using Exiled.API.Interfaces; - using InventorySystem.Items.Scp1509; - using PlayerRoles; /// @@ -178,4 +176,4 @@ public IEnumerable RevivedPlayers UnequipDecayDelay = UnequipDecayDelay, }; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Scp1576.cs b/EXILED/Exiled.API/Features/Items/Scp1576.cs index 1b2551e66e..3ff4514e4a 100644 --- a/EXILED/Exiled.API/Features/Items/Scp1576.cs +++ b/EXILED/Exiled.API/Features/Items/Scp1576.cs @@ -50,4 +50,4 @@ internal Scp1576() /// public void StopTransmitting() => Base.ServerStopTransmitting(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Scp330.cs b/EXILED/Exiled.API/Features/Items/Scp330.cs index 4df42da51e..38c9ded765 100644 --- a/EXILED/Exiled.API/Features/Items/Scp330.cs +++ b/EXILED/Exiled.API/Features/Items/Scp330.cs @@ -290,4 +290,4 @@ internal override void ChangeOwner(Player oldOwner, Player newOwner) Base.Owner = newOwner.ReferenceHub; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Throwable.cs b/EXILED/Exiled.API/Features/Items/Throwable.cs index a4b0434632..721167a3b5 100644 --- a/EXILED/Exiled.API/Features/Items/Throwable.cs +++ b/EXILED/Exiled.API/Features/Items/Throwable.cs @@ -93,7 +93,7 @@ public void Throw(bool fullForce = true) } /// - /// Cancels the throw of the item. + /// Cancel the the throws of the item. /// public void CancelThrow() => Base.ServerProcessCancellation(); @@ -113,4 +113,4 @@ public void Throw(bool fullForce = true) /// A string containing Throwable-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{PinPullTime}|"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Items/Usable.cs b/EXILED/Exiled.API/Features/Items/Usable.cs index 9da85656aa..efdff0c2ff 100644 --- a/EXILED/Exiled.API/Features/Items/Usable.cs +++ b/EXILED/Exiled.API/Features/Items/Usable.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features.Items using Exiled.API.Interfaces; using InventorySystem; + using InventorySystem.Items; using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables; diff --git a/EXILED/Exiled.API/Features/Lift.cs b/EXILED/Exiled.API/Features/Lift.cs index 8e47b7ba04..d191cd6764 100644 --- a/EXILED/Exiled.API/Features/Lift.cs +++ b/EXILED/Exiled.API/Features/Lift.cs @@ -16,12 +16,9 @@ namespace Exiled.API.Features using Exiled.API.Features.Doors; using Exiled.API.Features.Pools; using Exiled.API.Interfaces; - using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; - using UnityEngine; - using Utils; using static Interactables.Interobjects.ElevatorChamber; @@ -86,7 +83,7 @@ internal Lift(ElevatorChamber elevator) /// /// Gets a value of the internal doors list. /// - public IReadOnlyCollection Doors => internalDoorsList.Select(Door.Get).ToList(); + public IReadOnlyCollection Doors => internalDoorsList.Select(x => Door.Get(x)).ToList(); /// /// Gets a of in the . @@ -335,4 +332,4 @@ public void ChangeLock(DoorLockReason lockReason) /// A string containing Lift-related data. public override string ToString() => $"{Type} {Status} [{CurrentLevel}] *{IsLocked}*"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Lockers/Chamber.cs b/EXILED/Exiled.API/Features/Lockers/Chamber.cs index 980f5df9f6..610fcaa90f 100644 --- a/EXILED/Exiled.API/Features/Lockers/Chamber.cs +++ b/EXILED/Exiled.API/Features/Lockers/Chamber.cs @@ -16,11 +16,8 @@ namespace Exiled.API.Features.Lockers using Exiled.API.Extensions; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; - using InventorySystem.Items.Pickups; - using MapGeneration.Distributors; - using UnityEngine; /// @@ -307,4 +304,4 @@ public Vector3 GetRandomSpawnPoint() /// . internal static Chamber Get(LockerChamber chamber) => chamber == null ? null : Chambers.TryGetValue(chamber, out Chamber chmb) ? chmb : new(chamber, Locker.Get(x => x.Chambers.Any(x => x.Base == chamber)).FirstOrDefault()); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Lockers/Locker.cs b/EXILED/Exiled.API/Features/Lockers/Locker.cs index f4b4164adb..5b3d9e33cf 100644 --- a/EXILED/Exiled.API/Features/Lockers/Locker.cs +++ b/EXILED/Exiled.API/Features/Lockers/Locker.cs @@ -16,8 +16,10 @@ namespace Exiled.API.Features.Lockers using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + using InventorySystem.Items.Pickups; using MapGeneration.Distributors; + using Mirror; using UnityEngine; using BaseLocker = MapGeneration.Distributors.Locker; @@ -223,4 +225,4 @@ internal static void ClearCache() Chamber.Chambers.Clear(); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index 95c13e13c2..4e8b3547ed 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -15,33 +15,22 @@ namespace Exiled.API.Features using System.Linq; using CommandSystem.Commands.RemoteAdmin.Cleanup; - using Decals; - using Enums; - using Exiled.API.Extensions; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups; using Interactables.Interobjects; - using InventorySystem; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; - using Items; - using LightContainmentZoneDecontamination; - using MapGeneration; - using PlayerRoles.Ragdolls; - using RemoteAdmin; - using UnityEngine; - using Utils; using Utils.Networking; @@ -542,4 +531,4 @@ internal static void ClearCache() #pragma warning restore CS0618 } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Npc.cs b/EXILED/Exiled.API/Features/Npc.cs index 242f235091..893feac92c 100644 --- a/EXILED/Exiled.API/Features/Npc.cs +++ b/EXILED/Exiled.API/Features/Npc.cs @@ -14,23 +14,15 @@ namespace Exiled.API.Features using CommandSystem; using CommandSystem.Commands.RemoteAdmin.Dummies; - using Exiled.API.Enums; using Exiled.API.Features.CustomStats; using Exiled.API.Features.Roles; - using Footprinting; - using MEC; - using Mirror; - using NetworkManagerUtils.Dummies; - using PlayerRoles; - using PlayerStatsSystem; - using UnityEngine; /// @@ -110,7 +102,7 @@ public float? MaxDistance set { - if (!value.HasValue) + if(!value.HasValue) return; if (!GameObject.TryGetComponent(out PlayerFollower follower)) @@ -139,7 +131,7 @@ public float? MinDistance set { - if (!value.HasValue) + if(!value.HasValue) return; if (!GameObject.TryGetComponent(out PlayerFollower follower)) @@ -168,7 +160,7 @@ public float? Speed set { - if (!value.HasValue) + if(!value.HasValue) return; if (!GameObject.TryGetComponent(out PlayerFollower follower)) @@ -364,4 +356,4 @@ public void LateDestroy(float time) }); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs b/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs index 1bc646df3c..9b141f22f9 100644 --- a/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs @@ -9,9 +9,7 @@ namespace Exiled.API.Features.Objectives { using Exiled.API.Enums; using Exiled.API.Interfaces; - using PlayerRoles; - using Respawning.Objectives; using BaseObjective = Respawning.Objectives.EscapeObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs b/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs index 283d3b0d1a..77e95fa5e8 100644 --- a/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs @@ -9,7 +9,6 @@ namespace Exiled.API.Features.Objectives { using Exiled.API.Enums; using Exiled.API.Interfaces; - using Respawning.Objectives; using BaseObjective = Respawning.Objectives.GeneratorActivatedObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs b/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs index d34fb21611..5a9f136ba9 100644 --- a/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Objectives using Exiled.API.Enums; using Exiled.API.Features.DamageHandlers; using Exiled.API.Interfaces; - using Respawning.Objectives; using BaseObjective = Respawning.Objectives.HumanDamageObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs b/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs index bd73b46ebc..7856d1845b 100644 --- a/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs @@ -10,9 +10,7 @@ namespace Exiled.API.Features.Objectives using Exiled.API.Enums; using Exiled.API.Features.DamageHandlers; using Exiled.API.Interfaces; - using PlayerRoles; - using Respawning.Objectives; using BaseObjective = Respawning.Objectives.HumanKillObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs b/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs index b6f50b4c31..77dd37f5c7 100644 --- a/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Objectives { using Exiled.API.Interfaces; - using Respawning.Objectives; /// diff --git a/EXILED/Exiled.API/Features/Objectives/Objective.cs b/EXILED/Exiled.API/Features/Objectives/Objective.cs index 4a4f09388e..7497737b0f 100644 --- a/EXILED/Exiled.API/Features/Objectives/Objective.cs +++ b/EXILED/Exiled.API/Features/Objectives/Objective.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,15 +7,14 @@ namespace Exiled.API.Features.Objectives { + using System; using System.Collections.Generic; using System.Linq; using Exiled.API.Enums; using Exiled.API.Features.Core; using Exiled.API.Interfaces; - using PlayerRoles; - using Respawning; using Respawning.Objectives; @@ -70,7 +69,7 @@ internal Objective(FactionObjectiveBase objectiveFootprintBase) ObjectiveType.HumanDamage => FactionInfluenceManager.Objectives.OfType().First(), ObjectiveType.HumanKill => FactionInfluenceManager.Objectives.OfType().First(), ObjectiveType.Escape => FactionInfluenceManager.Objectives.OfType().First(), - _ => null, + _ => null }); /// @@ -90,7 +89,7 @@ public static Objective Get(FactionObjectiveBase factionObjectiveBase) BaseHumanDamageObjective humanDamageObjective => new HumanDamageObjective(humanDamageObjective), BaseHumanKillObjective humanKillObjective => new HumanKillObjective(humanKillObjective), BaseEscapeObjective escapeObjective => new EscapeObjective(escapeObjective), - _ => new Objective(factionObjectiveBase), + _ => new Objective(factionObjectiveBase) }; } diff --git a/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs b/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs index e4d79ad4b1..a50a36057f 100644 --- a/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs @@ -11,9 +11,7 @@ namespace Exiled.API.Features.Objectives using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; - using Respawning.Objectives; - using UnityEngine; using BaseObjective = Respawning.Objectives.ScpItemPickupObjective; diff --git a/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs b/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs index b061a06ba4..ce68921031 100644 --- a/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs @@ -68,4 +68,4 @@ public ushort Ammo /// A string containing AmmoPickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{MaxDisplayedAmmo}| -{Ammo}-"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs b/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs index aef81f1c79..3de6897413 100644 --- a/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs @@ -18,6 +18,8 @@ namespace Exiled.API.Features.Pickups using InventorySystem.Items; using InventorySystem.Items.Armor; + using UnityEngine; + using BaseBodyArmor = InventorySystem.Items.Armor.BodyArmorPickup; /// @@ -142,4 +144,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs b/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs index 1315fc2be4..4d7ec52765 100644 --- a/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Pickups using System; using Exiled.API.Interfaces; - using InventorySystem.Items; using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Attachments; @@ -118,26 +117,6 @@ public uint Attachments set => Base.Worldmodel.Setup(Base.CurId, Base.Worldmodel.WorldmodelType, value); } - /// - /// Gets or sets the damage for this . - /// - public float Damage { get; set; } - - /// - /// Gets or sets the inaccuracy for this . - /// - public float Inaccuracy { get; set; } - - /// - /// Gets or sets the penetration for this . - /// - public float Penetration { get; set; } - - /// - /// Gets or sets how much fast the value drop over the distance. - /// - public float DamageFalloffDistance { get; set; } - /// /// Initializes the item as if it was spawned naturally by map generation. /// @@ -156,10 +135,6 @@ internal override void ReadItemInfo(Items.Item item) { MaxAmmo = firearm.PrimaryMagazine.ConstantMaxAmmo; AmmoDrain = firearm.AmmoDrain; - Damage = firearm.Damage; - Inaccuracy = firearm.Inaccuracy; - Penetration = firearm.Penetration; - DamageFalloffDistance = firearm.DamageFalloffDistance; } base.ReadItemInfo(item); @@ -178,4 +153,4 @@ protected override void InitializeProperties(ItemBase itemBase) MaxAmmo = magazine.AmmoMax; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs b/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs index d8d9f9bf95..3cdb59898e 100644 --- a/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs @@ -88,4 +88,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs b/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs index 3cb4e21bf6..3d62c428fc 100644 --- a/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs @@ -94,4 +94,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs b/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs index d7f0ef0df2..93c18ff7bf 100644 --- a/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs @@ -134,4 +134,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs index f084899e32..5a80eb35ca 100644 --- a/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs @@ -87,4 +87,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs index d8694292f8..58e24a105e 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs @@ -16,14 +16,11 @@ namespace Exiled.API.Features.Pickups.Keycards using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pools; using Exiled.API.Interfaces.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; - using UnityEngine; /// @@ -167,10 +164,10 @@ public ItemType FindMatch(bool matchDesign, bool matchPerms, bool matchColors) goto add; - cont: + cont: continue; - add: + add: matches.Add(type); } diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs index cf6d6e6b82..9666c24b21 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs @@ -9,12 +9,9 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs index 94b34e7c92..cf1c0ea894 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs @@ -9,12 +9,9 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs index 62037fb344..8a79b0d405 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Pickups.Keycards using Exiled.API.Enums; using Exiled.API.Features.Items; using Exiled.API.Features.Items.Keycards; - using InventorySystem.Items; using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs index 9417f4c4e2..162ec6a721 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs @@ -9,12 +9,9 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs index a55c810864..a6874f57d3 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs @@ -9,12 +9,9 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs b/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs index 5091387416..255c32b6ad 100644 --- a/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs @@ -7,8 +7,8 @@ namespace Exiled.API.Features.Pickups { + using Exiled.API.Features.Items; using Exiled.API.Interfaces; - using InventorySystem.Items.MicroHID.Modules; using BaseMicroHID = InventorySystem.Items.MicroHID.MicroHIDPickup; @@ -149,4 +149,4 @@ public bool TryGetFireController(MicroHidFiringMode firingMode, out T module) /// A string containing MicroHIDPickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Energy}|"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Pickup.cs index 4c49efbd70..5dcceb6135 100644 --- a/EXILED/Exiled.API/Features/Pickups/Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Pickup.cs @@ -7,6 +7,7 @@ namespace Exiled.API.Features.Pickups { + using System; using System.Collections.Generic; using System.Linq; @@ -23,9 +24,7 @@ namespace Exiled.API.Features.Pickups using InventorySystem.Items.Usables.Scp244; using Mirror; - using RelativePositioning; - using UnityEngine; using BaseAmmoPickup = InventorySystem.Items.Firearms.Ammo.AmmoPickup; @@ -377,7 +376,7 @@ public static T Get(ItemPickupBase pickupBase) /// /// An of to convert into an of . /// An of containing all existing instances. - public static IEnumerable Get(IEnumerable pickups) => pickups.Select(Get); + public static IEnumerable Get(IEnumerable pickups) => pickups.Select(ipb => Get(ipb)); /// /// Gets an of containing all existing instances given an . @@ -689,4 +688,4 @@ protected virtual void InitializeProperties(ItemBase itemBase) { } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs index 6508d90160..a4cd84ef93 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs @@ -47,4 +47,4 @@ internal EffectGrenadeProjectile(ItemType type) /// A string containing EffectGrenadePickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs index 47809957a9..07cdbebefb 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs @@ -104,4 +104,4 @@ public float ScpDamageMultiplier /// A string containing ExplosionGrenadePickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs index 361d5428fa..8d30856743 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs @@ -74,4 +74,4 @@ public float SurfaceDistanceIntensifier /// A string containing FlashbangPickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs index 276353262a..f9d5b4f10d 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs @@ -12,12 +12,10 @@ namespace Exiled.API.Features.Pickups.Projectiles using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Interfaces; - using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; - using UnityEngine; using Object = UnityEngine.Object; @@ -172,4 +170,4 @@ public Projectile Spawn(Vector3 position, Quaternion? rotation = null, bool shou /// A string containing ProjectilePickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs index 9e44ea478c..f33d935a97 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs @@ -7,10 +7,10 @@ namespace Exiled.API.Features.Pickups.Projectiles { + using System; using System.Reflection; using Exiled.API.Interfaces; - using HarmonyLib; using InventorySystem.Items.ThrowableProjectiles; @@ -105,4 +105,4 @@ public float FriendlyFireTime /// A string containing Scp018Pickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{Damage}- ={IgnoreFriendlyFire}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs index f1a902828c..0c5715a9b9 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs @@ -62,4 +62,4 @@ public bool DropSound /// A string containing Scp2176Pickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{FuseTime}| ={IsAlreadyDetonated}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs index 5a26e9a2ef..cafd9be8cb 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs @@ -92,4 +92,4 @@ public void Explode() /// A string containing TimeGrenadePickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{FuseTime}| ={IsAlreadyDetonated}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs b/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs index 80bb879b27..b2eef73401 100644 --- a/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs @@ -74,4 +74,4 @@ public bool IsEnabled /// A string containing RadioPickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{BatteryLevel}| -{Range}- /{IsEnabled}/"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs index 6ea875e2fe..935bc636ca 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs @@ -9,7 +9,6 @@ namespace Exiled.API.Features.Pickups { using Exiled.API.Features.Items; using Exiled.API.Interfaces; - using InventorySystem.Items; using InventorySystem.Items.Scp1509; @@ -96,4 +95,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs index 805cf32ebe..64ab902dc6 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs @@ -46,4 +46,4 @@ internal Scp1576Pickup() /// A string containing Scp1576Pickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}*"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs index 0652792e3d..b7ac0126cf 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs @@ -12,7 +12,7 @@ namespace Exiled.API.Features.Pickups using Exiled.API.Features.DamageHandlers; using Exiled.API.Features.Items; using Exiled.API.Interfaces; - + using InventorySystem.Items; using InventorySystem.Items.Usables.Scp244; using UnityEngine; @@ -127,7 +127,7 @@ public float ActivationDot /// Damages the Scp244Pickup. /// /// The used to deal damage. - /// if the damage has been dealt; otherwise, . + /// if the the damage has been deal; otherwise, . public bool Damage(DamageHandler handler) => Base.Damage(handler.Damage, handler, Vector3.zero); /// @@ -148,4 +148,4 @@ internal override void ReadItemInfo(Item item) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs index 1ff14d5b15..a4a971afb7 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs @@ -68,4 +68,4 @@ public List Candies /// A string containing Scp330Pickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{ExposedCandy}| -{Candies}-"; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs b/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs index 511e7ce4ac..023469e4fe 100644 --- a/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs @@ -68,4 +68,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index a377c0a483..5627e8dc91 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -14,14 +14,10 @@ namespace Exiled.API.Features using System.Runtime.CompilerServices; using Core; - using CustomPlayerEffects; using CustomPlayerEffects.Danger; - using DamageHandlers; - using Enums; - using Exiled.API.Features.Core.Interfaces; using Exiled.API.Features.CustomStats; using Exiled.API.Features.Doors; @@ -32,17 +28,11 @@ namespace Exiled.API.Features using Exiled.API.Features.Roles; using Exiled.API.Interfaces; using Exiled.API.Structs; - using Extensions; - using Footprinting; - using global::Scp914; - using Hints; - using Interactables.Interobjects; - using InventorySystem; using InventorySystem.Disarming; using InventorySystem.Items; @@ -52,35 +42,24 @@ namespace Exiled.API.Features using InventorySystem.Items.Firearms.ShotEvents; using InventorySystem.Items.Usables; using InventorySystem.Items.Usables.Scp330; - using MapGeneration.Distributors; using MapGeneration.Rooms; - using MEC; - using Mirror; using Mirror.LiteNetLib4Mirror; - using PlayerRoles; using PlayerRoles.FirstPersonControl; using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; using PlayerRoles.RoleAssign; using PlayerRoles.Spectating; using PlayerRoles.Voice; - using PlayerStatsSystem; - using RelativePositioning; - using RemoteAdmin; - using RoundRestarting; - using UnityEngine; - using Utils; using Utils.Networking; - using VoiceChat; using VoiceChat.Playbacks; @@ -939,7 +918,10 @@ public float ArtificialHealth if (value > MaxArtificialHealth) MaxArtificialHealth = value; - ActiveArtificialHealthProcesses.FirstOrDefault()?.CurrentAmount = value; + AhpStat.AhpProcess ahp = ActiveArtificialHealthProcesses.FirstOrDefault(); + + if (ahp is not null) + ahp.CurrentAmount = value; } } @@ -956,7 +938,8 @@ public float MaxArtificialHealth AhpStat.AhpProcess ahp = ActiveArtificialHealthProcesses.FirstOrDefault(); - ahp?.Limit = value; + if (ahp is not null) + ahp.Limit = value; } } @@ -1559,7 +1542,7 @@ public static Player Get(string args) /// Contains the updated arguments after processing. /// Determines whether empty entries should be kept in the result. /// An representing the processed players. - public static IEnumerable GetProcessedData(ArraySegment args, int startIndex, out string[] newargs, bool keepEmptyEntries = false) => RAUtils.ProcessPlayerIdOrNamesList(args, startIndex, out newargs, keepEmptyEntries).Select(Get); + public static IEnumerable GetProcessedData(ArraySegment args, int startIndex, out string[] newargs, bool keepEmptyEntries = false) => RAUtils.ProcessPlayerIdOrNamesList(args, startIndex, out newargs, keepEmptyEntries).Select(hub => Get(hub)); /// /// Gets an containing all players processed based on the arguments specified. @@ -2948,7 +2931,7 @@ public void AddItem(Firearm item, IEnumerable identifiers) /// The that was added. public Item AddItem(FirearmPickup pickup, IEnumerable identifiers) { - Firearm firearm = Item.Get(Inventory.ServerAddItem(pickup.Type, ItemAddReason.PickedUp, pickup.Serial, pickup.Base)); + Firearm firearm = Item.Get(Inventory.ServerAddItem(pickup.Type, ItemAddReason.AdminCommand, pickup.Serial, pickup.Base)); if (identifiers is not null) firearm.AddAttachment(identifiers); @@ -4048,7 +4031,8 @@ public void SetCooldownItem(float time, ItemType itemType) /// public override bool Equals(object obj) { - return obj is Player player && ReferenceHub == player.ReferenceHub; + Player player = obj as Player; + return (object)player != null && ReferenceHub == player.ReferenceHub; } /// @@ -4064,7 +4048,7 @@ public override int GetHashCode() /// The second player instance. /// if the values are equal. #pragma warning disable SA1201 - public static bool operator ==(Player player1, Player player2) => player1?.Equals(player2) ?? (player2 is null); + public static bool operator ==(Player player1, Player player2) => player1?.Equals(player2) ?? player2 is null; /// /// Returns whether the two players are different. diff --git a/EXILED/Exiled.API/Features/Plugin.cs b/EXILED/Exiled.API/Features/Plugin.cs index e2818fb8df..cebeab971f 100644 --- a/EXILED/Exiled.API/Features/Plugin.cs +++ b/EXILED/Exiled.API/Features/Plugin.cs @@ -15,13 +15,9 @@ namespace Exiled.API.Features using System.Reflection; using CommandSystem; - using Enums; - using Extensions; - using Interfaces; - using RemoteAdmin; /// @@ -126,7 +122,9 @@ public virtual void OnRegisteringCommands() if (typeof(ParentCommand).IsAssignableFrom(commandHandlerType)) { - if (GetCommand(commandHandlerType) is not ParentCommand parentCommand) + ParentCommand parentCommand = GetCommand(commandHandlerType) as ParentCommand; + + if (parentCommand == null) { if (!toRegister.TryGetValue(commandHandlerType, out List list)) toRegister.Add(commandHandlerType, new() { command }); diff --git a/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs b/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs index a1352d6b8d..93ebd299d4 100644 --- a/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs +++ b/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs @@ -83,4 +83,4 @@ public KeyValuePair[] ToArrayReturn(Dictionary obj) return array; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pools/HashSetPool.cs b/EXILED/Exiled.API/Features/Pools/HashSetPool.cs index 06332c0437..b8749f5faa 100644 --- a/EXILED/Exiled.API/Features/Pools/HashSetPool.cs +++ b/EXILED/Exiled.API/Features/Pools/HashSetPool.cs @@ -56,4 +56,4 @@ public T[] ToArrayReturn(HashSet obj) return array; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pools/IPool.cs b/EXILED/Exiled.API/Features/Pools/IPool.cs index edd40fedf4..57a2f3da46 100644 --- a/EXILED/Exiled.API/Features/Pools/IPool.cs +++ b/EXILED/Exiled.API/Features/Pools/IPool.cs @@ -25,4 +25,4 @@ public interface IPool /// The object to return, of type . public void Return(T obj); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pools/ListPool.cs b/EXILED/Exiled.API/Features/Pools/ListPool.cs index dda0918930..f0508f7834 100644 --- a/EXILED/Exiled.API/Features/Pools/ListPool.cs +++ b/EXILED/Exiled.API/Features/Pools/ListPool.cs @@ -62,4 +62,4 @@ public T[] ToArrayReturn(List obj) return array; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pools/QueuePool.cs b/EXILED/Exiled.API/Features/Pools/QueuePool.cs index 7b3e093a9f..04b5f3df50 100644 --- a/EXILED/Exiled.API/Features/Pools/QueuePool.cs +++ b/EXILED/Exiled.API/Features/Pools/QueuePool.cs @@ -77,4 +77,4 @@ public T[] ToArrayReturn(Queue obj) return array; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs b/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs index edf576e663..16d84cc697 100644 --- a/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs +++ b/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs @@ -52,4 +52,4 @@ public string ToStringReturn(StringBuilder obj) return s; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/PrefabHelper.cs b/EXILED/Exiled.API/Features/PrefabHelper.cs index fe05eceef2..22579651ac 100644 --- a/EXILED/Exiled.API/Features/PrefabHelper.cs +++ b/EXILED/Exiled.API/Features/PrefabHelper.cs @@ -14,12 +14,9 @@ namespace Exiled.API.Features using Exiled.API.Enums; using Exiled.API.Features.Attributes; - using MapGeneration.Distributors; using MapGeneration.RoomConnectors; - using Mirror; - using UnityEngine; /// @@ -35,7 +32,7 @@ public static class PrefabHelper /// /// Gets a of and their corresponding . /// - public static IReadOnlyDictionary PrefabToGameObjectAndComponent => Prefabs; + public static IReadOnlyDictionary PrefabToGameObjectAndComponent => Prefabs; /// /// Gets a of and their corresponding . @@ -127,7 +124,7 @@ public static GameObject Spawn(PrefabType prefabType, Vector3 position = default PrefabType.HCZTwoSided => 0b00000000, PrefabType.HCZOneSided => 0b00000001, PrefabType.HCZBreakableDoor => 0b00000011, - _ => 0, + _ => 0 }; } diff --git a/EXILED/Exiled.API/Features/Ragdoll.cs b/EXILED/Exiled.API/Features/Ragdoll.cs index e743ad4ea2..19321ee35d 100644 --- a/EXILED/Exiled.API/Features/Ragdoll.cs +++ b/EXILED/Exiled.API/Features/Ragdoll.cs @@ -12,22 +12,15 @@ namespace Exiled.API.Features using System.Linq; using DeathAnimations; - using Enums; - using Exiled.API.Extensions; using Exiled.API.Interfaces; - using Mirror; - using PlayerRoles; using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.Ragdolls; - using PlayerStatsSystem; - using RelativePositioning; - using UnityEngine; using BaseScp3114Ragdoll = PlayerRoles.PlayableScps.Scp3114.Scp3114Ragdoll; @@ -479,4 +472,4 @@ public void Spawn(NetworkConnection ownerConnection, uint? assetId = null) /// A string containing Ragdoll-related data. public override string ToString() => $"{Owner} ({Name}) [{DeathReason}] *{Role}* |{CreationTime}| ={IsExpired}="; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Recontainer.cs b/EXILED/Exiled.API/Features/Recontainer.cs index 4b17861038..dbc31a35bf 100644 --- a/EXILED/Exiled.API/Features/Recontainer.cs +++ b/EXILED/Exiled.API/Features/Recontainer.cs @@ -12,11 +12,8 @@ namespace Exiled.API.Features using System.Linq; using Enums; - using Exiled.API.Features.Doors; - using PlayerRoles.PlayableScps.Scp079; - using UnityEngine; /// @@ -190,9 +187,7 @@ public static bool IsContainmentSequenceSuccessful /// /// The announcement to play. /// The glitchy multiplier. -#pragma warning disable IDE0060 // TODO: glitchyMultiplier is not used public static void PlayAnnouncement(string announcement, float glitchyMultiplier) => Base.PlayAnnouncement(announcement, false, false, null); -#pragma warning restore IDE0060 /// /// Begins the overcharge procedure. diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index aeebe336f6..fba56ca96d 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -12,17 +12,12 @@ namespace Exiled.API.Features using System.Linq; using CustomPlayerEffects; - using Enums; - using Extensions; - using PlayerRoles; - using Respawning; using Respawning.Waves; using Respawning.Waves.Generic; - using UnityEngine; /// @@ -33,7 +28,6 @@ public static class Respawn /// /// Gets the of paused 's. /// - [Obsolete("This is now unused.", true)] public static List PausedWaves { get; } = new(); /// @@ -395,43 +389,31 @@ public static void ForceWave(SpawnableWaveBase spawnableWaveBase) /// Pauses a specific respawn wave by removing it from the active wave list and adding it to the paused wave list. /// /// The representing the wave to pause. - public static void PauseWave(SpawnableFaction spawnableFaction) => PauseWave(spawnableFaction, true); - - /// - /// Pauses or resumes the timer of a time-based respawn wave for the specified faction. - /// - /// The faction associated with the respawn wave. - /// True to pause the wave timer, false to resume it. - public static void PauseWave(SpawnableFaction spawnableFaction, bool isForcePause) + public static void PauseWave(SpawnableFaction spawnableFaction) { if (TryGetWaveBase(spawnableFaction, out SpawnableWaveBase spawnableWaveBase)) { - if (spawnableWaveBase is TimeBasedWave timeBasedWave) + if (!PausedWaves.Contains(spawnableWaveBase)) + { + PausedWaves.Add(spawnableWaveBase); + } + + if (WaveManager.Waves.Contains(spawnableWaveBase)) { - timeBasedWave.Timer.IsForcefullyPaused = isForcePause; + WaveManager.Waves.Remove(spawnableWaveBase); } } } /// - /// Pauses all time-based respawn waves by controlling their timers. + /// Pauses respawn waves by removing them from WaveManager.Waves and storing them in . /// - public static void PauseWaves() => PauseWaves(true); - - /// - /// Pauses or resumes all time-based respawn waves by controlling their timers. - /// - /// If true, all time-based waves will be paused. If false, their timers will resume. - /// Unlike ClearWaves, this does not remove waves from the system, it only controls their timer state. - public static void PauseWaves(bool isForcePause = true) + /// + public static void PauseWaves() { - foreach (SpawnableWaveBase wave in WaveManager.Waves) - { - if (wave is TimeBasedWave timeBasedWave) - { - timeBasedWave.Timer.IsForcefullyPaused = isForcePause; - } - } + PausedWaves.Clear(); + PausedWaves.AddRange(WaveManager.Waves); + WaveManager.Waves.Clear(); } /// @@ -450,61 +432,50 @@ public static void PauseWaves(List spawnableFactions) } /// - /// Pauses the specified list of respawn waves by iterating through each wave - /// and pausing it using the method. - /// - /// A list of instances representing the waves to pause. - /// True to pause the wave timer, false to resume it. - public static void PauseWaves(List spawnableFactions, bool isForcePause = true) - { - foreach (SpawnableFaction spawnableFaction in spawnableFactions) - { - PauseWave(spawnableFaction, isForcePause); - } - } - - /// - /// Resumes respawn waves. + /// Resumes respawn waves by filling WaveManager.Waves with values stored in . /// + /// + /// This also clears . public static void ResumeWaves() { - foreach (SpawnableWaveBase wave in WaveManager.Waves) - { - if (wave is TimeBasedWave timeBasedWave) - { - timeBasedWave.Timer.IsForcefullyPaused = false; - } - } + WaveManager.Waves.Clear(); + WaveManager.Waves.AddRange(PausedWaves); + PausedWaves.Clear(); } /// /// Restarts a specific respawn wave by adding it back to the active wave list /// and removing it from the paused wave list if necessary. /// - /// The representing the wave to restart. + /// + /// The representing the wave to restart. + /// public static void RestartWave(SpawnableFaction spawnableFaction) { - PauseWave(spawnableFaction, false); - } + if (TryGetWaveBase(spawnableFaction, out SpawnableWaveBase spawnableWaveBase)) + { + if (!WaveManager.Waves.Contains(spawnableWaveBase)) + { + WaveManager.Waves.Add(spawnableWaveBase); + } - /// - /// Restarts respawn waves by clearing WaveManager.Waves and filling it with new values.. - /// - public static void RestartWaves() => RestartWaves(true); + if (PausedWaves.Contains(spawnableWaveBase)) + { + PausedWaves.Remove(spawnableWaveBase); + } + } + } /// /// Restarts respawn waves by clearing WaveManager.Waves and filling it with new values.. /// - /// True to reset the spawn interval. - public static void RestartWaves(bool resetSpawnInterval) + /// + /// This also clears . + public static void RestartWaves() { - foreach (SpawnableWaveBase wave in WaveManager.Waves) - { - if (wave is TimeBasedWave timeBasedWave) - { - timeBasedWave.Timer.Reset(resetSpawnInterval); - } - } + WaveManager.Waves.Clear(); + WaveManager.Waves.AddRange(new List { new ChaosMiniWave(), new ChaosSpawnWave(), new NtfMiniWave(), new NtfSpawnWave() }); + PausedWaves.Clear(); } /// diff --git a/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs b/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs index 230a127c4c..42e6cfe349 100644 --- a/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs +++ b/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs @@ -7,7 +7,14 @@ namespace Exiled.API.Features.Roles { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using PlayerRoles; + using PlayerRoles.Voice; /// /// Defines a role that represents players with destroyed role. @@ -26,4 +33,4 @@ internal DestroyedRole(PlayerRoleBase baseRole) /// public override RoleTypeId Type { get; } = RoleTypeId.Destroyed; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs b/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs index a245812f32..632abc33aa 100644 --- a/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs +++ b/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Roles { using PlayerRoles; - using UnityEngine; using FilmmakerGameRole = PlayerRoles.Filmmaker.FilmmakerRole; diff --git a/EXILED/Exiled.API/Features/Roles/FpcRole.cs b/EXILED/Exiled.API/Features/Roles/FpcRole.cs index 17294f5236..e61e866ea7 100644 --- a/EXILED/Exiled.API/Features/Roles/FpcRole.cs +++ b/EXILED/Exiled.API/Features/Roles/FpcRole.cs @@ -11,7 +11,6 @@ namespace Exiled.API.Features.Roles using System.Collections.Generic; using Exiled.API.Features.Pools; - using PlayerRoles; using PlayerRoles.FirstPersonControl; using PlayerRoles.FirstPersonControl.Thirdperson; @@ -19,11 +18,8 @@ namespace Exiled.API.Features.Roles using PlayerRoles.Spectating; using PlayerRoles.Visibility; using PlayerRoles.Voice; - using PlayerStatsSystem; - using RelativePositioning; - using UnityEngine; /// @@ -352,4 +348,4 @@ public void Jump(float? jumpStrength = null) FirstPersonController.FpcModule.Motor.JumpController.ForceJump(strength); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/HumanRole.cs b/EXILED/Exiled.API/Features/Roles/HumanRole.cs index 307376b44b..767a010d45 100644 --- a/EXILED/Exiled.API/Features/Roles/HumanRole.cs +++ b/EXILED/Exiled.API/Features/Roles/HumanRole.cs @@ -9,7 +9,7 @@ namespace Exiled.API.Features.Roles { using PlayerRoles; using PlayerRoles.PlayableScps.HumeShield; - + using Respawning; using Respawning.NamingRules; using HumanGameRole = PlayerRoles.HumanRole; diff --git a/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs b/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs index 741d274e0d..e0921af831 100644 --- a/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs +++ b/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs @@ -19,4 +19,4 @@ public interface IHumeShieldRole /// HumeShieldModuleBase HumeShieldModule { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/NoneRole.cs b/EXILED/Exiled.API/Features/Roles/NoneRole.cs index fe7aeb774f..ed52752a5a 100644 --- a/EXILED/Exiled.API/Features/Roles/NoneRole.cs +++ b/EXILED/Exiled.API/Features/Roles/NoneRole.cs @@ -30,6 +30,6 @@ internal NoneRole(PlayerRoleBase baseRole) public override RoleTypeId Type { get; } = RoleTypeId.None; /// - public VoiceModuleBase VoiceModule => (Base as NoneGameRole).VoiceModule; + public VoiceModuleBase VoiceModule => (Base as NoneGameRole) !.VoiceModule; } } \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs b/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs index d8f94198a9..92ce09fa3f 100644 --- a/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs +++ b/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs @@ -40,4 +40,4 @@ internal OverwatchRole(OverwatchGameRole baseRole) /// The overwatch RoleType. public RoleTypeId GetObfuscatedRole() => Base.GetRoleForUser(Owner.ReferenceHub); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/Role.cs b/EXILED/Exiled.API/Features/Roles/Role.cs index f6745bcb12..31f53ac040 100644 --- a/EXILED/Exiled.API/Features/Roles/Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Role.cs @@ -10,16 +10,12 @@ namespace Exiled.API.Features.Roles using System; using Enums; - using Exiled.API.Features.Core; using Exiled.API.Features.Spawn; using Exiled.API.Interfaces; - using Extensions; - using PlayerRoles; using PlayerRoles.PlayableScps.Scp049.Zombies; - using UnityEngine; using DestroyedGameRole = PlayerRoles.DestroyedRole; @@ -142,7 +138,7 @@ protected Role(PlayerRoleBase baseRole) /// The role. /// The other role. /// if the values are equal. - public static bool operator ==(Role left, Role right) => left?.Equals(right) ?? (right is null); + public static bool operator ==(Role left, Role right) => left?.Equals(right) ?? right is null; /// /// Returns whether the two roles are different. @@ -246,4 +242,4 @@ public virtual void Set(RoleTypeId newRole, SpawnReason reason, RoleSpawnFlags s _ => throw new Exception($"Missing role found in Exiled.API.Features.Roles.Role::Create ({role?.RoleTypeId}). Please contact an Exiled developer."), }; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/Scp049Role.cs b/EXILED/Exiled.API/Features/Roles/Scp049Role.cs index 05b163d390..6283226eb4 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp049Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp049Role.cs @@ -11,16 +11,13 @@ namespace Exiled.API.Features.Roles using System.Linq; using CustomPlayerEffects; - using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.Ragdolls; using PlayerRoles.Subroutines; - using PlayerStatsSystem; - using UnityEngine; using Scp049GameRole = PlayerRoles.PlayableScps.Scp049.Scp049Role; @@ -119,7 +116,7 @@ internal Scp049Role(Scp049GameRole baseRole) /// /// Gets all the dead zombies. /// - public IEnumerable DeadZombies => Scp049ResurrectAbility.DeadZombies.Select(Player.Get); + public IEnumerable DeadZombies => Scp049ResurrectAbility.DeadZombies.Select(x => Player.Get(x)); /// /// Gets all the resurrected players. @@ -365,4 +362,4 @@ public void Sense(Player player) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/Scp079Role.cs b/EXILED/Exiled.API/Features/Roles/Scp079Role.cs index 37202c1cdb..9d7e308659 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp079Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp079Role.cs @@ -12,13 +12,9 @@ namespace Exiled.API.Features.Roles using Exiled.API.Enums; using Exiled.API.Features.Doors; - using Interactables.Interobjects.DoorUtils; - using MapGeneration; - using Mirror; - using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.Scp079; @@ -27,9 +23,7 @@ namespace Exiled.API.Features.Roles using PlayerRoles.PlayableScps.Scp079.Rewards; using PlayerRoles.Subroutines; using PlayerRoles.Voice; - using RelativePositioning; - using Utils.NonAllocLINQ; using Mathf = UnityEngine.Mathf; @@ -627,4 +621,4 @@ public void ActivateTesla(bool consumeEnergy = true) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/Scp096Role.cs b/EXILED/Exiled.API/Features/Roles/Scp096Role.cs index 7dba16ecd4..6e78b6c662 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp096Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp096Role.cs @@ -322,4 +322,4 @@ public void Charge(float cooldown = 1f) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/Scp106Role.cs b/EXILED/Exiled.API/Features/Roles/Scp106Role.cs index fa94fe883e..8c5fda149a 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp106Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp106Role.cs @@ -10,13 +10,11 @@ namespace Exiled.API.Features.Roles using System.Collections.Generic; using Exiled.API.Enums; - using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; using PlayerRoles.PlayableScps.Scp106; using PlayerRoles.Subroutines; - using PlayerStatsSystem; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs b/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs index cb1bce9f4f..a4c9ba78cf 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs @@ -66,4 +66,4 @@ internal Scp1507Role(Scp1507GameRole baseRole) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base is ISpawnableScp spawnableScp ? spawnableScp.GetSpawnChance(alreadySpawned) : 0; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/Scp173Role.cs b/EXILED/Exiled.API/Features/Roles/Scp173Role.cs index 30928530d0..f7f603eece 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp173Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp173Role.cs @@ -11,15 +11,12 @@ namespace Exiled.API.Features.Roles using System.Linq; using Exiled.API.Features.Hazards; - using Mirror; - using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; using PlayerRoles.PlayableScps.Scp173; using PlayerRoles.Subroutines; - using UnityEngine; using Scp173GameRole = PlayerRoles.PlayableScps.Scp173.Scp173Role; @@ -165,7 +162,7 @@ public float RemainingTantrumCooldown /// /// Gets a of players that are currently viewing SCP-173. Can be empty. /// - public IEnumerable ObservingPlayers => ObserversTracker.Observers.Select(Player.Get); + public IEnumerable ObservingPlayers => ObserversTracker.Observers.Select(x => Player.Get(x)); /// /// Gets SCP-173's max move speed. diff --git a/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs b/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs index 4d685518cd..35a3aa032a 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Roles using System.Collections.Generic; using Exiled.API.Enums; - using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; diff --git a/EXILED/Exiled.API/Features/Roles/Scp939Role.cs b/EXILED/Exiled.API/Features/Roles/Scp939Role.cs index 42799d47a1..222a57670d 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp939Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp939Role.cs @@ -329,4 +329,4 @@ public void DestroyCurrentMimicPoint() /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs b/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs index 1ae9c59cab..d7fbcc7920 100644 --- a/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs +++ b/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs @@ -11,7 +11,6 @@ namespace Exiled.API.Features.Roles using PlayerRoles; using PlayerRoles.Voice; - using UnityEngine; using SpectatorGameRole = PlayerRoles.Spectating.SpectatorRole; @@ -75,4 +74,4 @@ public Player SpectatedPlayer /// public VoiceModuleBase VoiceModule => Base.VoiceModule; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Room.cs b/EXILED/Exiled.API/Features/Room.cs index bee30fa96c..846a76509c 100644 --- a/EXILED/Exiled.API/Features/Room.cs +++ b/EXILED/Exiled.API/Features/Room.cs @@ -12,26 +12,18 @@ namespace Exiled.API.Features using System.Linq; using Enums; - using Exiled.API.Extensions; using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; - using MapGeneration; using MapGeneration.Holidays; using MapGeneration.Rooms; - using MEC; - using Mirror; - using PlayerRoles.PlayableScps.Scp079; - using RelativePositioning; - using UnityEngine; - using Utils.NonAllocLINQ; /// @@ -437,16 +429,16 @@ internal void InternalCreate() Identifier = gameObject.GetComponent(); RoomIdentifierToRoom.Add(Identifier, this); + Zone = Identifier.Zone.GetZone(); + + if (Zone is ZoneType.Unspecified) + Log.Warn($"[ZONETYPE UNKNOWN] {Identifier} Zone : {Identifier?.Zone}"); + Type = FindType(gameObject); if (Type is RoomType.Unknown) Log.Warn($"[ROOMTYPE UNKNOWN] {Identifier} Name : {gameObject?.name.RemoveBracketsOnEndOfName()} Shape : {Identifier?.Shape}"); - Zone = Type is RoomType.Pocket ? ZoneType.Pocket : Identifier.Zone.GetZone(); - - if (Zone is ZoneType.Unspecified) - Log.Warn($"[ZONETYPE UNKNOWN] {Identifier} Zone : {Identifier?.Zone}"); - RoomLightControllers = RoomLightControllersValue.AsReadOnly(); GetComponentsInChildren().ForEach(component => @@ -508,7 +500,7 @@ private static RoomType FindType(GameObject gameObject) "HCZ_Corner_Deep" => RoomType.HczCornerDeep, "HCZ_Straight" => RoomType.HczStraight, "HCZ_Straight_C" => RoomType.HczStraightC, - "HCZ_Straight_PipeRoom" => RoomType.HczStraightPipeRoom, + "HCZ_Straight_PipeRoom"=> RoomType.HczStraightPipeRoom, "HCZ_Straight Variant" => RoomType.HczStraightVariant, "HCZ_ChkpA" => RoomType.HczElevatorA, "HCZ_ChkpB" => RoomType.HczElevatorB, @@ -541,7 +533,7 @@ private static RoomType FindType(GameObject gameObject) "HCZ_EZ_Checkpoint Part" => gameObject.transform.position.z switch { > 95 => RoomType.HczEzCheckpointA, - _ => RoomType.HczEzCheckpointB, + _ => RoomType.HczEzCheckpointB }, _ => RoomType.Unknown, }; @@ -554,4 +546,4 @@ private static string TryRemovePostfixes(string str) return str; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Round.cs b/EXILED/Exiled.API/Features/Round.cs index 1ee9b16407..02a3407b5a 100644 --- a/EXILED/Exiled.API/Features/Round.cs +++ b/EXILED/Exiled.API/Features/Round.cs @@ -259,4 +259,4 @@ public static bool EndRound(bool forceEnd = false) /// public static void Start() => CharacterClassManager.ForceRoundStart(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs b/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs index de6006d8f8..e8bb6a3f02 100644 --- a/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs +++ b/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features { using Exiled.API.Interfaces; - using PlayerRoles; using BaseScp3114Ragdoll = PlayerRoles.PlayableScps.Scp3114.Scp3114Ragdoll; @@ -76,4 +75,4 @@ public bool IsPlayingAnimation set => Base._playingAnimation = value; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Scp559.cs b/EXILED/Exiled.API/Features/Scp559.cs index 1a0225e446..246a030d7f 100644 --- a/EXILED/Exiled.API/Features/Scp559.cs +++ b/EXILED/Exiled.API/Features/Scp559.cs @@ -12,9 +12,7 @@ namespace Exiled.API.Features using System.Linq; using Exiled.API.Interfaces; - using MapGeneration; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Scp914.cs b/EXILED/Exiled.API/Features/Scp914.cs index 3088d8849c..7d9ea65818 100644 --- a/EXILED/Exiled.API/Features/Scp914.cs +++ b/EXILED/Exiled.API/Features/Scp914.cs @@ -13,9 +13,7 @@ namespace Exiled.API.Features using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pools; - using global::Scp914; - using UnityEngine; /// @@ -143,4 +141,4 @@ public static IEnumerable Scp914InputObject(out IEnumerable /// Interact code. public static void Start(Player player = null, Scp914InteractCode code = Scp914InteractCode.Activate) => Scp914Controller.ServerInteract((player ?? Server.Host).ReferenceHub, (byte)code); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Scp956.cs b/EXILED/Exiled.API/Features/Scp956.cs index cdcc2b75ee..49c90a5b36 100644 --- a/EXILED/Exiled.API/Features/Scp956.cs +++ b/EXILED/Exiled.API/Features/Scp956.cs @@ -12,7 +12,6 @@ namespace Exiled.API.Features using Exiled.API.Enums; using Exiled.API.Extensions; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Server.cs b/EXILED/Exiled.API/Features/Server.cs index fd90b8d14c..0d5809912e 100644 --- a/EXILED/Exiled.API/Features/Server.cs +++ b/EXILED/Exiled.API/Features/Server.cs @@ -11,6 +11,8 @@ namespace Exiled.API.Features using System.Collections.Generic; using System.Reflection; + using Exiled.API.Enums; + using GameCore; using Interfaces; diff --git a/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs b/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs index 63f85fa6a4..405a285098 100644 --- a/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs +++ b/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs @@ -12,9 +12,7 @@ namespace Exiled.API.Features.Spawn using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features.Lockers; - using UnityEngine; - using YamlDotNet.Serialization; /// @@ -80,4 +78,4 @@ public void GetSpawningInfo(out Locker locker, out Chamber chamber, out Vector3 position = chamber?.GetRandomSpawnPoint() ?? (Offset == Vector3.zero ? locker.Position : locker.Transform.TransformPoint(Offset)); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs b/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs index dc219b40a6..97041a2c92 100644 --- a/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs +++ b/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs @@ -56,4 +56,4 @@ public override Vector3 Position set => throw new InvalidOperationException("The position of this type of SpawnPoint cannot be changed."); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs b/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs index a1426f2fa6..975d5bc77e 100644 --- a/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs +++ b/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Spawn { using Exiled.API.Interfaces; - using PlayerRoles; using UnityEngine; @@ -46,4 +45,4 @@ public SpawnLocation(RoleTypeId roleType, Vector3 position, float horizontalRota /// public float HorizontalRotation { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs b/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs index 66ccfb4f22..880ea9e35a 100644 --- a/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs +++ b/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Spawn { using Exiled.API.Interfaces; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/TeslaGate.cs b/EXILED/Exiled.API/Features/TeslaGate.cs index dd9893e929..ddc04ac791 100644 --- a/EXILED/Exiled.API/Features/TeslaGate.cs +++ b/EXILED/Exiled.API/Features/TeslaGate.cs @@ -12,13 +12,9 @@ namespace Exiled.API.Features using System.Linq; using Exiled.API.Interfaces; - using Hazards; - using MEC; - using PlayerRoles; - using UnityEngine; using BaseTeslaGate = global::TeslaGate; @@ -182,7 +178,7 @@ public bool UseInstantBurst /// /// Gets a of which contains all the tantrums to destroy. /// - public IEnumerable TantrumsToDestroy => Base.TantrumsToBeDestroyed.Select(Hazard.Get); + public IEnumerable TantrumsToDestroy => Base.TantrumsToBeDestroyed.Select(x => Hazard.Get(x)); /// /// Gets a of which contains all the players inside the hurt range. @@ -297,4 +293,4 @@ public bool CanBeIdle(Player player) => player is not null && player.IsAlive && public bool CanBeTriggered(Player player) => player is not null && player.IsAlive && !IgnoredPlayers.Contains(player) && !IgnoredRoles.Contains(player.Role) && !IgnoredTeams.Contains(player.Role.Team) && IsPlayerInTriggerRange(player); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index 9c58b1df82..f03d412826 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -12,11 +12,8 @@ namespace Exiled.API.Features.Toys using AdminToys; using Enums; - using Exiled.API.Interfaces; - using Footprinting; - using Mirror; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Toys/Light.cs b/EXILED/Exiled.API/Features/Toys/Light.cs index d8b1f0041d..beda646358 100644 --- a/EXILED/Exiled.API/Features/Toys/Light.cs +++ b/EXILED/Exiled.API/Features/Toys/Light.cs @@ -13,7 +13,6 @@ namespace Exiled.API.Features.Toys using AdminToys; using Enums; - using Exiled.API.Interfaces; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Toys/Primitive.cs b/EXILED/Exiled.API/Features/Toys/Primitive.cs index fe22f7a811..5b577c73ff 100644 --- a/EXILED/Exiled.API/Features/Toys/Primitive.cs +++ b/EXILED/Exiled.API/Features/Toys/Primitive.cs @@ -7,15 +7,14 @@ namespace Exiled.API.Features.Toys { + using System; using System.Linq; using AdminToys; using Enums; - using Exiled.API.Interfaces; using Exiled.API.Structs; - using UnityEngine; using Object = UnityEngine.Object; @@ -160,4 +159,4 @@ public static Primitive Get(PrimitiveObjectToy primitiveObjectToy) return adminToy is not null ? adminToy as Primitive : new(primitiveObjectToy); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs index 87a82c7060..c43eb9360f 100644 --- a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs +++ b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs @@ -12,9 +12,10 @@ namespace Exiled.API.Features.Toys using System.Linq; using Enums; - using Exiled.API.Interfaces; + using Mirror; + using PlayerStatsSystem; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index f058178111..cd2b182499 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -1445,4 +1445,4 @@ private void EndingPlayBack() } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Toys/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 427467ec6a..71066b22c3 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -101,4 +101,4 @@ public static Text Create(Transform parent = null, Vector3? position = null, Qua return toy; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 0c7c5697a6..73a6500faf 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -114,7 +114,7 @@ public static Waypoint Create(Transform parent = null, Vector3? position = null, { Priority = priority, VisualizeBounds = visualizeBounds, - BoundsSize = scale ?? (Vector3.one * WaypointToy.MaxBounds), + BoundsSize = scale ?? Vector3.one * WaypointToy.MaxBounds, LocalPosition = position ?? Vector3.zero, LocalRotation = rotation ?? Quaternion.identity, }; diff --git a/EXILED/Exiled.API/Features/Warhead.cs b/EXILED/Exiled.API/Features/Warhead.cs index 652377647d..f765905410 100644 --- a/EXILED/Exiled.API/Features/Warhead.cs +++ b/EXILED/Exiled.API/Features/Warhead.cs @@ -11,13 +11,9 @@ namespace Exiled.API.Features using System.Collections.Generic; using Enums; - using Exiled.API.Extensions; - using Interactables.Interobjects.DoorUtils; - using Mirror; - using UnityEngine; /// @@ -38,7 +34,7 @@ public static class Warhead /// /// Gets the cached component. /// - public static AlphaWarheadOutsitePanel OutsitePanel => field?.gameObject != null ? field : (field = UnityEngine.Object.FindFirstObjectByType()); + public static AlphaWarheadOutsitePanel OutsitePanel => field != null ? field : (field = UnityEngine.Object.FindFirstObjectByType()); /// /// Gets the of the warhead lever. @@ -242,7 +238,7 @@ public static void Start() public static void Start(bool isAutomatic, bool suppressSubtitles = false, Player trigger = null) { Controller.InstantPrepare(); - Controller.StartDetonation(isAutomatic, suppressSubtitles, trigger?.ReferenceHub); + Controller.StartDetonation(isAutomatic, suppressSubtitles, trigger == null ? null : trigger.ReferenceHub); } /// @@ -294,4 +290,4 @@ public static void Start(bool isAutomatic, bool suppressSubtitles = false, Playe /// Whether the given position is prone to being detonated. public static bool CanBeDetonated(Vector3 pos, bool includeOnlyLifts = false) => AlphaWarheadController.CanBeDetonated(pos, includeOnlyLifts); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Features/Waves/TimedWave.cs b/EXILED/Exiled.API/Features/Waves/TimedWave.cs index ebded06851..6e9a5c55bf 100644 --- a/EXILED/Exiled.API/Features/Waves/TimedWave.cs +++ b/EXILED/Exiled.API/Features/Waves/TimedWave.cs @@ -11,9 +11,7 @@ namespace Exiled.API.Features.Waves using System.Linq; using Exiled.API.Enums; - using PlayerRoles; - using Respawning; using Respawning.Announcements; using Respawning.Waves; @@ -69,7 +67,7 @@ public class TimedWave Faction.FoundationStaff when IsMiniWave => SpawnableFaction.NtfMiniWave, Faction.FoundationStaff => SpawnableFaction.NtfWave, Faction.FoundationEnemy when IsMiniWave => SpawnableFaction.ChaosMiniWave, - _ => SpawnableFaction.ChaosWave, + _ => SpawnableFaction.ChaosWave }; /// @@ -98,7 +96,7 @@ public class TimedWave public static bool TryGetTimedWaves(Faction faction, out List waves) { List spawnableWaveBases = WaveManager.Waves.Where(w => w is TimeBasedWave wave && wave.TargetFaction == faction).ToList(); - if (!spawnableWaveBases.Any()) + if(!spawnableWaveBases.Any()) { waves = null; return false; @@ -117,7 +115,7 @@ public static bool TryGetTimedWaves(Faction faction, out List waves) public static bool TryGetTimedWaves(Team team, out List waves) { List spawnableWaveBases = WaveManager.Waves.Where(w => w is TimeBasedWave wave && wave.TargetFaction.GetSpawnableTeam() == team).ToList(); - if (!spawnableWaveBases.Any()) + if(!spawnableWaveBases.Any()) { waves = null; return false; diff --git a/EXILED/Exiled.API/Features/Waves/WaveTimer.cs b/EXILED/Exiled.API/Features/Waves/WaveTimer.cs index df96fee7cc..b99f2cf2bf 100644 --- a/EXILED/Exiled.API/Features/Waves/WaveTimer.cs +++ b/EXILED/Exiled.API/Features/Waves/WaveTimer.cs @@ -15,6 +15,8 @@ namespace Exiled.API.Features.Waves using PlayerRoles; + using Respawning; + using Respawning.Waves; /// diff --git a/EXILED/Exiled.API/Features/Window.cs b/EXILED/Exiled.API/Features/Window.cs index a1f92bc26f..2d327ff0c4 100644 --- a/EXILED/Exiled.API/Features/Window.cs +++ b/EXILED/Exiled.API/Features/Window.cs @@ -12,13 +12,10 @@ namespace Exiled.API.Features using System.Linq; using DamageHandlers; - using Enums; - using Exiled.API.Extensions; using Exiled.API.Features.Doors; using Exiled.API.Interfaces; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Workstation.cs b/EXILED/Exiled.API/Features/Workstation.cs index 2bc63e1e5e..ae4b2612d3 100644 --- a/EXILED/Exiled.API/Features/Workstation.cs +++ b/EXILED/Exiled.API/Features/Workstation.cs @@ -14,11 +14,9 @@ namespace Exiled.API.Features using Exiled.API.Enums; using Exiled.API.Interfaces; - using InventorySystem.Items.Firearms.Attachments; - using MapGeneration.Distributors; - + using Mirror; using UnityEngine; /// diff --git a/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs b/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs index c0ffcb97d2..3bd096a2a7 100644 --- a/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs +++ b/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs @@ -23,4 +23,4 @@ public interface IAudioFilter /// void Reset(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs b/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs index 32eeaf798f..ad9c9caea9 100644 --- a/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs +++ b/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs @@ -13,4 +13,4 @@ namespace Exiled.API.Interfaces.Audio public interface ILiveSource { } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs b/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs index 7ab6211c81..6f0423b86f 100644 --- a/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs +++ b/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs @@ -56,4 +56,4 @@ public interface IPcmSource : IDisposable /// void Reset(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Interfaces/IPosition.cs b/EXILED/Exiled.API/Interfaces/IPosition.cs index a169aa2965..467495137a 100644 --- a/EXILED/Exiled.API/Interfaces/IPosition.cs +++ b/EXILED/Exiled.API/Interfaces/IPosition.cs @@ -19,4 +19,4 @@ public interface IPosition /// public Vector3 Position { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Interfaces/IRotation.cs b/EXILED/Exiled.API/Interfaces/IRotation.cs index c7f1090d79..f7e244b19b 100644 --- a/EXILED/Exiled.API/Interfaces/IRotation.cs +++ b/EXILED/Exiled.API/Interfaces/IRotation.cs @@ -19,4 +19,4 @@ public interface IRotation /// public Quaternion Rotation { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Interfaces/IValidator.cs b/EXILED/Exiled.API/Interfaces/IValidator.cs deleted file mode 100644 index f9e2004ee1..0000000000 --- a/EXILED/Exiled.API/Interfaces/IValidator.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) ExMod Team. All rights reserved. -// Licensed under the CC BY-SA 3.0 license. -// -// ----------------------------------------------------------------------- - -namespace Exiled.API.Interfaces -{ - /// - /// Interface for all validations attributes. - /// - public interface IValidator - { - /// - /// Checks if is satisfying this attributes condition. - /// - /// Value to check. - /// Whether the value has passed check. - public bool Check(object other); - } -} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/IWorldSpace.cs b/EXILED/Exiled.API/Interfaces/IWorldSpace.cs index f17d2219fc..0df54e81e9 100644 --- a/EXILED/Exiled.API/Interfaces/IWorldSpace.cs +++ b/EXILED/Exiled.API/Interfaces/IWorldSpace.cs @@ -15,4 +15,4 @@ namespace Exiled.API.Interfaces public interface IWorldSpace : IPosition, IRotation { } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs b/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs index fbc1b980aa..d724f997ea 100644 --- a/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs +++ b/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Interfaces.Keycards { using Exiled.API.Features.Items.Keycards; - using UnityEngine; /// diff --git a/EXILED/Exiled.API/Structs/Audio/TrackData.cs b/EXILED/Exiled.API/Structs/Audio/TrackData.cs index 596b137d23..93f549369f 100644 --- a/EXILED/Exiled.API/Structs/Audio/TrackData.cs +++ b/EXILED/Exiled.API/Structs/Audio/TrackData.cs @@ -71,4 +71,4 @@ public readonly string FormattedDuration } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.API/Structs/PrimitiveSettings.cs b/EXILED/Exiled.API/Structs/PrimitiveSettings.cs index 0da6238ce4..24fcc04393 100644 --- a/EXILED/Exiled.API/Structs/PrimitiveSettings.cs +++ b/EXILED/Exiled.API/Structs/PrimitiveSettings.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Structs { using AdminToys; - using UnityEngine; /// diff --git a/EXILED/Exiled.CreditTags/Enums/InfoSide.cs b/EXILED/Exiled.CreditTags/Enums/InfoSide.cs index 7bf491865a..9d87360d4b 100644 --- a/EXILED/Exiled.CreditTags/Enums/InfoSide.cs +++ b/EXILED/Exiled.CreditTags/Enums/InfoSide.cs @@ -18,7 +18,7 @@ public enum InfoSide Badge, /// - /// Uses Custom Player Info area. + /// Uses Custom Player Info area /// CustomPlayerInfo, diff --git a/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs b/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs index 4d1bfd0bed..06c30e30fb 100644 --- a/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs +++ b/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs @@ -9,7 +9,6 @@ namespace Exiled.CreditTags.Events { using Exiled.CreditTags.Features; using Exiled.Events.EventArgs.Player; - using MEC; using static CreditTags; diff --git a/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs b/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs index 9092ae4056..ac3cc91781 100644 --- a/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs +++ b/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs @@ -12,7 +12,6 @@ namespace Exiled.CreditTags.Features using System.IO; using Cryptography; - using Exiled.API.Features; using Exiled.CreditTags.Enums; @@ -56,7 +55,7 @@ static DatabaseHandler() /// /// Gets the path to the cache directory. /// - private static DirectoryInfo CacheDirectory { get; } = new(Path.Combine(Paths.Configs, "CreditTags")); + private static DirectoryInfo CacheDirectory { get; } = new (Path.Combine(Paths.Configs, "CreditTags")); /// /// Gets the path to the cache file. diff --git a/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs b/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs index 15aa4ae1e9..b6ceaee015 100644 --- a/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs +++ b/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs @@ -10,9 +10,7 @@ namespace Exiled.CreditTags.Features using System.Collections.Generic; using Exiled.API.Features; - using MEC; - using UnityEngine.Networking; internal sealed class ThreadSafeRequest diff --git a/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs b/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs index 219f9e8aba..54f478d7ce 100644 --- a/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs +++ b/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs @@ -7,11 +7,18 @@ namespace Exiled.CustomItems.API.EventArgs { + using System.Collections.Generic; + + using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.CustomItems.API.Features; using Exiled.Events.EventArgs.Player; + using PlayerRoles; + + using Respawning; + /// /// Contains all information of a before a escapes. /// diff --git a/EXILED/Exiled.CustomItems/API/Extensions.cs b/EXILED/Exiled.CustomItems/API/Extensions.cs index 9fbfdc60e2..b527a2191a 100644 --- a/EXILED/Exiled.CustomItems/API/Extensions.cs +++ b/EXILED/Exiled.CustomItems/API/Extensions.cs @@ -55,7 +55,7 @@ public static void ResetInventory(this Player player, IEnumerable newIte public static void Register(this IEnumerable customItems) { if (customItems is null) - throw new ArgumentNullException(nameof(customItems)); + throw new ArgumentNullException("customItems"); foreach (CustomItem customItem in customItems) customItem.TryRegister(); @@ -74,7 +74,7 @@ public static void Register(this IEnumerable customItems) public static void Unregister(this IEnumerable customItems) { if (customItems is null) - throw new ArgumentNullException(nameof(customItems)); + throw new ArgumentNullException("customItems"); foreach (CustomItem customItem in customItems) customItem.TryUnregister(); diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs b/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs index 4b1e23ef21..c1a77f6351 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs @@ -18,7 +18,6 @@ namespace Exiled.CustomItems.API.Features using Exiled.Events.EventArgs.Player; using InventorySystem.Items.Armor; - using MEC; /// diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs b/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs index 7ac099f9bd..68f8d07818 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs @@ -245,4 +245,4 @@ private void RemoveSafely(ReferenceHub hub) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs b/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs index 00ee5157a5..feafdae9c2 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs @@ -11,12 +11,15 @@ namespace Exiled.CustomItems.API.Features using Exiled.API.Extensions; using Exiled.API.Features; + using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pickups.Projectiles; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Map; using Exiled.Events.EventArgs.Player; + using Footprinting; + using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Pickups; @@ -222,4 +225,4 @@ private void OnInternalChangedIntoGrenade(ChangedIntoGrenadeEventArgs ev) ev.Projectile.GameObject.AddComponent().Init((ev.Pickup.PreviousOwner ?? Server.Host).GameObject, ev.Projectile.Base); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs b/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs index 2b7356c0b6..e131db7086 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs @@ -26,21 +26,18 @@ namespace Exiled.CustomItems.API.Features using Exiled.Events.EventArgs.Player; using Exiled.Events.EventArgs.Scp914; using Exiled.Loader; - using InventorySystem.Items.Pickups; - using MEC; - using PlayerRoles; - using UnityEngine; - using YamlDotNet.Serialization; using static CustomItems; + using BaseFirearmPickup = InventorySystem.Items.Firearms.FirearmPickup; using Firearm = Exiled.API.Features.Items.Firearm; using Item = Exiled.API.Features.Items.Item; + using Map = Exiled.API.Features.Map; using Player = Exiled.API.Features.Player; using UpgradingPickupEventArgs = Exiled.Events.EventArgs.Scp914.UpgradingPickupEventArgs; @@ -1109,4 +1106,4 @@ private void OnInternalUpgradingPickup(UpgradingPickupEventArgs ev) }); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs b/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs index 3347c4b44f..1777953129 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs @@ -21,9 +21,7 @@ namespace Exiled.CustomItems.API.Features using Exiled.API.Interfaces.Keycards; using Exiled.Events.EventArgs.Item; using Exiled.Events.EventArgs.Player; - using InventorySystem.Items.Keycards; - using UnityEngine; /// diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs index 537ce96291..cc2e7f25bc 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs @@ -351,4 +351,4 @@ private void OnInternalChangingAttachment(ChangingAttachmentsEventArgs ev) OnChangingAttachment(ev); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomItems/Commands/Give.cs b/EXILED/Exiled.CustomItems/Commands/Give.cs index d4083c6097..cc63ed2228 100644 --- a/EXILED/Exiled.CustomItems/Commands/Give.cs +++ b/EXILED/Exiled.CustomItems/Commands/Give.cs @@ -18,6 +18,8 @@ namespace Exiled.CustomItems.Commands using Exiled.Permissions.Extensions; using RemoteAdmin; + using UnityStandardAssets.Effects; + using Utils; /// /// The command to give a player an item. @@ -125,4 +127,4 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s /// private bool CheckEligible(Player player) => player.IsAlive && !player.IsCuffed && (player.Items.Count < 8); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomItems/Commands/Main.cs b/EXILED/Exiled.CustomItems/Commands/Main.cs index e3557d1a66..7aba0b0366 100644 --- a/EXILED/Exiled.CustomItems/Commands/Main.cs +++ b/EXILED/Exiled.CustomItems/Commands/Main.cs @@ -33,7 +33,7 @@ public Main() public override string[] Aliases { get; } = { "ci", "cis" }; /// - public override string Description { get; } = "The parent command for EXILED custom items"; + public override string Description { get; } = string.Empty; /// public override void LoadGeneratedCommands() diff --git a/EXILED/Exiled.CustomItems/Events/MapHandler.cs b/EXILED/Exiled.CustomItems/Events/MapHandler.cs index bb9966ba01..ed1ae61970 100644 --- a/EXILED/Exiled.CustomItems/Events/MapHandler.cs +++ b/EXILED/Exiled.CustomItems/Events/MapHandler.cs @@ -9,7 +9,6 @@ namespace Exiled.CustomItems.Events { using Exiled.API.Features; using Exiled.CustomItems.API.Features; - using MEC; /// diff --git a/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs b/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs index da551cd4f1..8efcc98fb7 100644 --- a/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs +++ b/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs @@ -76,4 +76,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstruction); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomRoles/API/Extensions.cs b/EXILED/Exiled.CustomRoles/API/Extensions.cs index 6cd23c603d..8a0821216d 100644 --- a/EXILED/Exiled.CustomRoles/API/Extensions.cs +++ b/EXILED/Exiled.CustomRoles/API/Extensions.cs @@ -124,4 +124,4 @@ public static void Unregister(this IEnumerable customRoles) /// The the has selected, or . public static ActiveAbility? GetSelectedAbility(this Player player) => !ActiveAbility.AllActiveAbilities.TryGetValue(player, out HashSet abilities) ? null : abilities.FirstOrDefault(a => a.Check(player, CheckType.Selected)); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs b/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs index 9b823fbf95..cadc7c63f0 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs @@ -141,7 +141,7 @@ public virtual bool Check(Player player, CheckType type) CheckType.Active => ActivePlayers.Contains(player), CheckType.Selected => SelectedPlayers.Contains(player), CheckType.Available => Players.Contains(player), - _ => throw new ArgumentOutOfRangeException(nameof(type), type, null), + _ => throw new ArgumentOutOfRangeException(nameof(type), type, null) }; return result; diff --git a/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs b/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs index 91198b9e3b..1528d08fa3 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs @@ -166,7 +166,8 @@ public static IEnumerable RegisterAbilities(bool skipReflection = } } - customAbility ??= (CustomAbility)Activator.CreateInstance(type); + if (customAbility is null) + customAbility = (CustomAbility)Activator.CreateInstance(type); if (customAbility.TryRegister()) abilities.Add(customAbility); @@ -208,7 +209,8 @@ public static IEnumerable RegisterAbilities(IEnumerable tar } } - customAbility ??= (CustomAbility)Activator.CreateInstance(type); + if (customAbility is null) + customAbility = (CustomAbility)Activator.CreateInstance(type); if (customAbility.TryRegister()) abilities.Add(customAbility); @@ -309,7 +311,7 @@ public void RemoveAbility(Player player) /// True if the ability registered properly. internal bool TryRegister() { - if (!CustomRoles.Instance.Config.IsEnabled) + if (!CustomRoles.Instance!.Config.IsEnabled) return false; if (!Registered.Contains(this)) diff --git a/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs b/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs index 9f11652d14..f2dd9bc8d8 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs @@ -25,11 +25,8 @@ namespace Exiled.CustomRoles.API.Features using Exiled.CustomItems.API.Features; using Exiled.Events.EventArgs.Player; using Exiled.Loader; - using InventorySystem.Configs; - using MEC; - using PlayerRoles; using UnityEngine; @@ -646,7 +643,7 @@ public virtual void AddRole(Player player) ability.AddAbility(player); } - if (CustomRoles.Instance.Config.GotRoleHint.Show) + if (CustomRoles.Instance!.Config.GotRoleHint.Show) ShowMessage(player); ShowBroadcast(player); @@ -810,7 +807,7 @@ public bool TryAddFriendlyFire(Dictionary ffRules, bool overw /// True if the role registered properly. internal bool TryRegister() { - if (!CustomRoles.Instance.Config.IsEnabled) + if (!CustomRoles.Instance!.Config.IsEnabled) return false; if (!Registered.Contains(this)) @@ -895,7 +892,7 @@ protected Vector3 GetSpawnPosition() } float totalchance = 0f; - List<(float Chance, Vector3 Pos)> spawnPointPool = new(4); + List<(float chance, Vector3 pos)> spawnPointPool = new(4); void Add(Vector3 pos, float chance) { @@ -988,7 +985,7 @@ protected virtual void UnsubscribeEvents() /// Shows the spawn message to the player. /// /// The to show the message to. - protected virtual void ShowMessage(Player player) => player.ShowHint(string.Format(CustomRoles.Instance.Config.GotRoleHint.Content, Name, Description), CustomRoles.Instance.Config.GotRoleHint.Duration); + protected virtual void ShowMessage(Player player) => player.ShowHint(string.Format(CustomRoles.Instance!.Config.GotRoleHint.Content, Name, Description), CustomRoles.Instance.Config.GotRoleHint.Duration); /// /// Shows the spawn broadcast to the player. diff --git a/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs b/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs index 5e6ba3ab31..fb636665a8 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs @@ -13,7 +13,7 @@ namespace Exiled.CustomRoles.API.Features.Enums public enum CheckType { /// - /// Check if the ability is available to the player. (DOES NOT CHECK COOLDOWNS). + /// Check if the ability is available to the player. (DOES NOT CHECK COOLDOWNS) /// Available, diff --git a/EXILED/Exiled.CustomRoles/API/Features/Enums/AbilityKeypressTriggerType.cs b/EXILED/Exiled.CustomRoles/API/Features/Enums/KeypressActivationType.cs similarity index 93% rename from EXILED/Exiled.CustomRoles/API/Features/Enums/AbilityKeypressTriggerType.cs rename to EXILED/Exiled.CustomRoles/API/Features/Enums/KeypressActivationType.cs index 3ba1d84bc7..d63845ff70 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/Enums/AbilityKeypressTriggerType.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/Enums/KeypressActivationType.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. // diff --git a/EXILED/Exiled.CustomRoles/Commands/Get.cs b/EXILED/Exiled.CustomRoles/Commands/Get.cs index acaf661554..7d96d5f6b4 100644 --- a/EXILED/Exiled.CustomRoles/Commands/Get.cs +++ b/EXILED/Exiled.CustomRoles/Commands/Get.cs @@ -14,13 +14,13 @@ namespace Exiled.CustomRoles.Commands using System.Text; using CommandSystem; - using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.CustomRoles.API; using Exiled.CustomRoles.API.Features; using Exiled.Permissions.Extensions; + using HarmonyLib; /// /// The command to get specified player(s) current custom roles. diff --git a/EXILED/Exiled.CustomRoles/Commands/Parent.cs b/EXILED/Exiled.CustomRoles/Commands/Parent.cs index c5a46a0e7a..fd42b5e497 100644 --- a/EXILED/Exiled.CustomRoles/Commands/Parent.cs +++ b/EXILED/Exiled.CustomRoles/Commands/Parent.cs @@ -33,7 +33,7 @@ public Parent() public override string[] Aliases { get; } = { "cr", "crs" }; /// - public override string Description { get; } = "The parent command for EXILED custom roles"; + public override string Description { get; } = string.Empty; /// public override void LoadGeneratedCommands() diff --git a/EXILED/Exiled.CustomRoles/CustomRoles.cs b/EXILED/Exiled.CustomRoles/CustomRoles.cs index fc7a3e4333..a66457b3bd 100644 --- a/EXILED/Exiled.CustomRoles/CustomRoles.cs +++ b/EXILED/Exiled.CustomRoles/CustomRoles.cs @@ -82,4 +82,4 @@ public override void OnDisabled() base.OnDisabled(); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs b/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs index 23b27aac2f..47a153221d 100644 --- a/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs +++ b/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomRoles.Events { using System; using System.Collections.Generic; + using System.Threading; using Exiled.API.Enums; using Exiled.API.Features; diff --git a/EXILED/Exiled.Events/Commands/Config/Merge.cs b/EXILED/Exiled.Events/Commands/Config/Merge.cs index c8d5ff08b1..c6cf79042d 100644 --- a/EXILED/Exiled.Events/Commands/Config/Merge.cs +++ b/EXILED/Exiled.Events/Commands/Config/Merge.cs @@ -9,13 +9,12 @@ namespace Exiled.Events.Commands.Config { using System; using System.Collections.Generic; + using System.Linq; + using API.Enums; + using API.Features; + using API.Interfaces; using CommandSystem; - - using Exiled.API.Enums; - using Exiled.API.Features; - using Exiled.API.Interfaces; - using Loader; /// diff --git a/EXILED/Exiled.Events/Commands/Config/Split.cs b/EXILED/Exiled.Events/Commands/Config/Split.cs index a083e4388c..34816af579 100644 --- a/EXILED/Exiled.Events/Commands/Config/Split.cs +++ b/EXILED/Exiled.Events/Commands/Config/Split.cs @@ -9,13 +9,12 @@ namespace Exiled.Events.Commands.Config { using System; using System.Collections.Generic; + using System.Linq; + using API.Enums; + using API.Features; + using API.Interfaces; using CommandSystem; - - using Exiled.API.Enums; - using Exiled.API.Features; - using Exiled.API.Interfaces; - using Loader; /// diff --git a/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs b/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs index 54fc5e4260..4169b84cd7 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs @@ -9,11 +9,9 @@ namespace Exiled.Events.Commands.PluginManager { using System; + using API.Interfaces; using CommandSystem; - - using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; - using RemoteAdmin; /// diff --git a/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs b/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs index 59350f2500..36b6aa1ecd 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs @@ -12,12 +12,10 @@ namespace Exiled.Events.Commands.PluginManager using System.Linq; using System.Reflection; + using API.Interfaces; using CommandSystem; - using Exiled.API.Features; - using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; - using RemoteAdmin; /// @@ -94,4 +92,4 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s return true; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs b/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs index f789174a33..1f9a62c13d 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs @@ -39,4 +39,4 @@ protected override bool ExecuteParent(ArraySegment arguments, ICommandSe return false; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Commands/PluginManager/Show.cs b/EXILED/Exiled.Events/Commands/PluginManager/Show.cs index edaac0d85e..0b9f4d5459 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/Show.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/Show.cs @@ -12,10 +12,11 @@ namespace Exiled.Events.Commands.PluginManager using System.Linq; using System.Text; + using API.Features.Pools; + using API.Interfaces; + using CommandSystem; - using Exiled.API.Features.Pools; - using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; using RemoteAdmin; diff --git a/EXILED/Exiled.Events/Commands/Reload/Configs.cs b/EXILED/Exiled.Events/Commands/Reload/Configs.cs index 12beb34a1b..05f75a07ed 100644 --- a/EXILED/Exiled.Events/Commands/Reload/Configs.cs +++ b/EXILED/Exiled.Events/Commands/Reload/Configs.cs @@ -9,9 +9,10 @@ namespace Exiled.Events.Commands.Reload { using System; + using API.Interfaces; + using CommandSystem; - using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; using Loader; @@ -62,4 +63,4 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s return haveBeenReloaded; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Commands/Reload/Translations.cs b/EXILED/Exiled.Events/Commands/Reload/Translations.cs index d2c4132b0d..99459b3f19 100644 --- a/EXILED/Exiled.Events/Commands/Reload/Translations.cs +++ b/EXILED/Exiled.Events/Commands/Reload/Translations.cs @@ -9,9 +9,10 @@ namespace Exiled.Events.Commands.Reload { using System; + using API.Interfaces; + using CommandSystem; - using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; using Loader; diff --git a/EXILED/Exiled.Events/Commands/TpsCommand.cs b/EXILED/Exiled.Events/Commands/TpsCommand.cs index 15ca3d44c9..14c0def05e 100644 --- a/EXILED/Exiled.Events/Commands/TpsCommand.cs +++ b/EXILED/Exiled.Events/Commands/TpsCommand.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.Commands using System; using CommandSystem; - using Exiled.API.Features; /// @@ -36,7 +35,7 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s { > 0.9 => "green", > 0.5 => "yellow", - _ => "red", + _ => "red" }; response = $"{Server.SmoothTps}/{Server.MaxTps}"; diff --git a/EXILED/Exiled.Events/Config.cs b/EXILED/Exiled.Events/Config.cs index c4f94d76a8..fd244f699b 100644 --- a/EXILED/Exiled.Events/Config.cs +++ b/EXILED/Exiled.Events/Config.cs @@ -9,7 +9,7 @@ namespace Exiled.Events { using System.ComponentModel; - using Exiled.API.Interfaces; + using API.Interfaces; /// public sealed class Config : IConfig @@ -111,4 +111,4 @@ public sealed class Config : IConfig [Description("Whether to log RA commands.")] public bool LogRaCommands { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs index c7c2c633df..d5dbbef859 100644 --- a/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs @@ -11,11 +11,8 @@ namespace Exiled.Events.EventArgs.Cassie using System.Text; using Exiled.API.Features.Pools; - using global::Cassie; - using Interfaces; - using Subtitles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs index 7abe187114..bb523f3d75 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; + using API.Features; + using API.Features.DamageHandlers; /// /// Event args for when a player is taking damage. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs index d86189d40b..8c44ab58b6 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; + using API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs index 1a8711d078..eaa1babdcc 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs @@ -19,4 +19,4 @@ public interface IConsumableEvent : IItemEvent /// public Consumable Consumable { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs index f27c8c0ec6..0cf0ba2810 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features.Items; + using API.Features.Items; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs index 265aa5a2d7..5cddb0a8fb 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; + using API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs index bde0b9c466..c2fcb61da9 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features.Items; + using API.Features.Items; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs index ee42510c79..bc17988cc2 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features.Items; + using API.Features.Items; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs index 2f2e7d9962..fec096f0b3 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; + using API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs index 1889c43cd7..c15fbc028a 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; + using API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs index 64bac5ca77..0ff4df980b 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; + using API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs index fcc91cc850..7f79c1b15d 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using Exiled.API.Features; + using API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs index 995daa4b2f..8e491ee0b1 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.MarshmallowMan; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs index f339e8c5ed..6e76f8b7a6 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs @@ -65,4 +65,4 @@ public ChangingAmmoEventArgs(InventorySystem.Items.ItemBase firearm, byte oldAmm /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs index d8dcfc1883..6f4dc2ef60 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs @@ -10,10 +10,11 @@ namespace Exiled.Events.EventArgs.Item using System.Collections.Generic; using System.Linq; + using API.Features; + using API.Features.Items; + using API.Structs; + using Exiled.API.Extensions; - using Exiled.API.Features; - using Exiled.API.Features.Items; - using Exiled.API.Structs; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs index 510a4718d6..a70c37fde7 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features.Pickups; using Interfaces; - using InventorySystem.Items.MicroHID.Modules; using InventorySystem.Items.Pickups; diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs index e9ec5fd5ea..98f2588187 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs @@ -49,4 +49,4 @@ public ChargingJailbirdEventArgs(ReferenceHub player, InventorySystem.Items.Item /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs index 4252578733..ad3feef017 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs @@ -8,10 +8,9 @@ namespace Exiled.Events.EventArgs.Item { using Exiled.API.Features.Pickups; - using Interfaces; - using InventorySystem.Items.Firearms.Modules; + using InventorySystem.Items.Pickups; /// /// Contains all information before a pickup shoot while on the ground. diff --git a/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs index 23c20404b1..283fd4910f 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs index 2e51f8d305..5bb7cb4077 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs index f7fe990ce5..1bfbcd529e 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Jailbird; /// @@ -57,4 +56,4 @@ public JailbirdChangedWearStateEventArgs(InventorySystem.Items.ItemBase jailbird /// public Item Item => Jailbird; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs index 31c15e72e6..bf7ac51d95 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Jailbird; /// @@ -62,4 +61,4 @@ public JailbirdChangingWearStateEventArgs(InventorySystem.Items.ItemBase jailbir /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs index f6adb9770b..d583f22b3f 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs @@ -49,4 +49,4 @@ public JailbirdChargeCompleteEventArgs(ReferenceHub player, InventorySystem.Item /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs index 50b8b39e49..11f82ddbb4 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using Interactables.Interobjects.DoorUtils; using BaseKeycardPickup = InventorySystem.Items.Keycards.KeycardPickup; diff --git a/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs index ab58078c81..d2d927d95a 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.MarshmallowMan; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs index 3d6764df0a..a7cdb73f70 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs @@ -10,10 +10,11 @@ namespace Exiled.Events.EventArgs.Item using System.Collections.Generic; using System.Linq; + using API.Features; + using API.Structs; + using Exiled.API.Enums; using Exiled.API.Extensions; - using Exiled.API.Features; - using Exiled.API.Structs; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs index 8c768a5379..0d97d9da16 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs @@ -49,4 +49,4 @@ public SwingingEventArgs(ReferenceHub player, InventorySystem.Items.ItemBase swi /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs index 1e6ec08d27..e0e7fb8931 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,7 +11,6 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Waves; using Exiled.Events.EventArgs.Interfaces; - using Respawning.Announcements; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs index 0d3e0121d9..fd5a8f417e 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Waves; - using Interfaces; - using Respawning.Announcements; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs index b693cfc0b9..d8d38cc474 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs @@ -9,10 +9,9 @@ namespace Exiled.Events.EventArgs.Map { using System; - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; - using Exiled.API.Features.Roles; - + using API.Features; + using API.Features.DamageHandlers; + using API.Features.Roles; using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs index e0439cfbe8..197c741949 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Pickups; using Exiled.API.Features.Pickups.Projectiles; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.ThrowableProjectiles; /// @@ -42,4 +41,4 @@ public ChangedIntoGrenadeEventArgs(TimedGrenadePickup pickup, ThrownProjectile p /// Pickup IPickupEvent.Pickup => Pickup; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs index 4d62722f63..c2a8fbe9aa 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs index d480492ce9..205500cf60 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs @@ -10,9 +10,7 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Lockers; using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Pickups; - using MapGeneration.Distributors; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs index 32f7ef7ceb..15725ac6c6 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Enums; using Exiled.Events.EventArgs.Interfaces; + using UnityEngine; /// /// Contains all information after the server generates a seed, but before the map is generated. diff --git a/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs index 856950f7e6..b6187bb2ba 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Map { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs index f41b0bc637..faa0b772a4 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Pickups; /// @@ -33,4 +32,4 @@ public PickupAddedEventArgs(ItemPickupBase pickupBase) /// public Pickup Pickup { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs index 1661f669c3..49bba314cc 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Pickups; /// @@ -33,4 +32,4 @@ public PickupDestroyedEventArgs(ItemPickupBase pickupBase) /// public Pickup Pickup { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs index da482dee23..8a066fbaf9 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Map { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; using UnityEngine; diff --git a/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs index a47ccaf63b..3dcef688d2 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Pickups; using UnityEngine; diff --git a/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs index b751b05c80..263deba65c 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs @@ -7,13 +7,10 @@ namespace Exiled.Events.EventArgs.Map { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pickups; - using Interfaces; - using InventorySystem.Items.Usables.Scp244; - using MapGeneration; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs index 6c83d590bd..4476b88419 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs @@ -10,9 +10,7 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Pickups; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs index 8717f22371..179c244e83 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using MapGeneration.RoomConnectors; using MapGeneration.RoomConnectors.Spawners; @@ -56,4 +55,4 @@ public SpawningRoomConnectorEventArgs(RoomConnectorSpawnpointBase roomConnectorS /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs index 1bc1c3b0ce..2e455ff305 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs @@ -8,7 +8,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.Events.EventArgs.Interfaces; - + using Respawning; using Respawning.Waves; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs index dfafdd0808..8050e534bf 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs index e6c1004b80..65504085ed 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs index a10068d1c8..e035556555 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs index 9e9b2a932b..945295631a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs index d4814305df..0c060df6dc 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs index 5fea86b4c6..5679b15f76 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs @@ -9,10 +9,9 @@ namespace Exiled.Events.EventArgs.Player { using System.Reflection; + using API.Features; using CommandSystem; - using Exiled.API.Features; - /// /// Contains all information before banning a player from the server. /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs index 71a39402c7..19435c5250 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs @@ -7,10 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Usables; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs index f2e9778d81..a030f171c2 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs @@ -7,10 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Usables; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs index 06fdc3ef0e..cd5e3447a9 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs index 42dfc76855..2381256901 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; @@ -50,4 +50,4 @@ public ChangedItemEventArgs(Player player, ItemBase oldItem) /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs index 329aaa2a54..5df04b729e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs @@ -51,4 +51,4 @@ public ChangedRatioEventArgs(ReferenceHub player, float oldratio, float newratio /// public AspectRatioType NewRatio { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs index 1579036d2a..8ee98adb01 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.EventArgs.Player { using CustomPlayerEffects.Danger; - using Exiled.API.Enums; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs index 08fe6b0a82..699848459b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.EventArgs.Player using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items; /// @@ -44,4 +43,4 @@ public ChangingDisruptorModeEventArgs(ItemBase firearm, bool mode) /// public Player Player => Item.Owner; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs index 71a691b25c..759f1fa9ed 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs index 54ec5d2f11..feffd9882d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs index 97fdd988b4..ee305c7ada 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs @@ -9,8 +9,8 @@ namespace Exiled.Events.EventArgs.Player { using System; - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs index 4240a4482d..3e3c1eee9c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs @@ -7,12 +7,14 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using System; + using API.Features; + using API.Features.Items; using Interfaces; using InventorySystem.Items; + using InventorySystem.Items.MicroHID; using InventorySystem.Items.MicroHID.Modules; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs index 5c8c6e4ff4..36d5240158 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs index e73f6e9cff..c00696a759 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { + using API.Features; + using Exiled.API.Enums; - using Exiled.API.Features; using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs index f1f05804a5..92adf3b91a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs @@ -10,18 +10,14 @@ namespace Exiled.Events.EventArgs.Player using System.Collections.Generic; using System.Linq; - using Exiled.API.Enums; + using API.Enums; + using API.Features; using Exiled.API.Extensions; - using Exiled.API.Features; using Exiled.API.Features.Pools; - using Interfaces; - using InventorySystem; - using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; - using PlayerRoles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs index c39918116e..c50f5d6116 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs index 348316e0a6..c33b0bcc0f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.Events.EventArgs.Interfaces; - using MapGeneration.Distributors; /// @@ -44,4 +43,4 @@ public ClosingGeneratorEventArgs(Player player, Scp079Generator generator) /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs index ec72c82b78..0e48f83a8b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Exiled.Events.EventArgs.Interfaces; @@ -46,4 +46,4 @@ public ConsumingItemEventArgs(ReferenceHub hub, InventorySystem.Items.Usables.Co /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs index 177cb27f4c..4ed1981db1 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs @@ -9,11 +9,8 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.API.Features.Doors; - using Footprinting; - using Interactables.Interobjects.DoorUtils; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs index 891e669d57..7132b6088e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs @@ -9,9 +9,9 @@ namespace Exiled.Events.EventArgs.Player { using AdminToys; - using Exiled.API.Features; - using Exiled.API.Features.Items; - using Exiled.API.Features.Toys; + using API.Features; + using API.Features.Items; + using API.Features.Toys; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs index 94bc523a82..03e4aa1fa8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; + using API.Features; + using API.Features.DamageHandlers; using Interfaces; @@ -33,11 +33,9 @@ public class DamagingWindowEventArgs : IPlayerEvent, IDeniableEvent public DamagingWindowEventArgs(BreakableWindow window, float damage, DamageHandlerBase handler) { Window = Window.Get(window); + Handler = new DamageHandler(handler is AttackerDamageHandler attackerDamageHandler ? Player.Get(attackerDamageHandler.Attacker.Hub) : null, handler); + Handler.Damage = damage; Player = Handler.Attacker; - Handler = new DamageHandler(handler is AttackerDamageHandler attackerDamageHandler ? Player.Get(attackerDamageHandler.Attacker.Hub) : null, handler) - { - Damage = damage, - }; } /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs index 6eded5ff67..20ce6f84d0 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs index 504fbbdf4f..219838dc6f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; @@ -35,4 +35,4 @@ public DestroyingEventArgs(Player player) /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs index 9e6c119f43..24e91e6870 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; + using API.Features; + using API.Features.DamageHandlers; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs index 3550bf9905..78d229d08f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs @@ -9,11 +9,10 @@ namespace Exiled.Events.EventArgs.Player { using System.Collections.Generic; - using Exiled.API.Enums; + using API.Enums; + using API.Features; using Exiled.API.Extensions; - using Exiled.API.Features; using Exiled.API.Features.Pickups; - using Interfaces; using AmmoPickup = API.Features.Pickups.AmmoPickup; @@ -72,4 +71,4 @@ public DroppedAmmoEventArgs(Player player, ItemType itemType, ushort amount, Lis /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs index 11ecf5c7c6..c315553660 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pickups; - using Interfaces; - using InventorySystem.Items.Pickups; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs index bcef3e3911..999516aef2 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs @@ -7,10 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Enums; + using API.Enums; + using API.Features; using Exiled.API.Extensions; - using Exiled.API.Features; - using Interfaces; using PlayerRoles; @@ -79,4 +78,4 @@ public bool IsAllowed /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs index 712b8963a2..16006c8164 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs index 9273188f7f..dd9c80aa35 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs index 0f9aa9f844..2073d62678 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs index 63cbc5e5e8..9919ac0899 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.EventArgs.Player using System.Collections.Generic; using System.Linq; - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.DamageHandlers; + using API.Features.Items; using Interfaces; @@ -37,7 +37,9 @@ public DyingEventArgs(Player target, DamageHandlerBase damageHandler) { DamageHandler = new CustomDamageHandler(target, damageHandler); Player = target; +#pragma warning disable CS0618 ItemsToDrop = Player.Items.ToList(); +#pragma warning restore CS0618 Attacker = DamageHandler.BaseIs(out CustomAttackerHandler attackerDamageHandler) ? attackerDamageHandler.Attacker : null; } diff --git a/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs index 2286cfe056..d4594b42b3 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.EventArgs.Player { using Achievements; - using Exiled.API.Features; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs index fb87567110..dc61bef74e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Hazards; - using Hazards; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs index 398600ebba..0d8a82d3f6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs index 1ea381387b..2b66874acd 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs index 6717ff03ff..7333b3b3f8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { + using API.Features; using Exiled.API.Enums; - using Exiled.API.Features; - using Interfaces; using PlayerRoles; @@ -63,4 +62,4 @@ public EscapeScenario EscapeScenario /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs index 5426880210..841edfdcf6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs index 6043c9285e..e0b24de298 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Hazards; - using Hazards; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs index 0618e8cb7f..c2727317aa 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.MicroHID; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs index 2579fcb43d..620178368c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs @@ -7,7 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using System; + + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs index a7e92b0d45..954d2f39e8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; - + using API.Features; + using API.Features.Items; using Interfaces; - using InventorySystem.Items.Coin; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs index 4d5ff2803a..7f2d8c34c3 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs index b8bfdcf015..d9d18adc0e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,10 +10,8 @@ namespace Exiled.Events.EventArgs.Player using System.Collections.Generic; using System.Linq; - using Exiled.API.Features; - + using API.Features; using Interfaces; - using PlayerRoles.PlayableScps.Subroutines; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs index d970db90c9..b42a7ab209 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; + using API.Features; + using API.Features.DamageHandlers; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs index 7da8ade642..f328bddd20 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.DamageHandlers; - + using API.Features; + using API.Features.DamageHandlers; using Interfaces; - using PlayerStatsSystem; using CustomAttackerHandler = API.Features.DamageHandlers.AttackerDamageHandler; diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs index 83d93bfd34..f73f97451a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs index 3cde5a1883..509b8bc329 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs @@ -7,12 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Doors; - using Interactables; using Interactables.Interobjects.DoorUtils; - using Interfaces; /// @@ -76,4 +74,4 @@ public InteractingDoorEventArgs(Player player, DoorVariant door, byte colliderId /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs index 9e3013178c..9efbad6105 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Player using Exiled.API.Features; using Exiled.API.Features.Doors; using Exiled.Events.EventArgs.Interfaces; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs index f598b07eb6..b7cc7f3b5c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Lockers; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs index 89ea9e7037..9555a12861 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs @@ -11,9 +11,9 @@ namespace Exiled.Events.EventArgs.Player using AdminToys; - using Exiled.API.Enums; - using Exiled.API.Features; - using Exiled.API.Features.Toys; + using API.Enums; + using API.Features; + using API.Features.Toys; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs index d7c59cfb50..d17296909b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs index 25ccce6f1b..71c4cef39a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs index a10eb18bf8..64b15a6888 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs index e25552d149..410897b531 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs index 040e2d3e0b..b99b6051b4 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs index bae8413450..3fc6c1221d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs @@ -9,10 +9,8 @@ namespace Exiled.Events.EventArgs.Player { using System.Reflection; + using API.Features; using CommandSystem; - - using Exiled.API.Features; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs index 6e41af086d..1ef0bac618 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs index 057849e6f7..84e5e8735a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.Events.EventArgs.Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs index 4ab397d828..e0522ed31a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs index 1b66453503..fc1024823f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs @@ -12,7 +12,6 @@ namespace Exiled.Events.EventArgs.Player using Exiled.Events.EventArgs.Interfaces; using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.MicroHID; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs index 472da40bcb..13dc43febf 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs index 0e61c47e8e..f71781e3b7 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs @@ -52,4 +52,4 @@ public PickingUpItemEventArgs(ReferenceHub referenceHub, ItemPickupBase pickup, /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs index 4ea90f622d..41574b280c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs index b323e997bb..038a3e16c4 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs @@ -7,9 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using CustomPlayerEffects; + using API.Features; - using Exiled.API.Features; + using CustomPlayerEffects; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs index 8620534e04..b12fe11972 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs @@ -7,10 +7,11 @@ namespace Exiled.Events.EventArgs.Player { + using API.Features; + using API.Features.Items; + using AudioPooling; - using Exiled.API.Features; - using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; using UnityEngine; @@ -97,4 +98,4 @@ public ReceivingGunSoundEventArgs(ReferenceHub hub, InventorySystem.Items.Firear /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs index 2261640c97..4b491f739a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs @@ -9,9 +9,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles.Voice; - using VoiceChat.Networking; /// @@ -59,4 +57,4 @@ public ReceivingVoiceMessageEventArgs(Player receiver, Player sender, VoiceModul /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs index 6e30138b89..464f2db6c5 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs index d1edfe37c0..a33a3cabbc 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; @@ -47,4 +47,4 @@ public ReloadingWeaponEventArgs(InventorySystem.Items.Firearms.Firearm firearm, /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs index 5569f47e76..cef326e42d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Enums; - using Exiled.API.Features; + using API.Enums; + using API.Features; using Exiled.Events.EventArgs.Interfaces; /// @@ -44,4 +44,4 @@ public RemovedHandcuffsEventArgs(Player cuffer, Player target, UncuffReason uncu /// public UncuffReason UncuffReason { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs index bd683b6f25..782d77f0fb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Enums; - using Exiled.API.Features; + using API.Enums; + using API.Features; using Exiled.Events.EventArgs.Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs index e757034c37..cb949391ca 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs @@ -74,4 +74,4 @@ public ReservedSlotEventResult Result } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs index 871f831155..599ac864bf 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.Events.EventArgs.Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs index 469d5811d1..c640b78217 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs @@ -42,4 +42,4 @@ public RoomChangedEventArgs(ReferenceHub player, RoomIdentifier oldRoom, RoomIde /// public Room NewRoom { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs index c0286f7edb..515d8c7b04 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs @@ -7,11 +7,15 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; + + using Exiled.API.Features.Items.FirearmModules.Primary; using Interfaces; + using InventorySystem.Items.Firearms.Modules; + using FirearmBase = InventorySystem.Items.Firearms.Firearm; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs index ef098bd4d7..47b568d667 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.EventArgs.Player { using CustomPlayerEffects; - using Exiled.API.Features; using Exiled.API.Features.DamageHandlers; using Exiled.Events.EventArgs.Interfaces; @@ -65,4 +64,4 @@ public SavingByAntiScp207EventArgs(ReferenceHub player, float damageAmount, Dama /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs index bef34edd65..6dce01109c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; - + using API.Features; + using API.Features.Items; using Interfaces; - using InventorySystem.Items.Usables.Scp1576; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs index 5903268c82..921be7a267 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs @@ -8,8 +8,12 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; + using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Pickups; + using InventorySystem.Searching; + /// /// Contains all information before a player sends a message in AdminChat. /// @@ -49,4 +53,4 @@ public SendingAdminChatMessageEventsArgs(Player player, string message, bool isA /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs index 636d3fec80..c1041453ab 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs @@ -6,10 +6,11 @@ // ----------------------------------------------------------------------- namespace Exiled.Events.EventArgs.Player { + using API.Features; + using API.Features.Items; + using AudioPooling; - using Exiled.API.Features; - using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; using UnityEngine; @@ -82,4 +83,4 @@ public SendingGunSoundEventArgs(InventorySystem.Items.Firearms.Firearm firearm, /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs index f4ef316f08..1ea8a6df71 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs @@ -8,11 +8,11 @@ namespace Exiled.Events.EventArgs.Player { using CommandSystem; - using Exiled.API.Features; + using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using LabApi.Features.Enums; + using RemoteAdmin; /// /// Contains all information before a player sends the command. @@ -76,4 +76,4 @@ public SendingValidCommandEventArgs(Player player, ICommand command, CommandType /// public ICommand Command { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs index 3ecddd2c87..1c96ff88f9 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs @@ -8,11 +8,11 @@ namespace Exiled.Events.EventArgs.Player { using CommandSystem; - using Exiled.API.Features; + using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using LabApi.Features.Enums; + using RemoteAdmin; /// /// Contains all information after a player sends the command. @@ -80,4 +80,4 @@ public SentValidCommandEventArgs(Player player, ICommand command, CommandType co /// public ICommand Command { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs index 8195b894a1..3c2f9d12b6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs @@ -7,13 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; - using InventorySystem.Items.Firearms.Modules.Misc; - using UnityEngine; using BaseFirearm = InventorySystem.Items.Firearms.Firearm; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs index 41ee8ac4f2..18d2303353 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs @@ -7,13 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; - using InventorySystem.Items.Firearms.Modules; - using UnityEngine; /// @@ -109,4 +106,4 @@ public ShotEventArgs(HitscanHitregModuleBase hitregModule, RaycastHit hitInfo, I /// public bool CanSpawnImpactEffects { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs index b4364b8200..aa231bce41 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { + using API.Features; using Exiled.API.Enums; - using Exiled.API.Features; using Exiled.API.Features.Roles; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs index d8e41a57f6..a500495017 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs @@ -7,17 +7,14 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; using PlayerRoles; using PlayerRoles.Ragdolls; - using PlayerStatsSystem; - using RelativePositioning; - using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs index 73413e42c1..785ff5a3cc 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs @@ -12,9 +12,7 @@ namespace Exiled.Events.EventArgs.Player using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles; - using UnityEngine; /// @@ -77,4 +75,4 @@ public SpawningEventArgs(Player player, Vector3 position, float rotation, Player /// public Role NewRole { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs index 9694a53946..9212024a25 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs @@ -7,17 +7,13 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - + using API.Features; using Interfaces; using PlayerRoles; using PlayerRoles.Ragdolls; - using PlayerStatsSystem; - using RelativePositioning; - using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs index 89f201ee26..002e6a9b8f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Hazards; - using Hazards; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs index 87f61e1835..6462c655d8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.Events.EventArgs.Interfaces; - using MapGeneration.Distributors; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs index 32e04847ce..ee1b36558a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs @@ -50,4 +50,4 @@ public ThrowingRequestEventArgs(Player player, ThrowableItem item, ThrowableNetw /// public ThrowRequest RequestType { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs index 48238a8e60..14ab42de1e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs @@ -54,4 +54,4 @@ public ThrownProjectileEventArgs(ThrownProjectile projectile, Player player, Thr /// public Pickup Pickup => Projectile; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs index 6ffaa716e3..183476b48a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs @@ -7,11 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; - using InventorySystem.Items.ToggleableLights; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs index c0f397f7cf..65ea273731 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs index 95dc42d62a..7b0c68d7a6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs @@ -7,11 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using Exiled.API.Features.Items; using Interfaces; - using InventorySystem.Items.Radio; /// @@ -65,4 +64,4 @@ public TogglingRadioEventArgs(Player player, RadioItem radio, bool newState, boo /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs index cb30b5dc42..3c6f2f7886 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs index 908c3c1ffb..6c897ba955 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs index e3be85338e..69a37671dc 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs index 1cc14e9f77..2ac5ce4a2f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; @@ -51,4 +51,4 @@ public UnloadingWeaponEventArgs(InventorySystem.Items.Firearms.Firearm firearm, /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs index 63c5ce8a4f..77541732d0 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs index 3d57657aed..c6aeed7ffb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs index 51b133fce6..027d0a36c4 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; using InventorySystem.Items.Usables; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs index e11878f465..317d6ddbeb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; using InventorySystem.Items.Usables; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs index c87c0ade86..2cfe7fee35 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs index 340f07bd0e..3b3af1c73f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs index d0586ecd65..ec1d841365 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs index 06b6500a71..5a488c3d2e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs @@ -58,4 +58,4 @@ public VoiceChattingEventArgs(Player player, VoiceModuleBase voiceModule, VoiceM /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs index 3fe1d31ba6..a6144bbb8c 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp049 { - using Exiled.API.Features; + using API.Features; using Exiled.Events.EventArgs.Interfaces; using Scp049Role = API.Features.Roles.Scp049Role; @@ -61,4 +61,4 @@ public ActivatingSenseEventArgs(Player player, Player target, bool isAllowed = t /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs index f6767158ca..fc773a7fcb 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Scp049 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; - using PlayerRoles.Ragdolls; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs index d8c918c99d..43baf5987b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs @@ -63,4 +63,4 @@ public FinishingSenseEventArgs(ReferenceHub scp049, ReferenceHub target, double /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs index c261aae666..e859023690 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp049 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs index d591160096..93757c990a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp049 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// @@ -61,4 +60,4 @@ public StartingRecallEventArgs(Player player, Ragdoll ragdoll, bool isAllowed = /// public Ragdoll Ragdoll { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs index 43fd31568e..56aff95ac3 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp0492 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; using PlayerRoles.PlayableScps.Scp049.Zombies; @@ -51,4 +50,4 @@ public ConsumedCorpseEventArgs(ReferenceHub player, BasicRagdoll ragDoll) /// public float ConsumeHeal { get; set; } = ZombieConsumeAbility.ConsumeHeal; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs index 94c539686e..06de15a086 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp0492 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; using PlayerRoles.PlayableScps.Scp049.Zombies; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs index b93d7a3775..d827bbd254 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp079 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs index ecfcc677e4..973cbfe84d 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs @@ -9,10 +9,11 @@ namespace Exiled.Events.EventArgs.Scp079 { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles; using PlayerRoles.PlayableScps.Scp079; + using Scp079Role = API.Features.Roles.Scp079Role; + /// /// Contains all information before SCP-079 gains experience. /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs index 54c781883e..57eeae5ded 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp079 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs index 33d635bed1..cae1c775e2 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs @@ -41,4 +41,4 @@ public LosingSignalEventArgs(ReferenceHub player) /// public API.Features.Roles.Scp079Role Scp079 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs index 38f8dd2ee8..247eb5c20f 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs @@ -35,4 +35,4 @@ public LostSignalEventArgs(ReferenceHub player) /// public API.Features.Roles.Scp079Role Scp079 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs index 065658655e..811dca1977 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Scp079 { + using API.Features; + using Exiled.API.Enums; - using Exiled.API.Features; using Exiled.API.Features.Roles; - using Interfaces; using RelativePositioning; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs index 4be20db3cb..c897dd1a5f 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp079 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// @@ -58,4 +57,4 @@ public RecontainedEventArgs(Player player, PlayerRoles.PlayableScps.Scp079.Scp07 /// public bool IsAutomatic { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs index d344068959..5bde59481d 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs @@ -39,4 +39,4 @@ public RecontainingEventArgs(BreakableWindow recontainer) /// public bool IsAutomatic { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs index 6c1705e4c5..513a7d266a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.EventArgs.Scp079 { using Exiled.API.Features; + using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; using MapGeneration; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs index 3ee025e03a..e93c97772e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs @@ -7,11 +7,10 @@ namespace Exiled.Events.EventArgs.Scp079 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Doors; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; - using Interactables.Interobjects.DoorUtils; using Player; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs index e7eb9cb02e..6f23053ee4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs @@ -11,11 +11,11 @@ namespace Exiled.Events.EventArgs.Scp079 using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using MapGeneration; - using PlayerRoles.PlayableScps.Scp079; + using Scp079Role = API.Features.Roles.Scp079Role; + /// /// Contains all information before SCP-079 lockdowns a room. /// @@ -92,4 +92,4 @@ public ZoneBlackoutEventArgs(ReferenceHub player, FacilityZone zone, float auxil /// public API.Features.Roles.Scp079Role Scp079 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs index dfd9b25120..13e0660a7e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs index 5a35f807f3..c025e712ce 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs index 6f40cd9fdc..299ce58675 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs index d931149bd8..67ce2db693 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs index f5afec9bf7..1dc1934942 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs index 648199d227..22052c0350 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs @@ -7,11 +7,10 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; - using Exiled.API.Features.Doors; + using API.Features; + using API.Features.Doors; using Interactables.Interobjects; - using Interfaces; using Scp096Role = API.Features.Roles.Scp096Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs index 288ea9f8fe..803d7ddbcc 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Scp096 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Doors; - using Interfaces; - using UnityEngine; using Scp096Role = API.Features.Roles.Scp096Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs index 26aba1480c..b501c112c9 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs @@ -7,8 +7,7 @@ namespace Exiled.Events.EventArgs.Scp106 { - using Exiled.API.Features; - + using API.Features; using Interfaces; using Scp106Role = API.Features.Roles.Scp106Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs index cb3a10626b..b94a3db6ff 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs @@ -7,10 +7,8 @@ namespace Exiled.Events.EventArgs.Scp106 { - using Exiled.API.Features; - + using API.Features; using Interfaces; - using PlayerRoles.PlayableScps.Scp106; using Scp106Role = API.Features.Roles.Scp106Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs index 9e5067f528..52f503cf6a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp106 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; using UnityEngine; diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs index da3268e6f2..533ccbb5ce 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs index 86b22c14df..6a1d7b738b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs index 8c77180c9e..10810403d5 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs index 614551c797..b8934566a8 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs index 7c8c6b287e..c5c772529f 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs @@ -56,4 +56,4 @@ public ChangedStatusEventArgs(ItemBase item, Scp1344Status scp1344Status) [Obsolete("Please use ChangingStatusEventArgs::IsAllowed instead of this", true)] public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs index 4330cc41ce..6cf7449e99 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Scp1344 { using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items; using InventorySystem.Items.Usables.Scp1344; @@ -62,4 +61,4 @@ public ChangingStatusEventArgs(ItemBase item, Scp1344Status scp1344StatusNew, Sc /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs index c00535c169..79ec6925ee 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs @@ -41,4 +41,4 @@ public DeactivatedEventArgs(Item item) /// public Scp1344 Scp1344 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs index 680041f5df..8ff103fa53 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs @@ -54,4 +54,4 @@ public DeactivatingEventArgs(Item item, bool isAllowed = true) /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs index e3f92113bc..c58330e252 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs @@ -13,7 +13,6 @@ namespace Exiled.Events.EventArgs.Scp1507 using Exiled.API.Features.Doors; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; - using Interactables.Interobjects.DoorUtils; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs index 1806cc8eb4..376eba5abf 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs @@ -13,8 +13,8 @@ namespace Exiled.Events.EventArgs.Scp1507 using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles.PlayableScps.Scp1507; + using Utils.NonAllocLINQ; /// /// Contains all information before flamingos get spawned. @@ -30,7 +30,7 @@ public class SpawningFlamingosEventArgs : IDeniableEvent, IPlayerEvent public SpawningFlamingosEventArgs(Player newAlpha, bool isAllowed = true) { Player = newAlpha; - SpawnablePlayers = ReferenceHub.AllHubs.Where(Scp1507Spawner.ValidatePlayer).Select(Player.Get).ToHashSet(); + SpawnablePlayers = ReferenceHub.AllHubs.Where(Scp1507Spawner.ValidatePlayer).Select(x => Player.Get(x)).ToHashSet(); IsAllowed = isAllowed; } diff --git a/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs index 09eb92c630..0121d02d95 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs @@ -12,7 +12,6 @@ namespace Exiled.Events.EventArgs.Scp1507 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs index 90e3fd07cd..4484f3b730 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,9 +10,7 @@ namespace Exiled.Events.EventArgs.Scp1509 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Scp1509; - using PlayerRoles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs index 17d8d7c63c..cbc9b54106 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Scp1509 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Scp1509; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs index 6df42adb33..b47ee821c6 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Scp173 { using Exiled.API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs index 005499bb89..d1ee0750bf 100755 --- a/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs @@ -54,4 +54,4 @@ public BeingObservedEventArgs(API.Features.Player target, API.Features.Player sc /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs index 36990b3464..95f3e2a084 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs @@ -9,7 +9,7 @@ namespace Exiled.Events.EventArgs.Scp173 { using System.Collections.Generic; - using Exiled.API.Features; + using API.Features; using Interfaces; @@ -73,4 +73,4 @@ public BlinkingEventArgs(Player player, List targets, Vector3 blinkPos) /// public Scp173Role Scp173 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs index af7b57a865..f526d55c38 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.EventArgs.Scp173 using System.Collections.Generic; using System.Linq; - using Exiled.API.Features; - + using API.Features; using Interfaces; using Scp173Role = API.Features.Roles.Scp173Role; @@ -34,7 +33,7 @@ public BlinkingRequestEventArgs(Player player, HashSet targets) { Player = player; Scp173 = player.Role.As(); - Targets = targets.Select(Player.Get).ToList(); + Targets = targets.Select(target => Player.Get(target)).ToList(); } /// @@ -55,4 +54,4 @@ public BlinkingRequestEventArgs(Player player, HashSet targets) /// public Scp173Role Scp173 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs index 6b651d01a4..70ed06bdf4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs @@ -13,7 +13,6 @@ namespace Exiled.Events.EventArgs.Scp173 using Exiled.Events.EventArgs.Interfaces; using Hazards; - using PlayerRoles.Subroutines; using Scp173Role = API.Features.Roles.Scp173Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs index c4db144aec..a941cfeea6 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Scp173 { using Exiled.API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs index df671cccc2..32216ba9e0 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp173 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// @@ -55,4 +54,4 @@ public UsingBreakneckSpeedsEventArgs(Player player, bool isActivationRequested, /// public Scp173Role Scp173 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs index 808c41a500..d8550dd4e4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs @@ -38,4 +38,4 @@ public OpeningScp244EventArgs(Scp244DeployablePickup pickup) /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs index cc53b717a8..ab00eaab12 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Scp244 { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; @@ -53,4 +53,4 @@ public UsingScp244EventArgs(Scp244Item scp244, Player player, bool isAllowed = t /// public Player Player { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs index c891012223..1bb5773188 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.EventArgs.Scp2536 { using Christmas.Scp2536; - using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs index 193e057934..d4935e6c92 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -8,7 +8,6 @@ namespace Exiled.Events.EventArgs.Scp2536 { using Christmas.Scp2536; - using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs index 7e1297d2da..4ecd4af405 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.EventArgs.Scp2536 { using Christmas.Scp2536; - using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs index 8cc44aec2a..b952ed7fe3 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs @@ -7,6 +7,7 @@ namespace Exiled.Events.EventArgs.Scp2536 { + using Christmas.Scp2536; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs index af9abfcf79..49488a20bf 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.EventArgs.Scp3114 using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; + using Exiled.Events.Patches.Events.Scp3114; /// /// Contains all information before SCP-3114 changes its dancing status. diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs index 5f74301a1b..b7c7d4bf6b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs index 3296b107d1..050b4beb5b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs index 4bd687b7d5..cab47ebc91 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs index b19db42e62..215ffd1771 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs index 3562415936..41a01cdce7 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; - using PlayerRoles.PlayableScps.Subroutines; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs index bb803f6606..94b45227c4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs @@ -7,9 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; - + using API.Features; using Interfaces; + using PlayerRoles.PlayableScps.Scp3114; using Scp3114Role = Exiled.API.Features.Roles.Scp3114Role; @@ -51,4 +51,4 @@ public StranglingEventArgs(ReferenceHub hub, ReferenceHub target) /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs index 9d067c1a0a..f63aaba952 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs index d861a41285..7fa402479a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; using static PlayerRoles.PlayableScps.Scp3114.Scp3114VoiceLines; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs index af5d2b7e80..dbb905ee8a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Scp330 { - using Exiled.API.Features; - using Exiled.API.Features.Items; + using API.Features; + using API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs index 0f7f0a5123..74633d8c61 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp330 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; using InventorySystem.Items.Usables.Scp330; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs index b84aafaf61..ab15aa1d6b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp330 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Items; - using Interfaces; using InventorySystem.Items.Usables.Scp330; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs index c0b6ba40ab..d706ea289d 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs @@ -7,10 +7,8 @@ namespace Exiled.Events.EventArgs.Scp330 { - using Exiled.API.Features; - + using API.Features; using Exiled.API.Features.Items; - using Interfaces; using InventorySystem.Items.Usables.Scp330; @@ -42,10 +40,10 @@ public InteractingScp330EventArgs(ReferenceHub referenceHub, int usage, bool sho { Player = Player.Get(referenceHub); UsageCount = usage; - ShouldSever = shouldSever; + ShouldSever = usage >= 2; ShouldPlaySound = shouldPlaySound; IsAllowed = Player.IsHuman; - Candy = candy; + Candy = Scp330Candies.GetRandom(); } /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs index 8efc9cf7d6..6e3a81f06a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.EventArgs.Scp559 using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs index 491b626b00..1309a55978 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp914 { - using Exiled.API.Features; + using API.Features; using global::Scp914; diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs index ddde646524..4874f9de7b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp914 { - using Exiled.API.Features; + using API.Features; using global::Scp914; diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs index fb77bcc015..4bd590dc55 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs @@ -7,14 +7,12 @@ namespace Exiled.Events.EventArgs.Scp914 { - using Exiled.API.Features; - using Exiled.API.Features.Items; - + using API.Features; + using API.Features.Items; using global::Scp914; - using Interfaces; - using InventorySystem.Items; + using InventorySystem.Items.Pickups; /// /// Contains all information before SCP-914 upgrades an item. diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs index 8ead02480c..5bd2c9d952 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs @@ -9,11 +9,8 @@ namespace Exiled.Events.EventArgs.Scp914 { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using global::Scp914; - using InventorySystem.Items.Pickups; - using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs index b46ec984aa..667320e57e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs @@ -7,13 +7,10 @@ namespace Exiled.Events.EventArgs.Scp914 { - using Exiled.API.Features; - using Exiled.API.Features.Items; - + using API.Features; + using API.Features.Items; using global::Scp914; - using Interfaces; - using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs index 9a6fb7f4b5..691db20a15 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs @@ -9,11 +9,8 @@ namespace Exiled.Events.EventArgs.Scp914 { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using global::Scp914; - using InventorySystem.Items.Pickups; - using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs index 268f2cba15..cf4487eccc 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp914 { - using Exiled.API.Features; + using API.Features; using global::Scp914; diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs index 48b6c05313..982fbd09fd 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs index 5f82547a40..8ce4a1f1a2 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs index 30125cb3e0..387f0467cb 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs @@ -7,10 +7,8 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; - + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// @@ -38,4 +36,4 @@ public LungingEventArgs(Player player) /// public Scp939Role Scp939 { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs index 0d53bbe6a4..d2545aad3d 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; - using Exiled.API.Features.Hazards; - + using API.Features; + using API.Features.Hazards; using Interfaces; - using PlayerRoles.PlayableScps.Scp939; using Scp939Role = API.Features.Roles.Scp939Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs index 9571fb98cc..3d77ff708d 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs index 3428e7a171..a761942caf 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Scp939 using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; - using RelativePositioning; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs index 698ba3f498..269bb3ea3b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs @@ -7,10 +7,8 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; - + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// @@ -56,4 +54,4 @@ public PlayingFootstepEventArgs(Player target, Player player, bool isAllowed = t /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs index 12011c7547..675884707c 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs @@ -7,11 +7,9 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; - using PlayerRoles.PlayableScps.Scp939.Mimicry; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs index 7fd8ec4862..b744934b8c 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs index c8f60d96ed..60133cc196 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs index a6dc837cc9..e75a835f44 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Scp939 { - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Hazards; - + using Exiled.API.Features.Roles; using Interfaces; using PlayerRoles.PlayableScps.Scp939; @@ -38,7 +38,6 @@ public UpdatedCloudStateEventArgs(ReferenceHub hub, Scp939AmnesticCloudInstance. { Player = Player.Get(hub); AmnesticCloud = Hazard.Get(cloud); - NewState = cloudState; Scp939 = Player.Role.As(); } diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs index 6d50ae98d4..fa3a93f300 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Scp939 { + using API.Features; + using Exiled.API.Enums; - using Exiled.API.Features; using Exiled.API.Features.Roles; - using Interfaces; /// @@ -36,7 +36,7 @@ public ValidatingVisibilityEventArgs(Scp939VisibilityState state, ReferenceHub p Scp939 = Player.Role.As(); Target = Player.Get(target); TargetVisibilityState = state; - IsAllowed = TargetVisibilityState is not (Scp939VisibilityState.NotSeen or Scp939VisibilityState.None); + IsAllowed = TargetVisibilityState is not(Scp939VisibilityState.NotSeen or Scp939VisibilityState.None); IsLateSeen = TargetVisibilityState is Scp939VisibilityState.SeenByRange; } @@ -69,4 +69,4 @@ public ValidatingVisibilityEventArgs(Scp939VisibilityState state, ReferenceHub p /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs index aaa305cc1f..84c4457973 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs @@ -12,9 +12,7 @@ namespace Exiled.Events.EventArgs.Server using System.Text; using Exiled.API.Features.Pools; - using Interfaces; - using PlayerRoles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs index d685cbab5b..def486974b 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Server { using Exiled.API.Features.Objectives; using Exiled.Events.EventArgs.Interfaces; - using Respawning.Objectives; /// diff --git a/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs index c919f8ac1b..2e5c11dc05 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs @@ -9,8 +9,7 @@ namespace Exiled.Events.EventArgs.Server { using System; - using Exiled.API.Enums; - + using API.Enums; using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs index 834c0b516c..02d1d6b984 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Server { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs index 4eedf333dd..b102bdb377 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Server { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs index e8543f64a7..d3d62667a0 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs @@ -12,7 +12,7 @@ namespace Exiled.Events.EventArgs.Server using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - + using Respawning; using Respawning.Waves; /// @@ -41,4 +41,4 @@ public RespawnedTeamEventArgs(SpawnableWaveBase wave, IEnumerable /// public SpawnableWaveBase Wave { get; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs index b334d64ef6..6e017b2816 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs @@ -7,15 +7,15 @@ namespace Exiled.Events.EventArgs.Server { + using System; using System.Collections.Generic; using Exiled.API.Features; using Exiled.API.Features.Waves; using Exiled.Events.EventArgs.Interfaces; - using PlayerRoles; using PlayerRoles.Spectating; - + using Respawning; using Respawning.Objectives; using Respawning.Waves; @@ -100,4 +100,4 @@ public int MaximumRespawnAmount /// public Queue SpawnQueue { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs index 460747d00d..0e614d8a64 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Server { - using Exiled.API.Enums; + using API.Enums; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs index 10de2a7c6e..b97f309edf 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs @@ -7,6 +7,12 @@ namespace Exiled.Events.EventArgs.Server { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using Exiled.Events.EventArgs.Interfaces; /// @@ -53,4 +59,4 @@ public RoundStartingEventArgs(short timeLeft, short originalTimeLeft, int topPla /// public bool IsAllowed { get; set; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs index 689ebd12f0..dd62947778 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.EventArgs.Server using Exiled.API.Enums; using Exiled.API.Features.Waves; using Exiled.Events.EventArgs.Interfaces; - using Respawning.Waves; /// diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs index b3cce5d9a4..407cdfd762 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Warhead { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs index 9c63e9ec19..389677132c 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs @@ -17,4 +17,4 @@ public class DeadmanSwitchInitiatingEventArgs : IDeniableEvent /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs index 4cc024c942..d9c00e9da4 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs @@ -17,4 +17,4 @@ public class DetonatingEventArgs : IDeniableEvent /// public bool IsAllowed { get; set; } = true; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs index 71eff5af38..403380511b 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Warhead { - using Exiled.API.Features; + using API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/Events.cs b/EXILED/Exiled.Events/Events.cs index 980d245cb2..f01919aff5 100644 --- a/EXILED/Exiled.Events/Events.cs +++ b/EXILED/Exiled.Events/Events.cs @@ -10,23 +10,19 @@ namespace Exiled.Events using System; using System.Diagnostics; + using API.Enums; + using API.Features; using CentralAuth; - - using Exiled.API.Enums; - using Exiled.API.Features; using Exiled.API.Features.Core.UserSettings; using Exiled.Events.Features; - + using HarmonyLib; using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables; - using PlayerRoles.Ragdolls; using PlayerRoles.RoleAssign; using Respawning; - using UnityEngine.SceneManagement; - using UserSettings.ServerSpecific; /// @@ -153,8 +149,8 @@ public void Patch() { Patcher = new Patcher(); #if DEBUG - bool lastDebugStatus = HarmonyLib.Harmony.DEBUG; - HarmonyLib.Harmony.DEBUG = true; + bool lastDebugStatus = Harmony.DEBUG; + Harmony.DEBUG = true; #endif Patcher.PatchAll(!Config.UseDynamicPatching, out int failedPatch); @@ -163,7 +159,7 @@ public void Patch() else Log.Error($"Patching failed! There are {failedPatch} broken patches."); #if DEBUG - HarmonyLib.Harmony.DEBUG = lastDebugStatus; + Harmony.DEBUG = lastDebugStatus; #endif } catch (Exception exception) @@ -183,4 +179,4 @@ public void Unpatch() Log.Debug("All events have been unpatched complete. Goodbye!"); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Exiled.Events.csproj b/EXILED/Exiled.Events/Exiled.Events.csproj index e686633b20..c8d9aa1cd1 100644 --- a/EXILED/Exiled.Events/Exiled.Events.csproj +++ b/EXILED/Exiled.Events/Exiled.Events.csproj @@ -18,7 +18,7 @@ - + diff --git a/EXILED/Exiled.Events/Features/Event.cs b/EXILED/Exiled.Events/Features/Event.cs index 8d27e46b02..7c2d146635 100644 --- a/EXILED/Exiled.Events/Features/Event.cs +++ b/EXILED/Exiled.Events/Features/Event.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.Features using System; using System.Buffers; using System.Collections.Generic; + using System.Linq; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; @@ -32,11 +33,15 @@ namespace Exiled.Events.Features /// public class Event : IExiledEvent { + private record Registration(CustomEventHandler handler, int priority); + + private record AsyncRegistration(CustomAsyncEventHandler handler, int priority); + private static readonly List EventsValue = new(); - private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); + private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); - private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); + private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); private readonly List innerEvent = new(); @@ -133,7 +138,7 @@ public void Subscribe(CustomEventHandler handler, int priority) if (handler == null) return; - Registration registration = new(handler, priority); + Registration registration = new Registration(handler, priority); int index = innerEvent.BinarySearch(registration, RegisterComparable); if (index < 0) { @@ -141,7 +146,7 @@ public void Subscribe(CustomEventHandler handler, int priority) } else { - while (index < innerEvent.Count && innerEvent[index].Priority == priority) + while (index < innerEvent.Count && innerEvent[index].priority == priority) index++; innerEvent.Insert(index, registration); } @@ -172,7 +177,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) if (handler == null) return; - AsyncRegistration registration = new(handler, 0); + AsyncRegistration registration = new AsyncRegistration(handler, 0); int index = innerAsyncEvent.BinarySearch(registration, AsyncRegisterComparable); if (index < 0) { @@ -180,7 +185,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) } else { - while (index < innerAsyncEvent.Count && innerAsyncEvent[index].Priority == priority) + while (index < innerAsyncEvent.Count && innerAsyncEvent[index].priority == priority) index++; innerAsyncEvent.Insert(index, registration); } @@ -192,7 +197,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) /// The handler to add. public void Unsubscribe(CustomEventHandler handler) { - int index = innerEvent.FindIndex(p => p.Handler == handler); + int index = innerEvent.FindIndex(p => p.handler == handler); if (index != -1) innerEvent.RemoveAt(index); } @@ -203,7 +208,7 @@ public void Unsubscribe(CustomEventHandler handler) /// The handler to add. public void Unsubscribe(CustomAsyncEventHandler handler) { - int index = innerAsyncEvent.FindIndex(p => p.Handler == handler); + int index = innerAsyncEvent.FindIndex(p => p.handler == handler); if (index != -1) innerAsyncEvent.RemoveAt(index); } @@ -236,15 +241,15 @@ internal void BlendedInvoke() for (int i = 0; i < count; i++) { - if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].Priority >= localInnerAsyncEvent[asyncEventIndex].Priority)) + if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].priority >= localInnerAsyncEvent[asyncEventIndex].priority)) { try { - localInnerEvent[eventIndex].Handler(); + localInnerEvent[eventIndex].handler(); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[eventIndex].Handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[eventIndex].handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } eventIndex++; @@ -253,11 +258,11 @@ internal void BlendedInvoke() { try { - Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].Handler()); + Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].handler()); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } asyncEventIndex++; @@ -285,11 +290,11 @@ internal void InvokeNormal() { try { - localInnerEvent[i].Handler(); + localInnerEvent[i].handler(); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[i].Handler.Method.Name}\" of the class \"{localInnerEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[i].handler.Method.Name}\" of the class \"{localInnerEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -313,11 +318,11 @@ internal void InvokeAsync() { try { - Timing.RunCoroutine(localInnerAsyncEvent[i].Handler()); + Timing.RunCoroutine(localInnerAsyncEvent[i].handler()); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[i].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[i].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -326,9 +331,5 @@ internal void InvokeAsync() ArrayPool.Shared.Return(localInnerAsyncEvent, true); } } - - private record Registration(CustomEventHandler Handler, int Priority); - - private record AsyncRegistration(CustomAsyncEventHandler Handler, int Priority); } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Features/Event{T}.cs b/EXILED/Exiled.Events/Features/Event{T}.cs index 095cb17b40..40fdb85be7 100644 --- a/EXILED/Exiled.Events/Features/Event{T}.cs +++ b/EXILED/Exiled.Events/Features/Event{T}.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.Features using System; using System.Buffers; using System.Collections.Generic; + using System.Linq; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; @@ -37,11 +38,15 @@ namespace Exiled.Events.Features /// The specified that the event will use. public class Event : IExiledEvent { + private record Registration(CustomEventHandler handler, int priority); + + private record AsyncRegistration(CustomAsyncEventHandler handler, int priority); + private static readonly Dictionary> TypeToEvent = new(); - private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); + private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); - private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); + private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); private readonly List innerEvent = new(); @@ -138,7 +143,7 @@ public void Subscribe(CustomEventHandler handler, int priority) if (handler == null) return; - Registration registration = new(handler, priority); + Registration registration = new Registration(handler, priority); int index = innerEvent.BinarySearch(registration, RegisterComparable); if (index < 0) { @@ -146,7 +151,7 @@ public void Subscribe(CustomEventHandler handler, int priority) } else { - while (index < innerEvent.Count && innerEvent[index].Priority == priority) + while (index < innerEvent.Count && innerEvent[index].priority == priority) index++; innerEvent.Insert(index, registration); } @@ -177,7 +182,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) if (handler == null) return; - AsyncRegistration registration = new(handler, 0); + AsyncRegistration registration = new AsyncRegistration(handler, 0); int index = innerAsyncEvent.BinarySearch(registration, AsyncRegisterComparable); if (index < 0) { @@ -185,7 +190,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) } else { - while (index < innerAsyncEvent.Count && innerAsyncEvent[index].Priority == priority) + while (index < innerAsyncEvent.Count && innerAsyncEvent[index].priority == priority) index++; innerAsyncEvent.Insert(index, registration); } @@ -197,7 +202,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) /// The handler to add. public void Unsubscribe(CustomEventHandler handler) { - int index = innerEvent.FindIndex(p => p.Handler == handler); + int index = innerEvent.FindIndex(p => p.handler == handler); if (index != -1) innerEvent.RemoveAt(index); } @@ -208,7 +213,7 @@ public void Unsubscribe(CustomEventHandler handler) /// The handler to add. public void Unsubscribe(CustomAsyncEventHandler handler) { - int index = innerAsyncEvent.FindIndex(p => p.Handler == handler); + int index = innerAsyncEvent.FindIndex(p => p.handler == handler); if (index != -1) innerAsyncEvent.RemoveAt(index); } @@ -242,15 +247,15 @@ internal void BlendedInvoke(T arg) for (int i = 0; i < count; i++) { - if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].Priority >= localInnerAsyncEvent[asyncEventIndex].Priority)) + if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].priority >= localInnerAsyncEvent[asyncEventIndex].priority)) { try { - localInnerEvent[eventIndex].Handler(arg); + localInnerEvent[eventIndex].handler(arg); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[eventIndex].Handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[eventIndex].handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } eventIndex++; @@ -259,11 +264,11 @@ internal void BlendedInvoke(T arg) { try { - Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].Handler(arg)); + Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].handler(arg)); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } asyncEventIndex++; @@ -291,11 +296,11 @@ internal void InvokeNormal(T arg) { try { - localInnerEvent[i].Handler(arg); + localInnerEvent[i].handler(arg); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[i].Handler.Method.Name}\" of the class \"{localInnerEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[i].handler.Method.Name}\" of the class \"{localInnerEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -319,11 +324,11 @@ internal void InvokeAsync(T arg) { try { - Timing.RunCoroutine(localInnerAsyncEvent[i].Handler(arg)); + Timing.RunCoroutine(localInnerAsyncEvent[i].handler(arg)); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[i].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[i].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -332,9 +337,5 @@ internal void InvokeAsync(T arg) ArrayPool.Shared.Return(localInnerAsyncEvent, true); } } - - private record Registration(CustomEventHandler Handler, int Priority); - - private record AsyncRegistration(CustomAsyncEventHandler Handler, int Priority); } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Features/Patcher.cs b/EXILED/Exiled.Events/Features/Patcher.cs index 7ece301802..cbc739fb35 100644 --- a/EXILED/Exiled.Events/Features/Patcher.cs +++ b/EXILED/Exiled.Events/Features/Patcher.cs @@ -16,7 +16,6 @@ namespace Exiled.Events.Features using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Interfaces; - using HarmonyLib; /// @@ -155,4 +154,4 @@ public void UnpatchAll() /// A of all patch types. internal static HashSet GetAllPatchTypes() => Assembly.GetExecutingAssembly().GetTypes().Where((type) => type.CustomAttributes.Any((customAtt) => customAtt.AttributeType == typeof(HarmonyPatch))).ToHashSet(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs b/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs index 7c830f1310..2d4ebf971e 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs @@ -24,4 +24,4 @@ internal static class AdminToyList /// The destroyed ragdoll. public static void OnRemovedAdminToys(AdminToys.AdminToyBase adminToy) => API.Features.Toys.AdminToy.BaseToAdminToy.Remove(adminToy); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs b/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs index 4ebaf9759e..9e9f6eacd7 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs @@ -13,11 +13,8 @@ namespace Exiled.Events.Handlers.Internal using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Attributes; - using Mirror; - using PlayerRoles.Ragdolls; - using UnityEngine; /// @@ -68,9 +65,7 @@ public static void OnClientStarted() PrefabAttribute attribute = prefabType.GetPrefabAttribute(); if (prefabs.TryGetValue(attribute.AssetId, out (GameObject, Component) tuple)) { - if (attribute.Name != tuple.Item1.name) - Log.Warn($"Not valid Name {prefabType}: {attribute.Name} ({attribute.AssetId}) -> {tuple.Item1.name} ({attribute.AssetId})"); - + GameObject gameObject = tuple.Item1; PrefabHelper.Prefabs.Add(prefabType, prefabs.FirstOrDefault(prefab => prefab.Key == attribute.AssetId || prefab.Value.Item1.name.Contains(attribute.Name)).Value); prefabs.Remove(attribute.AssetId); continue; @@ -79,8 +74,6 @@ public static void OnClientStarted() KeyValuePair? value = prefabs.FirstOrDefault(x => x.Value.Item1.name == attribute.Name); if (value.HasValue) { - Log.Warn($"Not valid AssetId {prefabType}: {attribute.Name} ({attribute.AssetId}) -> {value.Value.Value.Item1.name} ({value.Value.Key})"); - PrefabHelper.Prefabs.Add(prefabType, prefabs.FirstOrDefault(prefab => prefab.Key == attribute.AssetId || prefab.Value.Item1.name.Contains(attribute.Name)).Value); prefabs.Remove(value.Value.Key); continue; diff --git a/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs b/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs index 14abd46be7..c7f0a36698 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs @@ -7,6 +7,7 @@ namespace Exiled.Events.Handlers.Internal { + using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Map; /// @@ -20,4 +21,4 @@ public static void OnChangedIntoGrenade(ChangedIntoGrenadeEventArgs ev) ev.Pickup.WriteProjectileInfo(ev.Projectile); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs b/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs index fe545f2e48..60ec679791 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs @@ -7,8 +7,10 @@ namespace Exiled.Events.Handlers.Internal { - using Exiled.API.Features; + using System.Collections.Generic; + using System.Linq; + using API.Features; using Exiled.API.Features.Lockers; using MEC; diff --git a/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs b/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs index f1062dddb2..88c6aa43c9 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.Handlers.Internal { using Exiled.API.Features.Pickups; - using InventorySystem.Items.Pickups; /// @@ -35,4 +34,4 @@ public static void OnRemovedPickup(ItemPickupBase itemPickupBase) Pickup.BaseToPickup.Remove(itemPickupBase); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs b/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs index cbff088505..4c2b955631 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs @@ -28,4 +28,4 @@ internal static class RagdollList /// The destroyed ragdoll. public static void OnRemovedRagdoll(BasicRagdoll ragdoll) => Ragdoll.BasicRagdollToRagdoll.Remove(ragdoll); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Internal/Round.cs b/EXILED/Exiled.Events/Handlers/Internal/Round.cs index 73b578d33c..ac058b4629 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/Round.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/Round.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Handlers.Internal using System.Linq; using CentralAuth; - using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features; @@ -25,16 +24,14 @@ namespace Exiled.Events.Handlers.Internal using Exiled.Events.EventArgs.Scp049; using Exiled.Loader; using Exiled.Loader.Features; - + using Interactables.Interobjects.DoorUtils; using InventorySystem; using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Attachments.Components; using InventorySystem.Items.Usables; using InventorySystem.Items.Usables.Scp330; - using PlayerRoles; using PlayerRoles.RoleAssign; - using Utils.NonAllocLINQ; /// @@ -43,7 +40,7 @@ namespace Exiled.Events.Handlers.Internal internal static class Round { /// - public static void OnServerOnUsingCompleted(ReferenceHub hub, UsableItem usable) => Handlers.Player.OnUsedItem(new(hub, usable, false)); + public static void OnServerOnUsingCompleted(ReferenceHub hub, UsableItem usable) => Handlers.Player.OnUsedItem(new (hub, usable, false)); /// public static void OnWaitingForPlayers() @@ -177,4 +174,4 @@ private static void GenerateAttachments() } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs b/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs index 5ebd2c2285..55b9d0738b 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.Handlers.Internal { - using Exiled.API.Features; - + using API.Features; + using Exiled.API.Features.Toys; using UnityEngine.SceneManagement; #pragma warning disable SA1611 // Element parameters should be documented diff --git a/EXILED/Exiled.Events/Handlers/Item.cs b/EXILED/Exiled.Events/Handlers/Item.cs index 50cd5425b9..d4344493b0 100644 --- a/EXILED/Exiled.Events/Handlers/Item.cs +++ b/EXILED/Exiled.Events/Handlers/Item.cs @@ -21,7 +21,7 @@ public static class Item /// /// Invoked before the ammo of an firearm are changed. /// - public static Event ChangingAmmo { get; set; } = new(); + public static Event ChangingAmmo { get; set; } = new (); /// /// Invoked before item attachments are changed. diff --git a/EXILED/Exiled.Events/Handlers/Player.cs b/EXILED/Exiled.Events/Handlers/Player.cs index c2ffca618f..9ef0015750 100644 --- a/EXILED/Exiled.Events/Handlers/Player.cs +++ b/EXILED/Exiled.Events/Handlers/Player.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.Handlers using System; using Exiled.API.Enums; + using Exiled.API.Features; #pragma warning disable IDE0079 #pragma warning disable IDE0060 @@ -29,7 +30,7 @@ public class Player /// /// Invoked after a player triggers the attack as an SCP. /// - public static Event Hit { get; set; } = new(); + public static Event Hit { get; set; } = new (); /// /// Invoked before authenticating a . @@ -86,7 +87,7 @@ public class Player /// /// Invoked before a finishes using a . In other words, it is invoked after the animation finishes but before the is actually used. /// - public static Event UsingItemCompleted { get; set; } = new(); + public static Event UsingItemCompleted { get; set; } = new (); /// /// Invoked after a uses an . @@ -1445,4 +1446,4 @@ public static void OnItemRemoved(ReferenceHub referenceHub, InventorySystem.Item /// The instance. public static void OnScp1576TransmissionEnded(Scp1576TransmissionEndedEventArgs ev) => Scp1576TransmissionEnded.InvokeSafely(ev); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Scp049.cs b/EXILED/Exiled.Events/Handlers/Scp049.cs index 34a1bbfe83..f4a2010794 100644 --- a/EXILED/Exiled.Events/Handlers/Scp049.cs +++ b/EXILED/Exiled.Events/Handlers/Scp049.cs @@ -83,4 +83,4 @@ public static class Scp049 /// The instance. public static void OnAttacking(AttackingEventArgs ev) => Attacking.InvokeSafely(ev); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Scp0492.cs b/EXILED/Exiled.Events/Handlers/Scp0492.cs index 11466dfec2..0d03a3727f 100644 --- a/EXILED/Exiled.Events/Handlers/Scp0492.cs +++ b/EXILED/Exiled.Events/Handlers/Scp0492.cs @@ -20,7 +20,7 @@ public class Scp0492 /// /// Invoked before a player triggers the bloodlust effect for 049-2. /// - public static Event TriggeringBloodlust { get; set; } = new(); + public static Event TriggeringBloodlust { get; set; } = new (); /// /// Called after 049-2 gets his benefits from consumed ability. @@ -50,4 +50,4 @@ public class Scp0492 /// instance. public static void OnConsumingCorpse(ConsumingCorpseEventArgs ev) => ConsumingCorpse.InvokeSafely(ev); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Scp127.cs b/EXILED/Exiled.Events/Handlers/Scp127.cs index 9c111ed0d6..bfdb1bcada 100644 --- a/EXILED/Exiled.Events/Handlers/Scp127.cs +++ b/EXILED/Exiled.Events/Handlers/Scp127.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.Handlers { using Exiled.Events.EventArgs.Scp127; using Exiled.Events.Features; - using LabApi.Events.Arguments.Scp127Events; #pragma warning disable SA1623 diff --git a/EXILED/Exiled.Events/Handlers/Scp1344.cs b/EXILED/Exiled.Events/Handlers/Scp1344.cs index 79ae3376ab..e3cd688c7c 100644 --- a/EXILED/Exiled.Events/Handlers/Scp1344.cs +++ b/EXILED/Exiled.Events/Handlers/Scp1344.cs @@ -72,4 +72,4 @@ public static class Scp1344 /// The instance. public static void OnChangedStatus(ChangedStatusEventArgs ev) => ChangedStatus.InvokeSafely(ev); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Scp173.cs b/EXILED/Exiled.Events/Handlers/Scp173.cs index cc5ba216c8..b5d577d5cd 100644 --- a/EXILED/Exiled.Events/Handlers/Scp173.cs +++ b/EXILED/Exiled.Events/Handlers/Scp173.cs @@ -94,4 +94,4 @@ public static class Scp173 /// The instance. public static void OnRemovedObserver(RemovedObserverEventArgs ev) => RemovedObserver.InvokeSafely(ev); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Handlers/Server.cs b/EXILED/Exiled.Events/Handlers/Server.cs index 7356338ef5..caef937bff 100644 --- a/EXILED/Exiled.Events/Handlers/Server.cs +++ b/EXILED/Exiled.Events/Handlers/Server.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.Handlers { using System.Collections.Generic; + using Respawning; using Respawning.Waves; #pragma warning disable SA1623 // Property summary documentation should match accessors @@ -265,4 +266,4 @@ public static class Server /// The instance. public static void OnCompletingObjective(CompletingObjectiveEventArgs ev) => CompletingObjective.InvokeSafely(ev); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs b/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs index 9e184b1aba..1e7b55e3a8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs @@ -11,16 +11,13 @@ namespace Exiled.Events.Patches.Events.Cassie using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Cassie; - using global::Cassie; - using Handlers; - using HarmonyLib; + using Respawning; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs b/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs index 7454f3bd42..fec7811ecf 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs @@ -10,12 +10,11 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; - using HarmonyLib; - using InventorySystem.Items.MarshmallowMan; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs index c658520201..7ef8824daf 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs @@ -7,12 +7,21 @@ namespace Exiled.Events.Patches.Events.Item { + using System.Collections.Generic; + using System.Reflection.Emit; + + using API.Features.Pools; using Exiled.Events.Attributes; + using Exiled.Events.EventArgs.Item; using Handlers; + using HarmonyLib; + using InventorySystem.Items.Firearms; + using static HarmonyLib.AccessTools; + /// /// Patches . /// Adds the event. diff --git a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs index 29ae01023b..6e45fbd152 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs @@ -8,10 +8,12 @@ namespace Exiled.Events.Patches.Events.Item { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Items; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs b/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs index 69b24013bd..889cbada1c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs @@ -10,18 +10,17 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; + using Exiled.API.Features; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; - using Footprinting; - using HarmonyLib; - using InventorySystem.Items; using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Extensions; + using InventorySystem.Items.Firearms.Modules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs b/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs index f45ca975ef..4ba2d307e8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -15,9 +15,7 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; - using HarmonyLib; - using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Jailbird; using InventorySystem.Items.Keycards; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs index 57fcbaca50..653afada85 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs @@ -12,15 +12,10 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; - using Handlers; - using HarmonyLib; - using InventorySystem.Items.Jailbird; - using Mirror; - using NorthwoodLib.Pools; using static HarmonyLib.AccessTools; @@ -81,43 +76,43 @@ private static bool HandleJailbird(JailbirdItem instance, JailbirdMessageType me switch (messageType) { case JailbirdMessageType.AttackTriggered: - { - SwingingEventArgs ev = new(instance.Owner, instance); + { + SwingingEventArgs ev = new(instance.Owner, instance); - Item.OnSwinging(ev); + Item.OnSwinging(ev); - return ev.IsAllowed; - } + return ev.IsAllowed; + } case JailbirdMessageType.ChargeLoadTriggered: - { - ChargingJailbirdEventArgs ev = new(instance.Owner, instance); + { + ChargingJailbirdEventArgs ev = new(instance.Owner, instance); - Item.OnChargingJailbird(ev); - if (ev.IsAllowed) - return true; + Item.OnChargingJailbird(ev); + if (ev.IsAllowed) + return true; - ev.Player.RemoveHeldItem(destroy: false); - ev.Player.CurrentItem = ev.Item; - return false; - } + ev.Player.RemoveHeldItem(destroy: false); + ev.Player.CurrentItem = ev.Item; + return false; + } case JailbirdMessageType.ChargeStarted: - { - JailbirdChargeCompleteEventArgs ev = new(instance.Owner, instance); + { + JailbirdChargeCompleteEventArgs ev = new(instance.Owner, instance); - Item.OnJailbirdChargeComplete(ev); - if (ev.IsAllowed) - return true; + Item.OnJailbirdChargeComplete(ev); + if (ev.IsAllowed) + return true; - ev.Player.RemoveHeldItem(destroy: false); - ev.Player.AddItem(ev.Item); - return false; - } + ev.Player.RemoveHeldItem(destroy: false); + ev.Player.AddItem(ev.Item); + return false; + } default: return true; } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs index 8918a88768..cd4499e115 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; - using HarmonyLib; - using InventorySystem.Items.Jailbird; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs b/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs index af222f2c7a..62faa353cd 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs @@ -10,11 +10,10 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; + using API.Features.Pickups; + using API.Features.Pools; using Attributes; - - using Exiled.API.Features; - using Exiled.API.Features.Pickups; - using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Item; using Footprinting; @@ -22,7 +21,6 @@ namespace Exiled.Events.Patches.Events.Item using HarmonyLib; using Interactables.Interobjects.DoorUtils; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs b/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs index 08c22a8c66..15c74b57b1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs @@ -10,12 +10,11 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; - using HarmonyLib; - using InventorySystem.Items.MarshmallowMan; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs b/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs index c3df3a6776..324c8cb6d4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs b/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs index cb1d21b71a..7d54efe70f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs @@ -12,9 +12,7 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Item; - using HarmonyLib; - using InventorySystem.Items.Radio; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs index d48225d34c..3033a0327d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -16,11 +16,8 @@ namespace Exiled.Events.Patches.Events.Map using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using HarmonyLib; - using Respawning.Announcements; - using Subtitles; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs index f91f64c17c..23882fa6c1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; @@ -30,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Map [HarmonyPatch(typeof(DecontaminationController), nameof(DecontaminationController.UpdateSpeaker))] internal static class AnnouncingDecontamination { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs index 99822f8fc6..75cf10177c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs @@ -7,19 +7,17 @@ namespace Exiled.Events.Patches.Events.Map { + using System; using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; using System.Text.RegularExpressions; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using Handlers; - using HarmonyLib; - using Respawning.Announcements; using Respawning.NamingRules; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs index 3c2a295484..018362acde 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,15 +10,11 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using Handlers; - using HarmonyLib; - using Respawning.Announcements; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs index 084cbc2440..5064239e03 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs @@ -12,15 +12,13 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; + using Exiled.API.Features; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - + using Exiled.Events.Handlers; using Footprinting; - using global::Cassie; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs b/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs index fbce1e7320..8236e2c485 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs @@ -10,16 +10,12 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using Footprinting; - using HarmonyLib; - using InventorySystem.Items.ThrowableProjectiles; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs index 58453f2874..30ec11522f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs b/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs index 16cbf115fe..6c8ad469a3 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; @@ -30,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Map [HarmonyPatch(typeof(DecontaminationController), nameof(DecontaminationController.FinishDecontamination))] internal static class Decontaminating { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs b/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs index a623790fcd..098a5852ae 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,9 +9,7 @@ namespace Exiled.Events.Patches.Events.Map { using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using HarmonyLib; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs index c21f7e8779..b01df68276 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs @@ -11,16 +11,13 @@ namespace Exiled.Events.Patches.Events.Map using System.Linq; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using Exiled.API.Extensions; - using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Map; using Exiled.Events.Patches.Generic; - using HarmonyLib; - using InventorySystem.Items.ThrowableProjectiles; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs index 2a544767d9..ad35198c58 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs b/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs index c72e70dd72..0816e0934e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs @@ -66,4 +66,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs b/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs index 1c14a8d8a1..ce68e1588d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -18,14 +18,10 @@ namespace Exiled.Events.Patches.Events.Map using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using HarmonyLib; - using LabApi.Events.Arguments.ServerEvents; - using MapGeneration; using MapGeneration.Holidays; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -525,7 +521,7 @@ private static void FakeSpawn(AtlasZoneGenerator gen, AtlasInterpretation interp Spawned.Add(new AtlasZoneGenerator.SpawnedRoomData { ChosenCandidate = spawnableRoom, - Instance = null, + Instance = null!, Interpretation = interpretation, }); @@ -549,7 +545,7 @@ private static void FakeSpawn(AtlasZoneGenerator gen, AtlasInterpretation interp Spawned.Add(new AtlasZoneGenerator.SpawnedRoomData { ChosenCandidate = room, - Instance = null, + Instance = null!, Interpretation = interpretation, }); diff --git a/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs b/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs index 578782d10c..dad7714174 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Diagnostics; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs b/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs index bc8da0cc5e..ff3a09dfa8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs @@ -11,19 +11,13 @@ namespace Exiled.Events.Patches.Events.Map using System.Linq; using System.Reflection.Emit; + using API.Features.Pools; using Attributes; - using Decals; - - using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Map; - using Handlers; - using HarmonyLib; - using InventorySystem.Items.Firearms.Modules; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs index ea127c946f..d82c118797 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs @@ -7,15 +7,14 @@ namespace Exiled.Events.Patches.Events.Map { + using System.Collections.Generic; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using Handlers; - using HarmonyLib; - using InventorySystem.Items.Pickups; - + using Mirror; using PlayerRoles.PlayableScps.Scp106; using static PlayerRoles.PlayableScps.Scp106.Scp106PocketItemManager; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs b/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs index 3ee65548c0..449fd14c57 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs @@ -8,21 +8,18 @@ namespace Exiled.Events.Patches.Events.Map { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; + using Exiled.API.Features.Pickups; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using HarmonyLib; - using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables.Scp244; - using MapGeneration; - using Mirror; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs b/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs index e932c0c6ef..bac813d138 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs @@ -10,13 +10,13 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Doors; + using API.Features.Pools; + using Attributes; using EventArgs.Map; - using Exiled.API.Features.Doors; - using Exiled.API.Features.Pools; - using HarmonyLib; using Interactables.Interobjects.DoorUtils; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs b/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs index f5d5f20da6..4d6a72a8f9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs @@ -17,9 +17,7 @@ namespace Exiled.Events.Patches.Events.Map using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using HarmonyLib; - using MapGeneration; using MapGeneration.RoomConnectors.Spawners; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs b/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs index e2449ec261..cbc12540eb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs index 9b764e9e5d..d7c8be8354 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs @@ -8,16 +8,14 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Diagnostics; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using Interactables.Interobjects.DoorUtils; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs index b47a21d98a..4dec7db382 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs b/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs index 83ba4a1fc6..737ff4ead2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs @@ -10,13 +10,16 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using Exiled.API.Extensions; using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; + using Exiled.Events.EventArgs.Player; + using Exiled.Events.Handlers; using HarmonyLib; - using InventorySystem.Items.Firearms.Modules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs b/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs index 96c2c708e1..f8486d05fc 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs b/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs index c6a0a26344..573c2bd820 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs @@ -10,15 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; using CommandSystem; - - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using Footprinting; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs index faaad99f57..1cc7dfc8a9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs @@ -10,14 +10,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; using CentralAuth; - - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -86,4 +83,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs index 0ed278469a..465935ad7a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -29,7 +29,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(Inventory), nameof(Inventory.CurInstance), MethodType.Setter)] internal static class ChangedItem { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); int index = newInstructions.Count - 1; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs index ce5e44d505..071e1c5fe1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs @@ -14,13 +14,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; - using HarmonyLib; - using MapGeneration; - using PlayerRoles; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -70,4 +66,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs index 7afe94bbd5..11030dddd8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs @@ -14,14 +14,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CustomPlayerEffects.Danger; - using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs index caf13eed8c..1263f56daa 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs @@ -13,11 +13,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; using InventorySystem.Items.Firearms.Modules; - using Mirror; using static HarmonyLib.AccessTools; @@ -69,4 +67,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs index 846320aac2..3e94bf497b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -92,4 +92,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs index 646fd7de25..fa964cad82 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Items; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Items; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs index e945ba24a8..fdab782419 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs @@ -8,15 +8,15 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Items; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items.MicroHID; using InventorySystem.Items.MicroHID.Modules; @@ -101,4 +101,4 @@ private static bool CallPickupEvent(ushort serial, ref MicroHidPhase phase) return ev.IsAllowed; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs index 94e93456fe..5c9879f7ca 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs index ddc7c834a2..ad77fa94ba 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -97,4 +97,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs index fd9e1c4e61..5a0768d7f8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs @@ -12,25 +12,25 @@ namespace Exiled.Events.Patches.Events.Player using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - using Exiled.API.Features.Roles; - + using API.Features; + using API.Features.Pools; + using API.Features.Roles; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem; + using InventorySystem.Configs; using InventorySystem.Items; + using InventorySystem.Items.Armor; using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables.Scp1344; - using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; + using Mirror; using PlayerRoles; using static HarmonyLib.AccessTools; + using static UnityEngine.GraphicsBuffer; using Player = Handlers.Player; @@ -197,7 +197,7 @@ private static void ChangeInventory(ChangingRoleEventArgs ev) Inventory inventory = ev.Player.Inventory; if (InventoryItemProvider.KeepItemsAfterEscaping && ev.Reason == API.Enums.SpawnReason.Escaped) { - List list = new(); + List list = new List(); HashSet hashSet = HashSetPool.Pool.Get(); foreach (KeyValuePair item2 in inventory.UserInventory.Items) @@ -241,4 +241,4 @@ private static void ChangeInventory(ChangingRoleEventArgs ev) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs index ae911e7917..52617181a2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs @@ -10,12 +10,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using PlayerRoles; using PlayerRoles.Spectating; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs index e71926d609..85e9f6698f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs @@ -75,4 +75,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs index a262608e3d..3b693af58e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs @@ -10,14 +10,16 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; + + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Handlers; using HarmonyLib; - using Interactables.Interobjects; + using Interactables.Interobjects.DoorUtils; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs index ac7b873f44..2687d9b0e7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs @@ -12,8 +12,8 @@ namespace Exiled.Events.Patches.Events.Player using AdminToys; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs b/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs index 0d4d002567..f8db09f753 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.DamageHandlers; - using Exiled.API.Features.Pools; + using API.Features.DamageHandlers; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs b/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs index ad9acd6009..a31db55d0b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs b/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs index c5cd661dc1..5b1b6ac58a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using System.Runtime.CompilerServices; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs b/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs index 759b3632d7..3ec5e18953 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs @@ -15,7 +15,6 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs b/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs index 84537ce483..180a0bd115 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs index 5b8b63b66a..f5802d2a84 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs b/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs index 20566d1349..9ea721c3b6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs @@ -56,7 +56,7 @@ internal static IEnumerable GetInstructions(CodeInstruction sta yield return new(OpCodes.Brfalse_S, ret); } - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -123,7 +123,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs b/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs index 0c42bce6ed..8acd20cb62 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs @@ -12,8 +12,8 @@ namespace Exiled.Events.Patches.Events.Player using Achievements; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -77,4 +77,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs b/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs index 2df58c54c6..a7d4475693 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; using static HarmonyLib.AccessTools; @@ -69,7 +67,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs index f8038bcdc3..59259d210c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs index 0f8e063d7a..f0dbbef923 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs index e17f9752ee..c98d661747 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs index 409524e490..b1d8fa813d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs b/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs index 060fd61672..87ad9273bb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs @@ -13,15 +13,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using EventArgs.Player; - - using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.API.Features.Roles; using Exiled.Events.Attributes; - using HarmonyLib; - using LabApi.Events.Arguments.PlayerEvents; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs index 3597f76d21..03153ab7a5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs @@ -8,10 +8,11 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -20,6 +21,8 @@ namespace Exiled.Events.Patches.Events.Player using PlayerRoles.FirstPersonControl; using PlayerRoles.PlayableScps.Scp106; + using UnityEngine; + using static HarmonyLib.AccessTools; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs index 81d1b47cd5..677a7dbda8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs index 7e1bcece75..113155064e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs b/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs index 64855a893c..2fdf38da46 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items.MicroHID.Modules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs index a5cb3ba790..5e4a7cfcb6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs @@ -10,13 +10,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using UnityEngine; + using static HarmonyLib.AccessTools; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs b/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs index d79e200c29..4ec1ce8c9f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs @@ -10,15 +10,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items; using InventorySystem.Items.Coin; - using Mirror; using static HarmonyLib.AccessTools; @@ -85,4 +83,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs b/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs index ed2ede6b71..11e53cd79a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs @@ -11,13 +11,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using PlayerStatsSystem; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs b/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs index 568a6b8f9d..2002397b50 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,14 +10,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using Attributes; - - using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.PlayableScps.Subroutines; using PlayerRoles.Subroutines; @@ -32,7 +29,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(ScpAttackAbilityBase), nameof(ScpAttackAbilityBase.ServerPerformAttack))] public class Hit { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs b/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs index f77e680ec2..ffd5392b06 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs @@ -10,9 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; + using API.Features.Roles; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using Exiled.Events.EventArgs.Scp079; + using Exiled.Events.Handlers; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs b/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs index 4d39378981..3c6c6e7f30 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs @@ -10,15 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using Interactables; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs index 7b341892c0..ddd406ac1f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs @@ -11,16 +11,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; + using API.Features.Pools; using Attributes; - using EventArgs.Player; - - using Exiled.API.Features.Pools; - using HarmonyLib; - using Interactables.Interobjects.DoorUtils; - using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; @@ -176,7 +171,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs index 4a13be49f0..39382fd680 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs index 6629cbcc70..dcde1d57eb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -16,9 +16,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs index ec52a34a24..ade2d45a67 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs @@ -13,7 +13,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs index 18864269a7..3ce7b9aeee 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs @@ -11,14 +11,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using MapGeneration.Distributors; using static HarmonyLib.AccessTools; @@ -31,7 +29,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(Locker), nameof(Locker.ServerInteract))] internal static class InteractingLocker { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs index 85ecd07ef3..131705bf4b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs b/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs index 1f995b12ff..08542cd432 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs @@ -8,9 +8,10 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Diagnostics; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -71,4 +72,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs b/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs index a94ac61ad6..e7b92c0426 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs b/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs index 75e66beb5b..18421e5044 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs @@ -12,7 +12,7 @@ namespace Exiled.Events.Patches.Events.Player using System; - using Exiled.API.Features; + using API.Features; using Exiled.Events.EventArgs.Player; using Exiled.Loader.Features; @@ -61,4 +61,4 @@ private static void Postfix(ReferenceHub __instance) CallEvent(__instance, out _); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs b/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs index ff3bac88e1..6f50676792 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs b/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs index 73214335ad..cf6a9261d0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs b/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs index 5943b4cf8f..0ab9467d61 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CommandSystem; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs b/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs index 4b9ff3291f..ac28cd901a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs @@ -10,14 +10,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; - using HarmonyLib; - using PlayerRoles.FirstPersonControl; + using PlayerRoles.FirstPersonControl.Thirdperson; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Left.cs b/EXILED/Exiled.Events/Patches/Events/Player/Left.cs index 8c4b5eaaf8..3621429dce 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Left.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Left.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; @@ -28,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(CustomNetworkManager), nameof(CustomNetworkManager.OnServerDisconnect), typeof(NetworkConnectionToClient))] internal static class Left { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs b/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs index f3b4f42e4d..eb64428da5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using PlayerRoles.FirstPersonControl.Thirdperson; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs b/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs index 9587ff3040..a631bdd812 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs @@ -11,12 +11,10 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using Attributes; - using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using InventorySystem.Items.MicroHID.Modules; using static HarmonyLib.AccessTools; @@ -74,4 +72,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs index 88cb84bec9..b4ad99a32a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -20,6 +20,8 @@ namespace Exiled.Events.Patches.Events.Player using static HarmonyLib.AccessTools; + using Player = API.Features.Player; + /// /// Patches the method to add the /// event. diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs index 270cdb6da8..17c16af893 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs @@ -10,12 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using InventorySystem.Items.Pickups; using InventorySystem.Searching; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs index 3c895bd058..b7d09303bd 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs @@ -11,7 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs index 8c5305e3a9..23ed931424 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs @@ -11,7 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs index 5984ae2d43..daeae1f672 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs b/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs index 4212f57ba0..4e09d7d062 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs @@ -10,13 +10,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using MapGeneration.Spawnables; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs b/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs index 2660447758..10386c48d1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -28,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(CustomLiteNetLib4MirrorTransport), nameof(CustomLiteNetLib4MirrorTransport.ProcessConnectionRequest))] internal static class PreAuthenticating { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -39,7 +39,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs b/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs index 157e37b66a..559af2a032 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs @@ -7,13 +7,13 @@ namespace Exiled.Events.Patches.Events.Player { -#pragma warning disable SA1402 // File may only contain a single type + #pragma warning disable SA1402 // File may only contain a single type using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs index c93e75c798..46881a8d6d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs @@ -183,4 +183,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs index 6ed6f26308..707743a243 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs @@ -10,10 +10,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using CustomPlayerEffects; + using API.Features; + using API.Features.Pools; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using CustomPlayerEffects; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs index 9fae37e842..fcefcbbd0d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs index e325480829..96152eafbe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs @@ -11,17 +11,23 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - + using InventorySystem.Items.Autosync; + using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Modules; + using InventorySystem.Items.Firearms.Modules.Misc; + using InventorySystem.Searching; + using Mirror; + using UnityEngine; using static HarmonyLib.AccessTools; + using Player = API.Features.Player; + /// /// Patches to add missing event handler to the /// and . diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs index adc3d4ac97..68c3c315bc 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs b/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs index 0813987c6f..827960840f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs b/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs index 4445af13fe..7dd1ea6065 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using Exiled.API.Extensions; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; @@ -19,7 +20,6 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.Events.Handlers; using HarmonyLib; - using InventorySystem.Items.Firearms.Modules; using static HarmonyLib.AccessTools; @@ -32,7 +32,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(CylinderAmmoModule), nameof(CylinderAmmoModule.RotateCylinder))] internal class RotatingRevolver { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs b/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs index 138214adf2..daa9f0c6fb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CustomPlayerEffects; - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -93,4 +92,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs b/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs index 385abdfd68..2f81bec7c7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items.Usables.Scp1576; using static HarmonyLib.AccessTools; @@ -24,36 +22,38 @@ namespace Exiled.Events.Patches.Events.Player /// Patches to add event. /// [EventPatch(typeof(Handlers.Player), nameof(Handlers.Player.Scp1576TransmissionEnded))] - [HarmonyPatch(typeof(Scp1576Item), nameof(Scp1576Item.ServerStopTransmitting))] + [HarmonyPatch(typeof(InventorySystem.Items.Usables.Scp1576.Scp1576Item), nameof(Scp1576Item.ServerStopTransmitting))] public class Scp1576TransmissionEnded { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { - List newInstructions = ListPool.Pool.Get(instructions); + List newInstructions = ListPool.Pool.Get(instructions); - int index = newInstructions.Count - 1; + int index = newInstructions.Count - 1; - newInstructions.InsertRange(index, new[] - { - // Player.Get(base.Owner) - new CodeInstruction(OpCodes.Ldarg_0), - new CodeInstruction(OpCodes.Callvirt, PropertyGetter(typeof(Scp1576Item), nameof(Scp1576Item.Owner))), - new CodeInstruction(OpCodes.Call, Method(typeof(API.Features.Player), nameof(API.Features.Player.Get), new[] { typeof(ReferenceHub) })), + newInstructions.InsertRange( + index, + new[] + { + // Player.Get(base.Owner) + new CodeInstruction(OpCodes.Ldarg_0), + new CodeInstruction(OpCodes.Callvirt, PropertyGetter(typeof(Scp1576Item), nameof(Scp1576Item.Owner))), + new CodeInstruction(OpCodes.Call, Method(typeof(API.Features.Player), nameof(API.Features.Player.Get), new[] { typeof(ReferenceHub) })), - // this - new CodeInstruction(OpCodes.Ldarg_0), + // this + new CodeInstruction(OpCodes.Ldarg_0), - // Scp1576TransmissionEndedEventArgs ev = new(Player, this) - new CodeInstruction(OpCodes.Newobj, GetDeclaredConstructors(typeof(Scp1576TransmissionEndedEventArgs))[0]), + // Scp1576TransmissionEndedEventArgs ev = new(Player, this) + new CodeInstruction(OpCodes.Newobj, GetDeclaredConstructors(typeof(Scp1576TransmissionEndedEventArgs))[0]), - // OnScp1576TransmissionEnded(ev) - new CodeInstruction(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnScp1576TransmissionEnded))), - }); + // OnScp1576TransmissionEnded(ev) + new CodeInstruction(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnScp1576TransmissionEnded))), + }); - for (int i = 0; i < newInstructions.Count; i++) - yield return newInstructions[i]; + for (int i = 0; i < newInstructions.Count; i++) + yield return newInstructions[i]; - ListPool.Pool.Return(newInstructions); + ListPool.Pool.Return(newInstructions); } } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs b/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs index a872bbb5c5..c05e73f0c7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -146,4 +146,4 @@ private static float SafeGetTime(SearchingPickupEventArgs ev, SearchCoordinator return coordinator.SessionPipe.Request.Target.SearchTimeForPlayer(coordinator.Hub); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs index 6adbfea602..cf74131a00 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs @@ -10,14 +10,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using InventorySystem.Items.Pickups; + using InventorySystem.Searching; using RemoteAdmin; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs index fc0d604781..203a31dc51 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs @@ -138,4 +138,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs index 6fc0be997a..e1ff66c95a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs @@ -7,20 +7,18 @@ namespace Exiled.Events.Patches.Events.Player { + using System; using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using CommandSystem; - - using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using LabApi.Features.Enums; - using RemoteAdmin; using static HarmonyLib.AccessTools; @@ -169,4 +167,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs index 0934d04b05..a9a0f9d9fb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs @@ -11,17 +11,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using CommandSystem; - - using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using LabApi.Features.Enums; - using RemoteAdmin; using static HarmonyLib.AccessTools; @@ -170,4 +167,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs b/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs index e50f6b7a28..ac526807b8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs @@ -7,17 +7,16 @@ namespace Exiled.Events.Patches.Events.Player { + using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items.Firearms.Modules.Misc; using static HarmonyLib.AccessTools; @@ -101,9 +100,9 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs b/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs index c502d5984b..af8b3a6c20 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs @@ -8,17 +8,16 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; using PlayerRoles.FirstPersonControl.Spawnpoints; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -88,4 +87,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs b/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs index 2a2a98760b..413e29bc51 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; + using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -135,4 +136,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs index 5f6ac2536a..b89eac29eb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -30,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(EnvironmentalHazard), nameof(EnvironmentalHazard.OnStay))] internal static class StayingOnEnvironmentalHazard { - internal static CodeInstruction[] GetInstructions() => new CodeInstruction[] + internal static CodeInstruction[] GetInstructions(Label ret) => new CodeInstruction[] { // Player.Get(player) new(OpCodes.Ldarg_1), @@ -46,11 +46,15 @@ internal static class StayingOnEnvironmentalHazard new(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnStayingOnEnvironmentalHazard))), }; - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); - newInstructions.InsertRange(0, GetInstructions()); + Label ret = generator.DefineLabel(); + + newInstructions.InsertRange(0, GetInstructions(ret)); + + newInstructions[newInstructions.Count - 1].WithLabels(ret); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs index 56b4919d41..19e6863645 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs @@ -8,10 +8,10 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; - using HarmonyLib; using Hazards; @@ -24,11 +24,15 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(SinkholeEnvironmentalHazard), nameof(SinkholeEnvironmentalHazard.OnStay))] internal static class StayingOnSinkholeEnvironmentalHazard { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); - newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions()); + Label ret = generator.DefineLabel(); + + newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions(ret)); + + newInstructions[newInstructions.Count - 1].WithLabels(ret); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs index b9d2fcc9ff..de0f5b7ca9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs @@ -8,11 +8,10 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; - using HarmonyLib; using Hazards; @@ -25,11 +24,15 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(TantrumEnvironmentalHazard), nameof(TantrumEnvironmentalHazard.OnStay))] internal static class StayingOnTantrumEnvironmentalHazard { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); - newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions()); + Label ret = generator.DefineLabel(); + + newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions(ret)); + + newInstructions[newInstructions.Count - 1].WithLabels(ret); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs b/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs index 474859a8e4..0b2a10d46d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs b/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs index 0078a8db87..d4ecc59a65 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -70,4 +69,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs index 01f77f1c20..91f8aa87ad 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -69,4 +68,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs index fb2602f419..9b6ebab9ce 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs @@ -10,7 +10,10 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; + + using Exiled.API.Features.Roles; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs index 46eb04a6a4..70a04812e2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; using CommandSystem.Commands.RemoteAdmin; - - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs index 54fd3e6e66..3b8b66ed5d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs @@ -108,4 +108,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs index 09aa48a3be..88fd7d7cd7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using Exiled.API.Extensions; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs b/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs index 734ce34ad0..ccf67613bc 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs @@ -8,14 +8,14 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; @@ -127,4 +127,4 @@ private static void TriggeringTeslaEvent(BaseTeslaGate baseTeslaGate, ref bool i } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs index 208a9b9ee4..4aab1c1327 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,15 +11,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CustomPlayerEffects; - + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items.Usables; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs index fe4a09b96d..ec10d374a6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs @@ -11,15 +11,17 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using CustomPlayerEffects; - - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; using InventorySystem.Items.Usables; + using LabApi.Events.Arguments.PlayerEvents; + using Utils.Networking; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs index 30ecb92fea..5a89cf2ba6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs @@ -10,14 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; + using Exiled.Events.EventArgs.Player; using HarmonyLib; using InventorySystem.Items.Usables; - using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs index 30817d44c5..115ffc8391 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs @@ -10,12 +10,10 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using HarmonyLib; - using InventorySystem.Items.MicroHID.Modules; using static HarmonyLib.AccessTools; @@ -83,4 +81,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs index bca01e1ddb..1baf62c851 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs b/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs index b029e90350..7b274bc7c1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs @@ -13,13 +13,11 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; + using API.Features.Pools; using CentralAuth; - using Exiled.API.Extensions; - using Exiled.API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs b/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs index 97da7328b4..17ba25773c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs index 48f4dab1af..849ba4ae93 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs @@ -12,12 +12,16 @@ namespace Exiled.Events.Patches.Events.Scp049 using Exiled.API.Features; using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; - using HarmonyLib; + using Mirror; + using PlayerRoles; + using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.Subroutines; + using Utils.Networking; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs index 34fe444301..0786079299 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs @@ -14,10 +14,9 @@ namespace Exiled.Events.Patches.Events.Scp049 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp049; + using PlayerRoles.Subroutines; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs index 0d69554754..6ea1385c8c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp049 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs index 22e9ea8a40..9a63f16e7e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs @@ -11,10 +11,9 @@ namespace Exiled.Events.Patches.Events.Scp049 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; - using HarmonyLib; using PlayerRoles.PlayableScps.Scp049; @@ -256,4 +255,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs index baeb1eef2e..275313384b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs @@ -12,6 +12,7 @@ namespace Exiled.Events.Patches.Events.Scp049 using Exiled.API.Features; using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs index 57e094ea7d..044e074872 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs @@ -9,13 +9,11 @@ namespace Exiled.Events.Patches.Events.Scp049 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.Ragdolls; @@ -73,4 +71,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs index 7c7e8e8836..592dd3a7b1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs @@ -10,15 +10,17 @@ namespace Exiled.Events.Patches.Events.Scp0492 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; + + using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp0492; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.Subroutines; + using PlayerStatsSystem; using static HarmonyLib.AccessTools; @@ -81,4 +83,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs index 2c326f207a..5422d0b2e2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs @@ -10,12 +10,13 @@ namespace Exiled.Events.Patches.Events.Scp0492 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; + + using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp0492; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.Subroutines; @@ -30,7 +31,7 @@ namespace Exiled.Events.Patches.Events.Scp0492 [HarmonyPatch(typeof(ZombieConsumeAbility), nameof(ZombieConsumeAbility.ServerValidateBegin))] public class Consuming { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs b/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs index 09a4844d33..32cd7264d0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs @@ -28,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Scp0492 [HarmonyPatch(typeof(ZombieBloodlustAbility), nameof(ZombieBloodlustAbility.AnyTargets))] internal static class TriggeringBloodlustEvent { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); Label continueLabel = newInstructions[newInstructions.FindIndex(i => i.opcode == OpCodes.Leave_S) + 1].labels[0]; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs index 4f251f68ef..3afb14f354 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs @@ -11,17 +11,14 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; using HarmonyLib; - using LabApi.Events.Arguments.Scp079Events; - using Mirror; - using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.PlayableScps.Scp079.Cameras; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs index 8be79fbfb3..2cd42b575f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; @@ -100,4 +100,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs index b161d569b2..2173ed5f07 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs @@ -10,15 +10,12 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; - using HarmonyLib; - using Mirror; - using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.PlayableScps.Scp079.Cameras; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs index b1d9888006..057c8ee31e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs index 30c0c5b58c..d82b1d0ff6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs index 97a7e4e3c4..bde75b05d9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs index fa4c2930c0..1688c3d9bf 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; @@ -57,7 +57,7 @@ private static IEnumerable Transpiler(IEnumerable), nameof(StandardSubroutine.Owner))), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs index d5de957dc5..4583f447f2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs index 37c9e52b1f..d2677745de 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs @@ -8,20 +8,18 @@ namespace Exiled.Events.Patches.Events.Scp079 { using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; - using HarmonyLib; - + using Mirror; using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.PlayableScps.Scp079.Pinging; using PlayerRoles.Subroutines; - using RelativePositioning; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -73,7 +71,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs index c6dd1b844d..680bbbf0dd 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs @@ -65,4 +65,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs index 3490cbf591..0ede86b0d9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs @@ -10,12 +10,10 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.Subroutines; @@ -163,4 +161,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs index a0aa8b4f99..fa6ecb2bc2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs @@ -10,16 +10,14 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; using Exiled.API.Features.Doors; - using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; - using HarmonyLib; - using Interactables.Interobjects.DoorUtils; - using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs index dde75796bf..12e0dc375f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; using Exiled.API.Extensions; - using Exiled.API.Features.Pools; + using Exiled.API.Features; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs index 9d44ac1a21..3a17a255e4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs index 9c742f56f7..cb6cf1fa7e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs index 26ab618bed..a4763fed00 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs index 5fba31a01f..85c02bab9c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs index 47ed33bac0..869988bda6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,16 +7,16 @@ namespace Exiled.Events.Patches.Events.Scp096 { + using System; using System.Collections.Generic; + using System.Diagnostics; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp096; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs index e39c1ca18a..e1d8b5b690 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs index 22822c1226..247934beb7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs index 901c5a0a2b..92c28c0548 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs @@ -8,15 +8,14 @@ namespace Exiled.Events.Patches.Events.Scp106 { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp106; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs index 1580c1b345..4265abef8b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs @@ -10,11 +10,10 @@ namespace Exiled.Events.Patches.Events.Scp106 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; - using HarmonyLib; using PlayerRoles.PlayableScps.Scp106; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs index ab823ced8e..2ffad3da94 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs @@ -8,13 +8,13 @@ namespace Exiled.Events.Patches.Events.Scp106 { using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; - using HarmonyLib; using PlayerRoles.PlayableScps.Scp106; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs index 0078cf8876..fd1f8ba42e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs @@ -10,15 +10,12 @@ namespace Exiled.Events.Patches.Events.Scp106 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; using Exiled.Events.Handlers; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp106; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -91,4 +88,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs b/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs index 6d30ba8dc0..ca0bbe8e35 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs @@ -4,6 +4,7 @@ // Licensed under the CC BY-SA 3.0 license. // // ----------------------------------------------------------------------- + #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Exiled.Events.Patches.Events.Scp1344 @@ -15,9 +16,12 @@ namespace Exiled.Events.Patches.Events.Scp1344 using HarmonyLib; using InventorySystem.Items.Usables.Scp1344; + using InventorySystem.Items.Usables.Scp244; using UnityEngine; + using static PlayerList; + /// /// Patches . /// Adds the event, @@ -80,4 +84,4 @@ private static bool StopDeactivation(Scp1344Item instance, Scp1344Status newStat return false; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs b/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs index 588d770620..b4db23211a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs @@ -7,6 +7,7 @@ namespace Exiled.Events.Patches.Events.Scp1344 { + using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; @@ -14,7 +15,6 @@ namespace Exiled.Events.Patches.Events.Scp1344 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1344; - using HarmonyLib; using InventorySystem.Items.Usables.Scp1344; @@ -108,4 +108,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs index 49ddc17a0b..76e5dcb1ef 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs @@ -15,9 +15,7 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs index 23329274ff..cb9a6d3cb6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs @@ -15,9 +15,7 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs index 6b5c747348..0fbaa80f10 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs @@ -16,9 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs index 4a90822497..34118b901e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs @@ -15,9 +15,7 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; - using HarmonyLib; - using InventorySystem.Items.FlamingoTapePlayer; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs b/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs index df8c952455..214aa79aec 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp1509 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; using Exiled.Events.EventArgs.Scp1509; - using HarmonyLib; - using InventorySystem.Items.Scp1509; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs b/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs index 2556926d52..cf9c490079 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp1509 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1509; - using HarmonyLib; - using InventorySystem.Items.Scp1509; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs index 1c94b9f300..a2c276d9d8 100755 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs @@ -7,13 +7,17 @@ namespace Exiled.Events.Patches.Events.Scp173 { + using System; using System.Collections.Generic; + using System.Linq; + using System.Reflection; using System.Reflection.Emit; + using API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; - using HarmonyLib; using PlayerRoles.PlayableScps; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs index a59d229a39..c828cd8b70 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs index abddf10ae9..0972c96386 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs @@ -8,10 +8,12 @@ namespace Exiled.Events.Patches.Events.Scp173 { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs index fe1eee3e3b..4f3cee3a94 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs @@ -10,14 +10,11 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Collections.Generic; using System.Reflection.Emit; + using API.Features; using Attributes; - - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Scp173; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp173; using PlayerRoles.Subroutines; @@ -67,7 +64,8 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable), nameof(StandardSubroutine.Owner))), + new(OpCodes.Callvirt, + PropertyGetter(typeof(StandardSubroutine), nameof(StandardSubroutine.Owner))), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), // Player.Get(ply); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs index 62359a7c27..9da814466b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs index f3ee4d7005..8e3c718ce4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; @@ -85,4 +85,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs b/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs index 060fea6351..fe511401fe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp244 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.DamageHandlers; - using Exiled.API.Features.Pools; + using API.Features.DamageHandlers; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp244; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs b/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs index bd389e767a..ce12d65377 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Events.Scp244 using System.Diagnostics; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp244; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs b/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs index bb7e8d1ba8..8b03fa883f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp244 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp244; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs index 387831a899..8fbaa35ed1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs @@ -11,13 +11,13 @@ namespace Exiled.Events.Patches.Events.Scp2536 using System.Reflection.Emit; using Christmas.Scp2536; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; + using Exiled.Events.EventArgs.Scp244; using Exiled.Events.EventArgs.Scp2536; - using HarmonyLib; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs index 257c1cb863..dd942042fb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,12 +11,10 @@ namespace Exiled.Events.Patches.Events.Scp2536 using System.Reflection.Emit; using Christmas.Scp2536; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp2536; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs index 0e6a00de6e..855523f1e3 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs @@ -12,12 +12,10 @@ namespace Exiled.Events.Patches.Events.Scp2536 using Christmas.Scp2536; using Christmas.Scp2536.Gifts; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp2536; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs index b10785d328..60c8fe059b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs @@ -11,12 +11,10 @@ namespace Exiled.Events.Patches.Events.Scp2536 using System.Reflection.Emit; using Christmas.Scp2536; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp2536; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs index 197a852ab8..53798e1a31 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs @@ -8,14 +8,16 @@ namespace Exiled.Events.Patches.Events.Scp3114 { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; + using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Pools; + using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Scp3114; - using HarmonyLib; - + using Mirror; using PlayerRoles.PlayableScps.Scp3114; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs index f6a8244858..515b59a856 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs @@ -98,4 +98,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs index 82b403bcba..b49b32622b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.Patches.Events.Scp3114 { using System.Collections.Generic; + using System.Linq; using System.Reflection.Emit; using Exiled.API.Features.Pools; @@ -16,7 +17,6 @@ namespace Exiled.Events.Patches.Events.Scp3114 using Exiled.Events.Handlers; using HarmonyLib; - using PlayerRoles.PlayableScps.Scp3114; using PlayerRoles.PlayableScps.Subroutines; @@ -69,4 +69,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs index d1926cbfcd..c0dbbe2ef8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs @@ -14,13 +14,13 @@ namespace Exiled.Events.Patches.Events.Scp3114 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp3114; using Exiled.Events.Handlers; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp3114; using static HarmonyLib.AccessTools; + using Player = API.Features.Player; + /// /// Patches to add the event. /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs index ff45998d30..5ff62d8112 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs @@ -78,4 +78,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs index 2fcb30d653..6004294efa 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs @@ -10,19 +10,23 @@ namespace Exiled.Events.Patches.Events.Scp330 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp330; using Handlers; using HarmonyLib; - using InventorySystem.Items; + using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables.Scp330; + using Mirror; + using static HarmonyLib.AccessTools; + using Player = API.Features.Player; + /// /// Patches the method to add the /// event. diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs index 2cb52ad65c..5ac86c50fe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp330 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp330; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs index dc92656f2f..b7e714470a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs @@ -7,21 +7,26 @@ namespace Exiled.Events.Patches.Events.Scp330 { + using InventorySystem.Items; + +#pragma warning disable SA1402 +#pragma warning disable SA1313 + using System.Collections.Generic; using System.Reflection.Emit; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp330; - using HarmonyLib; - using Interactables.Interobjects; - + using InventorySystem; using InventorySystem.Items.Usables.Scp330; using static HarmonyLib.AccessTools; + using Player = API.Features.Player; + /// /// Patches the method to add the /// event. diff --git a/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs b/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs index 23ad872908..dcf788f079 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs @@ -15,7 +15,6 @@ namespace Exiled.Events.Patches.Events.Scp559 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp559; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs b/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs index 57fe71a059..cd52be3cc0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs @@ -15,7 +15,6 @@ namespace Exiled.Events.Patches.Events.Scp559 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp559; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs index 9685166453..defc59b9b6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs @@ -10,14 +10,11 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - + using API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; - using global::Scp914; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs index 0f63715269..64842911da 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; @@ -31,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Scp914 [HarmonyPatch(typeof(Scp914Upgrader), nameof(Scp914Upgrader.ProcessPickup))] internal static class UpgradedPickup { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs index 7fd1cf35c9..d1441c3e22 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs @@ -7,21 +7,24 @@ namespace Exiled.Events.Patches.Events.Scp914 { + using System.CodeDom; using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; - using global::Scp914; - using HarmonyLib; + using Mono.Cecil.Cil; + using PlayerRoles.FirstPersonControl; + using UnityEngine; using static HarmonyLib.AccessTools; + using OpCode = System.Reflection.Emit.OpCode; using Scp914 = Handlers.Scp914; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs index ccd8056d61..9562decaed 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs index ea14b30804..3927ed9a55 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs @@ -11,18 +11,19 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; - using global::Scp914; - using HarmonyLib; + using Mono.Cecil.Cil; + using PlayerRoles.FirstPersonControl; + using UnityEngine; using static HarmonyLib.AccessTools; + using OpCode = System.Reflection.Emit.OpCode; using Scp914 = Handlers.Scp914; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs index 5eca08deec..c1cf9dd589 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp939; using static HarmonyLib.AccessTools; @@ -29,7 +27,7 @@ namespace Exiled.Events.Patches.Events.Scp939 [HarmonyPatch(typeof(Scp939ClawAbility), nameof(Scp939ClawAbility.ServerProcessCmd))] internal class Clawed { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs index cbc7d3e8a0..ced8ee89ae 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs @@ -16,7 +16,6 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; - using Mirror; using PlayerRoles.PlayableScps.Scp939; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs index e0cd5a26eb..1b6bc31f5f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs @@ -14,11 +14,8 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; using Exiled.Events.Handlers; - using HarmonyLib; - using Mirror; - using PlayerRoles.PlayableScps.Scp939; using static HarmonyLib.AccessTools; @@ -31,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Scp939 [HarmonyPatch(typeof(Scp939LungeAbility), nameof(Scp939LungeAbility.TriggerLunge))] internal static class Lunge { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs index 52edc3fbb8..61583050bf 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; using Exiled.Events.Handlers; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp939; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs index 20c2aefca3..7a803e9805 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs @@ -16,9 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; - using Mirror; - using PlayerRoles.PlayableScps.Scp939; using PlayerRoles.Subroutines; @@ -119,4 +117,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs index 6b4685ec12..753291df01 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; - using HarmonyLib; - using PlayerRoles.PlayableScps.Scp939.Mimicry; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs index a1139a7124..e0d0485430 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs @@ -16,7 +16,6 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; - using PlayerRoles.FirstPersonControl.Thirdperson; using PlayerRoles.PlayableScps.Scp939; using PlayerRoles.PlayableScps.Scp939.Ripples; @@ -77,4 +76,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs index 9c7f67b00a..cfd4da4ec8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs @@ -15,7 +15,6 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; - using Mirror; using PlayerRoles.PlayableScps.Scp939; @@ -34,9 +33,6 @@ internal static class PlayingSound { private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { - // TODO: This is bad practice should be reworked. - _ = instructions; - List newInstructions = new(); LocalBuilder option = generator.DeclareLocal(typeof(byte)); @@ -121,4 +117,4 @@ private static IEnumerable Transpiler(IEnumerable instance.ServerSendRpc(true); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs index 2d3cd49cfe..b74e6c49e5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs @@ -79,4 +79,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs index 2c15e4543f..9b8c3707b5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs @@ -16,9 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; - using PlayerRoles.PlayableScps.Scp939.Mimicry; - using PlayerStatsSystem; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs index 92a5aaef65..d12e690c62 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,18 +7,20 @@ namespace Exiled.Events.Patches.Events.Scp939 { + using System; using System.Collections.Generic; using System.Linq; using System.Reflection.Emit; using Exiled.API.Enums; + using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; - using HarmonyLib; - + using InventorySystem.Items; using Mirror; using PlayerRoles.PlayableScps.Scp939; @@ -89,7 +91,7 @@ private static IEnumerable Transpiler(IEnumerable StaticCallEvent(ILGenerator generator, LocalBuilder ev, Label ret, CodeInstruction insertInstuction, Scp939VisibilityState state, bool setLabel = true) { - CodeInstruction first = new(OpCodes.Ldc_I4, (int)state); + CodeInstruction first = new CodeInstruction(OpCodes.Ldc_I4, (int)state); if (setLabel) { @@ -148,4 +150,4 @@ private static void SetToLastSeen(ReferenceHub target) }; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs b/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs index d9779f1817..758ffea323 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs @@ -10,15 +10,12 @@ namespace Exiled.Events.Patches.Events.Server using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; - using HarmonyLib; - using PlayerRoles; - + using Respawning; using Respawning.NamingRules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs b/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs index 81cae085e5..d5d80d9250 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs @@ -10,13 +10,10 @@ namespace Exiled.Events.Patches.Events.Server using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; - using HarmonyLib; - using PlayerRoles.RoleAssign; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs b/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs index 17d4885887..cf9f9aacbe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; - using HarmonyLib; - using Respawning.Objectives; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs b/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs index 921839a189..d5150c2c81 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs @@ -10,14 +10,15 @@ namespace Exiled.Events.Patches.Events.Server using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; using Exiled.Events.Handlers; using HarmonyLib; + using UnityEngine; + using static HarmonyLib.AccessTools; using Player = API.Features.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs b/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs index e9bca60dd0..501f6d90e6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs @@ -12,17 +12,13 @@ namespace Exiled.Events.Patches.Events.Server using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.API.Features.Waves; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; using Exiled.Events.Handlers; - using HarmonyLib; - using PlayerRoles; - using Respawning.NamingRules; using Respawning.Waves; @@ -126,4 +122,4 @@ private static IEnumerable Transpiler(IEnumerable players) => players.Select(player => player.ReferenceHub).ToArray(); } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs b/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs index 9f3cfa9c53..ab4ef8b267 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs @@ -7,12 +7,24 @@ namespace Exiled.Events.Patches.Events.Server { + using System; + using System.Collections.Generic; + using System.Reflection.Emit; + + using API.Features.Pools; + using CustomPlayerEffects.Danger; + using Exiled.API.Enums; using Exiled.Events.Attributes; + using Exiled.Events.EventArgs.Player; + using GameCore; using HarmonyLib; using RoundRestarting; + using static HarmonyLib.AccessTools; + using static PlayerList; + /// /// Patches . /// Adds the event. @@ -30,4 +42,4 @@ private static void Prefix(bool value) Handlers.Server.OnRestartingRound(); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs b/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs index 343c96ba2c..e701deccb1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs @@ -18,7 +18,6 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.Events.EventArgs.Server; using HarmonyLib; - using PlayerRoles; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs b/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs index 73eefaf610..ec5e68b953 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs @@ -13,9 +13,9 @@ namespace Exiled.Events.Patches.Events.Server using System.Reflection; using System.Reflection.Emit; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Server; - using HarmonyLib; using static HarmonyLib.AccessTools; @@ -27,7 +27,7 @@ namespace Exiled.Events.Patches.Events.Server [HarmonyPatch] internal class RoundStarting { -#pragma warning disable SA1600 // Elements should be documented + #pragma warning disable SA1600 // Elements should be documented public static Type PrivateType { get; internal set; } private static MethodInfo TargetMethod() @@ -115,4 +115,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file + } diff --git a/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs b/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs index a565ce1afc..92c126e460 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.API.Features.Waves; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; - using HarmonyLib; - using Respawning; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs b/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs index fb969466d2..7792e7cdd1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs @@ -13,7 +13,6 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs b/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs index 17c15e3ae7..a75bbf7eb8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,7 +9,7 @@ namespace Exiled.Events.Patches.Events.Server { #pragma warning disable SA1313 // Parameter names should begin with lower-case letter - using Exiled.API.Features; + using API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs index 1f61cc6107..498c487f0c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs @@ -8,11 +8,11 @@ namespace Exiled.Events.Patches.Events.Warhead { using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs index d777eb1b38..e5bb5e1aae 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs @@ -10,13 +10,10 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; - using Handlers; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs index 057c4fdfb5..58c13e5332 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs @@ -10,13 +10,10 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; - using Handlers; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs index c3360fa5ac..13d1c10933 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs index 9e5e8512ac..cd35ac8627 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; diff --git a/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs b/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs index 070fb9426a..15da68148a 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs @@ -10,14 +10,10 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; using CustomPlayerEffects; - - using Exiled.API.Features.Pools; - using HarmonyLib; - using InventorySystem.Items.Usables.Scp244.Hypothermia; - using PlayerRoles; using PlayerRoles.PlayableScps.Scp106; diff --git a/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs b/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs index 8df7864ac0..1bd3f62bfb 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,9 +11,7 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using Exiled.API.Features.Pools; - using HarmonyLib; - using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Usables.Scp1344; diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs b/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs index 54c38a861f..cadbc403f0 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs @@ -8,13 +8,11 @@ namespace Exiled.Events.Patches.Fixes { using CustomPlayerEffects; - using Exiled.API.Enums; using Exiled.API.Features; - using HarmonyLib; - using RelativePositioning; + using UnityEngine; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter /// /// Patches 's setter. @@ -34,4 +32,4 @@ private static void Postfix(ref RelativePosition __result) __result = new RelativePosition(room.Position); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs b/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs index d1f72ba2fb..6ea4a5ac08 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs @@ -11,14 +11,11 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection; using System.Reflection.Emit; + using API.Features.Pools; using CustomPlayerEffects; - - using Exiled.API.Features.Pools; - + using Exiled.API.Features; using HarmonyLib; - using InventorySystem.Items.Usables.Scp330; - using PlayerRoles.PlayableScps.Scp049; using static HarmonyLib.AccessTools; @@ -32,7 +29,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(StatusEffectBase), nameof(StatusEffectBase.ServerSetState))] internal class FixEffectOrder { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -74,7 +71,7 @@ private static IEnumerable TargetMethods() yield return Method(typeof(SugarCrave), nameof(SugarCrave.Disabled)); } - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs b/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs index 6b82ee20f8..073931c8f6 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.Patches.Fixes { + using Exiled.Events.Attributes; using HarmonyLib; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs b/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs index cb8f01a998..fde6bfd51a 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs @@ -11,8 +11,10 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using CustomPlayerEffects; - + using Exiled.API.Features.Items; + using Exiled.Events.EventArgs.Player; using HarmonyLib; + using InventorySystem; /// /// Patches to fix NW overwritting value multiple time. @@ -22,8 +24,7 @@ internal class FixNWFlashbangDuration { private static IEnumerable Transpiler(IEnumerable instructions) { - _ = instructions; yield return new CodeInstruction(OpCodes.Ret); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs b/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs index 005fae0a82..95ec63e4cc 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs @@ -11,16 +11,19 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; + using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; - using Exiled.API.Features.Pools; using HarmonyLib; - using InventorySystem; using InventorySystem.Items; + using InventorySystem.Items.Firearms.Ammo; using InventorySystem.Items.Pickups; + using Mirror; + using static HarmonyLib.AccessTools; /// @@ -30,7 +33,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerAddItem))] internal class FixOnAddedBeingCallAfterOnRemoved { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -93,4 +96,4 @@ private static void CallBefore(ItemBase itemBase, ItemPickupBase pickupBase) item.ReadPickupInfoBefore(pickup); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs b/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs index 56e85abc21..24d743e6e0 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs @@ -10,12 +10,9 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Footprinting; - using HarmonyLib; - using InventorySystem; using InventorySystem.Items.Firearms.Ammo; using InventorySystem.Items.Pickups; @@ -29,7 +26,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerDropAmmo))] internal class FixPickupPreviousOwner { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -53,4 +50,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs b/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs index d99a25e232..c40037f4b9 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs @@ -10,14 +10,10 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Footprinting; - using HarmonyLib; - using Interactables.Interobjects.DoorUtils; - using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; @@ -29,7 +25,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(Scp1507AttackAbility), nameof(Scp1507AttackAbility.TryAttackDoor))] internal class FixScp1507DestroyingDoor { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -53,4 +49,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs b/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs index 61951ad21c..a5442d1df0 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,13 +13,9 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using Exiled.API.Features.Pools; - using Footprinting; - using HarmonyLib; - using LiteNetLib; - using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs b/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs index fdbfdc4e8d..c60f80e59a 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs @@ -9,11 +9,10 @@ namespace Exiled.Events.Patches.Fixes { using System; using System.Collections.Generic; + using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using HarmonyLib; - using InventorySystem.Configs; /// @@ -23,7 +22,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(InventoryLimits), nameof(InventoryLimits.GetAmmoLimit), new Type[] { typeof(InventorySystem.Items.Armor.BodyArmor), typeof(ItemType), })] internal class GetAmmoLimitFix { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -39,4 +38,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs b/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs index 7fb0ed5474..d7f5f08c53 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs @@ -11,9 +11,9 @@ namespace Exiled.Events.Patches.Fixes using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features.Items; - using Exiled.API.Features.Pickups.Projectiles; - using Exiled.API.Features.Pools; + using API.Features.Items; + using API.Features.Pickups.Projectiles; + using API.Features.Pools; using HarmonyLib; @@ -111,4 +111,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs b/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs index e18356002a..044914dca6 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs b/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs index 64f6f5548a..17bdf5e142 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs @@ -12,11 +12,12 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; - using InventorySystem.Items.Jailbird; + using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs b/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs index 34404b36fa..0f30d7d2df 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs @@ -7,7 +7,9 @@ namespace Exiled.Events.Patches.Fixes { - using Exiled.API.Features.DamageHandlers; +#pragma warning disable SA1313 // Parameter names should begin with lower-case letter + + using API.Features.DamageHandlers; using HarmonyLib; @@ -23,7 +25,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(PlayerStats), nameof(PlayerStats.KillPlayer))] internal class KillPlayer { - private static void Prefix(ref DamageHandlerBase handler) + private static void Prefix(PlayerStats __instance, ref DamageHandlerBase handler) { if (!DamageHandlers.IdsByTypeHash.ContainsKey(handler.GetType().FullName.GetStableHashCode()) && handler is GenericDamageHandler exiledHandler) handler = exiledHandler.Base; diff --git a/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs b/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs index 84c0a2e0bc..2538e90ca2 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs @@ -26,7 +26,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(LockerChamber), nameof(LockerChamber.OnFirstTimeOpen))] internal class LockerFixes { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs b/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs index de32425ab9..4d19d4954d 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Patches.Fixes using System.Linq; using GameCore; - using HarmonyLib; /// @@ -30,4 +29,4 @@ private static void Postfix() return; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs b/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs index fd72503a17..5a9f29b9a1 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs @@ -10,17 +10,12 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using Footprinting; - using HarmonyLib; - using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; - using PlayerRoles.PlayableScps.Scp096; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -58,4 +53,4 @@ private static IEnumerable Transpiler(IEnumerable damageableDoor is BreakableDoor breakableDoor && breakableDoor.GetExactState() is 1; } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs b/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs index bf16e05902..4f766c9b4f 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -12,12 +12,9 @@ namespace Exiled.Events.Patches.Fixes using Exiled.API.Extensions; using Exiled.API.Features.Pools; - using HarmonyLib; - using InventorySystem.Items; using InventorySystem.Items.Keycards; - using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs b/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs index 183c9ebbb3..ec70f756bc 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs @@ -12,14 +12,11 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using CommandSystem.Commands.RemoteAdmin.Dummies; - using Exiled.API.Features; using Exiled.API.Features.Pools; - + using GameCore; using HarmonyLib; - using NetworkManagerUtils.Dummies; - using UnityEngine; using static HarmonyLib.AccessTools; @@ -71,4 +68,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs b/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs index ddaa0f254d..231395869c 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using EventArgs.Player; + using API.Features.Items; - using Exiled.API.Features.Items; + using EventArgs.Player; using HarmonyLib; @@ -26,7 +26,6 @@ internal static class RoleChangedPatch { private static IEnumerable Transpiler(IEnumerable instructions) { - _ = instructions; yield return new CodeInstruction(OpCodes.Ret); } } diff --git a/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs b/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs index a1f528cb70..a7ea375c20 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs @@ -10,10 +10,8 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features.Pools; using HarmonyLib; - using PlayerRoles.PlayableScps.Scp3114; using PlayerRoles.PlayableScps.Subroutines; @@ -43,4 +41,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs b/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs index 1d8e22a5db..59767063fe 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs @@ -11,17 +11,15 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; - using Footprinting; + using Exiled.API.Features; + using Footprinting; using HarmonyLib; - using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; - using PlayerRoles; - using PlayerStatsSystem; using static HarmonyLib.AccessTools; @@ -101,7 +99,7 @@ public Scp3114FriendlyFireFix2(Footprint attacker, float damage) public override string ServerLogsText { get; } #pragma warning restore SA1600 // Elements should be documented - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs b/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs index 97c46af95d..8bd604cb53 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs @@ -8,12 +8,15 @@ namespace Exiled.Events.Patches.Fixes { #pragma warning disable SA1313 - using Exiled.API.Features.Items; + using API.Features.Items; + using Exiled.API.Features; using HarmonyLib; using InventorySystem.Items.Autosync; using InventorySystem.Items.MicroHID.Modules; + using InventorySystem.Items.Pickups; + using InventorySystem.Items.Usables.Scp330; /// /// Patches to fix phantom for . @@ -26,4 +29,4 @@ private static bool Prefix(CycleSyncModule __instance) return __instance.MicroHid.InstantiationStatus == AutosyncInstantiationStatus.InventoryInstance; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs b/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs index 59449ee3eb..24feae442f 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,11 +13,8 @@ namespace Exiled.Events.Patches.Fixes using Exiled.API.Extensions; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pools; - using HarmonyLib; - using Interactables.Interobjects.DoorUtils; - using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; diff --git a/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs b/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs index 27d6df23c7..57fda78d7b 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -12,11 +12,8 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using Exiled.API.Features.Pools; - using HarmonyLib; - using MapGeneration; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs b/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs index 1d942f155d..53450c07d6 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using HarmonyLib; @@ -24,7 +24,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(VoiceChatMutes), nameof(VoiceChatMutes.LoadMutes))] internal static class VoiceChatMutesClear { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs b/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs index 03ce70de3e..6da34a65eb 100644 --- a/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs +++ b/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1402 using HarmonyLib; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs b/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs index 305198dfb0..0fb3c4669c 100644 --- a/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs +++ b/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs @@ -13,6 +13,8 @@ namespace Exiled.Events.Patches.Generic using System.Linq; using System.Reflection.Emit; + using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.API.Features.Pools; @@ -23,6 +25,8 @@ namespace Exiled.Events.Patches.Generic using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Modules; + using MapGeneration; + using static HarmonyLib.AccessTools; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/CameraList.cs b/EXILED/Exiled.Events/Patches/Generic/CameraList.cs index 0f6c5e1f48..db02509a4f 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CameraList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CameraList.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pools; diff --git a/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs b/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs index 21715c71d3..01d7daaee5 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs b/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs index 63c5882b76..d7eb560618 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.Patches.Generic { using Exiled.API.Features; - using HarmonyLib; #pragma warning disable SA1313 #pragma warning disable CS0618 diff --git a/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs b/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs index 2fbb448f54..276538c918 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs @@ -12,8 +12,8 @@ namespace Exiled.Events.Patches.Generic using System.IO; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs b/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs index ce06d4deae..477893377d 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1313 using System.Collections.Generic; - using Exiled.API.Features; + using API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs b/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs index 19be07dda2..89471278db 100644 --- a/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs +++ b/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/DoorList.cs b/EXILED/Exiled.Events/Patches/Generic/DoorList.cs index ff9b42ef98..2057bbd0f5 100644 --- a/EXILED/Exiled.Events/Patches/Generic/DoorList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/DoorList.cs @@ -13,7 +13,7 @@ namespace Exiled.Events.Patches.Generic using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Doors; using Exiled.API.Features.Pools; diff --git a/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs b/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs index b685d3954b..de2f025b42 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs b/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs index 0de5084385..0a0117e3f2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs @@ -11,11 +11,8 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Extensions; using Exiled.API.Features; - using HarmonyLib; - using InventorySystem.Configs; - using UnityEngine; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs b/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs index a7ee90b90e..9f33e5481f 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs @@ -10,11 +10,8 @@ namespace Exiled.Events.Patches.Generic using System; using Exiled.API.Features; - using HarmonyLib; - using InventorySystem.Configs; - using UnityEngine; /// @@ -34,4 +31,4 @@ private static void Postfix(ItemCategory category, ReferenceHub player, ref sbyt __result = (sbyte)Mathf.Clamp(limit + __result - InventoryLimits.GetCategoryLimit(null, category), sbyte.MinValue, sbyte.MaxValue); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs b/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs index 5548f631b9..a01849dcd0 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; - using Exiled.API.Features.Roles; + using API.Features; + using API.Features.Pools; + using API.Features.Roles; using HarmonyLib; @@ -27,7 +27,7 @@ namespace Exiled.Events.Patches.Generic [HarmonyPatch(typeof(FpcServerPositionDistributor), nameof(FpcServerPositionDistributor.WriteAll))] internal class GhostModePatch { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -70,4 +70,4 @@ private static void HandleGhostMode(ReferenceHub hubReceiver, ReferenceHub hubTa isInvisible = target.Role.Is(out FpcRole role) && (role.IsInvisible || role.IsInvisibleFor.Contains(receiver)); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Generic/HazardList.cs b/EXILED/Exiled.Events/Patches/Generic/HazardList.cs index 85cf0006d2..db16697730 100644 --- a/EXILED/Exiled.Events/Patches/Generic/HazardList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/HazardList.cs @@ -10,9 +10,7 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1313 using Exiled.API.Features.Hazards; - using HarmonyLib; - using Hazards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs b/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs index ee2b734743..574c0d856a 100644 --- a/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs +++ b/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs @@ -7,15 +7,16 @@ namespace Exiled.Events.Patches.Generic { + using Exiled.API.Extensions; + #pragma warning disable SA1402 using System; using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Extensions; - using Exiled.API.Features; + using API.Features; + using API.Features.Pools; using Exiled.API.Features.Items; - using Exiled.API.Features.Pools; using Footprinting; diff --git a/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs b/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs index 9614ebf0d2..a64584b8dc 100644 --- a/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs +++ b/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs index a74614e4b5..896084a08a 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs index a1a1f4ac45..574ce2b78d 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs index 899af9099a..d3a1c7cc84 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items; using InventorySystem.Items.Keycards; diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs index c7d4b7d8ec..6b5889f193 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs @@ -8,11 +8,8 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; - using UnityEngine; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs index 86311e4893..b846455d9c 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs index 23eaab28c0..fb2bf92181 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs index 765ff69895..af25a81e9e 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs index 090fc1c17b..482c996c3c 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; - using HarmonyLib; - using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs b/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs index e33ecf2bb6..c451459445 100644 --- a/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs +++ b/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Pools; - using HarmonyLib; - using PlayerRoles.PlayableScps.HumanTracker; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/LiftList.cs b/EXILED/Exiled.Events/Patches/Generic/LiftList.cs index 4979e86a83..d088dbe3ab 100644 --- a/EXILED/Exiled.Events/Patches/Generic/LiftList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/LiftList.cs @@ -8,10 +8,9 @@ namespace Exiled.Events.Patches.Generic { #pragma warning disable SA1313 // Parameter names should begin with lower-case letter - using Exiled.API.Features; + using API.Features; using HarmonyLib; - using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/LockerList.cs b/EXILED/Exiled.Events/Patches/Generic/LockerList.cs index 4e351f8f01..b0bd8af1de 100644 --- a/EXILED/Exiled.Events/Patches/Generic/LockerList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/LockerList.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; - + using API.Features; + using API.Features.Pools; + using Exiled.API.Features.Lockers; using HarmonyLib; using MapGeneration.Distributors; @@ -49,4 +50,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs b/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs index dae5033e4d..39d15716df 100644 --- a/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs +++ b/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,9 +13,7 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Pools; - using HarmonyLib; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs b/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs index 4b749b0182..9649cf2740 100644 --- a/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs +++ b/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs @@ -11,10 +11,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; + using API.Features.Pools; using CentralAuth; - - using Exiled.API.Features.Pools; - using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs b/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs index 4cd3a5a2b6..42e6c1013d 100644 --- a/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs +++ b/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs b/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs index 629deef198..a1c98e0a72 100644 --- a/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs +++ b/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs @@ -12,9 +12,10 @@ namespace Exiled.Events.Patches.Generic using System.Linq; using System.Reflection.Emit; + using API.Features.Pickups; + using API.Features.Pools; + using Exiled.API.Features.Items; - using Exiled.API.Features.Pickups; - using Exiled.API.Features.Pools; using HarmonyLib; @@ -35,7 +36,9 @@ namespace Exiled.Events.Patches.Generic [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerCreatePickup), typeof(ItemBase), typeof(PickupSyncInfo), typeof(Vector3), typeof(Quaternion), typeof(bool), typeof(Action))] internal static class PickupControlPatch { - private static IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler( + IEnumerable instructions, + ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -69,7 +72,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instructions) + private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { List newInstructions = ListPool.Pool.Get(instructions); @@ -87,4 +90,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs b/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs index 21df520940..91a54a9c4f 100644 --- a/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs @@ -8,7 +8,7 @@ namespace Exiled.Events.Patches.Generic { #pragma warning disable SA1313 - using Exiled.API.Features; + using API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/RoomList.cs b/EXILED/Exiled.Events/Patches/Generic/RoomList.cs index 58e8656c57..88c24aa6c7 100644 --- a/EXILED/Exiled.Events/Patches/Generic/RoomList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/RoomList.cs @@ -12,7 +12,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pools; diff --git a/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs b/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs index 503ad64709..983cb201af 100644 --- a/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs +++ b/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs @@ -15,7 +15,6 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Pools; - using HarmonyLib; using static HarmonyLib.AccessTools; @@ -71,4 +70,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs b/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs index f58930fa33..f92a59482f 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features.Pools; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs b/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs index 0ff58650e2..6b4b93e406 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; - using Exiled.API.Features.Pools; + using API.Features; + using API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs b/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs index b747de0d19..c98d2d57c2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs @@ -8,9 +8,7 @@ namespace Exiled.Events.Patches.Generic { using Exiled.API.Features.Items; - using HarmonyLib; - using InventorySystem.Items.Firearms.Modules.Scp127; #pragma warning disable SA1313 diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs b/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs index 949dbc8df0..aadad0c087 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; + using API.Features; using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs b/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs index 84705bb13a..d708cbfcd8 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable CS0618 using Exiled.API.Features; - using HarmonyLib; /// @@ -26,4 +25,4 @@ private static void Prefix(Scp559Cake __instance) Scp559.Get(__instance); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs b/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs index d614f2046e..54d6380865 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.Patches.Generic { using Exiled.API.Features; - using HarmonyLib; #pragma warning disable SA1313 diff --git a/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs b/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs index 9078c32934..c14b89b770 100644 --- a/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs +++ b/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -12,9 +12,7 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pools; - using HarmonyLib; - using InventorySystem.Items.Keycards; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs b/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs index 437e90f480..42d974dfae 100644 --- a/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs +++ b/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs @@ -8,7 +8,7 @@ namespace Exiled.Events.Patches.Generic { #pragma warning disable SA1313 - using Exiled.API.Features; + using API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs b/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs index 61dfb8f950..1e5deb9adf 100644 --- a/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs +++ b/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs @@ -11,9 +11,7 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Roles; - using HarmonyLib; - using InventorySystem; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs b/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs index ddfd23aca3..38ad7536e2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs +++ b/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs @@ -7,11 +7,11 @@ namespace Exiled.Events.Patches.Generic { + using Exiled.API.Features; using Exiled.API.Features.Items; #pragma warning disable SA1313 using HarmonyLib; - using InventorySystem.Items.Armor; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs b/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs index eff63b7f2e..9620eac9a4 100644 --- a/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs +++ b/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs @@ -11,9 +11,7 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Roles; - using HarmonyLib; - using InventorySystem; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs b/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs index 0d506137fb..fc2ec1cdbd 100644 --- a/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.Patches.Generic { - using Exiled.API.Features; + using API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs b/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs index 314e23b8ba..544ef5086e 100644 --- a/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs +++ b/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1402 using HarmonyLib; - using InventorySystem.Items.Firearms.Attachments; /// diff --git a/EXILED/Exiled.Example/Commands/Test.cs b/EXILED/Exiled.Example/Commands/Test.cs index b15a3f0f74..6b5b4be49c 100644 --- a/EXILED/Exiled.Example/Commands/Test.cs +++ b/EXILED/Exiled.Example/Commands/Test.cs @@ -10,7 +10,6 @@ namespace Exiled.Example.Commands using System; using CommandSystem; - using Exiled.API.Features; using Exiled.API.Features.Pickups; diff --git a/EXILED/Exiled.Example/Events/PlayerHandler.cs b/EXILED/Exiled.Example/Events/PlayerHandler.cs index cc45bec0b3..37701f6555 100644 --- a/EXILED/Exiled.Example/Events/PlayerHandler.cs +++ b/EXILED/Exiled.Example/Events/PlayerHandler.cs @@ -7,17 +7,18 @@ namespace Exiled.Example.Events { + using System; + using System.Collections.Generic; + using CameraShaking; using CustomPlayerEffects; - using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Player; using Exiled.Events.EventArgs.Scp106; using Exiled.Events.EventArgs.Scp914; - using LabApi.Events.Arguments.PlayerEvents; using MEC; @@ -226,4 +227,4 @@ public void OnHurting(HurtingEventArgs ev) } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Example/Exiled.Example.csproj b/EXILED/Exiled.Example/Exiled.Example.csproj index 36803e309e..ce8f908c20 100644 --- a/EXILED/Exiled.Example/Exiled.Example.csproj +++ b/EXILED/Exiled.Example/Exiled.Example.csproj @@ -17,7 +17,7 @@ - + diff --git a/EXILED/Exiled.Installer/CommandSettings.cs b/EXILED/Exiled.Installer/CommandSettings.cs index ecc97048cd..b0ee50d4e2 100644 --- a/EXILED/Exiled.Installer/CommandSettings.cs +++ b/EXILED/Exiled.Installer/CommandSettings.cs @@ -14,13 +14,10 @@ namespace Exiled.Installer using System.Linq; using System.Threading.Tasks; - /// - /// TODO: Add doc IDK NEED HELP FOR DOC. - /// internal sealed class CommandSettings { /// - /// The RootCommand to the Exiled Installer. + /// The RootCommand to the Exiled Installer /// public static readonly RootCommand RootCommand = new() { @@ -70,7 +67,7 @@ internal sealed class CommandSettings "Forces the folder to be the AppData folder (useful for containers when pterodactyl runs as root)") { IsRequired = true }, - new Option( + new Option( "--exiled", (parsed) => { @@ -147,7 +144,7 @@ internal sealed class CommandSettings public DirectoryInfo Exiled { get; set; } #nullable restore /// - /// Gets or sets a value indicating whether if it is a prerelease. + /// Gets or sets if it is a prerelease. /// public bool PreReleases { get; set; } @@ -167,25 +164,20 @@ internal sealed class CommandSettings public string? GitHubToken { get; set; } /// - /// Gets or sets a value indicating whether the version of Exiled available. + /// Gets or sets the version of Exiled available. /// public bool GetVersions { get; set; } /// - /// Gets or sets a value indicating whether the boolean for exiting. + /// Gets or sets the boolean for exiting. /// public bool Exit { get; set; } /// - /// Gets or sets a value indicating whether the value indicating whether the version select should be skipped. + /// Gets or sets the value indicating whether the version select should be skipped. /// public bool SkipVersionSelect { get; set; } - /// - /// TODO: Add doc IDK NEED HELP FOR DOC. - /// - /// Todo doc. - /// todo fuck doc. public static async Task Parse(string[] args) { RootCommand.Handler = CommandHandler.Create(async args => await Program.MainSafe(args).ConfigureAwait(false)); diff --git a/EXILED/Exiled.Installer/Program.cs b/EXILED/Exiled.Installer/Program.cs index 3e8fd8a151..ea09dada54 100644 --- a/EXILED/Exiled.Installer/Program.cs +++ b/EXILED/Exiled.Installer/Program.cs @@ -25,14 +25,8 @@ namespace Exiled.Installer using Version = SemanticVersioning.Version; - /// - /// TODO: Add doc IDK NEED HELP FOR DOC. - /// internal enum PathResolution { - /// - /// TODO: Add doc IDK NEED HELP FOR DOC. - /// Undefined, /// @@ -46,9 +40,6 @@ internal enum PathResolution Exiled, } - /// - /// TODO: Add doc IDK NEED HELP FOR DOC. - /// internal static class Program { private const long RepoID = 833723500; @@ -65,11 +56,12 @@ internal static class Program // Force use of LF because the file uses LF private static readonly Dictionary Markup = Resources.Markup.Trim().Split('\n').ToDictionary(s => s.Split(':')[0], s => s.Split(':', 2)[1]); - /// - /// TODO: Add doc IDK NEED HELP FOR DOC. - /// - /// Todo doc. - /// todo fuck doc. + private static async Task Main(string[] args) + { + Console.OutputEncoding = new UTF8Encoding(false, false); + await CommandSettings.Parse(args).ConfigureAwait(false); + } + internal static async Task MainSafe(CommandSettings args) { bool error = false; @@ -129,9 +121,9 @@ internal static async Task MainSafe(CommandSettings args) Release targetRelease = FindRelease(args, releases); Console.WriteLine(Resources.Program_MainSafe_Release_found_); - Console.WriteLine(FormatRelease(targetRelease)); + Console.WriteLine(FormatRelease(targetRelease!)); - ReleaseAsset? exiledAsset = targetRelease.Assets.FirstOrDefault(a => a.Name.Equals(ExiledAssetName, StringComparison.OrdinalIgnoreCase)); + ReleaseAsset? exiledAsset = targetRelease!.Assets.FirstOrDefault(a => a.Name.Equals(ExiledAssetName, StringComparison.OrdinalIgnoreCase)); if (exiledAsset is null) { Console.WriteLine(Resources.Program_MainSafe_____ASSETS____); @@ -174,12 +166,6 @@ internal static async Task MainSafe(CommandSettings args) Environment.Exit(error ? 1 : 0); } - private static async Task Main(string[] args) - { - Console.OutputEncoding = new UTF8Encoding(false, false); - await CommandSettings.Parse(args).ConfigureAwait(false); - } - private static async Task> GetReleases() { IEnumerable releases = (await GitHubClient.Repository.Release.GetAll(RepoID).ConfigureAwait(false)) @@ -340,4 +326,4 @@ private static Release FindRelease(CommandSettings args, IEnumerable re return enumerable.First(); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Installer/Properties/Resources.Designer.cs b/EXILED/Exiled.Installer/Properties/Resources.Designer.cs index 2636e1f9ec..b95cc93c54 100644 --- a/EXILED/Exiled.Installer/Properties/Resources.Designer.cs +++ b/EXILED/Exiled.Installer/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // @@ -107,7 +107,7 @@ internal static string Program_ExtractEntry_Extracting___0___into___1_____ { } /// - /// Looks up a localized string similar to ? Prerelease selected.. + /// Looks up a localized string similar to → Prerelease selected.. /// internal static string Program_MainSafe_ { get { @@ -324,4 +324,4 @@ internal static string Program_TryFindRelease_Trying_to_find_release__ { } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Loader/Config.cs b/EXILED/Exiled.Loader/Config.cs index 2ad58460d3..6e07979ef2 100644 --- a/EXILED/Exiled.Loader/Config.cs +++ b/EXILED/Exiled.Loader/Config.cs @@ -11,10 +11,9 @@ namespace Exiled.Loader using System.ComponentModel; using System.IO; - using Exiled.API.Enums; + using API.Enums; + using API.Interfaces; using Exiled.API.Features; - using Exiled.API.Interfaces; - using YamlDotNet.Core; /// @@ -89,11 +88,5 @@ public sealed class Config : IConfig /// [Description("Indicates whether Exiled should auto-update itself as soon as a new release is available.")] public bool EnableAutoUpdates { get; set; } = true; - - /// - /// Gets or sets a value indicating whether config validator should check all properties inside config values' types. - /// - [Description("Indicating whether config validator should check all properties inside config values' types.")] - public bool EnableDeepValidation { get; set; } = false; } } \ No newline at end of file diff --git a/EXILED/Exiled.Loader/ConfigManager.cs b/EXILED/Exiled.Loader/ConfigManager.cs index ac5b8c3090..706924ee45 100644 --- a/EXILED/Exiled.Loader/ConfigManager.cs +++ b/EXILED/Exiled.Loader/ConfigManager.cs @@ -13,15 +13,14 @@ namespace Exiled.Loader using System.Linq; using System.Reflection; - using Exiled.API.Enums; - using Exiled.API.Extensions; + using API.Enums; + using API.Extensions; + using API.Interfaces; + using Exiled.API.Features; - using Exiled.API.Features.Attributes; using Exiled.API.Features.Pools; - using Exiled.API.Interfaces; using LabApi.Loader.Features.Plugins.Configuration; - using YamlDotNet.Core; using YamlDotNet.Serialization; @@ -73,93 +72,6 @@ public static SortedDictionary LoadSorted(string rawConfigs) } } - /// - /// Validates plugin config. - /// - /// Plugin which config is validated. - /// Validated config. - /// Config after validation is passed. - public static IConfig ValidateConfig(this IPlugin plugin, IConfig config) - { - int validated = 0; - foreach (PropertyInfo propertyInfo in config.GetType().GetProperties().Where(x => x.GetMethod != null && x.SetMethod != null)) - { - try - { - ValidateType(config, plugin.Config, propertyInfo, ref validated); - } - catch (Exception ex) - { - Log.Error($"Failed to validate config: {ex}"); - } - } - - if (validated > 0) - Log.Info($"Plugin {plugin.Name} has successfully passed {validated} config validations!"); - - return config; - } - - /// - /// Performs a validation for property and all its properties in 's type. - /// - /// Plugin which config is validated. - /// Validated config. - /// Property which will be validated. - /// Amount of successfully passed validations. - public static void ValidateType(object instance, object defaultInstance, PropertyInfo propertyInfo, ref int validated) - { - object value = propertyInfo.GetValue(instance, null); - object defaultValue = propertyInfo.GetValue(defaultInstance, null); - - bool hasValidateChildrenAttribute = false; - try - { - foreach (Attribute attribute in propertyInfo.GetCustomAttributes()) - { - hasValidateChildrenAttribute |= attribute is ValidateChildrenAttribute; - if (attribute is not IValidator validator) - continue; - - try - { - if (!validator.Check(value)) - { - Log.Error($"Value {value} in config ({propertyInfo.Name.ToSnakeCase()}) has failed validation for attribute {attribute.GetType().Name}. Default value ({defaultValue}) will be used instead."); - propertyInfo.SetValue(instance, defaultValue); - continue; - } - } - catch (Exception ex) - { - Log.Error($"Value {value} in config ({propertyInfo.Name.ToSnakeCase()}) has failed validation for attribute {attribute.GetType().Name}. Default value ({defaultValue}) will be used instead."); - Log.Error($"Validation error message: {ex.Message}"); - propertyInfo.SetValue(instance, defaultValue); - continue; - } - - validated++; - } - } - catch (Exception ex) - { - Log.Error($"Error while validating value of property '{propertyInfo.Name}': {ex.Message}. Default value ({defaultValue}) will be used instead."); - return; - } - - if (hasValidateChildrenAttribute || (!LoaderPlugin.Config.EnableDeepValidation && !(propertyInfo.PropertyType.Namespace?.Contains("System") ?? false))) - { - foreach (PropertyInfo property in propertyInfo.PropertyType.GetProperties().Where(x => x.GetMethod != null && x.SetMethod != null)) - { - ConstructorInfo ctor = property.PropertyType.GetConstructor(Type.EmptyTypes); - if (ctor is null) - continue; - - ValidateType(value, ctor.Invoke(null, null), property, ref validated); - } - } - } - /// /// Loads the config of a plugin using the distribution. /// @@ -194,7 +106,7 @@ public static IConfig LoadDefaultConfig(this IPlugin plugin, Dictionary try { string rawConfigString = Loader.Serializer.Serialize(rawDeserializedConfig); - config = ValidateConfig(plugin, (IConfig)Loader.Deserializer.Deserialize(rawConfigString, plugin.Config.GetType())); + config = (IConfig)Loader.Deserializer.Deserialize(rawConfigString, plugin.Config.GetType()); plugin.Config.CopyProperties(config); } catch (YamlException yamlException) @@ -223,7 +135,7 @@ public static IConfig LoadSeparatedConfig(this IPlugin plugin) try { - config = ValidateConfig(plugin, (IConfig)Loader.Deserializer.Deserialize(File.ReadAllText(plugin.ConfigPath), plugin.Config.GetType())); + config = (IConfig)Loader.Deserializer.Deserialize(File.ReadAllText(plugin.ConfigPath), plugin.Config.GetType()); plugin.Config.CopyProperties(config); } catch (YamlException yamlException) @@ -543,7 +455,7 @@ public static bool LoadLabAPIProperties(LabPlugin plugin) { Log.Warn($"LabAPI Plugin {plugin.Name} doesn't have default properties, generating..."); PropertiesSetter.Invoke(plugin, new object[] { Properties.CreateDefault() }); - File.WriteAllText(configPath, serializer.Serialize(plugin.Properties)); + File.WriteAllText(configPath, serializer.Serialize(plugin.Properties!)); return true; } @@ -555,7 +467,7 @@ public static bool LoadLabAPIProperties(LabPlugin plugin) { Log.Error($"{plugin.Name} properties could not be loaded, default properties will be loaded instead!\n{yamlException}"); PropertiesSetter.Invoke(plugin, new object[] { Properties.CreateDefault() }); - File.WriteAllText(configPath, serializer.Serialize(plugin.Properties)); + File.WriteAllText(configPath, serializer.Serialize(plugin.Properties!)); } return true; diff --git a/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs b/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs index c3bba54c51..bac70abfd1 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs @@ -27,7 +27,7 @@ public sealed class CommentGatheringTypeInspector : TypeInspectorSkeleton /// The inner type description instance. public CommentGatheringTypeInspector(ITypeInspector innerTypeDescriptor) { - this.innerTypeDescriptor = innerTypeDescriptor ?? throw new ArgumentNullException(nameof(innerTypeDescriptor)); + this.innerTypeDescriptor = innerTypeDescriptor ?? throw new ArgumentNullException("innerTypeDescriptor"); } /// diff --git a/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs b/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs index 246554c641..d97c5cda3a 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs @@ -40,4 +40,4 @@ public override bool EnterMapping(IPropertyDescriptor key, IObjectDescriptor val return base.EnterMapping(key, value, context); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs index 8bd9de339f..950078e802 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs @@ -11,7 +11,7 @@ namespace Exiled.Loader.Features.Configs.CustomConverters using System.Collections.Generic; using System.IO; - using Exiled.API.Structs; + using API.Structs; using InventorySystem.Items.Firearms.Attachments; diff --git a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs index f66d8039b8..04e15c00c6 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs @@ -14,9 +14,7 @@ namespace Exiled.Loader.Features.Configs.CustomConverters using Exiled.API.Features; using Exiled.API.Features.Pools; - using UnityEngine; - using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Serialization; diff --git a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs index df9139d4d2..cdf89ab3d9 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs @@ -14,9 +14,7 @@ namespace Exiled.Loader.Features.Configs.CustomConverters using Exiled.API.Features; using Exiled.API.Features.Pools; - using UnityEngine; - using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Serialization; diff --git a/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs b/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs index 3d8ccc63da..e4ede00b1c 100644 --- a/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs @@ -40,4 +40,4 @@ public override void Emit(ScalarEventInfo eventInfo, IEmitter emitter) base.Emit(eventInfo, emitter); } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs b/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs index 6ba949cf96..6b4a1e8358 100644 --- a/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs +++ b/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs @@ -10,7 +10,6 @@ namespace Exiled.Loader.Features.Configs using System.Collections.Generic; using Exiled.API.Extensions; - using YamlDotNet.Serialization; /// diff --git a/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs b/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs index 5c1115b62f..227fad327c 100644 --- a/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs +++ b/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs @@ -9,7 +9,7 @@ namespace Exiled.Loader.Features { using System.Collections.Generic; - using Exiled.API.Interfaces; + using API.Interfaces; /// /// Comparator implementation according to plugin priorities. diff --git a/EXILED/Exiled.Loader/Loader.cs b/EXILED/Exiled.Loader/Loader.cs index 0d0b78d224..00754c8c09 100644 --- a/EXILED/Exiled.Loader/Loader.cs +++ b/EXILED/Exiled.Loader/Loader.cs @@ -17,21 +17,19 @@ namespace Exiled.Loader using System.Security.Principal; using System.Threading; + using API.Enums; + using API.Interfaces; + using CommandSystem.Commands.Shared; - using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Pools; - using Exiled.API.Interfaces; - using Features; using Features.Configs; using Features.Configs.CustomConverters; - using LabApi.Loader; using LabApi.Loader.Features.Misc; using LabApi.Loader.Features.Plugins.Configuration; - using YamlDotNet.Serialization; using YamlDotNet.Serialization.NodeDeserializers; @@ -824,4 +822,4 @@ private static void LoadDependencies() } } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Loader/LoaderPlugin.cs b/EXILED/Exiled.Loader/LoaderPlugin.cs index 4b3696b17e..019a308f10 100644 --- a/EXILED/Exiled.Loader/LoaderPlugin.cs +++ b/EXILED/Exiled.Loader/LoaderPlugin.cs @@ -13,7 +13,6 @@ namespace Exiled.Loader using LabApi.Loader.Features.Plugins; using LabApi.Loader.Features.Plugins.Enums; - using MEC; using Log = API.Features.Log; diff --git a/EXILED/Exiled.Loader/PathExtensions.cs b/EXILED/Exiled.Loader/PathExtensions.cs index be13ef3c66..7e241ae693 100644 --- a/EXILED/Exiled.Loader/PathExtensions.cs +++ b/EXILED/Exiled.Loader/PathExtensions.cs @@ -10,7 +10,7 @@ namespace Exiled.Loader using System; using System.Reflection; - using Exiled.API.Interfaces; + using API.Interfaces; /// /// Contains the extensions to get a path. diff --git a/EXILED/Exiled.Loader/TranslationManager.cs b/EXILED/Exiled.Loader/TranslationManager.cs index 4737838746..c7d85c3f97 100644 --- a/EXILED/Exiled.Loader/TranslationManager.cs +++ b/EXILED/Exiled.Loader/TranslationManager.cs @@ -12,11 +12,12 @@ namespace Exiled.Loader using System.IO; using System.Linq; - using Exiled.API.Enums; - using Exiled.API.Extensions; + using API.Enums; + using API.Extensions; + using API.Interfaces; + using Exiled.API.Features; using Exiled.API.Features.Pools; - using Exiled.API.Interfaces; using YamlDotNet.Core; @@ -211,7 +212,10 @@ public static bool Clear() /// The of the desired plugin. private static ITranslation LoadDefaultTranslation(this IPlugin plugin, Dictionary rawTranslations) { - rawTranslations ??= Loader.Deserializer.Deserialize>(Read()) ?? DictionaryPool.Pool.Get(); + if (rawTranslations is null) + { + rawTranslations = Loader.Deserializer.Deserialize>(Read()) ?? DictionaryPool.Pool.Get(); + } if (!rawTranslations.TryGetValue(plugin.Prefix, out object rawDeserializedTranslation)) { diff --git a/EXILED/Exiled.Loader/Updater.cs b/EXILED/Exiled.Loader/Updater.cs index e45b4b12cc..a2a3863597 100644 --- a/EXILED/Exiled.Loader/Updater.cs +++ b/EXILED/Exiled.Loader/Updater.cs @@ -23,7 +23,6 @@ namespace Exiled.Loader using Exiled.Loader.GHApi.Models; using Exiled.Loader.GHApi.Settings; using Exiled.Loader.Models; - using ServerOutput; #pragma warning disable SA1310 // Field names should not contain underscore @@ -345,4 +344,4 @@ private bool FindAsset(string assetName, Release release, out ReleaseAsset asset return false; } } -} \ No newline at end of file +} diff --git a/EXILED/Exiled.Permissions/Config.cs b/EXILED/Exiled.Permissions/Config.cs index abb7c038ac..b0aabc52f0 100644 --- a/EXILED/Exiled.Permissions/Config.cs +++ b/EXILED/Exiled.Permissions/Config.cs @@ -10,8 +10,9 @@ namespace Exiled.Permissions using System.ComponentModel; using System.IO; + using API.Interfaces; + using Exiled.API.Features; - using Exiled.API.Interfaces; /// public sealed class Config : IConfig diff --git a/EXILED/Exiled.Permissions/Extensions/Permissions.cs b/EXILED/Exiled.Permissions/Extensions/Permissions.cs index 42730728f6..56823e3feb 100644 --- a/EXILED/Exiled.Permissions/Extensions/Permissions.cs +++ b/EXILED/Exiled.Permissions/Extensions/Permissions.cs @@ -18,13 +18,10 @@ namespace Exiled.Permissions.Extensions using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; - using Features; using Properties; - using Query; - using RemoteAdmin; using YamlDotNet.Core; diff --git a/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs b/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs index 519208e583..31492a1d89 100644 --- a/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs +++ b/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // @@ -52,4 +52,4 @@ internal static byte[] permissions { } } } -} \ No newline at end of file +} From 419a210c083d331a0aae18512e9a4bbf89f51e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 00:46:38 +0300 Subject: [PATCH 09/16] Reapply "Merge branch 'toys' of https://github.com/MS-crew/EXILEDPR into toys" This reverts commit c5374ad9f5ae9411e67f662c2aa1e1c7321abee0. --- .../localization/GettingStarted-BR.md | 142 ++++++++++-------- .../documentation/localization/README-BR.md | 126 +++++++++------- .../documentation/localization/README-FR.md | 22 +-- EXILED/.editorconfig | 31 +++- EXILED/EXILED.props | 3 +- EXILED/Exiled.API/Enums/AmmoType.cs | 4 +- EXILED/Exiled.API/Enums/AspectRatioType.cs | 2 +- EXILED/Exiled.API/Enums/CameraType.cs | 2 +- EXILED/Exiled.API/Enums/DamageType.cs | 4 +- EXILED/Exiled.API/Enums/DanceType.cs | 2 +- .../Exiled.API/Enums/DecontaminationState.cs | 4 +- EXILED/Exiled.API/Enums/DoorLockType.cs | 2 +- EXILED/Exiled.API/Enums/DoorType.cs | 1 + EXILED/Exiled.API/Enums/EffectCategory.cs | 2 +- EXILED/Exiled.API/Enums/EffectType.cs | 112 +++++++------- .../Enums/FacilityLayouts/EzFacilityLayout.cs | 2 +- .../FacilityLayouts/HczFacilityLayout.cs | 2 +- .../FacilityLayouts/LczFacilityLayout.cs | 2 +- EXILED/Exiled.API/Enums/FirearmType.cs | 2 +- EXILED/Exiled.API/Enums/GlassType.cs | 2 +- EXILED/Exiled.API/Enums/HazardType.cs | 2 +- EXILED/Exiled.API/Enums/LayerMasks.cs | 2 +- EXILED/Exiled.API/Enums/LeadingTeam.cs | 2 +- EXILED/Exiled.API/Enums/LockerType.cs | 2 +- EXILED/Exiled.API/Enums/PingType.cs | 2 +- EXILED/Exiled.API/Enums/RespawnEffectType.cs | 4 - .../Exiled.API/Enums/RevolverChamberState.cs | 2 +- EXILED/Exiled.API/Enums/ScenesType.cs | 6 +- ...lityStates.cs => Scp939VisibilityState.cs} | 16 +- EXILED/Exiled.API/Enums/SpawnLocationType.cs | 10 +- EXILED/Exiled.API/Enums/UncuffReason.cs | 2 +- EXILED/Exiled.API/Enums/UsableRippleType.cs | 2 +- EXILED/Exiled.API/Enums/ZoneType.cs | 1 + .../Exiled.API/Extensions/CommonExtensions.cs | 2 +- .../Extensions/DamageTypeExtensions.cs | 6 +- .../Extensions/DangerTypeExtensions.cs | 1 + .../Extensions/EffectTypeExtension.cs | 7 +- .../Exiled.API/Extensions/FloatExtensions.cs | 2 +- .../Exiled.API/Extensions/ItemExtensions.cs | 3 +- .../Exiled.API/Extensions/LockerExtensions.cs | 5 +- .../Exiled.API/Extensions/MirrorExtensions.cs | 52 +++++-- .../Exiled.API/Extensions/RoleExtensions.cs | 13 +- .../Exiled.API/Extensions/StringExtensions.cs | 2 +- .../Attributes/ValidateChildrenAttribute.cs | 19 +++ .../Validators/AvailableValuesAttribute.cs | 37 +++++ .../Validators/CustomValidatorAttribute.cs | 49 ++++++ .../Validators/GreaterOrEqualAttribute.cs | 38 +++++ .../Validators/GreaterThanAttribute.cs | 38 +++++ .../Validators/LessOrEqualAttribute.cs | 38 +++++ .../Validators/LessThanAttribute.cs | 38 +++++ .../Validators/NonNegativeAttribute.cs | 23 +++ .../Validators/NonPositiveAttribute.cs | 23 +++ .../Attributes/Validators/RangeAttribute.cs | 57 +++++++ .../Features/Audio/AudioDataStorage.cs | 3 +- .../Exiled.API/Features/Audio/WavUtility.cs | 2 +- EXILED/Exiled.API/Features/Camera.cs | 4 + EXILED/Exiled.API/Features/Cassie.cs | 14 +- EXILED/Exiled.API/Features/Coffee.cs | 3 +- .../Features/ComponentsEqualityComparer.cs | 2 +- EXILED/Exiled.API/Features/Core/EActor.cs | 1 + .../Features/Core/Generic/EBehaviour.cs | 2 - .../Features/Core/StateMachine/State.cs | 1 - .../Exiled.API/Features/Core/StaticActor.cs | 4 +- .../Core/UserSettings/ButtonSetting.cs | 1 + .../Core/UserSettings/DropdownSetting.cs | 1 + .../Core/UserSettings/HeaderSetting.cs | 1 + .../Core/UserSettings/KeybindSetting.cs | 2 + .../Features/Core/UserSettings/SettingBase.cs | 7 +- .../Core/UserSettings/SliderSetting.cs | 1 + .../Core/UserSettings/TextInputSetting.cs | 2 + .../Core/UserSettings/TwoButtonsSetting.cs | 1 + .../Core/UserSettings/UserTextInputSetting.cs | 2 + .../CustomStats/CustomHumeShieldStat.cs | 4 + .../Features/DamageHandlers/DamageHandler.cs | 1 + .../DamageHandlers/DamageHandlerBase.cs | 7 +- .../DamageHandlers/GenericDamageHandler.cs | 19 +-- EXILED/Exiled.API/Features/Doors/BasicDoor.cs | 2 + EXILED/Exiled.API/Features/Doors/Door.cs | 12 +- .../Exiled.API/Features/Doors/ElevatorDoor.cs | 2 + .../Features/Doors/EmergencyReleaseButton.cs | 1 + EXILED/Exiled.API/Features/Doors/Gate.cs | 2 + EXILED/Exiled.API/Features/Draw.cs | 1 - EXILED/Exiled.API/Features/Generator.cs | 3 + .../Features/GlobalPatchProcessor.cs | 42 +++--- .../Features/Hazards/AmnesticCloudHazard.cs | 1 + EXILED/Exiled.API/Features/Hazards/Hazard.cs | 17 ++- .../Features/Hazards/SinkholeHazard.cs | 1 + .../Features/Hazards/TantrumHazard.cs | 4 + EXILED/Exiled.API/Features/Items/Ammo.cs | 1 + EXILED/Exiled.API/Features/Items/Armor.cs | 2 +- .../Exiled.API/Features/Items/Consumable.cs | 2 +- .../Features/Items/ExplosiveGrenade.cs | 1 + EXILED/Exiled.API/Features/Items/Firearm.cs | 27 ++-- .../Barrel/AutomaticBarrelMagazine.cs | 8 +- .../FirearmModules/Barrel/BarrelMagazine.cs | 2 +- .../Barrel/PumpBarrelMagazine.cs | 8 +- .../Features/Items/FirearmModules/Magazine.cs | 8 +- .../Primary/CylinderMagazine.cs | 4 +- .../FirearmModules/Primary/NormalMagazine.cs | 2 +- .../FirearmModules/Primary/PrimaryMagazine.cs | 3 +- .../Exiled.API/Features/Items/Flashlight.cs | 6 +- EXILED/Exiled.API/Features/Items/Item.cs | 8 +- EXILED/Exiled.API/Features/Items/Jailbird.cs | 3 + EXILED/Exiled.API/Features/Items/Keycard.cs | 2 + .../Items/Keycards/CustomKeycardItem.cs | 7 +- .../Items/Keycards/PermissionsProvider.cs | 2 + .../Items/Keycards/SingleUseKeycard.cs | 2 + .../Exiled.API/Features/Items/Marshmallow.cs | 9 +- EXILED/Exiled.API/Features/Items/MicroHid.cs | 5 - EXILED/Exiled.API/Features/Items/Radio.cs | 1 + EXILED/Exiled.API/Features/Items/Scp127.cs | 5 +- EXILED/Exiled.API/Features/Items/Scp1344.cs | 7 +- EXILED/Exiled.API/Features/Items/Scp1509.cs | 4 +- EXILED/Exiled.API/Features/Items/Scp1576.cs | 2 +- EXILED/Exiled.API/Features/Items/Scp330.cs | 2 +- EXILED/Exiled.API/Features/Items/Throwable.cs | 4 +- EXILED/Exiled.API/Features/Items/Usable.cs | 1 - EXILED/Exiled.API/Features/Lift.cs | 7 +- EXILED/Exiled.API/Features/Lockers/Chamber.cs | 5 +- EXILED/Exiled.API/Features/Lockers/Locker.cs | 4 +- EXILED/Exiled.API/Features/Map.cs | 13 +- EXILED/Exiled.API/Features/Npc.cs | 16 +- .../Features/Objectives/EscapeObjective.cs | 2 + .../Objectives/GeneratorActivatedObjective.cs | 1 + .../Objectives/HumanDamageObjective.cs | 1 + .../Features/Objectives/HumanKillObjective.cs | 2 + .../Features/Objectives/HumanObjective.cs | 1 + .../Features/Objectives/Objective.cs | 9 +- .../Objectives/ScpItemPickupObjective.cs | 2 + .../Exiled.API/Features/Pickups/AmmoPickup.cs | 2 +- .../Features/Pickups/BodyArmorPickup.cs | 4 +- .../Features/Pickups/FirearmPickup.cs | 27 +++- .../Features/Pickups/FlashGrenadePickup.cs | 2 +- .../Features/Pickups/GrenadePickup.cs | 2 +- .../Features/Pickups/JailbirdPickup.cs | 2 +- .../Features/Pickups/KeycardPickup.cs | 2 +- .../Pickups/Keycards/CustomKeycardPickup.cs | 7 +- .../Keycards/ManagementKeycardPickup.cs | 3 + .../Pickups/Keycards/MetalKeycardPickup.cs | 3 + .../Keycards/SingleUseKeycardPickup.cs | 1 + .../Pickups/Keycards/Site02KeycardPickup.cs | 3 + .../Keycards/TaskForceKeycardPickup.cs | 3 + .../Features/Pickups/MicroHIDPickup.cs | 4 +- EXILED/Exiled.API/Features/Pickups/Pickup.cs | 7 +- .../Projectiles/EffectGrenadeProjectile.cs | 2 +- .../Projectiles/ExplosionGrenadeProjectile.cs | 2 +- .../Projectiles/FlashbangProjectile.cs | 2 +- .../Pickups/Projectiles/Projectile.cs | 4 +- .../Pickups/Projectiles/Scp018Projectile.cs | 4 +- .../Pickups/Projectiles/Scp2176Projectile.cs | 2 +- .../Projectiles/TimeGrenadeProjectile.cs | 2 +- .../Features/Pickups/RadioPickup.cs | 2 +- .../Features/Pickups/Scp1509Pickup.cs | 3 +- .../Features/Pickups/Scp1576Pickup.cs | 2 +- .../Features/Pickups/Scp244Pickup.cs | 6 +- .../Features/Pickups/Scp330Pickup.cs | 2 +- .../Features/Pickups/UsablePickup.cs | 2 +- EXILED/Exiled.API/Features/Player.cs | 38 +++-- EXILED/Exiled.API/Features/Plugin.cs | 8 +- .../Features/Pools/DictionaryPool.cs | 2 +- .../Exiled.API/Features/Pools/HashSetPool.cs | 2 +- EXILED/Exiled.API/Features/Pools/IPool.cs | 2 +- EXILED/Exiled.API/Features/Pools/ListPool.cs | 2 +- EXILED/Exiled.API/Features/Pools/QueuePool.cs | 2 +- .../Features/Pools/StringBuilderPool.cs | 2 +- EXILED/Exiled.API/Features/PrefabHelper.cs | 7 +- EXILED/Exiled.API/Features/Ragdoll.cs | 9 +- EXILED/Exiled.API/Features/Recontainer.cs | 5 + EXILED/Exiled.API/Features/Respawn.cs | 111 +++++++++----- .../Features/Roles/DestroyedRole.cs | 9 +- .../Features/Roles/FilmMakerRole.cs | 1 + EXILED/Exiled.API/Features/Roles/FpcRole.cs | 6 +- EXILED/Exiled.API/Features/Roles/HumanRole.cs | 2 +- .../Features/Roles/IHumeShieldRole.cs | 2 +- EXILED/Exiled.API/Features/Roles/NoneRole.cs | 2 +- .../Features/Roles/OverwatchRole.cs | 2 +- EXILED/Exiled.API/Features/Roles/Role.cs | 8 +- .../Exiled.API/Features/Roles/Scp049Role.cs | 7 +- .../Exiled.API/Features/Roles/Scp079Role.cs | 8 +- .../Exiled.API/Features/Roles/Scp096Role.cs | 2 +- .../Exiled.API/Features/Roles/Scp106Role.cs | 2 + .../Exiled.API/Features/Roles/Scp1507Role.cs | 2 +- .../Exiled.API/Features/Roles/Scp173Role.cs | 5 +- .../Exiled.API/Features/Roles/Scp3114Role.cs | 1 + .../Exiled.API/Features/Roles/Scp939Role.cs | 2 +- .../Features/Roles/SpectatorRole.cs | 3 +- EXILED/Exiled.API/Features/Room.cs | 24 ++- EXILED/Exiled.API/Features/Round.cs | 2 +- EXILED/Exiled.API/Features/Scp3114Ragdoll.cs | 3 +- EXILED/Exiled.API/Features/Scp559.cs | 2 + EXILED/Exiled.API/Features/Scp914.cs | 4 +- EXILED/Exiled.API/Features/Scp956.cs | 1 + EXILED/Exiled.API/Features/Server.cs | 2 - .../Features/Spawn/LockerSpawnPoint.cs | 4 +- .../Features/Spawn/RoomSpawnPoint.cs | 2 +- .../Features/Spawn/SpawnLocation.cs | 3 +- .../Exiled.API/Features/Spawn/SpawnPoint.cs | 1 + EXILED/Exiled.API/Features/TeslaGate.cs | 8 +- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 3 + EXILED/Exiled.API/Features/Toys/Light.cs | 1 + EXILED/Exiled.API/Features/Toys/Primitive.cs | 5 +- .../Features/Toys/ShootingTargetToy.cs | 3 +- EXILED/Exiled.API/Features/Toys/Speaker.cs | 2 +- EXILED/Exiled.API/Features/Toys/Text.cs | 2 +- EXILED/Exiled.API/Features/Toys/Waypoint.cs | 2 +- EXILED/Exiled.API/Features/Warhead.cs | 10 +- EXILED/Exiled.API/Features/Waves/TimedWave.cs | 8 +- EXILED/Exiled.API/Features/Waves/WaveTimer.cs | 2 - EXILED/Exiled.API/Features/Window.cs | 3 + EXILED/Exiled.API/Features/Workstation.cs | 4 +- .../Interfaces/Audio/IAudioFilter.cs | 2 +- .../Interfaces/Audio/ILiveSource.cs | 2 +- .../Exiled.API/Interfaces/Audio/IPcmSource.cs | 2 +- EXILED/Exiled.API/Interfaces/IPosition.cs | 2 +- EXILED/Exiled.API/Interfaces/IRotation.cs | 2 +- EXILED/Exiled.API/Interfaces/IValidator.cs | 22 +++ EXILED/Exiled.API/Interfaces/IWorldSpace.cs | 2 +- .../Interfaces/Keycards/ILabelKeycard.cs | 1 + EXILED/Exiled.API/Structs/Audio/TrackData.cs | 2 +- .../Exiled.API/Structs/PrimitiveSettings.cs | 1 + EXILED/Exiled.CreditTags/Enums/InfoSide.cs | 2 +- .../Events/CreditsHandler.cs | 1 + .../Features/DatabaseHandler.cs | 3 +- .../Features/ThreadSafeRequest.cs | 2 + .../API/EventArgs/OwnerEscapingEventArgs.cs | 7 - EXILED/Exiled.CustomItems/API/Extensions.cs | 4 +- .../API/Features/CustomArmor.cs | 1 + .../API/Features/CustomGoggles.cs | 2 +- .../API/Features/CustomGrenade.cs | 5 +- .../API/Features/CustomItem.cs | 9 +- .../API/Features/CustomKeycard.cs | 2 + .../API/Features/CustomWeapon.cs | 2 +- EXILED/Exiled.CustomItems/Commands/Give.cs | 4 +- EXILED/Exiled.CustomItems/Commands/Main.cs | 2 +- .../Exiled.CustomItems/Events/MapHandler.cs | 1 + .../Patches/PlayerInventorySee.cs | 2 +- EXILED/Exiled.CustomRoles/API/Extensions.cs | 2 +- .../API/Features/ActiveAbility.cs | 2 +- .../API/Features/CustomAbility.cs | 8 +- .../API/Features/CustomRole.cs | 11 +- ...nType.cs => AbilityKeypressTriggerType.cs} | 2 +- .../API/Features/Enums/CheckType.cs | 2 +- EXILED/Exiled.CustomRoles/Commands/Get.cs | 2 +- EXILED/Exiled.CustomRoles/Commands/Parent.cs | 2 +- EXILED/Exiled.CustomRoles/CustomRoles.cs | 2 +- .../Events/PlayerHandlers.cs | 1 - EXILED/Exiled.Events/Commands/Config/Merge.cs | 9 +- EXILED/Exiled.Events/Commands/Config/Split.cs | 9 +- .../Commands/PluginManager/Disable.cs | 4 +- .../Commands/PluginManager/Enable.cs | 6 +- .../Commands/PluginManager/PluginManager.cs | 2 +- .../Commands/PluginManager/Show.cs | 5 +- .../Exiled.Events/Commands/Reload/Configs.cs | 5 +- .../Commands/Reload/Translations.cs | 3 +- EXILED/Exiled.Events/Commands/TpsCommand.cs | 3 +- EXILED/Exiled.Events/Config.cs | 4 +- .../Cassie/SendingCassieMessageEventArgs.cs | 3 + .../EventArgs/Interfaces/IAttackerEvent.cs | 4 +- .../EventArgs/Interfaces/ICameraEvent.cs | 2 +- .../EventArgs/Interfaces/IConsumableEvent.cs | 2 +- .../EventArgs/Interfaces/IFirearmEvent.cs | 2 +- .../EventArgs/Interfaces/IGeneratorEvent.cs | 2 +- .../EventArgs/Interfaces/IItemEvent.cs | 2 +- .../EventArgs/Interfaces/IMicroHIDEvent.cs | 2 +- .../EventArgs/Interfaces/IPlayerEvent.cs | 2 +- .../EventArgs/Interfaces/IRagdollEvent.cs | 2 +- .../EventArgs/Interfaces/IRoomEvent.cs | 2 +- .../EventArgs/Interfaces/ITeslaEvent.cs | 2 +- .../EventArgs/Item/CacklingEventArgs.cs | 1 + .../EventArgs/Item/ChangingAmmoEventArgs.cs | 2 +- .../Item/ChangingAttachmentsEventArgs.cs | 7 +- .../ChangingMicroHIDPickupStateEventArgs.cs | 1 + .../Item/ChargingJailbirdEventArgs.cs | 2 +- .../Item/DisruptorFiringEventArgs.cs | 3 +- .../EventArgs/Item/InspectedItemEventArgs.cs | 3 +- .../EventArgs/Item/InspectingItemEventArgs.cs | 3 +- .../Item/JailbirdChangedWearStateEventArgs.cs | 3 +- .../JailbirdChangingWearStateEventArgs.cs | 3 +- .../Item/JailbirdChargeCompleteEventArgs.cs | 2 +- .../Item/KeycardInteractingEventArgs.cs | 1 + .../EventArgs/Item/PunchingEventArgs.cs | 1 + .../Item/ReceivingPreferenceEventArgs.cs | 5 +- .../EventArgs/Item/SwingingEventArgs.cs | 2 +- .../Map/AnnouncingChaosEntranceEventArgs.cs | 3 +- .../Map/AnnouncingNtfEntranceEventArgs.cs | 2 + .../Map/AnnouncingScpTerminationEventArgs.cs | 7 +- .../Map/ChangedIntoGrenadeEventArgs.cs | 3 +- .../Map/ElevatorSequencesUpdatedEventArgs.cs | 3 +- .../EventArgs/Map/FillingLockerEventArgs.cs | 2 + .../EventArgs/Map/GeneratingEventArgs.cs | 3 +- .../Map/GeneratorActivatingEventArgs.cs | 2 +- .../EventArgs/Map/PickupAddedEventArgs.cs | 3 +- .../EventArgs/Map/PickupDestroyedEventArgs.cs | 3 +- .../Map/PlacingBulletHoleEventArgs.cs | 3 +- ...acingPickupIntoPocketDimensionEventArgs.cs | 1 + .../EventArgs/Map/Scp244SpawningEventArgs.cs | 5 +- .../EventArgs/Map/SpawningItemEventArgs.cs | 2 + .../Map/SpawningRoomConnectorEventArgs.cs | 3 +- .../Map/SpawningTeamVehicleEventArgs.cs | 2 +- .../Player/ActivatingGeneratorEventArgs.cs | 2 +- .../Player/ActivatingWarheadPanelEventArgs.cs | 2 +- .../Player/ActivatingWorkstationEventArgs.cs | 2 +- .../Player/AimingDownSightEventArgs.cs | 4 +- .../EventArgs/Player/BannedEventArgs.cs | 2 +- .../EventArgs/Player/BanningEventArgs.cs | 3 +- .../Player/CancelledItemUseEventArgs.cs | 3 +- .../Player/CancellingItemUseEventArgs.cs | 3 +- .../Player/ChangedEmotionEventArgs.cs | 1 + .../EventArgs/Player/ChangedItemEventArgs.cs | 6 +- .../EventArgs/Player/ChangedRatioEventArgs.cs | 2 +- .../Player/ChangingDangerStateEventArgs.cs | 1 + .../Player/ChangingDisruptorModeEventArgs.cs | 3 +- .../Player/ChangingEmotionEventArgs.cs | 1 + .../Player/ChangingGroupEventArgs.cs | 2 +- .../EventArgs/Player/ChangingItemEventArgs.cs | 4 +- .../Player/ChangingMicroHIDStateEventArgs.cs | 6 +- .../Player/ChangingMoveStateEventArgs.cs | 2 +- .../Player/ChangingRadioPresetEventArgs.cs | 3 +- .../EventArgs/Player/ChangingRoleEventArgs.cs | 8 +- .../ChangingSpectatedPlayerEventArgs.cs | 2 +- .../Player/ClosingGeneratorEventArgs.cs | 5 +- .../Player/ConsumingItemEventArgs.cs | 6 +- .../EventArgs/Player/DamagingDoorEventArgs.cs | 3 + .../Player/DamagingShootingTargetEventArgs.cs | 6 +- .../Player/DamagingWindowEventArgs.cs | 10 +- .../DeactivatingWorkstationEventArgs.cs | 2 +- .../EventArgs/Player/DestroyingEventArgs.cs | 4 +- .../EventArgs/Player/DiedEventArgs.cs | 4 +- .../EventArgs/Player/DroppedAmmoEventArgs.cs | 7 +- .../EventArgs/Player/DroppedItemEventArgs.cs | 4 +- .../EventArgs/Player/DroppingAmmoEventArgs.cs | 7 +- .../EventArgs/Player/DroppingItemEventArgs.cs | 4 +- .../Player/DroppingNothingEventArgs.cs | 2 +- .../Player/DryfiringWeaponEventArgs.cs | 4 +- .../EventArgs/Player/DyingEventArgs.cs | 8 +- .../Player/EarningAchievementEventArgs.cs | 2 + .../EnteringEnvironmentalHazardEventArgs.cs | 2 + .../EnteringKillerCollisionEventArgs.cs | 2 +- .../EnteringPocketDimensionEventArgs.cs | 2 +- .../EventArgs/Player/EscapingEventArgs.cs | 5 +- .../EscapingPocketDimensionEventArgs.cs | 2 +- .../ExitingEnvironmentalHazardEventArgs.cs | 2 + .../Player/ExplodingMicroHIDEventArgs.cs | 1 + .../FailingEscapePocketDimensionEventArgs.cs | 4 +- .../EventArgs/Player/FlippingCoinEventArgs.cs | 6 +- .../EventArgs/Player/HandcuffingEventArgs.cs | 2 +- .../EventArgs/Player/HitEventArgs.cs | 6 +- .../EventArgs/Player/HurtEventArgs.cs | 4 +- .../EventArgs/Player/HurtingEventArgs.cs | 6 +- .../EventArgs/Player/InteractedEventArgs.cs | 2 +- .../Player/InteractingDoorEventArgs.cs | 6 +- .../InteractingEmergencyButtonEventArgs.cs | 3 +- .../Player/InteractingLockerEventArgs.cs | 3 +- .../InteractingShootingTargetEventArgs.cs | 6 +- .../Player/IntercomSpeakingEventArgs.cs | 2 +- .../EventArgs/Player/IssuingMuteEventArgs.cs | 2 +- .../EventArgs/Player/JoinedEventArgs.cs | 2 +- .../EventArgs/Player/JumpingEventArgs.cs | 2 +- .../EventArgs/Player/KickedEventArgs.cs | 2 +- .../EventArgs/Player/KickingEventArgs.cs | 4 +- .../EventArgs/Player/LandingEventArgs.cs | 2 +- .../EventArgs/Player/LeftEventArgs.cs | 2 +- .../EventArgs/Player/MakingNoiseEventArgs.cs | 2 +- .../Player/MicroHIDOpeningDoorEventArgs.cs | 1 + .../Player/OpeningGeneratorEventArgs.cs | 2 +- .../Player/PickingUpItemEventArgs.cs | 2 +- .../Player/PlayingAudioLogEventArgs.cs | 2 +- .../Player/ReceivingEffectEventArgs.cs | 4 +- .../Player/ReceivingGunSoundEventArgs.cs | 7 +- .../Player/ReceivingVoiceMessageEventArgs.cs | 4 +- .../Player/ReloadedWeaponEventArgs.cs | 4 +- .../Player/ReloadingWeaponEventArgs.cs | 6 +- .../Player/RemovedHandcuffsEventArgs.cs | 6 +- .../Player/RemovingHandcuffsEventArgs.cs | 4 +- .../Player/ReservedSlotsCheckEventArgs.cs | 2 +- .../EventArgs/Player/RevokingMuteEventArgs.cs | 2 +- .../EventArgs/Player/RoomChangedEventArgs.cs | 2 +- .../Player/RotatingRevolverEventArgs.cs | 8 +- .../Player/SavingByAntiScp207EventArgs.cs | 3 +- .../Scp1576TransmissionEndedEventArgs.cs | 8 +- .../SendingAdminChatMessageEventsArgs.cs | 6 +- .../Player/SendingGunSoundEventArgs.cs | 7 +- .../Player/SendingValidCommandEventArgs.cs | 6 +- .../Player/SentValidCommandEventArgs.cs | 6 +- .../EventArgs/Player/ShootingEventArgs.cs | 5 +- .../EventArgs/Player/ShotEventArgs.cs | 7 +- .../EventArgs/Player/SpawnedEventArgs.cs | 2 +- .../Player/SpawnedRagdollEventArgs.cs | 5 +- .../EventArgs/Player/SpawningEventArgs.cs | 4 +- .../Player/SpawningRagdollEventArgs.cs | 6 +- .../StayingOnEnvironmentalHazardEventArgs.cs | 2 + .../Player/StoppingGeneratorEventArgs.cs | 3 +- .../Player/ThrowingRequestEventArgs.cs | 2 +- .../Player/ThrownProjectileEventArgs.cs | 2 +- .../Player/TogglingFlashlightEventArgs.cs | 5 +- .../Player/TogglingNoClipEventArgs.cs | 2 +- .../Player/TogglingRadioEventArgs.cs | 7 +- .../TogglingWeaponFlashlightEventArgs.cs | 4 +- .../Player/TriggeringTeslaEventArgs.cs | 2 +- .../Player/UnloadedWeaponEventArgs.cs | 4 +- .../Player/UnloadingWeaponEventArgs.cs | 6 +- .../Player/UnlockingGeneratorEventArgs.cs | 2 +- .../EventArgs/Player/UsedItemEventArgs.cs | 4 +- .../Player/UsingItemCompletedEventArgs.cs | 3 +- .../EventArgs/Player/UsingItemEventArgs.cs | 3 +- .../Player/UsingMicroHIDEnergyEventArgs.cs | 4 +- .../Player/UsingRadioBatteryEventArgs.cs | 4 +- .../EventArgs/Player/VerifiedEventArgs.cs | 2 +- .../Player/VoiceChattingEventArgs.cs | 2 +- .../Scp049/ActivatingSenseEventArgs.cs | 4 +- .../Scp049/FinishingRecallEventArgs.cs | 4 +- .../Scp049/FinishingSenseEventArgs.cs | 2 +- .../EventArgs/Scp049/SendingCallEventArgs.cs | 3 +- .../Scp049/StartingRecallEventArgs.cs | 5 +- .../Scp0492/ConsumedCorpseEventArgs.cs | 5 +- .../Scp0492/ConsumingCorpseEventArgs.cs | 3 +- .../Scp079/ChangingSpeakerStatusEventArgs.cs | 2 +- .../Scp079/GainingExperienceEventArgs.cs | 3 +- .../EventArgs/Scp079/GainingLevelEventArgs.cs | 3 +- .../EventArgs/Scp079/LosingSignalEventArgs.cs | 2 +- .../EventArgs/Scp079/LostSignalEventArgs.cs | 2 +- .../EventArgs/Scp079/PingingEventArgs.cs | 4 +- .../EventArgs/Scp079/RecontainedEventArgs.cs | 5 +- .../EventArgs/Scp079/RecontainingEventArgs.cs | 2 +- .../EventArgs/Scp079/RoomBlackoutEventArgs.cs | 1 - .../Scp079/TriggeringDoorEventArgs.cs | 3 +- .../EventArgs/Scp079/ZoneBlackoutEventArgs.cs | 6 +- .../EventArgs/Scp096/AddingTargetEventArgs.cs | 2 +- .../EventArgs/Scp096/CalmingDownEventArgs.cs | 2 +- .../EventArgs/Scp096/ChargingEventArgs.cs | 3 +- .../EventArgs/Scp096/EnragingEventArgs.cs | 3 +- .../Scp096/RemovingTargetEventArgs.cs | 4 +- .../Scp096/StartPryingGateEventArgs.cs | 5 +- .../Scp096/TryingNotToCryEventArgs.cs | 4 +- .../EventArgs/Scp106/ExitStalkingEventArgs.cs | 3 +- .../EventArgs/Scp106/StalkingEventArgs.cs | 4 +- .../EventArgs/Scp106/TeleportingEventArgs.cs | 3 +- .../Scp127/GainedExperienceEventArgs.cs | 1 + .../Scp127/GainingExperienceEventArgs.cs | 3 +- .../EventArgs/Scp127/TalkedEventArgs.cs | 3 +- .../EventArgs/Scp127/TalkingEventArgs.cs | 1 + .../Scp1344/ChangedStatusEventArgs.cs | 2 +- .../Scp1344/ChangingStatusEventArgs.cs | 3 +- .../EventArgs/Scp1344/DeactivatedEventArgs.cs | 2 +- .../Scp1344/DeactivatingEventArgs.cs | 2 +- .../Scp1507/AttackingDoorEventArgs.cs | 1 + .../Scp1507/SpawningFlamingosEventArgs.cs | 4 +- .../EventArgs/Scp1507/UsingTapeEventArgs.cs | 1 + .../Scp1509/ResurrectingEventArgs.cs | 4 +- .../Scp1509/TriggeringAttackEventArgs.cs | 3 +- .../Scp173/AddingObserverEventArgs.cs | 1 + .../Scp173/BeingObservedEventArgs.cs | 2 +- .../EventArgs/Scp173/BlinkingEventArgs.cs | 4 +- .../Scp173/BlinkingRequestEventArgs.cs | 7 +- .../Scp173/PlacingTantrumEventArgs.cs | 1 + .../Scp173/RemovedObserverEventArgs.cs | 1 + .../Scp173/UsingBreakneckSpeedsEventArgs.cs | 5 +- .../Scp244/OpeningScp244EventArgs.cs | 2 +- .../EventArgs/Scp244/UsingScp244EventArgs.cs | 6 +- .../Scp2536/FindingPositionEventArgs.cs | 1 + .../Scp2536/FoundPositionEventArgs.cs | 3 +- .../Scp2536/GrantingGiftEventArgs.cs | 1 + .../EventArgs/Scp2536/OpeningGiftEventArgs.cs | 1 - .../EventArgs/Scp3114/DancingEventArgs.cs | 1 - .../EventArgs/Scp3114/DisguisedEventArgs.cs | 3 +- .../EventArgs/Scp3114/DisguisingEventArgs.cs | 3 +- .../EventArgs/Scp3114/RevealedEventArgs.cs | 3 +- .../EventArgs/Scp3114/RevealingEventArgs.cs | 3 +- .../EventArgs/Scp3114/SlappedEventArgs.cs | 4 +- .../EventArgs/Scp3114/StranglingEventArgs.cs | 6 +- .../EventArgs/Scp3114/TryUseBodyEventArgs.cs | 3 +- .../EventArgs/Scp3114/VoiceLinesEventArgs.cs | 3 +- .../Scp330/DroppingScp330EventArgs.cs | 4 +- .../EventArgs/Scp330/EatenScp330EventArgs.cs | 3 +- .../EventArgs/Scp330/EatingScp330EventArgs.cs | 3 +- .../Scp330/InteractingScp330EventArgs.cs | 8 +- .../EventArgs/Scp559/SpawningEventArgs.cs | 1 + .../EventArgs/Scp914/ActivatingEventArgs.cs | 2 +- .../Scp914/ChangingKnobSettingEventArgs.cs | 2 +- .../Scp914/UpgradedInventoryItemEventArgs.cs | 8 +- .../Scp914/UpgradedPickupEventArgs.cs | 3 + .../Scp914/UpgradingInventoryItemEventArgs.cs | 7 +- .../Scp914/UpgradingPickupEventArgs.cs | 3 + .../Scp914/UpgradingPlayerEventArgs.cs | 2 +- .../Scp939/ChangingFocusEventArgs.cs | 3 +- .../EventArgs/Scp939/ClawedEventArgs.cs | 2 +- .../EventArgs/Scp939/LungingEventArgs.cs | 6 +- .../Scp939/PlacedAmnesticCloudEventArgs.cs | 6 +- .../Scp939/PlacingAmnesticCloudEventArgs.cs | 3 +- .../Scp939/PlacingMimicPointEventArgs.cs | 1 + .../Scp939/PlayingFootstepEventArgs.cs | 6 +- .../EventArgs/Scp939/PlayingSoundEventArgs.cs | 4 +- .../EventArgs/Scp939/PlayingVoiceEventArgs.cs | 3 +- .../EventArgs/Scp939/SavingVoiceEventArgs.cs | 3 +- .../Scp939/UpdatedCloudStateEventArgs.cs | 5 +- .../Scp939/ValidatingVisibilityEventArgs.cs | 10 +- .../Server/ChoosingStartTeamQueueEventArgs.cs | 2 + .../Server/CompletingObjectiveEventArgs.cs | 3 +- .../EventArgs/Server/EndingRoundEventArgs.cs | 3 +- .../Server/LocalReportingEventArgs.cs | 2 +- .../Server/ReportingCheaterEventArgs.cs | 2 +- .../Server/RespawnedTeamEventArgs.cs | 4 +- .../Server/RespawningTeamEventArgs.cs | 6 +- .../EventArgs/Server/RoundEndedEventArgs.cs | 2 +- .../Server/RoundStartingEventArgs.cs | 8 +- .../Server/SelectingRespawnTeamEventArgs.cs | 1 + .../Warhead/ChangingLeverStatusEventArgs.cs | 2 +- .../DeadmanSwitchInitiatingEventArgs.cs | 2 +- .../EventArgs/Warhead/DetonatingEventArgs.cs | 2 +- .../EventArgs/Warhead/StoppingEventArgs.cs | 2 +- EXILED/Exiled.Events/Events.cs | 18 ++- EXILED/Exiled.Events/Exiled.Events.csproj | 2 +- EXILED/Exiled.Events/Features/Event.cs | 43 +++--- EXILED/Exiled.Events/Features/Event{T}.cs | 43 +++--- EXILED/Exiled.Events/Features/Patcher.cs | 3 +- .../Handlers/Internal/AdminToyList.cs | 2 +- .../Handlers/Internal/ClientStarted.cs | 9 +- .../Handlers/Internal/ExplodingGrenade.cs | 3 +- .../Handlers/Internal/MapGenerated.cs | 4 +- .../Handlers/Internal/PickupEvent.cs | 3 +- .../Handlers/Internal/RagdollList.cs | 2 +- .../Exiled.Events/Handlers/Internal/Round.cs | 9 +- .../Handlers/Internal/SceneUnloaded.cs | 4 +- EXILED/Exiled.Events/Handlers/Item.cs | 2 +- EXILED/Exiled.Events/Handlers/Player.cs | 7 +- EXILED/Exiled.Events/Handlers/Scp049.cs | 2 +- EXILED/Exiled.Events/Handlers/Scp0492.cs | 4 +- EXILED/Exiled.Events/Handlers/Scp127.cs | 1 + EXILED/Exiled.Events/Handlers/Scp1344.cs | 2 +- EXILED/Exiled.Events/Handlers/Scp173.cs | 2 +- EXILED/Exiled.Events/Handlers/Server.cs | 3 +- .../Events/Cassie/SendingCassieMessage.cs | 7 +- .../Patches/Events/Item/Cackling.cs | 3 +- .../Patches/Events/Item/ChangingAmmo.cs | 9 -- .../Events/Item/ChangingAttachments.cs | 6 +- .../Patches/Events/Item/DisruptorFiring.cs | 5 +- .../Patches/Events/Item/Inspect.cs | 4 +- .../Patches/Events/Item/JailbirdPatch.cs | 53 ++++--- .../Patches/Events/Item/JailbirdWearState.cs | 2 + .../Patches/Events/Item/KeycardInteracting.cs | 8 +- .../Patches/Events/Item/Punching.cs | 3 +- .../Events/Item/ReceivingPreference.cs | 2 +- .../Events/Item/UsingRadioPickupBattery.cs | 2 + .../Events/Map/AnnouncingChaosEntrance.cs | 5 +- .../Events/Map/AnnouncingDecontamination.cs | 4 +- .../Events/Map/AnnouncingNtfEntrance.cs | 8 +- .../Events/Map/AnnouncingNtfMiniEntrance.cs | 8 +- .../Events/Map/AnnouncingScpTermination.cs | 8 +- .../Patches/Events/Map/BreakingScp2176.cs | 8 +- .../Patches/Events/Map/ChangingIntoGrenade.cs | 2 +- .../Patches/Events/Map/Decontaminating.cs | 4 +- .../Events/Map/ElevatorSequencesUpdated.cs | 4 +- .../Events/Map/ExplodingFlashGrenade.cs | 7 +- .../Events/Map/ExplodingFragGrenade.cs | 5 +- .../Patches/Events/Map/FillingLocker.cs | 2 +- .../Patches/Events/Map/Generating.cs | 10 +- .../Patches/Events/Map/GeneratorActivating.cs | 2 +- .../Patches/Events/Map/PlacingBulletHole.cs | 8 +- .../Map/PlacingPickupIntoPocketDimension.cs | 7 +- .../Patches/Events/Map/Scp244Spawning.cs | 7 +- .../Patches/Events/Map/SpawningItem.cs | 6 +- .../Events/Map/SpawningRoomConnector.cs | 2 + .../Patches/Events/Map/TurningOffLights.cs | 2 +- .../Events/Player/ActivatingWarheadPanel.cs | 8 +- .../Events/Player/ActivatingWorkstation.cs | 5 +- .../Patches/Events/Player/Aiming.cs | 5 +- .../Patches/Events/Player/Banned.cs | 4 +- .../Patches/Events/Player/Banning.cs | 5 +- .../Events/Player/ChangedAspectRatio.cs | 7 +- .../Patches/Events/Player/ChangedItem.cs | 6 +- .../Patches/Events/Player/ChangedRoom.cs | 6 +- .../Events/Player/ChangingDangerState.cs | 2 + .../Events/Player/ChangingDisruptorMode.cs | 4 +- .../Patches/Events/Player/ChangingGroup.cs | 6 +- .../Patches/Events/Player/ChangingItem.cs | 6 +- .../Events/Player/ChangingMicroHIDState.cs | 8 +- .../Events/Player/ChangingMoveState.cs | 2 +- .../Events/Player/ChangingRadioPreset.cs | 6 +- .../Events/Player/ChangingRoleAndSpawned.cs | 18 +-- .../Player/ChangingSpectatedPlayerPatch.cs | 3 +- .../Patches/Events/Player/ConsumingItem.cs | 2 +- .../Patches/Events/Player/DamagingDoor.cs | 6 +- .../Events/Player/DamagingShootingTarget.cs | 4 +- .../Patches/Events/Player/DamagingWindow.cs | 4 +- .../Events/Player/DeactivatingWorkstation.cs | 2 +- .../Patches/Events/Player/Destroying.cs | 4 +- .../Patches/Events/Player/DrinkingCoffee.cs | 1 + .../Patches/Events/Player/DroppingAmmo.cs | 4 +- .../Patches/Events/Player/DroppingItem.cs | 2 +- .../Patches/Events/Player/DryFire.cs | 4 +- .../Patches/Events/Player/DyingAndDied.cs | 8 +- .../Events/Player/EarningAchievement.cs | 6 +- .../Patches/Events/Player/Emotion.cs | 6 +- .../Events/Player/EnteringKillerCollision.cs | 2 +- .../Events/Player/EnteringPocketDimension.cs | 4 +- .../EnteringSinkholeEnvironmentalHazard.cs | 2 +- .../EnteringTantrumEnvironmentalHazard.cs | 2 +- .../Events/Player/EscapingAndEscaped.cs | 7 +- .../Events/Player/EscapingPocketDimension.cs | 7 +- .../ExitingSinkholeEnvironmentalHazard.cs | 2 +- .../ExitingTantrumEnvironmentalHazard.cs | 2 +- .../Events/Player/ExplodingMicroHID.cs | 2 + .../Player/FailingEscapePocketDimension.cs | 6 +- .../Patches/Events/Player/FlippingCoin.cs | 8 +- .../Patches/Events/Player/Healing.cs | 4 +- .../Patches/Events/Player/Hit.cs | 11 +- .../Patches/Events/Player/Hurting.cs | 5 +- .../Patches/Events/Player/Interacted.cs | 7 +- .../Patches/Events/Player/InteractingDoor.cs | 9 +- .../Events/Player/InteractingElevator.cs | 4 +- .../Player/InteractingEmergencyButton.cs | 4 +- .../Events/Player/InteractingGenerator.cs | 2 +- .../Events/Player/InteractingLocker.cs | 8 +- .../Player/InteractingShootingTarget.cs | 4 +- .../Patches/Events/Player/IntercomSpeaking.cs | 5 +- .../Patches/Events/Player/IssuingMute.cs | 4 +- .../Patches/Events/Player/Joined.cs | 4 +- .../Patches/Events/Player/Jumping.cs | 2 +- .../Patches/Events/Player/Kicked.cs | 4 +- .../Patches/Events/Player/Kicking.cs | 1 + .../Patches/Events/Player/Landing.cs | 5 +- .../Patches/Events/Player/Left.cs | 6 +- .../Patches/Events/Player/MakingNoise.cs | 2 + .../Events/Player/MicroHIDOpeningDoor.cs | 4 +- .../Patches/Events/Player/PickingUp330.cs | 4 +- .../Patches/Events/Player/PickingUpAmmo.cs | 4 +- .../Patches/Events/Player/PickingUpArmor.cs | 3 +- .../Patches/Events/Player/PickingUpItem.cs | 3 +- .../Patches/Events/Player/PickingUpScp244.cs | 2 +- .../Patches/Events/Player/PlayingAudioLog.cs | 6 +- .../Events/Player/PreAuthenticating.cs | 8 +- .../Events/Player/ProcessDisarmMessage.cs | 6 +- .../Events/Player/ReceivingGunSound.cs | 2 +- .../Events/Player/ReceivingStatusEffect.cs | 7 +- .../Events/Player/ReceivingVoiceMessage.cs | 2 +- .../Events/Player/ReloadedAndUnloaded.cs | 12 +- .../Events/Player/ReservedSlotPatch.cs | 2 +- .../Patches/Events/Player/RevokingMute.cs | 4 +- .../Patches/Events/Player/RotatingRevolver.cs | 4 +- .../Events/Player/SavingByAntiScp207.cs | 3 +- .../Events/Player/Scp1576TransmissionEnded.cs | 46 +++--- .../Events/Player/SearchingPickupEvent.cs | 6 +- .../Events/Player/SendingAdminChatMessage.cs | 7 +- .../Patches/Events/Player/SendingGunSound.cs | 2 +- .../Player/SendingValidGameConsoleCommand.cs | 10 +- .../Events/Player/SendingValidRACommand.cs | 9 +- .../Patches/Events/Player/Shooting.cs | 13 +- .../Patches/Events/Player/Shot.cs | 8 +- .../Patches/Events/Player/Spawning.cs | 5 +- .../Patches/Events/Player/SpawningRagdoll.cs | 5 +- .../Player/StayingOnEnvironmentalHazard.cs | 12 +- .../StayingOnSinkholeEnvironmentalHazard.cs | 12 +- .../StayingOnTantrumEnvironmentalHazard.cs | 13 +- .../Patches/Events/Player/ThrowingRequest.cs | 5 +- .../Patches/Events/Player/ThrownProjectile.cs | 5 +- .../Events/Player/TogglingFlashlight.cs | 5 +- .../Patches/Events/Player/TogglingNoClip.cs | 5 +- .../Events/Player/TogglingOverwatch.cs | 3 +- .../Patches/Events/Player/TogglingRadio.cs | 2 +- .../Events/Player/TogglingWeaponFlashlight.cs | 1 - .../Patches/Events/Player/TriggeringTesla.cs | 8 +- .../Events/Player/UsedItemByHolstering.cs | 7 +- .../Player/UsingAndCancellingItemUse.cs | 6 +- .../Events/Player/UsingItemCompleted.cs | 6 +- .../Events/Player/UsingMicroHIDEnergy.cs | 6 +- .../Events/Player/UsingRadioBattery.cs | 3 +- .../Patches/Events/Player/Verified.cs | 6 +- .../Patches/Events/Player/VoiceChatting.cs | 2 +- .../Patches/Events/Scp049/ActivatingSense.cs | 6 +- .../Patches/Events/Scp049/Attacking.cs | 3 +- .../Patches/Events/Scp049/FinishingRecall.cs | 4 +- .../Patches/Events/Scp049/FinishingSense.cs | 5 +- .../Patches/Events/Scp049/SendingCall.cs | 1 - .../Patches/Events/Scp049/StartingRecall.cs | 8 +- .../Patches/Events/Scp0492/Consumed.cs | 10 +- .../Patches/Events/Scp0492/Consuming.cs | 9 +- .../Scp0492/TriggeringBloodlustEvent.cs | 2 +- .../Patches/Events/Scp079/ChangingCamera.cs | 5 +- .../Events/Scp079/ChangingSpeakerStatus.cs | 4 +- .../Events/Scp079/ElevatorTeleporting.cs | 5 +- .../Events/Scp079/GainingExperience.cs | 2 +- .../Patches/Events/Scp079/GainingLevel.cs | 2 +- .../Patches/Events/Scp079/InteractingTesla.cs | 2 +- .../Patches/Events/Scp079/LockingDown.cs | 4 +- .../Patches/Events/Scp079/Lost.cs | 2 +- .../Patches/Events/Scp079/Pinging.cs | 10 +- .../Patches/Events/Scp079/Recontain.cs | 6 +- .../Patches/Events/Scp079/Recontaining.cs | 2 +- .../Patches/Events/Scp079/RoomBlackout.cs | 6 +- .../Patches/Events/Scp079/TriggeringDoor.cs | 6 +- .../Patches/Events/Scp079/ZoneBlackout.cs | 3 +- .../Patches/Events/Scp096/AddingTarget.cs | 4 +- .../Patches/Events/Scp096/CalmingDown.cs | 4 +- .../Patches/Events/Scp096/Charging.cs | 4 +- .../Patches/Events/Scp096/Enraging.cs | 4 +- .../Patches/Events/Scp096/RemovingTarget.cs | 10 +- .../Patches/Events/Scp096/StartPryingGate.cs | 4 +- .../Patches/Events/Scp096/TryingNotToCry.cs | 4 +- .../Patches/Events/Scp106/Attacking.cs | 3 +- .../Patches/Events/Scp106/ExitStalking.cs | 5 +- .../Patches/Events/Scp106/Stalking.cs | 6 +- .../Patches/Events/Scp106/Teleporting.cs | 7 +- .../Patches/Events/Scp1344/Deactivating.cs | 6 +- .../Patches/Events/Scp1344/Status.cs | 4 +- .../Patches/Events/Scp1507/AttackingDoor.cs | 2 + .../Patches/Events/Scp1507/Scream.cs | 2 + .../Events/Scp1507/SpawningFlamingos.cs | 2 + .../Patches/Events/Scp1507/TapeUsing.cs | 2 + .../Scp1509/InspectingAndTriggeringAttack.cs | 2 + .../Patches/Events/Scp1509/Resurrecting.cs | 4 +- .../Patches/Events/Scp173/BeingObserved.cs | 6 +- .../Patches/Events/Scp173/Blinking.cs | 4 +- .../Patches/Events/Scp173/BlinkingRequest.cs | 6 +- .../Patches/Events/Scp173/Observers.cs | 11 +- .../Patches/Events/Scp173/PlacingTantrum.cs | 2 +- .../Events/Scp173/UsingBreakneckSpeeds.cs | 6 +- .../Patches/Events/Scp244/DamagingScp244.cs | 4 +- .../Patches/Events/Scp244/UpdateScp244.cs | 2 +- .../Patches/Events/Scp244/UsingScp244.cs | 3 +- .../Patches/Events/Scp2536/FindingPosition.cs | 4 +- .../Patches/Events/Scp2536/FoundPosition.cs | 4 +- .../Patches/Events/Scp2536/GrantingGift.cs | 2 + .../Patches/Events/Scp2536/OpeningGift.cs | 2 + .../Patches/Events/Scp3114/Dancing.cs | 6 +- .../Patches/Events/Scp3114/Disguising.cs | 2 +- .../Patches/Events/Scp3114/Slapped.cs | 4 +- .../Patches/Events/Scp3114/Strangling.cs | 4 +- .../Patches/Events/Scp3114/TryUseBody.cs | 2 +- .../Patches/Events/Scp330/DroppingCandy.cs | 8 +- .../Patches/Events/Scp330/EatingScp330.cs | 2 +- .../Events/Scp330/InteractingScp330.cs | 11 +- .../Patches/Events/Scp559/Interacting.cs | 1 + .../Patches/Events/Scp559/Spawning.cs | 1 + .../Events/Scp914/InteractingEvents.cs | 5 +- .../Patches/Events/Scp914/UpgradedPickup.cs | 5 +- .../Patches/Events/Scp914/UpgradedPlayer.cs | 13 +- .../Patches/Events/Scp914/UpgradingPickup.cs | 3 +- .../Patches/Events/Scp914/UpgradingPlayer.cs | 11 +- .../Patches/Events/Scp939/Clawed.cs | 4 +- .../Patches/Events/Scp939/Focus.cs | 1 + .../Patches/Events/Scp939/Lunge.cs | 5 +- .../Events/Scp939/PlacedAmnesticCloud.cs | 2 + .../Events/Scp939/PlacingAmnesticCloud.cs | 4 +- .../Events/Scp939/PlacingMimicPoint.cs | 4 +- .../Patches/Events/Scp939/PlayingFootstep.cs | 3 +- .../Patches/Events/Scp939/PlayingSound.cs | 6 +- .../Patches/Events/Scp939/PlayingVoice.cs | 2 +- .../Patches/Events/Scp939/SavingVoice.cs | 2 + .../Events/Scp939/ValidatingVisibility.cs | 12 +- .../Patches/Events/Server/AddingUnitName.cs | 7 +- .../Events/Server/ChoosingStartTeamQueue.cs | 5 +- .../Events/Server/CompletingObjective.cs | 4 +- .../Patches/Events/Server/Reporting.cs | 5 +- .../Patches/Events/Server/RespawningTeam.cs | 8 +- .../Patches/Events/Server/RestartingRound.cs | 14 +- .../Patches/Events/Server/RoundEnd.cs | 1 + .../Patches/Events/Server/RoundStarting.cs | 6 +- .../Events/Server/SelectingRespawnTeam.cs | 2 + .../Patches/Events/Server/Unban.cs | 1 + .../Events/Server/WaitingForPlayers.cs | 4 +- .../Events/Warhead/ChangingLeverStatus.cs | 6 +- .../Events/Warhead/DeadmanSwitchStart.cs | 5 +- .../Patches/Events/Warhead/Detonation.cs | 5 +- .../Patches/Events/Warhead/Starting.cs | 5 +- .../Patches/Events/Warhead/Stopping.cs | 5 +- .../Fixes/Fix106RegenerationWithScp244.cs | 6 +- .../Patches/Fixes/Fix1344Dupe.cs | 4 +- .../Patches/Fixes/FixCapturePosition.cs | 6 +- .../Patches/Fixes/FixEffectOrder.cs | 11 +- .../Patches/Fixes/FixElevatorChamberAwake.cs | 2 +- .../Patches/Fixes/FixNWFlashbangDuration.cs | 7 +- .../FixOnAddedBeingCallAfterOnRemoved.cs | 11 +- .../Patches/Fixes/FixPickupPreviousOwner.cs | 9 +- .../Patches/Fixes/FixScp1507DestroyingDoor.cs | 10 +- .../Patches/Fixes/FootprintConstructorFix.cs | 6 +- .../Patches/Fixes/GetAmmoLimitFix.cs | 9 +- .../Patches/Fixes/GrenadePropertiesFix.cs | 8 +- .../Exiled.Events/Patches/Fixes/HurtingFix.cs | 4 +- .../Patches/Fixes/Jailbird914CoarseFix.cs | 5 +- .../Exiled.Events/Patches/Fixes/KillPlayer.cs | 6 +- .../Patches/Fixes/LockerFixes.cs | 2 +- .../Patches/Fixes/NWFixDetonationTimer.cs | 3 +- .../Patches/Fixes/NWFixScp096BreakingDoor.cs | 9 +- .../Patches/Fixes/NameTagDetailFix.cs | 5 +- ...RemoteAdminNpcCommandAddToDictionaryFix.cs | 7 +- .../Patches/Fixes/RoleChangedPatch.cs | 5 +- .../Patches/Fixes/Scp3114AttackAhpFix.cs | 6 +- .../Patches/Fixes/Scp3114FriendlyFireFix.cs | 10 +- .../Patches/Fixes/ServerHubMicroHidFix.cs | 7 +- .../Patches/Fixes/ThrownCustomKeycardFix.cs | 5 +- .../Patches/Fixes/TryRaycastRoomFix.cs | 5 +- .../Patches/Fixes/VoiceChatMutesClear.cs | 4 +- .../Patches/Generic/AirlockListAdd.cs | 1 + .../Patches/Generic/AmmoDrain.cs | 4 - .../Patches/Generic/CameraList.cs | 2 +- .../Patches/Generic/CanScp049SenseTutorial.cs | 4 +- .../Patches/Generic/CoffeeListAdd.cs | 1 + .../Patches/Generic/CommandLogging.cs | 4 +- .../Patches/Generic/CurrentHint.cs | 2 +- .../Generic/DestroyRecontainerInstance.cs | 4 +- .../Exiled.Events/Patches/Generic/DoorList.cs | 2 +- .../Patches/Generic/GeneratorList.cs | 4 +- .../Patches/Generic/GetCustomAmmoLimit.cs | 3 + .../Patches/Generic/GetCustomCategoryLimit.cs | 5 +- .../Patches/Generic/GhostModePatch.cs | 10 +- .../Patches/Generic/HazardList.cs | 2 + .../Patches/Generic/IndividualFriendlyFire.cs | 7 +- .../Generic/InitRecontainerInstance.cs | 4 +- .../CustomItemNameDetailData.cs | 4 +- .../KeycardDetails/CustomLabelDetailData.cs | 2 + .../KeycardDetails/CustomPermsDetailData.cs | 2 + .../KeycardDetails/CustomRankDetailData.cs | 3 + .../CustomSerialNumberDetailData.cs | 2 + .../KeycardDetails/CustomTintDetailData.cs | 2 + .../KeycardDetails/CustomWearDetailData.cs | 2 + .../KeycardDetails/NameTagDetailData.cs | 2 + .../Patches/Generic/LastTarget.cs | 2 + .../Exiled.Events/Patches/Generic/LiftList.cs | 3 +- .../Patches/Generic/LockerList.cs | 7 +- .../Patches/Generic/MapLayoutGetter.cs | 4 +- .../Patches/Generic/OfflineModeIds.cs | 4 +- .../Patches/Generic/ParseVisionInformation.cs | 4 +- .../Patches/Generic/PickupControlPatch.cs | 13 +- .../Generic/PocketDimensionTeleportList.cs | 2 +- .../Exiled.Events/Patches/Generic/RoomList.cs | 2 +- .../Patches/Generic/RoundTargetCount.cs | 3 +- .../Patches/Generic/Scp079Recontain.cs | 2 +- .../Patches/Generic/Scp079Scan.cs | 4 +- .../Patches/Generic/Scp127MaxHs.cs | 2 + .../Patches/Generic/Scp173BeingLooked.cs | 2 +- .../Patches/Generic/Scp559List.cs | 3 +- .../Patches/Generic/Scp956Capybara.cs | 1 + .../Generic/SingleUseKeycardRemainingUses.cs | 4 +- .../Patches/Generic/SpeakerInRoom.cs | 2 +- .../Patches/Generic/StaminaRegen.cs | 2 + .../Patches/Generic/StaminaRegenArmor.cs | 2 +- .../Patches/Generic/StaminaUsage.cs | 2 + .../Patches/Generic/TeslaList.cs | 2 +- .../Patches/Generic/WorkstationListAdd.cs | 1 + EXILED/Exiled.Example/Commands/Test.cs | 1 + EXILED/Exiled.Example/Events/PlayerHandler.cs | 7 +- EXILED/Exiled.Example/Exiled.Example.csproj | 2 +- EXILED/Exiled.Installer/CommandSettings.cs | 20 ++- EXILED/Exiled.Installer/Program.cs | 32 ++-- .../Properties/Resources.Designer.cs | 6 +- EXILED/Exiled.Loader/Config.cs | 11 +- EXILED/Exiled.Loader/ConfigManager.cs | 104 ++++++++++++- .../Configs/CommentGatheringTypeInspector.cs | 2 +- .../Configs/CommentsObjectGraphVisitor.cs | 2 +- .../AttachmentIdentifiersConverter.cs | 2 +- .../CustomConverters/ColorConverter.cs | 2 + .../CustomConverters/VectorsConverter.cs | 2 + .../Configs/TypeAssigningEventEmitter.cs | 2 +- .../Configs/UnderscoredNamingConvention.cs | 1 + .../Features/PluginPriorityComparer.cs | 2 +- EXILED/Exiled.Loader/Loader.cs | 10 +- EXILED/Exiled.Loader/LoaderPlugin.cs | 1 + EXILED/Exiled.Loader/PathExtensions.cs | 2 +- EXILED/Exiled.Loader/TranslationManager.cs | 12 +- EXILED/Exiled.Loader/Updater.cs | 3 +- EXILED/Exiled.Permissions/Config.cs | 3 +- .../Extensions/Permissions.cs | 3 + .../Properties/Resources.Designer.cs | 4 +- 863 files changed, 2984 insertions(+), 1815 deletions(-) rename EXILED/Exiled.API/Enums/{Scp939VisibilityStates.cs => Scp939VisibilityState.cs} (63%) create mode 100644 EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs create mode 100644 EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs create mode 100644 EXILED/Exiled.API/Interfaces/IValidator.cs rename EXILED/Exiled.CustomRoles/API/Features/Enums/{KeypressActivationType.cs => AbilityKeypressTriggerType.cs} (93%) diff --git a/.github/documentation/localization/GettingStarted-BR.md b/.github/documentation/localization/GettingStarted-BR.md index 37b5f5b4f8..157aaad4ac 100644 --- a/.github/documentation/localization/GettingStarted-BR.md +++ b/.github/documentation/localization/GettingStarted-BR.md @@ -1,21 +1,28 @@ -# Documento de Baixo Nível do Exiled -*(Escrito por [KadeDev](https://github.com/KadeDev) para a comunidade) (Traduzido por [Firething](https://github.com/Firething))* +# Tutorial do EXILED +*(Escrito por [KadeDev](https://github.com/KadeDev) para a comunidade, revisado e traduzido por [Unbistrackted](https://github.com/Unbistrackted) e [Firething](https://github.com/Firething))* ## Manual de Instruções ### Introdução -Exiled é uma API de baixo nível, o que significa que você pode chamar funções do jogo sem precisar de vários bloatwares de API. +Como dito anteriormente, o EXILED é um framework de alto nível que nos permite chamar funções do jogo sem ter nenhum tipo de complicação ou quase nenhuma perda de performance. -Isso permite com que o Exiled atualize-se facilmente, e ele pode ser atualizado antes mesmo da atualização chegar ao jogo. +Isso permite que o projeto seja atualizado de forma mais simples, sem precisar que desenvolvedores atualizem seus plugins toda vez que o jogo atualizar. (Isso se não houver códigos que foram alterados/tornados obsoletos em versões majors do EXILED) -Isso também permite que desenvolvedores de plug-in não precisem atualizar seus códigos sempre que houver uma atualização do Exiled ou SCP:SL. Na realidade, eles nem precisarão atualizar seus plug-ins! +O guia a seguir irá te ensinar o básico de como criar seu primeiro plugin! -Esse documento mostrará a você os básicos de como se fazer um Plug-in para o Exiled. A partir daqui, você poderá mostrar ao mundo as coisas criativas que você pode criar com essa framework! +### Guia +O [Plug-in de Exemplo](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Example) mostra o que são eventos e como criar eles de forma correta. Usar esse exemplo ajudará você a aprender a como usar o Exiled apropriadamente. Dentro desse existem elementos que são importantes, portanto acompanhe o código durante o tutorial. -### Exemplo de Plug-in -Um [Exemplo de Plug-in](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Example) que é um plug-in simples que mostra eventos e como fazer eles adequadamente. Usar esse exemplo ajudará você a aprender a como usar o Exiled apropriadamente. Há alguns aspectos nesse plug-in que são importantes, falaremos sobre eles. +#### ``OnEnable`` e ``OnDisable``+ Atualizações Dinâmicas +O EXILED possuí um comando chamado **Reload**, que recarrega todos os plug-ins instalados. -#### Atualizações Dinâmicas em On Enable + On Disable -Exiled é uma framework que tem um comando de **Reload** que pode ser usado para recarregar todos os plug-ins e obter novos. Isso significa que você deve fazer com que seus plug-ins sejam **Dinamicamente Atualizáveis.** Isso significa que toda variável, evento, corrotina, etc *deve* ser atribuída quando ativada e anulada quando desativada. O método **On Enable** deve ativar todos, e o método **On Disable** deve desativar todos. Mas talvez você esteja se perguntando 'E o **On Reload**'? Essa função tem como objetivo carregar variáveis estáticas para que toda constante estática que você fizer não seja apagada. Então você poderia fazer algo assim: +Ele funciona desativando o plugin e ativando-o novamente, além de chamar a função ``OnReload`` que entraremos em detalhes abaixo. + +Lembrando que toda variável, evento, corrotina, etc. *deve* ser atribuído ou criado quando o plugin é ativado e anulada quando o mesmo é desativado. + +> [!IMPORTANT] +> Você **DEVE** usar o método ``OnEnable`` para ativar o Plug-in, e ``OnDisable`` desativa-lo. + +Mas talvez você deve estar se perguntando: "Mas então para que serve o ``OnReload``?" Essa função tem como objetivo recarregar as variáveis estáticas de dentro do seu plugin. Então você poderia fazer algo assim: ```csharp public static int StaticCount = 0; public int counter = 0; @@ -24,13 +31,13 @@ public override void OnEnable() { counter = StaticCount; counter++; - Info(counter); + Log.Info(counter); } public override void OnDisable() { counter++; - Info(counter); + Log.Info(counter); } public override void OnReload() @@ -41,34 +48,46 @@ public override void OnReload() E o resultado seria: ```bash -# On enable fires +# O servidor é iniciado... +# OnEnable é chamado. 1 -# Reload command -# On Disable fires +# Comando Reload é executado por alguém... +# OnDisable é chamado. 2 -# On Reload fires -# On Enable fires again +# OnReload é chamado. +"counter" é guardado dentro de "StaticCount" +# E então OnEnabled é chamado novamente. 3 ``` -(Claro, excluindo qualquer coisa além das respostas reais) -Sem fazer isso, teria ido apenas para o 1 e então para o 2 novamente. +Sem fazer isso, teria apenas mostrado no console ``1`` e então para o ``2`` novamente. ### Jogadores + Eventos -Agora que terminamos de fazer com que nossos plug-ins sejam **Dinamicamente Atualizáveis**, podemos focar em tentar interagir com jogadores por meio de eventos! +Agora que entendemos como os métodos de entrada/inicializaçãos dos plug-ins funcionam, podemos focar em como interagir com jogadores por meio de eventos! + +Um evento é uma forma do jogo notificar seu plug-in quando algo acontece, por exemplo quando um jogador entrar, tomar dano, morrer, etc. -Um evento é bem interessante, ele permite com que o SCP:SL se comunique com o Exiled e depois com o Exiled para todos os plug-ins! +> [!IMPORTANT] +> Você **PRECISA** referenciar o arquivo `Exiled.Events.dll` para que você consiga usar os eventos. (Ou apenas baixe o pacote [Nuget do Exiled](https://www.nuget.org/packages/ExMod.Exiled)!) + +Para começar a ouvir um evento, iremos utilizar uma nova classe chamada "EventHandlers", que irá gerenciar nossos eventos. + +Na classe EventHandlers: -Você pode ouvir os eventos do seu plug-in adicionando isso à parte superior do arquivo de origem do plug-in principal: ```csharp -using EXILED; +public class EventHandlers +{ + public void PlayerVerified(VerifiedEventArgs ev) + { + // Códigos 1 + // Códigos 2 + // Códigos 3 + } +} ``` -E então você precisa referenciar o arquivo `Exiled.Events.dll` para que você realmente obtenha eventos. -Para referenciar um evento, nós estaremos utilizando uma nova classe que criamos; denominada "EventHandlers". O gerenciador de eventos não é fornecido por padrão; você deve criá-lo. - -Nós podemos referenciá-lo no void OnEnable e OnDisable assim: +E depois nós podemos referenciá-lo no ``OnEnable`` e ``OnDisable`` desse jeito: `MainClass.cs` ```csharp @@ -76,50 +95,37 @@ using Player = Exiled.Events.Handlers.Player; public EventHandlers EventHandler; -public override OnEnable() +public override void OnEnable() { - // Registre a classe de gerenciador de evento. E adicione o evento - // ao ouvinte de eventos 'EXILED_Events' para que obtenhamos o evento. EventHandler = new EventHandlers(); + // += significa que você vai estar se atribuindo ao evento, que nesse caso você vai ouvir toda vez que ele for chamado. Player.Verified += EventHandler.PlayerVerified; } -public override OnDisable() +public override void OnDisable() { - // Torne-o dinamicamente atualizável. - // Fazemos isso ao remover o ouvinte para o evento e então anulando o gerenciador de eventos. - // Esse processo deve ser repetido para cada evento. + // Precisamos desatribuir o evento e depois, anular o gerenciador de eventos. + // A linha abaixo deve ser repetida para cada evento. Player.Verified -= EventHandler.PlayerVerified; EventHandler = null; } ``` -E na classe EventHandlers, faríamos: +Agora toda vez que um jogador é autenticado após entrar no servidor podemos executar nosso código customizado! É importante destacar que todos eventos têm diferentes argumentos, e cada tipo tem propriedades diferentes associadas. -```csharp -public class EventHandlers -{ - public void PlayerVerified(VerifiedEventArgs ev) - { - - } -} -``` -Agora conseguimos nos conectar a um evento de jogador verificado que é executado sempre que um jogador é autenticado após entrar no servidor! É importante destacar que todos eventos têm diferentes argumentos de evento, e cada tipo de argumento de evento tem propriedades diferentes associadas. - -O EXILED já fornece uma função de aviso (broadcast), então a usaremos em nosso evento: +O EXILED já fornece uma função para enviar um broadcast, então a usaremos em nosso exemplo: ```csharp public class EventHandlers { public void PlayerVerified(VerifiedEventArgs ev) { - ev.Player.Broadcast(5, "Bem-vindo ao meu servidor maneiro!"); + ev.Player.Broadcast(5, "Bem-vindo(a) ao meu servidor!"); } } ``` -Como destacado acima, todo evento tem diferentes argumentos. Abaixo há um evento diferente que desliga os portões de Tesla para jogadores da Nine-Tailed Fox. +Outro exemplo seria um evento que desliga as Teslas para todos os MTFs. (Incluindo guardas) `MainClass.cs` ```csharp @@ -127,15 +133,15 @@ using Player = Exiled.Events.Handlers.Player; public EventHandlers EventHandler; -public override OnEnable() +public override void OnEnable() { EventHandler = new EventHandlers(); Player.TriggeringTesla += EventHandler.TriggeringTesla; } -public override OnDisable() +public override void OnDisable() { - // Não se esqueça, eventos devem ser desconectados e anulados no metódo Disable. + // Não se esqueça, eventos devem ser desatribuídos e anulados nesse metódo! Player.TriggeringTesla -= EventHandler.TriggeringTesla; EventHandler = null; } @@ -150,10 +156,10 @@ public class EventHandlers public void TriggeringTesla(TriggeringTeslaEventArgs ev) { // Desativa o evento para jogadores da equipe da Fundação. - // Isso pode ser feito ao verificar o lado (side) do jogador. + // Isso pode ser feito ao verificar o lado da classe (Player::Role.Side) do jogador. if (ev.Player.Role.Side == Side.Mtf) { - // Desative o acionamento da Tesla ao definir o ev.IsTriggerable para 'false'. - // Jogadores que tiverem uma patente na FTM não irão mais ativar portões de Tesla. + // Desative o acionamento da Tesla mudando o valor de 'ev.IsTriggerable' para 'false'. + // Lembrando que isso desabilita para todos os MTFs, incluindo Guardas! ev.IsTriggerable = false; } } @@ -162,33 +168,37 @@ public class EventHandlers ### Configurações -A maioria dos plug-ins do Exiled contém configurações. As configurações permitem que os gerentes de servidor modifiquem os plug-ins livremente, embora sejam limitadas à configuração que o desenvolvedor do plug-in fornece. +Grande partes dos plug-ins precisam de configurações, isso permite que os donos de servidores modifiquem-os livremente. -Primeiro crie uma classe `config.cs` e mude a herança do seu plug-in de `Plugin<>` para `Plugin` +Primeiro crie uma classe chmada `Config` e mude a herança do seu plug-in de `Plugin<>` para `Plugin` -Agora você precisa fazer essa configuração herdar `IConfig`. Após herdar de `IConfig`, adicione uma propriedade para a classe titulada como `IsEnabled` e `Debug`. Sua classe de Configuração agora deve se assemelhar a isso: +Agora você precisa fazer essa classe herdar `IConfig`, e depois implementar o contrato dela criando `IsEnabled` e `Debug`. Sua classe de Configuração agora deve se assemelhar a isso: ```csharp public class Config : IConfig { - public bool IsEnabled { get; set; } + public bool IsEnabled { get; set; } = true; // Se você não colocar "= true", o seu plugin não sera habilitado quando o servidor iniciar! public bool Debug { get; set; } } ``` -Você pode adicionar qualquer opção de configuração ali e referenciá-la assim: +Você pode adicionar qualquer opção de configuração e referenciá-la assim: `Config.cs` ```csharp public class Config : IConfig { - public bool IsEnabled { get; set; } + public bool IsEnabled { get; set; } = true; public bool Debug { get; set; } - public string TextThatINeed { get; set; } = "esse é o padrão"; + public string TextThatINeed { get; set; } = "Texto para testes"; } ``` +> [!NOTE] +> Você não precisa verificar se `IsEnabled == true` ou não, o Loader do Exiled já faz isso automaticamente. + `MainClass.cs` + ```csharp public override OnEnabled() { @@ -196,11 +206,11 @@ Você pode adicionar qualquer opção de configuração ali e referenciá-la ass } ``` -E parabéns! Você fez o seu primeiro Plug-in para o Exiled! É importante destacar que todos os plug-ins **devem** ter uma configuração IsEnabled. Essa configuração permite que donos de servidor ativem e desativem o plug-in quando quiserem. A configuração IsEnabled será lida pelo carregador do Exiled (seu plug-in não precisa verificar se `IsEnabled == true` ou não). +Pronto, você está preparado para fazer Plug-ins usando o Exiled! ### E agora? -Se você quiser mais informações, você deve entrar no nosso [discord!](https://discord.gg/PyUkWTg) +Se você quiser mais informações, entre no nosso [Servidor do Discord!](https://discord.gg/PyUkWTg) -Nós temos um canal de #resources que você pode considerar útil, assim como colaboradores do EXILED e desenvolvedores de plug-in que estariam dispostos a ajudá-lo na criação de seus plug-ins. +Nós temos um canal de recursos chamado ``#resources`` que você pode considerar útil, assim como vários outros desenvolvedores que iram te ajudar a desenvolver seus plug-ins! -Ou você poderia ler sobre todos os eventos que nós temos! Se você deseja verificá-los, veja [aqui!](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Events/EventArgs) +Ou você poderia ler sobre todos os eventos que nós temos! Bem [aqui](https://github.com/ExMod-Team/EXILED/tree/master/EXILED/Exiled.Events/EventArgs)! diff --git a/.github/documentation/localization/README-BR.md b/.github/documentation/localization/README-BR.md index e6f6102b89..410a92e58d 100644 --- a/.github/documentation/localization/README-BR.md +++ b/.github/documentation/localization/README-BR.md @@ -11,98 +11,114 @@ -O EXILED é uma estrutura para plug-ins de alto nível aos servidores de SCP: Secret Laboratory. Ele oferece um sistema de eventos para os desenvolvedores usarem com o intuito de manipular, alterar o código do jogo ou implementar suas próprias funções. -Todos os eventos do EXILED são codificados com Harmony, o que significa que não requerem edição direta dos Assemblies do servidor para funcionar, o que permite dois benefícios exclusivos. +EXILED é um Framework de alto nível para a criação de plug-ins direcionado a servidores de SCP: Secret Laboratory. Ele oferece um sistema de eventos para os desenvolvedores, com o objetivo de manipular, alterar ou implementar suas próprias funcionalidades no jogo. +Todos os eventos do EXILED são feitos com [Harmony](https://harmony.pardeike.net/articles/intro.html), o que significa que não requerem edição direta dos Assemblies/Código Base do servidor para funcionar, permitindo dois benefícios: - - Em primeiro lugar, todo o código da estrutura pode ser publicado e compartilhado livremente, permitindo que os desenvolvedores entendam melhor *como* ele funciona, além de oferecer sugestões para adicionar ou alterar suas funções. - - Em segundo lugar, como todo o código relacionado à estrutura é feito fora da Assembly do servidor, coisas como pequenas atualizações do jogo terão pouco ou nenhum efeito na framework, tornando-a mais compatível com futuras atualizações do jogo, além de facilitar a atualização quando *for* necessário fazê-la. + - Todo o código do Framework pode ser publicado e compartilhado livremente, permitindo que os desenvolvedores entendam melhor *como* funciona, além de poderem sugerir adições ou alterações. + - Todo o código relacionado ao framework é executado fora do assembly do servidor, significando que pequenas atualizações do jogo provavelmente não causarão efeitos colaterais. Isso torna o projeto mais compatível, além de facilitar quando for necessário atualizá-lo. # Instalação -A instalação do EXILED é bastante simples. Ele se carrega por meio da API de plug-in da NW. É por isso que existem duas pastas dentro de ``Exiled.tar.gz`` nos arquivos de lançamento. ``SCP Secret Laboratory`` contém os arquivos necessários para carregar os recursos do EXILED na pasta ``EXILED``. Com isso dito, tudo o que você precisa fazer é mover essas duas pastas para o caminho adequado que é explicado abaixo, e pronto! +A instalação do EXILED é bem simples e você pode escolher entre dois tipos: ``Automática`` e ``Manual``. -Se você optar por usar o instalador, se executado corretamente, ele cuidará de instalar todos os recursos do EXILED. +Na instalação automática, o instalador cuidará de baixar todos os recursos e arquivos para que o EXILED funcione. + +Já na manual, você faz o download do ``Exiled.tar.gz`` nos arquivos do release, e há duas pastas dentro. +``SCP Secret Laboratory`` contém os arquivos necessários para carregar os recursos do EXILED de dentro da pasta ``EXILED``. Com isso em mente, tudo o que você precisa fazer é mover essas duas para o caminho adequado e pronto! + +Abaixo entraremos em mais detalhes... # Windows -### Instalação automática ([mais informações](https://github.com/ExMod-Team/EXILED/blob/master/EXILED/Exiled.Installer/README.md)) -**Nota**: Verifique se você está conectado ao usuário que executa o servidor ou se possui privilégios de administrador antes de executar o Instalador. +> [!IMPORTANT] +> Verifique se você está conectado no mesmo usuário do Windows que está executando o servidor ou se possui privilégios de administrador antes de executar o Instalador. - - Baixe o **`Exiled.Installer-Win.exe` [daqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> clique no Instalador) - - Coloque-o na pasta do seu servidor (baixe o servidor dedicado, caso não o tenha feito) +### Instalação automática ([mais informações](https://github.com/ExMod-Team/EXILED/blob/master/EXILED/Exiled.Installer/README.md)) + - Baixe **`Exiled.Installer-Win.exe` [aqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> clique no instalador) + - Coloque-o na pasta do seu servidor (Ele precisa estar dentro da pasta de um servidor "dedicado", caso não tenha siga [esse guia](https://techwiki.scpslgame.com/books/server-guides/page/1-how-to-create-a-dedicated-server)) - Clique duas vezes em **`Exiled.Installer.exe`** ou **[baixe este .bat](https://www.dropbox.com/scl/fi/7yh0r3q0vdn6ic4rhuu3l/install-prerelease.bat?rlkey=99fwjbwy1xg61qgtak0qzb9rd&st=8xs4xks8&dl=1)** e coloque-o na pasta do servidor para instalar o pré-lançamento mais recente - - Para instalar e obter plug-ins, confira a seção [Instalando plug-ins](#installing-plugins) abaixo. -**Nota:** Se você estiver instalando o EXILED em um servidor remoto, certifique-se de executar o .exe como o mesmo usuário que executa seus servidores de SCP:SL (ou um com privilégios de administrador) + - Para instalar e obter plug-ins, confira a secção [Instalando plug-ins](https://github.com/ExMod-Team/EXILED/edit/master/.github/documentation/localization/README-BR.md#instala%C3%A7%C3%A3o-manual). ### Instalação manual - - Baixe o **`Exiled.tar.gz` [daqui](https://github.com/ExMod-Team/EXILED/releases)** - - Extraia seus conteúdos com [7Zip](https://www.7-zip.org/) ou [WinRar](https://www.win-rar.com/download.html?&L=6) - - Mova a pasta **``EXILED``** para **`%appdata%`** *Note: Esta pasta precisa ir ao diretório ``C:\Users\%NomeDoUsuário%\AppData\Roaming``, e ***NÃO*** ao ``C:\Users\%NomeDoUsuário%\AppData\Roaming\SCP Secret Laboratory``, e **DEVE** estar em (...)\AppData\Roaming, não (...)\AppData\!* + - Baixe o **`Exiled.tar.gz` [aqui](https://github.com/ExMod-Team/EXILED/releases)** + - Extraia o conteúdo com [7Zip](https://www.7-zip.org/) ou [WinRar](https://www.win-rar.com/download.html?&L=6) + > [!CAUTION] + > As pastas a seguir precisam estar em ``C:\Users\%NomeDoUsuário%\AppData\Roaming``, e ***NÃO*** ``C:\Users\%NomeDoUsuário%\AppData\Roaming\SCP Secret Laboratory``. + - Mova a pasta **``EXILED``** para **`%appdata%`** - Mova **``SCP Secret Laboratory``** para **`%appdata%`**. - - Windows 10 e 11: - Escreva `%appdata%` na Cortana / no ícone de pesquisa ou na barra do Windows Explorer - - Qualquer outra versão do Windows: + - **Windows 10 e 11**: + Escreva `%appdata%` na Cortana, no ícone de pesquisa ou na barra do Windows Explorer + - **Outras versões do Windows**: Pressione Win + R e digite `%appdata%` ### Instalando plug-ins -É isso, o EXILED agora deve estar instalado e ativo na próxima vez que você inicializar seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins no **[nosso servidor do Discord](https://discord.gg/PyUkWTg)** +O EXILED agora deve estar instalado e ativo na próxima vez que você iniciar o seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins em **[nosso servidor do Discord](https://discord.gg/PyUkWTg)!** - Para instalar um plug-in, basta: - - Baixar um plug-in da [página de lançamentos *deles*](https://i.imgur.com/u34wgPD.jpg) (**DEVE ser um `.dll`!**) - - Mova-o para: ``C:\Users\%NomeDoUsuário%\AppData\Roaming\EXILED\Plugins`` (mova-se para cá pressionando Win + R e, em seguida, escrevendo `%appdata%`) + - Baixar um plug-in da [página de lançamentos *deles*](https://i.imgur.com/u34wgPD.jpg) (**PRECISA ser um `.dll`!**) + - Mova-o para: ``C:\Users\%NomeDoUsuário%\AppData\Roaming\EXILED\Plugins`` # Linux -### Instalação automática ([mais informações](https://github.com/ExMod-Team/EXILED/blob/master/EXILED/Exiled.Installer/README.md)) +> [!IMPORTANT] +> Certifique-se de executar o instalador como o mesmo usuário (ou root) que executa seus servidores de SCP:SL. -**Nota:** Se você estiver instalando o EXILED em um servidor remoto, certifique-se de executar o instalador como o mesmo usuário que executa seus servidores de SCP:SL (ou root) - - - Baixe o **`Exiled.Installer-Linux` [daqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> baixe o Instalador) - - Instale-o digitando **`./Exiled.Installer-Linux --path /path/to/server`** ou mova-o diretamente para dentro da pasta do servidor, mova para ele com o terminal(`cd`) e digite: **`./Exiled.Installer-Linux`**. - - Se você quiser o último pré-lançamento, simplesmente adicione **`--pre-releases`**. Exemplo: **`./Exiled.Installer-Linux /home/scp/server --pre-releases`** - - Outro exemplo, se você colocou `Exiled.Installer-Linux` na pasta do seu servidor: **`/home/scp/server/Exiled.Installer-Linux --pre-releases`** - - Para instalar e obter plug-ins, confira a seção [Instalando plug-ins](#installing-plugins-1) abaixo. +### Instalação automática ([mais informações](https://github.com/ExMod-Team/EXILED/blob/master/EXILED/Exiled.Installer/README.md)) +> [!CAUTION] +> Não esqueça de usar o ``chmod`` para dar as permissões necessárias para o instalador e executar o servidor dedicado pelo menos uma vez! + - Baixe o **`Exiled.Installer-Linux` [aqui](https://github.com/ExMod-Team/EXILED/releases)** (clique em Assets -> baixe o Instalador) + - Mova-o diretamente para dentro da pasta do servidor e digite: **`./Exiled.Installer-Linux`** ou, passe diretamente o caminho usando o comando: **`./Exiled.Installer-Linux --path /path/to/server`** + - Para instalar e obter plug-ins, confira a secção [Instalando plug-ins](https://github.com/ExMod-Team/EXILED/edit/master/.github/documentation/localization/README-BR.md#instalando-plug-ins-1). ### Instalação manual - - **Tenha certeza** de que você está conectado ao usuário que executa os servidores de SCP. - - Baixe o **`Exiled.tar.gz` [daqui](https://github.com/ExMod-Team/EXILED/releases)** (SSH: clique com o botão direito do mouse para receber o link do `Exiled.tar.gz` e então digite: **`wget (link_para_baixar)`**) + - Baixe o **`Exiled.tar.gz` [aqui](https://github.com/ExMod-Team/EXILED/releases)** (SSH: clique com o botão direito do mouse para copiar o link do `Exiled.tar.gz` e então digite: **`wget (link_para_baixar)`**) - Para extraí-lo à sua pasta atual, digite **``tar -xzvf EXILED.tar.gz``** - - Mova a pasta **`EXILED`** para **``~/.config``**. *Nota: Esta pasta precisa ir ao diretório ``~/.config``, e ***NÃO*** ``~/.config/SCP Secret Laboratory``* (SSH: **`mv EXILED ~/.config/`**) - - Mova a pasta **`SCP Secret Laboratory`** para **``~/.config``**. *Nota: Esta pasta precisa ir ao diretório ``~/.config``, e ***NÃO*** ``~/.config/SCP Secret Laboratory``* (SSH: **`mv SCP Secret Laboratory ~/.config/`**) + +> [!CAUTION] +> As pastas precisam ir para o diretório ``~/.config``, e ***NÃO*** ``~/.config/SCP Secret Laboratory``* + + - Mova a pasta **`EXILED`** para **``~/.config``**. (SSH: **`mv EXILED ~/.config/`**) + - Mova a pasta **`SCP Secret Laboratory`** para **``~/.config``**. (SSH: **`mv "SCP Secret Laboratory" ~/.config/`**) ### Instalando plug-ins -É isso, o EXILED agora deve estar instalado e ativo na próxima vez que você inicializar seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins no **[nosso servidor do Discord](https://discord.gg/PyUkWTg)** +O EXILED agora deve estar instalado e ativo na próxima vez que você inicializar seu servidor. Observe que o EXILED sozinho não fará quase nada, portanto, certifique-se de obter novos plug-ins em **[nosso servidor do Discord](https://discord.gg/PyUkWTg)!** - Para instalar um plug-in, basta: - Baixar um plug-in da [página de lançamento *deles*](https://i.imgur.com/u34wgPD.jpg) (**DEVE ser um `.dll`!**) - - Mova-o para: ``~/.config/EXILED/Plugins`` (se você utiliza SSH como root, então procure pela `.config` correta, que estará dentro de `/home/(Usuário do Servidor de SCP)`) + - Mova-o para: ``~/.config/EXILED/Plugins`` (se você utiliza SSH como root, procure pela `.config` correta, que estará dentro de `/home/(Usuário do Servidor de SCP)`) # Configuração O EXILED por si só oferece algumas opções de configuração. Todas elas são geradas automaticamente na inicialização do servidor e estão localizadas no arquivo ``~/.config/EXILED/Configs/(PortaDoServidorAqui)-config.yml`` (``%AppData%\EXILED\Configs\(PortaDoServidorAqui)-config.yml`` no Windows). -As configurações do plug-in ***NÃO*** estarão no arquivo ``config_gameplay.txt`` supracitado, em vez disso, as configurações do plug-in são definidas no arquivo ``~/.config/EXILED/Configs/(PortaDoServidor)-config.yml`` (``%AppData%\EXILED\(PortaDoServidor)-config.yml`` no Windows). -No entanto, alguns plug-ins podem obter suas configurações de outros locais por conta própria. Esta é simplesmente a localização padrão do EXILED para eles, portanto, consulte o criador do plug-in se houver problemas. +As configurações dos plug-ins ***NÃO*** estarão no arquivo ``config_gameplay.txt``! +Em vez disso, você encontrará no arquivo ``~/.config/EXILED/Configs/(porta_do_servidor)-config.yml`` (``%AppData%\EXILED\Configs\(porta_do_servidor)-config.yml`` no Windows). + +> [!NOTE] +> Em versões mais recentes do EXILED, as configs dos plug-ins foram movidas para pastas próprias: ``EXILED\Configs\(nome_do_plugin)``. Você pode mudar esse comportamento +> editando a configuração do Loader em: ``SCP Secret Laboratory\LabAPI\configs\global\Exiled.Loader`` (ou ``SCP Secret Laboratory\LabAPI\configs\(porta_do_servidor)\Exiled.Loader``) + +No entanto, alguns plug-ins podem gerar suas configurações em outros locais por conta própria. Este é simplesmente o local padrão do EXILED para esses arquivos, portanto, consulte o criador do plug-in se houver problemas. # Para Desenvolvedores -Se você deseja fazer um plug-in ao EXILED, é bem simples de fazê-lo. Se você quiser ver algum tipo de tutorial, visite nosso [Manual de Instruções.](GettingStarted-BR.md) +Se você deseja fazer um plug-in com o EXILED, é bem simples. Caso queira ver um tutorial, visite nosso [Manual de Instruções.](GettingStarted-BR.md) Para tutoriais mais abrangentes e ativamente atualizados, consulte [o site da EXILED](https://exmod-team.github.io/EXILED/). Mas certifique-se de seguir estas regras ao publicar seus plug-ins: - Seu plug-in deve conter uma classe herdada de ``Exiled.API.Features.Plugin<>``, caso contrário, o EXILED não carregará seu plug-in quando o servidor iniciar. - - Quando um plug-in é carregado, o código dentro do método ``OnEnabled()`` da classe supracitada é acionado imediatamente, ele não espera que outros plug-ins sejam carregados. Ele não espera a conclusão do processo de inicialização do servidor. ***Ele não espera por nada.*** Ao configurar seu método ``OnEnable()``, certifique-se de não estar acessando coisas que ainda não foram inicializadas pelo servidor, como ``ServerConsole.Port``, ou ``PlayerManager.localPlayer``. - - Se você precisar acessar coisas que não foram inicializadas antes do carregamento do plug-in, é recomendável simplesmente aguardar o evento ``WaitingForPlayers`` para fazê-lo, se por algum motivo precisar fazer as coisas antes, envolva o código em um loop ``` while(!x)``` que verifica se a variável/objeto que você precisa não é mais *null* antes de continuar. + - Quando um plug-in é carregado, o código dentro do método ``OnEnabled()`` da classe é chamado imediatamente (Dependendo do ``Exiled.API.Features.Plugin<>::PluginPriority``) + - Se você precisar acessar algo que ainda não foi inicializado antes do carregamento do plug-in, recomendamos simplesmente ouvir o evento ``WaitingForPlayers``. Se por algum motivo você precisar fazer isso antes, coloque o código dentro de um loop ```while (!x)``` onde verifica se a variável/objeto que você precisa não é mais *null* antes de continuar. - O EXILED suporta o recarregamento dinâmico de Assemblies de plug-ins no meio da execução. Isso significa que, se você precisar atualizar um plug-in, isso pode ser feito sem reiniciar o servidor, no entanto, se você estiver atualizando um plug-in no meio da execução, o plug-in precisa ser configurado corretamente para suportá-lo, ou você terá um sério problema. Consulte a seção ``Atualizações Dinâmicas`` para mais informações e orientações a seguir. - - **NÃO** há evento OnUpdate, OnFixedUpdate ou OnLateUpdate no EXILED. Se você precisar, por algum motivo, executar o código com frequência, poderá usar uma corrotina MEC que espera por um quadro, 0.01f, ou usar uma camada de Timing como Timing.FixedUpdate. + - **NÃO** há evento OnUpdate, OnFixedUpdate ou OnLateUpdate no EXILED. Se você precisar, por algum motivo, executar o código com frequência, poderá usar uma corrotina MEC que espera por um quadro, 0.01f, ou usar um segmento de Timing como ``Timing.FixedUpdate``. ### Desativando patches de evento do EXILED ***Atualmente, esta função não está mais implementada.*** -### Corrotinas MEC +### Corrotinas do MEC Se você não estiver familiarizado com o MEC, este será um guia muito breve e simples para você começar. -Corrotinas MEC são basicamente métodos cronometrados que suportam períodos de espera antes de continuar a execução, sem interromper/suspender o alinhamento (thread) principal do jogo. -As corrotinas MEC são seguras para usar com o Unity, ao contrário do alinhamento tradicional. ***NÃO tente criar novos alinhamentos para interagir com o Unity, eles VÃO travar o servidor.*** +As corrotinas do MEC são basicamente métodos temporizados que suportam períodos de espera antes de continuar a execução, sem interromper/suspender a thread principal do jogo. +Elas são seguras para usar com o Unity, ao contrário do threading tradicional. ***NÃO tente criar NOVAS THREADS para interagir com o Unity, isso irá travar o servidor!!!*** Para usar o MEC, você precisará referenciar ``Assembly-CSharp-firstpass.dll`` dos arquivos do servidor e incluir ``using MEC;``. -Exemplo de chamada de uma corrotina simples, que se repete com um atraso entre cada ciclo: +Exemplo de criação de uma corrotina simples, que se repete com um atraso a cada ciclo: ```cs using MEC; using Exiled.API.Features; @@ -116,24 +132,24 @@ public IEnumerator MyCoroutine() { for (;;) //Repete o evento seguinte por tempo indefinido { - Log.Info("Ei, eu sou um ciclo infinito!"); //Designar Log.Info para reproduzir uma linha nos registros do console/servidor do jogo. + Log.Info("Ei, eu sou um ciclo infinito!"); // Usado para reproduzir uma linha nos registros do console/servidor do jogo. yield return Timing.WaitForSeconds(5f); //Diz à corrotina para esperar 5 segundos antes de continuar, e quando está no final do ciclo, efetivamente interrompe a repetição do ciclo por 5 segundos. } } ``` -É **altamente** recomendável que você pesquise no Google ou pergunte no Discord se não estiver familiarizado com o MEC e quiser aprender mais, obter conselhos ou precisar de ajuda. As perguntas, não importa o quão 'estúpidas' sejam, sempre serão respondidas da maneira mais útil e clara possível para que os desenvolvedores de plug-ins se destaquem. Um bom código é melhor para todos. +É **altamente** recomendável que você pesquise no Google ou pergunte no Discord se não estiver familiarizado com o MEC e quiser aprender mais, obter conselhos ou precisar de ajuda. As perguntas, não importa o quão 'estúpidas' sejam, sempre serão respondidas da maneira mais útil e clara possível. Um bom código é melhor para todos. ### Atualizações Dinâmicas -O EXILED como uma estrutura suporta o recarregamento dinâmico de Assemblies de plug-ins sem exigir uma reinicialização do servidor. -Por exemplo, se você iniciar o servidor apenas com `Exiled.Events` como o único plug-in e desejar adicionar um novo, não será necessário reiniciar o servidor para concluir esta tarefa. Você pode simplesmente usar o comando do RemoteAdmin/ServerConsole `reload plugins` para recarregar todos os plug-ins do EXILED, incluindo os novos que não foram carregados antes. +O EXILED como uma estrutura suporta o recarregamento dinâmico de Assemblies de plug-ins sem precisar reiniciar o servidor. +Por exemplo, apenas com `Exiled.Events` como o único plug-in e depois você deseja adicionar um novo, não será necessário reiniciar o servidor. Você pode simplesmente usar o comando do RemoteAdmin/ServerConsole `reload plugins` para recarregar todos os plug-ins do EXILED, incluindo os novos que não foram carregados antes. Isso também significa que você pode *atualizar* os plug-ins sem precisar reinicializar totalmente o servidor. No entanto, existem algumas diretrizes que devem ser seguidas pelo desenvolvedor do plug-in para que isso seja realizado corretamente: ***Para Hosters*** - Se você estiver atualizando um plug-in, certifique-se de que o nome do Assembly não seja o mesmo da versão atual que você instalou (se houver uma). O plug-in deve ser construído pelo desenvolvedor com atualizações dinâmicas em mente para que isso funcione, simplesmente renomear o arquivo não basta. - Se o plug-in suporta Atualizações Dinâmicas, certifique-se de que, ao colocar a versão mais recente do plug-in na pasta "Plugins", você também remova a versão mais antiga da pasta, antes de recarregar o EXILED; a falha em garantir isso resultará em muitos problemas indesejados. - - Quaisquer problemas decorrentes da Atualização Dinâmica de um plug-in são de sua exclusiva responsabilidade e do desenvolvedor do plug-in em questão. Embora o EXILED suporte e incentive totalmente as Atualizações Dinâmicas, a única maneira de isso falhar ou dar errado é se o anfitrião do servidor ou o desenvolvedor do plug-in fizer algo errado. Verifique três vezes se tudo foi feito corretamente por ambas as partes antes de relatar um erro aos desenvolvedores da EXILED em relação às Atualizações Dinâmicas. + - Quaisquer problemas decorrentes da Atualização Dinâmica de um plug-in são de sua exclusiva responsabilidade e do desenvolvedor do plug-in em questão. Embora o EXILED suporte e incentive totalmente as Atualizações Dinâmicas, a única maneira de isso falhar ou dar errado é se o dono do servidor ou o desenvolvedor do plug-in fizer algo errado. Verifique três vezes se tudo foi feito corretamente por ambas as partes antes de relatar um erro aos desenvolvedores da EXILED em relação às Atualizações Dinâmicas. ***Para Desenvolvedores*** @@ -141,14 +157,14 @@ Isso também significa que você pode *atualizar* os plug-ins sem precisar reini - Os plug-ins que possuem patches personalizados do Harmony devem usar algum tipo de variável mutável no nome da instância do Harmony e devem usar UnPatchAll() em sua instância do Harmony quando o plug-in for desativado ou recarregado. - Quaisquer corrotinas iniciadas pelo plug-in em ``OnEnabled()`` também devem ser eliminadas quando o plug-in for desativado ou recarregado. -Tudo isso pode ser realizado nos métodos ``OnReloaded()`` ou ``OnDisabled()`` na classe do plug-in. Quando o EXILED recarrega os plug-ins, ele designa OnDisabled(), então ``OnReloaded()``, então ele carregará nos novos Assemblies, e então executará ``OnEnabled()``. +Tudo isso pode ser realizado nos métodos ``OnReloaded()`` ou ``OnDisabled()`` na classe do plug-in. Quando o EXILED recarrega os plug-ins, ele chama ``OnDisabled()``, então ``OnReloaded()``, então ele carregará nos novos Assemblies, e então executará ``OnEnabled()``. Observe que eu disse *novos* Assemblies. Se você substituir um Assembly por outro com o mesmo nome, ele ***NÃO*** será atualizado. Isso se deve ao GAC (Global Assembly Cache), se você tentar 'carregar' um Assembly que já está no cache, ele sempre usará o Assembly em cache. Por esse motivo, se o seu plug-in oferecer suporte a Atualizações Dinâmicas, você deverá criar cada versão com um nome de Assembly diferente nas opções de compilação (renomear o arquivo não funcionará). Além disso, como o Assembly antigo não é "destruído" quando não é mais necessário, se você não cancelar a assinatura de eventos, desfazer o patch de sua instância de Harmony, eliminar corrotinas, etc., esse código continuará a ser executado, bem como o código da nova versão. -Esta é uma péssima, bem péssima situação para se deixar ocorrer. +Esta é uma situação muito ruim para se deixar acontecer. -Como tal, os plug-ins que oferecem suporte a Atualizações Dinâmicas ***DEVEM*** seguir estas diretrizes ou serão removidos do servidor do Discord devido ao risco potencial para os anfitriões de servidor. +Como tal, os plug-ins que oferecem suporte a Atualizações Dinâmicas ***DEVEM*** seguir estas diretrizes ou serão removidos do servidor do Discord devido ao risco potencial para os donos de servidor. -Mas nem todo plug-in tem de oferecer suporte a Atualizações Dinâmicas. Se você não pretende oferecer suporte a Atualizações Dinâmicas, tudo bem, simplesmente não altere o nome do Assembly do seu plug-in ao criar uma nova versão e não precisará se preocupar com nada disso, apenas certifique-se de que os anfitriões de servidor saibam que eles precisarão reinicializar completamente seus servidores para atualizar seu plug-in. +Mas nem todo plug-in tem de oferecer suporte a Atualizações Dinâmicas. Se você não pretende oferecer suporte a Atualizações Dinâmicas, tudo bem, simplesmente não altere o nome do Assembly do seu plug-in ao criar uma nova versão e não precisará se preocupar com nada disso, apenas certifique-se de que os donos de servidor saibam que eles precisarão reinicializar completamente seus servidores para atualizar seu plug-in. -**Tradução brasileira feita por**: *Firething* +**Tradução para o português feita por**: *Unbistrackted* e *Firething* diff --git a/.github/documentation/localization/README-FR.md b/.github/documentation/localization/README-FR.md index 33ce9dbc25..8e24f5f5b5 100644 --- a/.github/documentation/localization/README-FR.md +++ b/.github/documentation/localization/README-FR.md @@ -30,7 +30,7 @@ Si vous choisissez d'utiliser l'installateur, il se chargera, s'il est exécuté - Placez-le dans le dossier de votre serveur (téléchargez le serveur dédié si vous ne l'avez pas encore fait) - Double-cliquez sur **`Exiled.Installer.exe`** ou **[téléchargez ce .bat](https://www.dropbox.com/scl/fi/7yh0r3q0vdn6ic4rhuu3l/install-prerelease.bat?rlkey=99fwjbwy1xg61qgtak0qzb9rd&st=8xs4xks8&dl=1)** et placez-le dans le dossier du serveur pour installer la dernière pré-version - Pour obtenir et installer des plugins, consultez la section [installation de plugin](#installation-de-plugin) ci-dessous. -**Note:** Si vous installez EXILED sur un serveur distant, assurez-vous d'exécuter le .exe avec même utilisateur qui exécute vos serveurs SCP:SL (ou un utilisateur avec des privilèges d'administration) +**Note:** Si vous installez EXILED sur un serveur distant, assurez-vous d'exécuter le .exe avec le même utilisateur qui exécute vos serveurs SCP:SL (ou un utilisateur avec des privilèges d'administration) ### Installation manuelle - Téléchargez **`Exiled.tar.gz` [ici](https://github.com/ExMod-Team/EXILED/releases)** @@ -67,13 +67,13 @@ C'est tout, EXILED devrait maintenant être installé et actif la prochaine fois - Déplacez le dossier **`SCP Secret Laboratory`** vers **``~/.config``**. *Remarque : Ce dossier doit être placé dans ``~/.config``, et ***NON*** ``~/.config/SCP Secret Laboratory``* (SSH: **`mv SCP Secret Laboratory ~/.config/`**) ### Installation de plugins -C'est tout, EXILED devrait maintenant être installé et actif la prochaine fois que vous démarrez votre serveur. Notez qu'EXILED par lui-même ne fera presque rien, alors assurez-vous d'obtenir des plugins depuis **[depuis notre serveur Discord](https://discord.gg/PyUkWTg)** +C'est tout, EXILED devrait maintenant être installé et actif la prochaine fois que vous démarrez votre serveur. Notez qu'EXILED par lui-même ne fera presque rien, alors assurez-vous d'obtenir des plugins depuis **[notre serveur Discord](https://discord.gg/PyUkWTg)** - Pour installer un plugin, simplement : - Téléchargez un plugin depuis [*sa page de release*](https://i.imgur.com/u34wgPD.jpg) (**il DOIT s'agir d'un fichier `.dll`!**) - Déplacez-le vers: ``~/.config/EXILED/Plugins`` (si vous utilisez SSH en tant que root, alors recherchez le `.config` correct qui sera à l'intérieur de `/home/(SCP Server User)`) # Config -EXILED quelques options de configuration. +EXILED offre quelques options de configuration. Toutes sont générées automatiquement au démarrage du serveur et se trouvent dans le fichier ``~/.config/EXILED/Configs/(ServerPortHere)-config.yml`` (``%AppData%\EXILED\Configs\(ServerPortHere)-config.yml`` sur Windows). Les configurations des plugins ***NE seront PAS*** dans le fichier ``config_gameplay.txt`` mentionné précédemment. Au lieu de cela, les configurations des plugins sont définies dans le fichier ``~/.config/EXILED/Configs/(ServerPortHere)-config.yml`` (``%AppData%\EXILED\(ServerPortHere)-config.yml`` sur Windows). @@ -87,14 +87,14 @@ Pour des tutoriels plus complets et régulièrement mis à jour, consultez [le s Mais veuillez faire attention à suivre les règles suivantes lorsque vous publiez vos plugins : -- Votre plugin doit contenir une classe appartenant à ``Exiled.API.Features.Plugin<>``, sinon EXILED ne chargera pas votre plugin lorsque le serveur démarrera. +- Votre plugin doit contenir une classe héritant de ``Exiled.API.Features.Plugin<>``, sinon EXILED ne chargera pas votre plugin lorsque le serveur démarrera. - Lorsqu'un plugin est chargé, le code de la classe mentionnée précédemment dans ``OnEnabled()`` est immédiatement exécuté et n'attend pas que les autres plugins soient chargés. Il n'attend pas non plus que le démarrage du serveur soit terminé. ***Il n'attend rien du tout.*** Lors de la mise en place de votre méthode ``OnEnabled()``, assurez-vous de ne pas accéder à des choses qui ne devraient pas être démarrées par le serveur à ce moment-là, comme par exemple ``ServerConsole.Port``, ou ``PlayerManager.localPlayer``. - Si vous avez besoin d'accéder à certaines choses avant que votre plugin ne soit chargé, il est recommandé d'attendre l'événement ``WaitingForPlayers`` pour cela. Sinon, encadrez votre code d'une boucle ``while(!x)`` qui vérifie si votre variable/objet qui a besoin de ne plus être ``NULL`` avant de continuer. -- EXILED prend en charge le rechargement dynamique des assembly de plugins en cours d'exécution, ce qui signifie que si vous devez mettre à jour un plugin, cela peut être fait sans redémarrer le serveur. Cependant, si vous mettez à jour un plugin en cours d'exécution, le plugin doit être correctement configuré pour le prendre en charge, sinon vous rencontrerez des problèmes. Consultez la section [Mise à jour Dynamiques](#mise-a-jour-dynamiques) pour plus d'informations et de directives à suivre. +- EXILED prend en charge le rechargement dynamique des assembly de plugins en cours d'exécution, ce qui signifie que si vous devez mettre à jour un plugin, cela peut être fait sans redémarrer le serveur. Cependant, si vous mettez à jour un plugin en cours d'exécution, le plugin doit être correctement configuré pour le prendre en charge, sinon vous rencontrerez des problèmes. Consultez la section [Mises à jour dynamiques](#mises-à-jour-dynamiques) pour plus d'informations et de directives à suivre. - Il n'y a ***AUCUN*** événement ``OnUpdate``, ``OnFixedUpdate`` ou ``OnLateUpdate`` dans EXILED. Si vous devez exécuter du code aussi souvent, vous pouvez utiliser des coroutines de MEC (ou More Effective Coroutines) qui attendent une frame, 0.01f, ou utiliser une couche de synchronisation comme ``Timing.FixedUpdate`` à la place. ### Les coroutines de MEC -Si vous n'êtes pas familier avec MEC, voici une breve et simple explication pour vous aider à démarrer. -Les coroutines MEC sont essentiellement des méthodes chronométrées qui prennent en charge des périodes d'attente avant de poursuivre l'exécution, sans interrompre/pausé le thread principal du jeu. +Si vous n'êtes pas familier avec MEC, voici une brève et simple introduction pour vous aider à démarrer. +Les coroutines MEC sont essentiellement des méthodes chronométrées qui prennent en charge des périodes d'attente avant de poursuivre l'exécution, sans interrompre ni mettre en pause le thread principal du jeu. Les coroutines MEC sont sûres à utiliser avec Unity, contrairement au threading traditionnel. ***NE TENTEZ PAS de créer de nouveaux threads pour interagir avec Unity, cela FERA planter le serveur.*** Pour utiliser MEC, vous devrez référencer ``Assembly-CSharp-firstpass.dll`` depuis les fichiers du serveur et inclure ``using MEC;``. @@ -111,9 +111,9 @@ public void SomeMethod() public IEnumerator MyCoroutine() { - for (;;) //fonctione infinie + for (;;) //répète ce qui suit indéfiniment { - Log.Info("Hey Je suis une boucle infini!"); //appel à Log.Info pour écrire une ligne sur la console du serveur. + Log.Info("Hey, je suis une boucle infinie!"); //appel à Log.Info pour écrire une ligne sur la console du serveur. yield return Timing.WaitForSeconds(5f); //Dit à la coroutine d'attendre 5 secondes avant de continuer. Comme c'est à la fin de la boucle, cela empêche effectivement la boucle de se répéter pendant 5 secondes. } } @@ -121,7 +121,7 @@ public IEnumerator MyCoroutine() Il est ***fortement*** recommandé de faire quelques recherches sur Google ou de demander autour de vous sur Discord si vous n'êtes pas familier avec MEC et que vous souhaitez en apprendre d'avantage, obtenir des conseils ou de l'aide. Les questions, aussi 'bêtes' soient-elles, seront toujours répondues de manière aussi utile et claire que possible pour aider les développeurs de plugins à exceller. Un meilleur code profite à tout le monde. -### Mise a jour Dynamiques +### Mises à jour dynamiques EXILED en tant que framework prend en charge le rechargement dynamique des assembly de plugins sans nécessité de redémarrage du serveur. Par exemple, si vous démarrez le serveur avec juste ``Exiled.Events`` comme seul plugin, et que vous souhaitez en ajouter un nouveau, vous n'avez pas besoin de redémarrer le serveur pour accomplir cette tâche. Vous pouvez simplement utiliser la commande de la console à distance ou de la console du serveur ``reload plugins`` pour recharger tous les plugins EXILED, y compris les nouveaux qui n'ont pas été chargés auparavant. @@ -137,7 +137,7 @@ Cela signifie également que vous pouvez *mettre à jour* les plugins sans avoir - Les plugins comportant des patches ``Harmony`` personnalisés doivent utiliser une sorte de variable changeante dans le nom de l'instance ``Harmony``, et doivent appeler ``UnPatchAll()`` sur leur instance Harmony lorsque le plugin est désactivé ou rechargé. - Toutes les coroutines démarrées par le plugin dans ``OnEnabled()`` doivent également être arrêtées lorsque le plugin est désactivé ou rechargé. -Tout cela peut être réalisé dans les méthodes ``OnReloaded()`` ou ``OnDisabled()`` de la classe du plugin. Lorsque EXILED, recharge les plugins, il appelle ``OnDisabled()``, puis ``OnReloaded()``, puis il chargera les nouvelles assembly, et ensuite exécutera ``OnEnabled()``. +Tout cela peut être réalisé dans les méthodes ``OnReloaded()`` ou ``OnDisabled()`` de la classe du plugin. Lorsque EXILED recharge les plugins, il appelle ``OnDisabled()``, puis ``OnReloaded()``, puis il chargera les nouvelles assembly, et ensuite exécutera ``OnEnabled()``. Notez qu'il s'agit de *nouvelles* assembly. Si vous remplacez une ``assembly`` par une autre portant le même nom, elle ne sera ***PAS*** mise à jour. Cela est dû au GAC (Global Assembly Cache) ; si vous tentez de "charger" une ``assembly`` qui est déjà en cache, elle utilisera toujours l'``assembly`` mise en cache. Pour cette raison, si votre plugin prend en charge les mises à jour dynamiques, vous devez construire chaque version avec un nom d'``assembly`` différent dans les options choisis (renommer le fichier ne fonctionnera pas). De plus, étant donné que l'ancienne ``assembly`` n'est pas "supprimé" lorsqu'elle n'est plus nécessaire, si vous ne vous désabonnez pas des événements, ne démontez pas votre instance ``Harmony``, n'arrêtez pas les coroutines, etc. Ce code continuera également à s'exécuter ainsi que celui de la nouvelle version. diff --git a/EXILED/.editorconfig b/EXILED/.editorconfig index b64d58c275..e5ab37f77f 100644 --- a/EXILED/.editorconfig +++ b/EXILED/.editorconfig @@ -19,10 +19,37 @@ ij_wrap_on_typing = false csharp_style_var_for_built_in_types = false:error csharp_style_var_when_type_is_apparent = false:error csharp_style_var_elsewhere = false:error +dotnet_diagnostic.IDE0005.severity = warning +dotnet_diagnostic.IDE0017.severity = warning +dotnet_diagnostic.IDE0019.severity = warning +dotnet_diagnostic.IDE0031.severity = warning +dotnet_diagnostic.IDE0048.severity = warning +dotnet_diagnostic.IDE0055.severity = warning +dotnet_diagnostic.IDE0060.severity = warning +dotnet_diagnostic.IDE0074.severity = warning +dotnet_diagnostic.IDE0079.severity = warning +dotnet_diagnostic.IDE0090.severity = warning +dotnet_diagnostic.IDE0200.severity = warning +dotnet_diagnostic.IDE0350.severity = warning +dotnet_diagnostic.IDE0370.severity = warning + +dotnet_diagnostic.IDE0028.severity = none +dotnet_diagnostic.IDE0034.severity = none +dotnet_diagnostic.IDE0056.severity = none +dotnet_diagnostic.IDE0057.severity = none +dotnet_diagnostic.IDE0290.severity = none +dotnet_diagnostic.IDE0300.severity = none +dotnet_diagnostic.IDE0301.severity = none +dotnet_diagnostic.IDE0302.severity = none +dotnet_diagnostic.IDE0303.severity = none +dotnet_diagnostic.IDE0304.severity = none dotnet_diagnostic.IDE0305.severity = none +dotnet_diagnostic.IDE0306.severity = none +dotnet_diagnostic.IDE0340.severity = none -# ReSharper properties -resharper_csharp_max_line_length = 400 +dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = true +csharp_using_directive_placement = inside_namespace [*.properties] ij_properties_align_group_field_declarations = false diff --git a/EXILED/EXILED.props b/EXILED/EXILED.props index 052935a2c5..9b69d1bb48 100644 --- a/EXILED/EXILED.props +++ b/EXILED/EXILED.props @@ -20,7 +20,7 @@ false 2.4.2 - 1.1.118 + 1.2.0-beta.556 2.0.2 Copyright © $(Authors) 2020 - $([System.DateTime]::Now.ToString("yyyy")) @@ -35,6 +35,7 @@ True True + True Portable diff --git a/EXILED/Exiled.API/Enums/AmmoType.cs b/EXILED/Exiled.API/Enums/AmmoType.cs index 506d3067de..5a9b19f74a 100644 --- a/EXILED/Exiled.API/Enums/AmmoType.cs +++ b/EXILED/Exiled.API/Enums/AmmoType.cs @@ -40,13 +40,13 @@ public enum AmmoType /// /// 12 gauge shotgun ammo. - /// Used by + /// Used by . /// Ammo12Gauge, /// /// 44 Caliber Revolver Ammo - /// Used by + /// Used by . /// Ammo44Cal, } diff --git a/EXILED/Exiled.API/Enums/AspectRatioType.cs b/EXILED/Exiled.API/Enums/AspectRatioType.cs index 79e4f4c96e..65d6005749 100644 --- a/EXILED/Exiled.API/Enums/AspectRatioType.cs +++ b/EXILED/Exiled.API/Enums/AspectRatioType.cs @@ -57,4 +57,4 @@ public enum AspectRatioType : byte /// Ratio32_9, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/CameraType.cs b/EXILED/Exiled.API/Enums/CameraType.cs index 292da90b2d..eb18b59633 100644 --- a/EXILED/Exiled.API/Enums/CameraType.cs +++ b/EXILED/Exiled.API/Enums/CameraType.cs @@ -166,4 +166,4 @@ public enum CameraType HczLoadingBayStairwell, #endregion } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/DamageType.cs b/EXILED/Exiled.API/Enums/DamageType.cs index bb6f2524d5..28c399b4e3 100644 --- a/EXILED/Exiled.API/Enums/DamageType.cs +++ b/EXILED/Exiled.API/Enums/DamageType.cs @@ -240,7 +240,7 @@ public enum DamageType A7, /// - /// Damage caused by + /// Damage caused by . /// Scp3114, @@ -289,4 +289,4 @@ public enum DamageType /// Scp1509, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/DanceType.cs b/EXILED/Exiled.API/Enums/DanceType.cs index 685c01ed00..94f5eaac16 100644 --- a/EXILED/Exiled.API/Enums/DanceType.cs +++ b/EXILED/Exiled.API/Enums/DanceType.cs @@ -48,7 +48,7 @@ public enum DanceType : byte Swing, /// - /// Dance1 + /// None. /// None = byte.MaxValue, } diff --git a/EXILED/Exiled.API/Enums/DecontaminationState.cs b/EXILED/Exiled.API/Enums/DecontaminationState.cs index c415a6750e..d821f75a5d 100644 --- a/EXILED/Exiled.API/Enums/DecontaminationState.cs +++ b/EXILED/Exiled.API/Enums/DecontaminationState.cs @@ -7,8 +7,6 @@ namespace Exiled.API.Enums { - using System; - using Features; /// @@ -57,4 +55,4 @@ public enum DecontaminationState /// Finish, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/DoorLockType.cs b/EXILED/Exiled.API/Enums/DoorLockType.cs index b876c24c11..28b5e5447f 100644 --- a/EXILED/Exiled.API/Enums/DoorLockType.cs +++ b/EXILED/Exiled.API/Enums/DoorLockType.cs @@ -74,4 +74,4 @@ public enum DoorLockType /// Lockdown2176 = 512, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/DoorType.cs b/EXILED/Exiled.API/Enums/DoorType.cs index 5e99c32a22..2df0eb8973 100644 --- a/EXILED/Exiled.API/Enums/DoorType.cs +++ b/EXILED/Exiled.API/Enums/DoorType.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Enums using System; using Exiled.API.Features.Doors; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.API/Enums/EffectCategory.cs b/EXILED/Exiled.API/Enums/EffectCategory.cs index c340fca101..cb8af3a988 100644 --- a/EXILED/Exiled.API/Enums/EffectCategory.cs +++ b/EXILED/Exiled.API/Enums/EffectCategory.cs @@ -39,4 +39,4 @@ public enum EffectCategory /// Harmful = 8, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/EffectType.cs b/EXILED/Exiled.API/Enums/EffectType.cs index dc79e7c481..0d2117d223 100644 --- a/EXILED/Exiled.API/Enums/EffectType.cs +++ b/EXILED/Exiled.API/Enums/EffectType.cs @@ -24,7 +24,7 @@ public enum EffectType None, /// - /// Prevents the player from reloading weapons and using medical items. + /// Prevents the affected player from reloading weapons and using medical items. /// AmnesiaItems, @@ -34,142 +34,142 @@ public enum EffectType AmnesiaVision, /// - /// Drains the player's stamina and then health. + /// Drains the affected player's stamina and then health. /// Asphyxiated, /// - /// Damages the player over time. + /// Damages the affected player over time. /// Bleeding, /// - /// Make the player screen darker. + /// Blurs the affected player's screen. /// Blindness, /// - /// Increases damage the player receives. Does not apply any standalone damage. + /// Increases damage the affected player receives. Does not apply any standalone damage. /// Burned, /// - /// Blurs the player's screen while rotating. + /// Blurs the affected player's screen while rotating. /// Concussed, /// - /// Effect given to player after being hurt by SCP-106. + /// Effect given to the affected player after being hurt by SCP-106. /// Corroding, /// - /// Deafens the player. + /// Muffles the affected player's audio. Does not scale with intensity. /// Deafened, /// - /// Removes 10% of the player's health per second. + /// Removes 10% of the affected player's health per second. /// Decontaminating, /// - /// Slows down the player's movement. + /// Slows down the affected player's movement. /// Disabled, /// - /// Prevents the player from moving. + /// Prevents the affected player from moving. /// Ensnared, /// - /// Halves the player's maximum stamina and stamina regeneration rate. + /// Halves the affected player's maximum stamina and stamina regeneration rate. /// Exhausted, /// - /// Flashes the player. + /// Flashes the affected player. /// Flashed, /// - /// Drains the player's health while sprinting. + /// Drains the affected player's health while sprinting. /// Hemorrhage, /// - /// Reduces the player's FOV, gives infinite stamina and gives the effect of underwater sound. + /// Increases the affected player's FOV very slightly, gives infinite stamina and gives the effect of underwater sound. /// Invigorated, /// - /// Reduces damage taken by body shots. + /// Reduces the affected player's damage taken by body shots. /// BodyshotReduction, /// - /// Damages the player every 5 seconds, starting low and increasing over time. + /// Damages the affected player every 5 seconds, starting low and increasing over time, capping out at 20 hp every 5 seconds. /// Poisoned, /// - /// Increases the speed of the player while also draining health. + /// Increases the speed of the affected player while also draining health, dependent on how fast the player is moving. /// Scp207, /// - /// Makes the player invisible. + /// Makes the affected player invisible. /// Invisible, /// - /// Slows down the player's movement with the SCP-106 sinkhole effect. + /// Slows the affected player's movement speed, adds vignette, and makes the affected player's footsteps the same as SCP106's. /// SinkHole, /// - /// Reduces overall damage taken. + /// Reduces the affected player's overall damage taken. /// DamageReduction, /// - /// Increases movement speed. + /// Increases the affected player's movement speed. /// MovementBoost, /// - /// Reduces the severity of negative effects. + /// Reduces the severity of the affected player's negative effects. /// RainbowTaste, /// - /// Drops the player's current item, disables interaction with objects, and deals damage while effect is active. + /// Drops the affected player's current item, disables interaction with objects, spawns hands that drop to the floor, and deals damage while effect is active. /// SeveredHands, /// - /// Prevents the player from sprinting and reduces movement speed by 20%. + /// Prevents the affected player from sprinting, plays a sound alongside their every footstep, reduces movement speed by 20%. /// Stained, /// - /// Causes the player to become gain immunity to certain negative status effects. + /// Causes the affected player to gain immunity to certain negative status effects. /// Vitality, /// - /// Cause the player to slowly take damage, reduces bullet accuracy, and increases item pickup time. + /// Cause the affected player to slowly take damage, reduces bullet accuracy, applies a blue vignette, plays a sound effect spanning the entire effect's length, and increases item pickup time. /// Hypothermia, /// - /// Increases the player's motor function, causing the player to reduce the weapon draw time, reload spead, item pickup speed, and medical item usage. + /// Increases the affected player's motor function, causing the affected player to reduce the weapon draw time, reload speed, item pickup speed, and medical item usage. /// Scp1853, /// - /// Effect given to player after being hurt by SCP-049. + /// Effect given to a player after being hurt by SCP-049. Deals 8 damage per second, after an initial 16 damage for the first second. /// CardiacArrest, @@ -184,90 +184,90 @@ public enum EffectType SoundtrackMute, /// - /// Protects players from enemy damage if the config is enabled. + /// Protects the affected player from enemy damage if the config is enabled. /// SpawnProtected, /// - /// Make Scp106 able to see you when he is in the ground (stalking), causes the player's screens to become monochromatic when seeing Scp106, and instantly killed if attacked by Scp106. + /// All players with the Scp106 role will be able to see the affected player whilst stalking. Causes the affected player's screens to become monochromatic when seeing Scp106. The affected player is instantly killed if attacked by Scp106. /// Traumatized, /// - /// It slows down the player, providing a passive health regeneration and saving the player from death once. + /// Slows the affected player, provides passive health regeneration and passive AHP gain up to 75, and can save the affected player from fatal damage once per effect. /// AntiScp207, /// - /// The effect that SCP-079 gives the scanned player with the Breach Scanner. + /// The effect applied by SCP-079's breach scanner. Mutes the affected player's soundtrack. /// Scanned, /// - /// Teleports the player to the pocket dimension and drains health until the player escapes or is killed. The amount of damage recieved increases the longer the effect is applied. + /// Teleports the affected player to the pocket dimension and drains their health until the affected player escapes the pocket dimension or is killed. The amount of damage received increases the longer the effect is applied. /// PocketCorroding, /// - /// Reduces walking sound by 10%. + /// Reduces the affected player's own movement sounds by 10% per intensity level. /// SilentWalk, /// /// Makes you a marshmallow guy. /// - // [Obsolete("Not functional in-game")] + [Obsolete("Only availaible for Halloween")] Marshmallow, /// - /// The effect that is given to the player when getting attacked by SCP-3114's Strangle ability. + /// The effect that is given to the player while getting attacked by SCP-3114's Strangle ability. /// Strangled, /// - /// Makes the player nearly invisible, and allows them to pass through doors. + /// Allows the affected player to pass through doors. /// Ghostly, /// - /// Manipulate wish Fog player will have. + /// Manipulate which fog type the affected player will have. /// You can choose fog with and putting it on intensity. /// FogControl, /// - /// . + /// Slows the affected player down by 1% per intensity. /// Slowness, /// - /// . + /// Allows the affected player to see other players through walls, with a slight delay between spurts of viewability. /// Scp1344, /// - /// . + /// Does not blind the affected player. Spawns eyeballs that drop to the floor, and does 10 damage per second. /// SeveredEyes, /// - /// . + /// Immediately kills the affected player with death message "Fatal blunt trauma; the body is badly mutilated and pupled.", and "Reason: Crushed" through console. /// PitDeath, /// - /// Blurs the player's screen. + /// Blurs the affected player's vision. Does not scale with intensity. /// Blurred, /// - /// Makes you a flamingo . + /// Makes the affected player a flamingo . /// [Obsolete("Only availaible for Christmas and AprilFools.")] BecomingFlamingo, /// - /// Makes you a Child after eating Cake . + /// Makes the affected player a Child after eating Cake . /// [Obsolete("Only availaible for Christmas and AprilFools.")] Scp559, @@ -285,32 +285,32 @@ public enum EffectType Snowed, /// - /// . + /// Plays a sound effect to the affected player, and adds purple vignette to the affected player's vision. /// Scp1344Detected, /// - /// . + /// Allows the affected player to speak with players in spectator or overwatch. /// Scp1576, /// - /// . + /// Increases the affected player's jump height. /// Lightweight, /// - /// . + /// Decreases the affected player's jump height. /// HeavyFooted, /// - /// . + /// Makes the affected player transparent, 255 being completely transparent. /// Fade, /// - /// . + /// Allows the affected player to see in dark areas. Does not extend the viewing range. Scales with intensity. /// NightVision, @@ -387,7 +387,7 @@ public enum EffectType WhiteCandy, /// - /// . + /// Gives the affected player 25 non-decaying AHP, and sets their HP to 75 if it was above or at 75, otherwise if <75 keeps current HP. Clearing this effect does not reset their AHP nor HP maximum. /// Scp1509Resurrected, @@ -397,13 +397,13 @@ public enum EffectType FocusedVision, /// - /// . + /// If the affected player has a maximum hume shield, this sets the hume shield to the maximum value. /// AnomalousRegeneration, /// - /// . + /// Allows SCPs to see the affected player from a certain distance. Works on SCPs. /// AnomalousTarget, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs b/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs index 6428cdbc00..58ca2ed445 100644 --- a/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs +++ b/EXILED/Exiled.API/Enums/FacilityLayouts/EzFacilityLayout.cs @@ -18,7 +18,7 @@ namespace Exiled.API.Enums public enum EzFacilityLayout { /// - /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occured. + /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occurred. /// Unknown, diff --git a/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs b/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs index e67bcdbf89..243d0be928 100644 --- a/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs +++ b/EXILED/Exiled.API/Enums/FacilityLayouts/HczFacilityLayout.cs @@ -18,7 +18,7 @@ namespace Exiled.API.Enums public enum HczFacilityLayout { /// - /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occured. + /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occurred. /// Unknown, diff --git a/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs b/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs index 0f2f2b027e..afeadaf22a 100644 --- a/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs +++ b/EXILED/Exiled.API/Enums/FacilityLayouts/LczFacilityLayout.cs @@ -18,7 +18,7 @@ namespace Exiled.API.Enums public enum LczFacilityLayout { /// - /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occured. + /// Represents an unknown layout. This value is only used if you try to access prematurely or if an error occurred. /// Unknown, diff --git a/EXILED/Exiled.API/Enums/FirearmType.cs b/EXILED/Exiled.API/Enums/FirearmType.cs index 05cccf2388..7992265e71 100644 --- a/EXILED/Exiled.API/Enums/FirearmType.cs +++ b/EXILED/Exiled.API/Enums/FirearmType.cs @@ -95,4 +95,4 @@ public enum FirearmType /// Scp127, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/GlassType.cs b/EXILED/Exiled.API/Enums/GlassType.cs index fef4d59f44..70056bf02c 100644 --- a/EXILED/Exiled.API/Enums/GlassType.cs +++ b/EXILED/Exiled.API/Enums/GlassType.cs @@ -86,7 +86,7 @@ public enum GlassType GateAArmory, /// - /// Represents the window in + /// Represents the window in . /// HczLoadingBay, } diff --git a/EXILED/Exiled.API/Enums/HazardType.cs b/EXILED/Exiled.API/Enums/HazardType.cs index 43d16dac41..f13dc69d60 100644 --- a/EXILED/Exiled.API/Enums/HazardType.cs +++ b/EXILED/Exiled.API/Enums/HazardType.cs @@ -30,7 +30,7 @@ public enum HazardType Tantrum, /// - /// Should never happen + /// Should never happen. /// Unknown, } diff --git a/EXILED/Exiled.API/Enums/LayerMasks.cs b/EXILED/Exiled.API/Enums/LayerMasks.cs index e13683a3a1..53137d47de 100644 --- a/EXILED/Exiled.API/Enums/LayerMasks.cs +++ b/EXILED/Exiled.API/Enums/LayerMasks.cs @@ -84,4 +84,4 @@ public enum LayerMasks InteractionAnticheatMask = Default | Glass | Door | InteractableNoPlayerCollision, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/LeadingTeam.cs b/EXILED/Exiled.API/Enums/LeadingTeam.cs index b136e854f0..23644058ee 100644 --- a/EXILED/Exiled.API/Enums/LeadingTeam.cs +++ b/EXILED/Exiled.API/Enums/LeadingTeam.cs @@ -45,4 +45,4 @@ public enum LeadingTeam : byte /// Draw, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/LockerType.cs b/EXILED/Exiled.API/Enums/LockerType.cs index 755da9d18f..21dbe9f78f 100644 --- a/EXILED/Exiled.API/Enums/LockerType.cs +++ b/EXILED/Exiled.API/Enums/LockerType.cs @@ -126,4 +126,4 @@ public enum LockerType /// Scp1509Pedestal, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/PingType.cs b/EXILED/Exiled.API/Enums/PingType.cs index ab9f8f5fd6..50949d3b93 100644 --- a/EXILED/Exiled.API/Enums/PingType.cs +++ b/EXILED/Exiled.API/Enums/PingType.cs @@ -47,4 +47,4 @@ public enum PingType : byte /// Default, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/RespawnEffectType.cs b/EXILED/Exiled.API/Enums/RespawnEffectType.cs index 672abb1976..34ce495b51 100644 --- a/EXILED/Exiled.API/Enums/RespawnEffectType.cs +++ b/EXILED/Exiled.API/Enums/RespawnEffectType.cs @@ -7,10 +7,6 @@ namespace Exiled.API.Enums { - using Features; - - using PlayerRoles; - /// /// Layers game respawn effects. /// diff --git a/EXILED/Exiled.API/Enums/RevolverChamberState.cs b/EXILED/Exiled.API/Enums/RevolverChamberState.cs index 421f18587d..13c0095162 100644 --- a/EXILED/Exiled.API/Enums/RevolverChamberState.cs +++ b/EXILED/Exiled.API/Enums/RevolverChamberState.cs @@ -30,4 +30,4 @@ public enum RevolverChamberState /// Discharged, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/ScenesType.cs b/EXILED/Exiled.API/Enums/ScenesType.cs index 60691443f9..c69874f0d0 100644 --- a/EXILED/Exiled.API/Enums/ScenesType.cs +++ b/EXILED/Exiled.API/Enums/ScenesType.cs @@ -19,7 +19,7 @@ public enum ScenesType /// /// The current main menu. - /// ! Will cause crash when trying joining servers ! + /// ! Will cause crash when trying joining servers !. /// NewMainMenu, @@ -35,7 +35,7 @@ public enum ScenesType /// /// The loading Screen. - /// ! Will cause crash when trying joining servers ! + /// ! Will cause crash when trying joining servers !. /// PreLoader, @@ -44,4 +44,4 @@ public enum ScenesType /// Loader, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/Scp939VisibilityStates.cs b/EXILED/Exiled.API/Enums/Scp939VisibilityState.cs similarity index 63% rename from EXILED/Exiled.API/Enums/Scp939VisibilityStates.cs rename to EXILED/Exiled.API/Enums/Scp939VisibilityState.cs index d9be0eadc8..7d6a9b2811 100644 --- a/EXILED/Exiled.API/Enums/Scp939VisibilityStates.cs +++ b/EXILED/Exiled.API/Enums/Scp939VisibilityState.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. // @@ -15,33 +15,33 @@ namespace Exiled.API.Enums public enum Scp939VisibilityState { /// - /// SCP-939 doesnt see an other player, by default FPC role logic. + /// SCP-939 doesn't see another player, by default FPC role logic. /// None, /// - /// SCP-939 doesnt see an player, by basic SCP-939 logic. + /// SCP-939 doesn't see a player, by basic SCP-939 logic. /// NotSeen, /// - /// SCP-939 sees an other player, who is teammate SCP. + /// SCP-939 sees another player, who is teammate SCP. /// SeenAsScp, /// - /// SCP-939 sees an other player due the Alpha Warhead detonation. + /// SCP-939 sees another player due the Alpha Warhead detonation. /// SeenByDetonation, /// - /// SCP-939 sees an other player, due the base-game vision range logic. + /// SCP-939 sees another player, due the base-game vision range logic. /// SeenByRange, /// - /// SCP-939 sees an other player for a while, after it's out of range. + /// SCP-939 sees another player for a while, after it's out of range. /// SeenByLastTime, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/SpawnLocationType.cs b/EXILED/Exiled.API/Enums/SpawnLocationType.cs index 2fc9d2a780..4752396e34 100644 --- a/EXILED/Exiled.API/Enums/SpawnLocationType.cs +++ b/EXILED/Exiled.API/Enums/SpawnLocationType.cs @@ -152,27 +152,27 @@ public enum SpawnLocationType InsideGr18Glass, /// - /// Inside 106's Primary Door + /// Inside 106's Primary Door. /// Inside106Primary, /// - /// Inside 106's Secondary Door + /// Inside 106's Secondary Door. /// Inside106Secondary, /// - /// Inside 939 Cryo Chamber + /// Inside 939 Cryo Chamber. /// Inside939Cryo, /// - /// Inside SCP-079's Armory + /// Inside SCP-079's Armory. /// Inside079Armory, /// - /// Inside SCP-127's Lab + /// Inside SCP-127's Lab. /// Inside127Lab, diff --git a/EXILED/Exiled.API/Enums/UncuffReason.cs b/EXILED/Exiled.API/Enums/UncuffReason.cs index 977ad09fe1..1cf4bd6961 100644 --- a/EXILED/Exiled.API/Enums/UncuffReason.cs +++ b/EXILED/Exiled.API/Enums/UncuffReason.cs @@ -27,4 +27,4 @@ public enum UncuffReason /// CufferDied, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/UsableRippleType.cs b/EXILED/Exiled.API/Enums/UsableRippleType.cs index 1abc6936f8..cef62046c7 100644 --- a/EXILED/Exiled.API/Enums/UsableRippleType.cs +++ b/EXILED/Exiled.API/Enums/UsableRippleType.cs @@ -23,4 +23,4 @@ public enum UsableRippleType /// Footstep, } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Enums/ZoneType.cs b/EXILED/Exiled.API/Enums/ZoneType.cs index 382833528c..ab2e7f38a2 100644 --- a/EXILED/Exiled.API/Enums/ZoneType.cs +++ b/EXILED/Exiled.API/Enums/ZoneType.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Enums using System; using Exiled.API.Features.Doors; + using Features; /// diff --git a/EXILED/Exiled.API/Extensions/CommonExtensions.cs b/EXILED/Exiled.API/Extensions/CommonExtensions.cs index 6b175fc281..f44f9a14ab 100644 --- a/EXILED/Exiled.API/Extensions/CommonExtensions.cs +++ b/EXILED/Exiled.API/Extensions/CommonExtensions.cs @@ -80,4 +80,4 @@ public static AnimationCurve Add(this AnimationCurve curve, float amount) return curve; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs b/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs index 8c06d82d0d..dc32e86cf6 100644 --- a/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs +++ b/EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs @@ -11,10 +11,14 @@ namespace Exiled.API.Extensions using System.Linq; using Enums; + using Features; + using InventorySystem.Items.Scp1509; + using PlayerRoles.PlayableScps.Scp1507; using PlayerRoles.PlayableScps.Scp3114; + using PlayerStatsSystem; /// @@ -211,4 +215,4 @@ public static DamageType GetDamageType(DamageHandlerBase damageHandlerBase) return DamageType.Unknown; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs b/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs index 86c4c27099..2715e726dc 100644 --- a/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs +++ b/EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs @@ -13,6 +13,7 @@ namespace Exiled.API.Extensions using System.Linq; using CustomPlayerEffects.Danger; + using Exiled.API.Enums; /// diff --git a/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs b/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs index 69677e71c7..8ceb671037 100644 --- a/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs +++ b/EXILED/Exiled.API/Extensions/EffectTypeExtension.cs @@ -13,11 +13,16 @@ namespace Exiled.API.Extensions using System.Linq; using CustomPlayerEffects; + using CustomRendering; + using Enums; + using Exiled.API.Features; + using InventorySystem.Items.MarshmallowMan; using InventorySystem.Items.Usables.Scp244.Hypothermia; + using PlayerRoles.FirstPersonControl; /// @@ -242,4 +247,4 @@ public static EffectCategory GetCategories(this EffectType effect) return category; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/FloatExtensions.cs b/EXILED/Exiled.API/Extensions/FloatExtensions.cs index b7a32af87f..f9608626c0 100644 --- a/EXILED/Exiled.API/Extensions/FloatExtensions.cs +++ b/EXILED/Exiled.API/Extensions/FloatExtensions.cs @@ -53,4 +53,4 @@ public static AspectRatioType GetAspectRatioLabel(this float ratio) return closestRatio; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/ItemExtensions.cs b/EXILED/Exiled.API/Extensions/ItemExtensions.cs index 80c77a4c37..3a4bb791cc 100644 --- a/EXILED/Exiled.API/Extensions/ItemExtensions.cs +++ b/EXILED/Exiled.API/Extensions/ItemExtensions.cs @@ -20,6 +20,7 @@ namespace Exiled.API.Extensions using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Pickups; + using Structs; /// @@ -353,4 +354,4 @@ public static uint GetBaseCode(this FirearmType type) /// true if weapon has the specified attachment. Otherwise, false. public static bool HasAttachment(this Firearm firearm, AttachmentName attachment) => firearm.Attachments.FirstOrDefault(x => x.Name == attachment)?.IsEnabled ?? false; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/LockerExtensions.cs b/EXILED/Exiled.API/Extensions/LockerExtensions.cs index fbd60ec2a6..3bf7edf51b 100644 --- a/EXILED/Exiled.API/Extensions/LockerExtensions.cs +++ b/EXILED/Exiled.API/Extensions/LockerExtensions.cs @@ -7,9 +7,8 @@ namespace Exiled.API.Extensions { - using System; - using Exiled.API.Enums; + using MapGeneration.Distributors; /// @@ -53,4 +52,4 @@ public static class LockerExtensions _ => LockerType.Unknown, }; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/MirrorExtensions.cs b/EXILED/Exiled.API/Extensions/MirrorExtensions.cs index ca7742fda5..bbd3258782 100644 --- a/EXILED/Exiled.API/Extensions/MirrorExtensions.cs +++ b/EXILED/Exiled.API/Extensions/MirrorExtensions.cs @@ -13,7 +13,6 @@ namespace Exiled.API.Extensions using System.Linq; using System.Reflection; using System.Reflection.Emit; - using System.Text; using AdminToys; @@ -24,17 +23,16 @@ namespace Exiled.API.Extensions using CustomPlayerEffects; using Exiled.API.Enums; - using Exiled.API.Features.Items; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups.Keycards; using Features; - using Features.Pools; + + using HarmonyLib; using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Autosync; - using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Keycards; @@ -52,7 +50,7 @@ namespace Exiled.API.Extensions using RelativePositioning; - using Respawning; + using Unity.Collections.LowLevel.Unsafe; using UnityEngine; @@ -115,19 +113,38 @@ public static ReadOnlyDictionary SyncVarDirtyBits if (setMethod is null) continue; - MethodBody methodBody = setMethod.GetMethodBody(); - - if (methodBody is null) - continue; - - byte[] bytecodes = methodBody.GetILAsByteArray(); + ulong bit = GetBit(setMethod); if (!SyncVarDirtyBitsValue.ContainsKey($"{property.ReflectedType.Name}.{property.Name}")) - SyncVarDirtyBitsValue.Add($"{property.ReflectedType.Name}.{property.Name}", bytecodes[bytecodes.LastIndexOf((byte)OpCodes.Ldc_I8.Value) + 1]); + SyncVarDirtyBitsValue.Add($"{property.ReflectedType.Name}.{property.Name}", bit); } } return ReadOnlySyncVarDirtyBitsValue; + + static ulong GetBit(MethodInfo setter) + { + List instructions = PatchProcessor.GetOriginalInstructions(setter); + + object operand = null; + ulong bit; + try + { + operand = instructions.Single(c => c.opcode == OpCodes.Ldc_I8).operand; + long casted = (long)operand; + + // Standard casting doesn't work here because IL doesn't have a specific instruction for unsigned ulongs, it just loads it as a long and uses that. + // Because of that, harmony here gives it back as a long, and standard casting would clamp the value if it was ever big enough, so we need an unsafe cast. + bit = UnsafeUtility.As(ref casted); + } + catch (Exception ex) + { + Log.Error($"Error finding dirty bit in method {setter.ReflectedType.Name}.{setter.Name}! Found operand type: {operand?.GetType().Name ?? "Null"}. Exception: {ex}"); + return 0; + } + + return bit; + } } } @@ -254,7 +271,9 @@ public static void PlayGunSound(this Player player, Vector3 position, FirearmTyp /// The direction of the blood decal. /// The RoleTypeId from who blood come from. /// The sound than player get when getting shot. +#pragma warning disable IDE0060 // TODO: Deleted the unused param public static void PlaceBlood(this Player player, Vector3 position, Vector3 origin, RoleTypeId roleTypeId, int gettingShotSoundIndex) +#pragma warning restore IDE0060 { if (!roleTypeId.TryGetRoleBase(out PlayerRoleBase playerRoleBase) || playerRoleBase is not IBleedableRole) return; @@ -291,7 +310,8 @@ public static void PlaceBlood(this Player player, Vector3 position, Vector3 orig writer.WriteRelativePosition(new RelativePosition(origin)); writer.WriteByte(255); writer.WriteRoleType(RoleTypeId.ClassD); - }, true); + }, + true); #pragma warning restore SA1116 // Split parameters should start on line after declaration } @@ -541,7 +561,9 @@ public static void PlayCassieAnnouncement(this Player player, string words, bool /// Same on 's isHeld. /// Same on 's isNoisy. /// Same on 's isSubtitles. +#pragma warning disable IDE0060 // TODO: Deleted the unused param public static void MessageTranslated(this Player player, string words, string translation, string customSubtitles, bool makeHold = false, bool makeNoise = true, bool isSubtitles = true) +#pragma warning restore IDE0060 { CassieAnnouncement announcement = new(new CassieTtsPayload(words, customSubtitles, makeHold), 0, makeNoise ? 1 : 0); @@ -988,7 +1010,7 @@ private static void MakeCustomSyncWriter(NetworkIdentity behaviorOwner, Type tar // Write syncdata position data int position3 = owner.Position; owner.Position = position; - owner.WriteByte((byte)(position3 - position2 & 255)); + owner.WriteByte((byte)((position3 - position2) & 255)); owner.Position = position3; // Copy owner to observer @@ -996,4 +1018,4 @@ private static void MakeCustomSyncWriter(NetworkIdentity behaviorOwner, Type tar observer.WriteBytes(owner.ToArraySegment().Array, position, owner.Position - position); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/RoleExtensions.cs b/EXILED/Exiled.API/Extensions/RoleExtensions.cs index db1a7c99a9..14e1c4dd59 100644 --- a/EXILED/Exiled.API/Extensions/RoleExtensions.cs +++ b/EXILED/Exiled.API/Extensions/RoleExtensions.cs @@ -12,14 +12,19 @@ namespace Exiled.API.Extensions using System.Linq; using Enums; + using Features.Spawn; + using Footprinting; + using InventorySystem; using InventorySystem.Configs; + using PlayerRoles; using PlayerRoles.FirstPersonControl; - using Respawning; + using Respawning.Waves; + using UnityEngine; using Team = PlayerRoles.Team; @@ -84,7 +89,7 @@ public static class RoleExtensions RoleTypeId.ChaosConscript or RoleTypeId.ChaosMarauder or RoleTypeId.ChaosRepressor or RoleTypeId.ChaosRifleman or RoleTypeId.ChaosFlamingo => Team.ChaosInsurgency, RoleTypeId.Scientist => Team.Scientists, RoleTypeId.ClassD => Team.ClassD, - RoleTypeId.Scp049 or RoleTypeId.Scp939 or RoleTypeId.Scp0492 or RoleTypeId.Scp079 or RoleTypeId.Scp096 or RoleTypeId.Scp106 or RoleTypeId.Scp173 or RoleTypeId.Scp3114 or RoleTypeId.ZombieFlamingo=> Team.SCPs, + RoleTypeId.Scp049 or RoleTypeId.Scp939 or RoleTypeId.Scp0492 or RoleTypeId.Scp079 or RoleTypeId.Scp096 or RoleTypeId.Scp106 or RoleTypeId.Scp173 or RoleTypeId.Scp3114 or RoleTypeId.ZombieFlamingo => Team.SCPs, RoleTypeId.FacilityGuard or RoleTypeId.NtfCaptain or RoleTypeId.NtfPrivate or RoleTypeId.NtfSergeant or RoleTypeId.NtfSpecialist or RoleTypeId.NtfFlamingo => Team.FoundationForces, RoleTypeId.Tutorial => Team.OtherAlive, RoleTypeId.Flamingo or RoleTypeId.AlphaFlamingo => Team.Flamingos, @@ -243,7 +248,7 @@ public static Dictionary GetStartingAmmo(this RoleTypeId roleT NtfMiniWave => SpawnableFaction.NtfMiniWave, ChaosSpawnWave => SpawnableFaction.ChaosWave, ChaosMiniWave => SpawnableFaction.ChaosMiniWave, - _ => SpawnableFaction.None + _ => SpawnableFaction.None, }; /// @@ -283,4 +288,4 @@ public static bool TryGetSpawnableFaction(this Faction faction, out SpawnableFac return true; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Extensions/StringExtensions.cs b/EXILED/Exiled.API/Extensions/StringExtensions.cs index 1cc8dc7c32..c6ccc67202 100644 --- a/EXILED/Exiled.API/Extensions/StringExtensions.cs +++ b/EXILED/Exiled.API/Extensions/StringExtensions.cs @@ -67,7 +67,7 @@ public static int GetDistance(this string firstString, string secondString) /// /// The to extract from. /// Returns a containing the exctracted command name and arguments. - public static (string commandName, string[] arguments) ExtractCommand(this string commandLine) + public static (string CommandName, string[] Arguments) ExtractCommand(this string commandLine) { string[] extractedArguments = commandLine.Split(' '); diff --git a/EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs b/EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs new file mode 100644 index 0000000000..b31fe9f6e4 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/ValidateChildrenAttribute.cs @@ -0,0 +1,19 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes +{ + using System; + + /// + /// Checks all properties in the target object for validators. + /// + [AttributeUsage(AttributeTargets.Property)] + public class ValidateChildrenAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs new file mode 100644 index 0000000000..a92da9244a --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/AvailableValuesAttribute.cs @@ -0,0 +1,37 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Checks if value is in list of available values. + /// + [AttributeUsage(AttributeTargets.Property)] + public class AvailableValuesAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// + public AvailableValuesAttribute(params object[] values) + { + Values = values; + } + + /// + /// Gets the array of possible values. + /// + public object[] Values { get; } + + /// + public bool Check(object other) => Values.Contains(other); + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs new file mode 100644 index 0000000000..611b416070 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/CustomValidatorAttribute.cs @@ -0,0 +1,49 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + using System.Collections.Generic; + + using Exiled.API.Interfaces; + + /// + /// Check a value with custom function. + /// + [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] + public class CustomValidatorAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// The type of the custom check validator. + /// + /// The from customFunctionType must be a class inheriting IValidator with a parameterless constructor. + /// + public CustomValidatorAttribute(Type customFunctionType) + { + if (!customFunctionType.IsClass || customFunctionType.IsAbstract || !customFunctionType.GetInterfaces().Contains(typeof(IValidator))) + throw new ArgumentException($"{nameof(customFunctionType)} must be a type inheriting IValidator!"); + + CustomFunctionType = customFunctionType; + } + + /// + /// Gets a from a type inheriting , to an instance of that class. + /// + public static Dictionary ValidatorInstances { get; } = new(); + + /// + /// Gets the type of the custom check validator. + /// + public Type CustomFunctionType { get; } + + /// + public bool Check(object other) => ValidatorInstances.GetOrAdd(CustomFunctionType, () => (IValidator)Activator.CreateInstance(CustomFunctionType)).Check(other); + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs new file mode 100644 index 0000000000..b31d3cbc83 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/GreaterOrEqualAttribute.cs @@ -0,0 +1,38 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Checks if value greater or equal. + /// + [AttributeUsage(AttributeTargets.Property)] + public class GreaterOrEqualAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// + /// value must be able to convert to your target type via . + public GreaterOrEqualAttribute(object value) + { + Value = value; + } + + /// + /// Gets the minimum value. + /// + public object Value { get; } + + /// + public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable min && min.CompareTo(other) <= 0; + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs new file mode 100644 index 0000000000..5bb1025bd9 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/GreaterThanAttribute.cs @@ -0,0 +1,38 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Interfaces; + + /// + /// Check if value is greater. + /// + [AttributeUsage(AttributeTargets.Property)] + public class GreaterThanAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// + /// value must be able to convert to your target type via . + public GreaterThanAttribute(object value) + { + Value = value; + } + + /// + /// Gets the minimum value. + /// + public object Value { get; } + + /// + public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable min && min.CompareTo(other) < 0; + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs new file mode 100644 index 0000000000..e521a47bd1 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/LessOrEqualAttribute.cs @@ -0,0 +1,38 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Checks if value less or equal. + /// + [AttributeUsage(AttributeTargets.Property)] + public class LessOrEqualAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// + /// value must be able to convert to your target type via . + public LessOrEqualAttribute(object value) + { + Value = value; + } + + /// + /// Gets the maximum value. + /// + public object Value { get; } + + /// + public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable max && max.CompareTo(other) >= 0; + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs new file mode 100644 index 0000000000..5497a99fa6 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/LessThanAttribute.cs @@ -0,0 +1,38 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Checks if value is less. + /// + [AttributeUsage(AttributeTargets.Property)] + public class LessThanAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// + /// value must be able to convert to your target type via . + public LessThanAttribute(object value) + { + Value = value; + } + + /// + /// Gets the maximum value. + /// + public object Value { get; } + + /// + public bool Check(object other) => Convert.ChangeType(Value, other.GetType()) is IComparable max && max.CompareTo(other) > 0; + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs new file mode 100644 index 0000000000..914ce09d59 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/NonNegativeAttribute.cs @@ -0,0 +1,23 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Checks if value is 0 or greater. + /// + [AttributeUsage(AttributeTargets.Property)] + public class NonNegativeAttribute : Attribute, IValidator + { + /// + public bool Check(object other) => Convert.ToDecimal(other) >= 0; + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs new file mode 100644 index 0000000000..a473405e49 --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/NonPositiveAttribute.cs @@ -0,0 +1,23 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Check if value is 0 or less. + /// + [AttributeUsage(AttributeTargets.Property)] + public class NonPositiveAttribute : Attribute, IValidator + { + /// + public bool Check(object other) => Convert.ToDecimal(other) <= 0; + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs b/EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs new file mode 100644 index 0000000000..ebf0c1d10d --- /dev/null +++ b/EXILED/Exiled.API/Features/Attributes/Validators/RangeAttribute.cs @@ -0,0 +1,57 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Features.Attributes.Validators +{ + using System; + + using Exiled.API.Interfaces; + + /// + /// Check if an is inside a specific range. + /// + [AttributeUsage(AttributeTargets.Property)] + public class RangeAttribute : Attribute, IValidator + { + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// min and max must inherit . + public RangeAttribute(object min, object max, bool inclusive = false) + { + Min = min; + Max = max; + Inclusive = inclusive; + } + + /// + /// Gets the maximum value. + /// + public object Max { get; } + + /// + /// Gets the minimum value. + /// + public object Min { get; } + + /// + /// Gets a value indicating whether check is inclusive. + /// + public bool Inclusive { get; } + + /// + public bool Check(object other) => + Convert.ChangeType(Min, other.GetType()) is IComparable min && + Convert.ChangeType(Max, other.GetType()) is IComparable max && + (Inclusive + ? min.CompareTo(other) <= 0 && max.CompareTo(other) >= 0 + : min.CompareTo(other) < 0 && max.CompareTo(other) > 0); + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs b/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs index 17ea91b02f..10db73bbb4 100644 --- a/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs +++ b/EXILED/Exiled.API/Features/Audio/AudioDataStorage.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Audio { using System; - using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; @@ -210,4 +209,4 @@ private static void OnRoundRestart() Clear(); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Audio/WavUtility.cs b/EXILED/Exiled.API/Features/Audio/WavUtility.cs index 9be12fa6b8..7e8df6dbea 100644 --- a/EXILED/Exiled.API/Features/Audio/WavUtility.cs +++ b/EXILED/Exiled.API/Features/Audio/WavUtility.cs @@ -129,7 +129,7 @@ public static AudioData ParseWavSpanToPcm(Stream stream, ReadOnlySpan audi /// A struct containing the parsed file information. public static TrackData SkipHeader(Stream stream) { - TrackData trackData = new(); + TrackData trackData = default(TrackData); if (stream.Length < 12) { diff --git a/EXILED/Exiled.API/Features/Camera.cs b/EXILED/Exiled.API/Features/Camera.cs index 4eedc693dd..0c949f124b 100644 --- a/EXILED/Exiled.API/Features/Camera.cs +++ b/EXILED/Exiled.API/Features/Camera.cs @@ -12,10 +12,14 @@ namespace Exiled.API.Features using System.Linq; using Enums; + using Exiled.API.Extensions; using Exiled.API.Interfaces; + using MapGeneration; + using PlayerRoles.PlayableScps.Scp079.Cameras; + using UnityEngine; using CameraType = Enums.CameraType; diff --git a/EXILED/Exiled.API/Features/Cassie.cs b/EXILED/Exiled.API/Features/Cassie.cs index 475e68ad4e..ab7b490451 100644 --- a/EXILED/Exiled.API/Features/Cassie.cs +++ b/EXILED/Exiled.API/Features/Cassie.cs @@ -13,12 +13,16 @@ namespace Exiled.API.Features using System.Text; using Exiled.API.Features.Pools; + using global::Cassie; using global::Cassie.Interpreters; + using MEC; + using PlayerRoles; + using PlayerStatsSystem; - using Respawning; + using Respawning.NamingRules; using CustomFirearmHandler = DamageHandlers.FirearmDamageHandler; @@ -57,7 +61,9 @@ public static void Message(string message, bool isHeld = false, bool isNoisy = t /// Indicates whether C.A.S.S.I.E has to hold the message. /// Indicates whether C.A.S.S.I.E has to make noises during the message. /// Indicates whether C.A.S.S.I.E has to make subtitles. +#pragma warning disable IDE0060 // TODO: Deleted the unused param public static void MessageTranslated(string message, string translation, bool isHeld = false, bool isNoisy = true, bool isSubtitles = true) +#pragma warning restore IDE0060 { new CassieAnnouncement(new CassieTtsPayload(message, translation, isHeld), 0f, isNoisy ? 1 : 0).AddToQueue(); } @@ -117,7 +123,7 @@ public static float CalculateDuration(string message) float value = 0; string[] lines = message.Split(' ', StringSplitOptions.RemoveEmptyEntries); - CassiePlaybackModifiers modifiers = new(); + CassiePlaybackModifiers modifiers = default(CassiePlaybackModifiers); StringBuilder builder = StringBuilderPool.Pool.Get(); for (int i = 0; i < lines.Length; i++) @@ -167,7 +173,7 @@ public static string ConvertNumber(int num) return string.Empty; } - NumberInterpreter numberInterpreter = (NumberInterpreter)CassieTtsAnnouncer.Interpreters.FirstOrDefault((CassieInterpreter x) => x is NumberInterpreter); + NumberInterpreter numberInterpreter = (NumberInterpreter)CassieTtsAnnouncer.Interpreters.FirstOrDefault(x => x is NumberInterpreter); if (numberInterpreter == null) { return string.Empty; @@ -222,7 +228,7 @@ public static void CustomScpTermination(string scpName, CustomHandlerBase info) /// /// The word to check. /// if the word is valid; otherwise, . - public static bool IsValid(string word) => CassieTtsAnnouncer.TryGetDatabase(out CassieLineDatabase cassieLineDatabase) ? cassieLineDatabase.AllLines.Any(line => line.ApiName.ToUpper() == word.ToUpper()) : false; + public static bool IsValid(string word) => CassieTtsAnnouncer.TryGetDatabase(out CassieLineDatabase cassieLineDatabase) && cassieLineDatabase.AllLines.Any(line => line.ApiName.ToUpper() == word.ToUpper()); /// /// Gets a value indicating whether the given sentence is all valid C.A.S.S.I.E word. diff --git a/EXILED/Exiled.API/Features/Coffee.cs b/EXILED/Exiled.API/Features/Coffee.cs index adabb2387e..5874d66245 100644 --- a/EXILED/Exiled.API/Features/Coffee.cs +++ b/EXILED/Exiled.API/Features/Coffee.cs @@ -13,6 +13,7 @@ namespace Exiled.API.Features using Exiled.API.Extensions; using Exiled.API.Interfaces; + using UnityEngine; using BaseCoffee = global::Coffee; @@ -118,4 +119,4 @@ public string TranslationAuthor /// The player who interacts. If , it will be chosen randomly. public void Interact(Player player = null) => Base.ServerInteract((player ?? Player.Get(x => x.IsHuman).GetRandomValue()).ReferenceHub, byte.MaxValue); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs b/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs index a61a7f1602..e2db497289 100644 --- a/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs +++ b/EXILED/Exiled.API/Features/ComponentsEqualityComparer.cs @@ -22,4 +22,4 @@ internal class ComponentsEqualityComparer : IEqualityComparer /// public int GetHashCode(Component obj) => obj == null ? 0 : obj.GetHashCode(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Core/EActor.cs b/EXILED/Exiled.API/Features/Core/EActor.cs index b051974788..31a8911725 100644 --- a/EXILED/Exiled.API/Features/Core/EActor.cs +++ b/EXILED/Exiled.API/Features/Core/EActor.cs @@ -15,6 +15,7 @@ namespace Exiled.API.Features.Core using Exiled.API.Features.DynamicEvents; using Exiled.API.Features.Pools; using Exiled.API.Interfaces; + using MEC; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs b/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs index 7bd14fb6e2..0ac6098b9b 100644 --- a/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs +++ b/EXILED/Exiled.API/Features/Core/Generic/EBehaviour.cs @@ -7,8 +7,6 @@ namespace Exiled.API.Features.Core.Generic { - using System; - using Exiled.API.Features; /// diff --git a/EXILED/Exiled.API/Features/Core/StateMachine/State.cs b/EXILED/Exiled.API/Features/Core/StateMachine/State.cs index e790e61a8d..dee7f4cd49 100644 --- a/EXILED/Exiled.API/Features/Core/StateMachine/State.cs +++ b/EXILED/Exiled.API/Features/Core/StateMachine/State.cs @@ -14,7 +14,6 @@ namespace Exiled.API.Features.Core.StateMachine using Exiled.API.Features; using Exiled.API.Features.Core.Attributes; - using UnityEngine; /// /// The base class which handles in-context states. diff --git a/EXILED/Exiled.API/Features/Core/StaticActor.cs b/EXILED/Exiled.API/Features/Core/StaticActor.cs index e6c4cc08b0..3323ec1a70 100644 --- a/EXILED/Exiled.API/Features/Core/StaticActor.cs +++ b/EXILED/Exiled.API/Features/Core/StaticActor.cs @@ -76,7 +76,7 @@ public static T Get() /// /// Gets a given the specified type. /// - /// The the type of the to look for. + /// The type of the to look for. /// The type to cast the to. /// The corresponding of type , or if not found. public static T Get(Type type) @@ -96,7 +96,7 @@ public static T Get(Type type) /// /// Gets a given the specified type. /// - /// The the type of the to look for. + /// The type of the to look for. /// The corresponding . public static StaticActor Get(Type type) { diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs index 46938d13b4..dfccf71d77 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/ButtonSetting.cs @@ -11,6 +11,7 @@ namespace Exiled.API.Features.Core.UserSettings using System.Diagnostics; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs index ada19ec63a..8876f74b96 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/DropdownSetting.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features.Core.UserSettings using System.Linq; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs index 4b13238b65..5944a682fd 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/HeaderSetting.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs index e3b40e8f0c..98c168adaa 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/KeybindSetting.cs @@ -10,7 +10,9 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs b/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs index 38b5132ec7..9286c5b409 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/SettingBase.cs @@ -14,6 +14,7 @@ namespace Exiled.API.Features.Core.UserSettings using Exiled.API.Features.Pools; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; /// @@ -205,7 +206,7 @@ public static bool TryGetSetting(Player player, int id, out T setting) SSTwoButtonsSetting twoButtonsSetting => new TwoButtonsSetting(twoButtonsSetting), SSPlaintextSetting plainTextSetting => new UserTextInputSetting(plainTextSetting), SSSliderSetting sliderSetting => new SliderSetting(sliderSetting), - _ => new SettingBase(settingBase) + _ => new SettingBase(settingBase), }; /// @@ -419,7 +420,7 @@ internal static void OnSettingUpdated(ReferenceHub hub, ServerSpecificSettingBas setting = list.Find(x => x.Id == settingBase.SettingId); - invoke: + invoke: if (setting.OriginalDefinition == null) { @@ -429,4 +430,4 @@ internal static void OnSettingUpdated(ReferenceHub hub, ServerSpecificSettingBas setting.OriginalDefinition?.OnChanged?.Invoke(player, setting); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs index abb522fd76..3a88ab477c 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/SliderSetting.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs index 69c7875ad1..d1c9aa7eb5 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/TextInputSetting.cs @@ -10,7 +10,9 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; + using TMPro; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs index 18233e6ffc..d921ede5a4 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/TwoButtonsSetting.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; /// diff --git a/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs b/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs index 99c163581e..fe773e8021 100644 --- a/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs +++ b/EXILED/Exiled.API/Features/Core/UserSettings/UserTextInputSetting.cs @@ -10,7 +10,9 @@ namespace Exiled.API.Features.Core.UserSettings using System; using Exiled.API.Interfaces; + using global::UserSettings.ServerSpecific; + using TMPro; /// diff --git a/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs b/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs index e19ce970f5..f366ba01bf 100644 --- a/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs +++ b/EXILED/Exiled.API/Features/CustomStats/CustomHumeShieldStat.cs @@ -8,9 +8,13 @@ namespace Exiled.API.Features.CustomStats { using Mirror; + using PlayerRoles.PlayableScps.HumeShield; + using PlayerStatsSystem; + using UnityEngine; + using Utils.Networking; /// diff --git a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs index 1103ed138e..7b4720f6d3 100644 --- a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs +++ b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandler.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features.DamageHandlers using Footprinting; using PlayerStatsSystem; + using UnityEngine; using BaseHandler = PlayerStatsSystem.DamageHandlerBase; diff --git a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs index 6a9b8f4562..0c1bd95076 100644 --- a/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs +++ b/EXILED/Exiled.API/Features/DamageHandlers/DamageHandlerBase.cs @@ -13,12 +13,17 @@ namespace Exiled.API.Features.DamageHandlers using System.Linq; using Enums; + using Exiled.API.Features.Items; + using Extensions; + using InventorySystem.Items.Scp1509; + using PlayerRoles.PlayableScps.Scp1507; using PlayerRoles.PlayableScps.Scp3114; using PlayerRoles.PlayableScps.Scp939; + using PlayerStatsSystem; using BaseHandler = PlayerStatsSystem.DamageHandlerBase; @@ -266,7 +271,7 @@ protected DamageType GetDamageType(BaseHandler damageHandler = null) FirearmType.E11SR => DamageType.E11Sr, FirearmType.FSP9 => DamageType.Fsp9, FirearmType.FRMG0 => DamageType.Frmg0, - _ => DamageType.Firearm + _ => DamageType.Firearm, }; case PlayerStatsSystem.AttackerDamageHandler attackerDamageHandler: diff --git a/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs b/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs index 4ea1909b72..776aa1943f 100644 --- a/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs +++ b/EXILED/Exiled.API/Features/DamageHandlers/GenericDamageHandler.cs @@ -12,19 +12,13 @@ namespace Exiled.API.Features.DamageHandlers using Enums; using Exiled.API.Extensions; - using Exiled.API.Features.Pickups.Projectiles; using Footprinting; using InventorySystem; - using InventorySystem.Items; - using InventorySystem.Items.Firearms; - using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Firearms.ShotEvents; using InventorySystem.Items.Scp1509; - using Items; - using PlayerRoles; using PlayerRoles.PlayableScps.Scp096; using PlayerRoles.PlayableScps.Scp1507; @@ -35,8 +29,6 @@ namespace Exiled.API.Features.DamageHandlers using UnityEngine; - using Object = UnityEngine.Object; - /// /// Allows generic damage to a player. /// @@ -70,8 +62,7 @@ public GenericDamageHandler(Player player, Player attacker, float damage, Damage cassieAnnouncement ??= DamageHandlerBase.CassieAnnouncement.Default; customCassieAnnouncement = cassieAnnouncement; - if (customCassieAnnouncement is not null) - customCassieAnnouncement.Announcement ??= $"{player.Nickname} killed by {attacker.Nickname} utilizing {damageType}"; + customCassieAnnouncement?.Announcement ??= $"{player.Nickname} killed by {attacker.Nickname} utilizing {damageType}"; Attacker = attacker != null ? attacker.Footprint : Server.Host.Footprint; AllowSelfDamage = true; @@ -192,16 +183,14 @@ public GenericDamageHandler(Player player, Player attacker, float damage, Damage case DamageType.Scp096: Scp096Role curr096 = attacker.ReferenceHub.roleManager.CurrentRole as Scp096Role ?? new Scp096Role(); - if (curr096 != null) - curr096._lastOwner = attacker.ReferenceHub; + curr096?._lastOwner = attacker.ReferenceHub; Base = new Scp096DamageHandler(curr096, damage, Scp096DamageHandler.AttackType.SlapRight); break; case DamageType.Scp939: Scp939Role curr939 = attacker.ReferenceHub.roleManager.CurrentRole as Scp939Role ?? new Scp939Role(); - if (curr939 != null) - curr939._lastOwner = attacker.ReferenceHub; + curr939?._lastOwner = attacker.ReferenceHub; Base = new Scp939DamageHandler(curr939, damage, Scp939DamageType.LungeTarget); break; @@ -344,4 +333,4 @@ private void GenericFirearm(float amount, ItemType itemType) }; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Doors/BasicDoor.cs b/EXILED/Exiled.API/Features/Doors/BasicDoor.cs index 5a53caa738..a0c184b22a 100644 --- a/EXILED/Exiled.API/Features/Doors/BasicDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/BasicDoor.cs @@ -10,7 +10,9 @@ namespace Exiled.API.Features.Doors using System.Collections.Generic; using Exiled.API.Enums; + using PlayerRoles; + using UnityEngine; using Basegame = Interactables.Interobjects.BasicDoor; diff --git a/EXILED/Exiled.API/Features/Doors/Door.cs b/EXILED/Exiled.API/Features/Doors/Door.cs index 0e27b6daae..8518be4a9c 100644 --- a/EXILED/Exiled.API/Features/Doors/Door.cs +++ b/EXILED/Exiled.API/Features/Doors/Door.cs @@ -15,11 +15,15 @@ namespace Exiled.API.Features.Doors using Exiled.API.Extensions; using Exiled.API.Features.Core; using Exiled.API.Interfaces; + using Interactables.Interobjects; using Interactables.Interobjects.DoorButtons; using Interactables.Interobjects.DoorUtils; + using MEC; + using Mirror; + using UnityEngine; using BaseBreakableDoor = Interactables.Interobjects.BreakableDoor; @@ -421,7 +425,7 @@ public static void LockAll(float duration, ZoneType zoneType = ZoneType.Unspecif { door.IsOpen = false; door.ChangeLock(lockType); - Timing.CallDelayed(duration, () => door.Unlock()); + Timing.CallDelayed(duration, door.Unlock); } } @@ -448,7 +452,7 @@ public static void LockAll(float duration, DoorLockType lockType = DoorLockType. { door.IsOpen = false; door.ChangeLock(lockType); - Timing.CallDelayed(duration, () => door.Unlock()); + Timing.CallDelayed(duration, door.Unlock); } } @@ -593,7 +597,7 @@ internal static Door Create(DoorVariant doorVariant, List rooms) PryableDoor prbl => new Gate(prbl, rooms), Interactables.Interobjects.BasicNonInteractableDoor nonInteractableDoor => new BasicNonInteractableDoor(nonInteractableDoor, rooms), Interactables.Interobjects.BasicDoor basicDoor => new BasicDoor(basicDoor, rooms), - _ => new Door(doorVariant, rooms) + _ => new Door(doorVariant, rooms), }; } @@ -709,4 +713,4 @@ private DoorType GetDoorType() }; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs b/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs index 8d455e6653..9f5643cb04 100644 --- a/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs +++ b/EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs @@ -11,7 +11,9 @@ namespace Exiled.API.Features.Doors using System.Linq; using Exiled.API.Enums; + using Interactables.Interobjects; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs b/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs index 4fb094f639..e115b4416a 100644 --- a/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs +++ b/EXILED/Exiled.API/Features/Doors/EmergencyReleaseButton.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features.Doors using System.Linq; using Exiled.API.Interfaces; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.API/Features/Doors/Gate.cs b/EXILED/Exiled.API/Features/Doors/Gate.cs index 89cbc3ced0..050c635ef6 100644 --- a/EXILED/Exiled.API/Features/Doors/Gate.cs +++ b/EXILED/Exiled.API/Features/Doors/Gate.cs @@ -10,8 +10,10 @@ namespace Exiled.API.Features.Doors using System.Collections.Generic; using Exiled.API.Enums; + using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Draw.cs b/EXILED/Exiled.API/Features/Draw.cs index 5eb7361b91..8eb2127d3f 100644 --- a/EXILED/Exiled.API/Features/Draw.cs +++ b/EXILED/Exiled.API/Features/Draw.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features { using System; - using System.Buffers; using System.Collections.Generic; using DrawableLine; diff --git a/EXILED/Exiled.API/Features/Generator.cs b/EXILED/Exiled.API/Features/Generator.cs index 8f3d6f41be..e494184cd0 100644 --- a/EXILED/Exiled.API/Features/Generator.cs +++ b/EXILED/Exiled.API/Features/Generator.cs @@ -12,8 +12,11 @@ namespace Exiled.API.Features using System.Linq; using Enums; + using Exiled.API.Interfaces; + using Interactables.Interobjects.DoorUtils; + using MapGeneration.Distributors; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs b/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs index f14d8feac8..f7844678c4 100644 --- a/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs +++ b/EXILED/Exiled.API/Features/GlobalPatchProcessor.cs @@ -86,7 +86,7 @@ public static Harmony PatchAll(string id = "", string groupId = null) } if (string.IsNullOrEmpty(patchGroup.GroupId)) - throw new ArgumentNullException("GroupId"); + throw new ArgumentNullException(nameof(patchGroup.GroupId)); if (string.IsNullOrEmpty(groupId) || patchGroup.GroupId != groupId) continue; @@ -147,44 +147,40 @@ public static void UnpatchAll(string id = "", string groupId = null) goto Unpatch; if (string.IsNullOrEmpty(patchGroup.GroupId)) - throw new ArgumentNullException("GroupId"); + throw new ArgumentNullException(nameof(patchGroup.GroupId)); if (string.IsNullOrEmpty(groupId) || patchGroup.GroupId != groupId) continue; - Unpatch: + Unpatch: bool hasMethodBody = methodBase.HasMethodBody(); if (hasMethodBody) { - patchInfo.Postfixes.Do( - delegate(Patch patchInfo) - { - harmony.Unpatch(methodBase, patchInfo.PatchMethod); - }); - patchInfo.Prefixes.Do( - delegate(Patch patchInfo) - { - harmony.Unpatch(methodBase, patchInfo.PatchMethod); - }); - } - - patchInfo.Transpilers.Do( - delegate(Patch patchInfo) + patchInfo.Postfixes.Do((patchInfo) => + { + harmony.Unpatch(methodBase, patchInfo.PatchMethod); + }); + patchInfo.Prefixes.Do((patchInfo) => { harmony.Unpatch(methodBase, patchInfo.PatchMethod); }); + } + + patchInfo.Transpilers.Do((patchInfo) => + { + harmony.Unpatch(methodBase, patchInfo.PatchMethod); + }); if (hasMethodBody) { - patchInfo.Finalizers.Do( - delegate(Patch patchInfo) - { - harmony.Unpatch(methodBase, patchInfo.PatchMethod); - }); + patchInfo.Finalizers.Do((patchInfo) => + { + harmony.Unpatch(methodBase, patchInfo.PatchMethod); + }); } PatchedGroupMethodsValue.Remove(methodBase); } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs b/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs index 3c2a982ab7..9a1cc7e110 100644 --- a/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/AmnesticCloudHazard.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Hazards { using Exiled.API.Enums; + using PlayerRoles.PlayableScps.Scp939; /// diff --git a/EXILED/Exiled.API/Features/Hazards/Hazard.cs b/EXILED/Exiled.API/Features/Hazards/Hazard.cs index 22d620092a..c0c82a3aea 100644 --- a/EXILED/Exiled.API/Features/Hazards/Hazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/Hazard.cs @@ -14,8 +14,11 @@ namespace Exiled.API.Features.Hazards using Exiled.API.Enums; using Exiled.API.Features.Core; using Exiled.API.Interfaces; + using global::Hazards; + using PlayerRoles.PlayableScps.Scp939; + using UnityEngine; /// @@ -121,13 +124,13 @@ public Vector3 Position public static Hazard Get(EnvironmentalHazard environmentalHazard) => EnvironmentalHazardToHazard.TryGetValue(environmentalHazard, out Hazard hazard) ? hazard : environmentalHazard switch - { - TantrumEnvironmentalHazard tantrumEnvironmentalHazard => new TantrumHazard(tantrumEnvironmentalHazard), - Scp939AmnesticCloudInstance scp939AmnesticCloudInstance => new AmnesticCloudHazard(scp939AmnesticCloudInstance), - SinkholeEnvironmentalHazard sinkholeEnvironmentalHazard => new SinkholeHazard(sinkholeEnvironmentalHazard), - global::Hazards.TemporaryHazard temporaryHazard => new TemporaryHazard(temporaryHazard), - _ => new Hazard(environmentalHazard) - }; + { + TantrumEnvironmentalHazard tantrumEnvironmentalHazard => new TantrumHazard(tantrumEnvironmentalHazard), + Scp939AmnesticCloudInstance scp939AmnesticCloudInstance => new AmnesticCloudHazard(scp939AmnesticCloudInstance), + SinkholeEnvironmentalHazard sinkholeEnvironmentalHazard => new SinkholeHazard(sinkholeEnvironmentalHazard), + global::Hazards.TemporaryHazard temporaryHazard => new TemporaryHazard(temporaryHazard), + _ => new Hazard(environmentalHazard), + }; /// /// Gets the by . diff --git a/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs b/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs index 5e368dfd25..86f924c0d0 100644 --- a/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/SinkholeHazard.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Hazards { using Exiled.API.Enums; + using global::Hazards; /// diff --git a/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs b/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs index 1660ba4dc9..733096ae26 100644 --- a/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/TantrumHazard.cs @@ -8,9 +8,13 @@ namespace Exiled.API.Features.Hazards { using Exiled.API.Enums; + using global::Hazards; + using Mirror; + using RelativePositioning; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Items/Ammo.cs b/EXILED/Exiled.API/Features/Items/Ammo.cs index d6cf394750..54210cc6d2 100644 --- a/EXILED/Exiled.API/Features/Items/Ammo.cs +++ b/EXILED/Exiled.API/Features/Items/Ammo.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Items { using Enums; + using Exiled.API.Interfaces; using InventorySystem.Items.Firearms.Ammo; diff --git a/EXILED/Exiled.API/Features/Items/Armor.cs b/EXILED/Exiled.API/Features/Items/Armor.cs index 344b7a0118..43676a2e97 100644 --- a/EXILED/Exiled.API/Features/Items/Armor.cs +++ b/EXILED/Exiled.API/Features/Items/Armor.cs @@ -15,10 +15,10 @@ namespace Exiled.API.Features.Items using Exiled.API.Interfaces; using InventorySystem.Items.Armor; + using PlayerRoles; using Structs; - using UnityEngine; /// /// A wrapper class for . diff --git a/EXILED/Exiled.API/Features/Items/Consumable.cs b/EXILED/Exiled.API/Features/Items/Consumable.cs index 6b4ec6c5ce..0927474fe0 100644 --- a/EXILED/Exiled.API/Features/Items/Consumable.cs +++ b/EXILED/Exiled.API/Features/Items/Consumable.cs @@ -49,4 +49,4 @@ internal override void ChangeOwner(Player oldOwner, Player newOwner) Base.Owner = newOwner.ReferenceHub; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs b/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs index b550c13456..e9b7b0ce95 100644 --- a/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs +++ b/EXILED/Exiled.API/Features/Items/ExplosiveGrenade.cs @@ -15,6 +15,7 @@ namespace Exiled.API.Features.Items using InventorySystem.Items; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; + using UnityEngine; using Object = UnityEngine.Object; diff --git a/EXILED/Exiled.API/Features/Items/Firearm.cs b/EXILED/Exiled.API/Features/Items/Firearm.cs index 56215591af..00630fad35 100644 --- a/EXILED/Exiled.API/Features/Items/Firearm.cs +++ b/EXILED/Exiled.API/Features/Items/Firearm.cs @@ -7,11 +7,11 @@ namespace Exiled.API.Features.Items { - using System; using System.Collections.Generic; using System.Linq; using CameraShaking; + using Enums; using Exiled.API.Features.Items.FirearmModules; @@ -20,7 +20,9 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; using Exiled.API.Structs; + using Extensions; + using InventorySystem.Items.Autosync; using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Attachments.Components; @@ -109,8 +111,7 @@ public static IReadOnlyDictionary>> playerPreferences = AttachmentsServerHandler.PlayerPreferences.Where( - kvp => kvp.Key is not null).Select( - (KeyValuePair> keyValuePair) => + kvp => kvp.Key is not null).Select(keyValuePair => { return new KeyValuePair>( Player.Get(keyValuePair.Key), @@ -169,12 +170,7 @@ public int MagazineAmmo public int BarrelAmmo { get => BarrelMagazine?.Ammo ?? 0; - - set - { - if (BarrelMagazine != null) - BarrelMagazine.Ammo = value; - } + set => BarrelMagazine?.Ammo = value; } /// @@ -251,12 +247,7 @@ public float DamageFalloffDistance public int MaxBarrelAmmo { get => BarrelMagazine?.MaxAmmo ?? 0; - - set - { - if (BarrelMagazine != null) - BarrelMagazine.MaxAmmo = value; - } + set => BarrelMagazine?.MaxAmmo = value; } /// @@ -814,7 +805,11 @@ internal override void ReadPickupInfoBefore(Pickup pickup) { PrimaryMagazine.MaxAmmo = firearmPickup.MaxAmmo; AmmoDrain = firearmPickup.AmmoDrain; + Damage = firearmPickup.Damage; + Inaccuracy = firearmPickup.Inaccuracy; + Penetration = firearmPickup.Penetration; + DamageFalloffDistance = firearmPickup.DamageFalloffDistance; } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs index db8992d720..0ddbd8bf54 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs @@ -7,12 +7,6 @@ namespace Exiled.API.Features.Items.FirearmModules.Barrel { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using InventorySystem.Items.Firearms.Modules; using UnityEngine; @@ -102,4 +96,4 @@ public bool BoltLocked /// public override void Resync() => AutomaticBarrel.ServerResync(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs index b1e11f7580..d189df088f 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/BarrelMagazine.cs @@ -28,4 +28,4 @@ public BarrelMagazine(IAmmoContainerModule module) /// public abstract bool IsCocked { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs index afeb1f3248..141cacbab8 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs @@ -7,12 +7,6 @@ namespace Exiled.API.Features.Items.FirearmModules.Barrel { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using InventorySystem.Items.Firearms.Modules; using UnityEngine; @@ -88,4 +82,4 @@ public override bool IsCocked /// public override void Resync() => PumpBarrel.ServerResync(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs index 8fb2688bb7..a0633f46c0 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Magazine.cs @@ -7,12 +7,12 @@ namespace Exiled.API.Features.Items.FirearmModules { - using System; - using Exiled.API.Features.Items.FirearmModules.Barrel; using Exiled.API.Features.Items.FirearmModules.Primary; + using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Firearms.Modules.Scp127; + using UnityEngine; /// @@ -69,7 +69,7 @@ public static Magazine Get(IAmmoContainerModule module) MagazineModule magazine => magazine switch { Scp127MagazineModule scp127MagazineModule => new Scp127Magazine(scp127MagazineModule), - _ => new NormalMagazine(magazine) + _ => new NormalMagazine(magazine), }, _ => null, }, @@ -111,4 +111,4 @@ public int ModifyAmmo(int delta, bool useBorders = true) /// public abstract void Resync(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs index 2beedd7bb7..652d71250e 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs @@ -7,8 +7,6 @@ namespace Exiled.API.Features.Items.FirearmModules.Primary { - using System; - using System.Collections; using System.Collections.Generic; using System.Linq; @@ -102,4 +100,4 @@ public RevolverChamberState State } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs index 6c4bb19c28..0421ec1f0e 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs @@ -95,4 +95,4 @@ public bool MagazineInserted /// public override void Resync() => MagazineModule.ServerResyncData(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs index 39ff428556..85a294f5d8 100644 --- a/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs +++ b/EXILED/Exiled.API/Features/Items/FirearmModules/Primary/PrimaryMagazine.cs @@ -10,7 +10,6 @@ namespace Exiled.API.Features.Items.FirearmModules.Primary using System; using Exiled.API.Enums; - using Exiled.API.Extensions; using InventorySystem.Items.Firearms.Modules; @@ -60,4 +59,4 @@ public override int Ammo /// public abstract AmmoType AmmoType { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Flashlight.cs b/EXILED/Exiled.API/Features/Items/Flashlight.cs index 93a3876ca6..4030d1a358 100644 --- a/EXILED/Exiled.API/Features/Items/Flashlight.cs +++ b/EXILED/Exiled.API/Features/Items/Flashlight.cs @@ -7,12 +7,12 @@ namespace Exiled.API.Features.Items { - using System; - using Exiled.API.Interfaces; + using InventorySystem.Items.ToggleableLights; using InventorySystem.Items.ToggleableLights.Flashlight; using InventorySystem.Items.ToggleableLights.Lantern; + using Utils.Networking; /// @@ -80,4 +80,4 @@ public float NextAllowedTime /// A string containing item-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{IsEmittingLight}| /{NextAllowedTime}/"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Item.cs b/EXILED/Exiled.API/Features/Items/Item.cs index 6e9a20d66f..6446dd8cf6 100644 --- a/EXILED/Exiled.API/Features/Items/Item.cs +++ b/EXILED/Exiled.API/Features/Items/Item.cs @@ -15,6 +15,7 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Armor; @@ -34,6 +35,7 @@ namespace Exiled.API.Features.Items using InventorySystem.Items.Usables.Scp1576; using InventorySystem.Items.Usables.Scp244; using InventorySystem.Items.Usables.Scp330; + using UnityEngine; using BaseConsumable = InventorySystem.Items.Usables.Consumable; @@ -235,7 +237,7 @@ public static Item Get(ItemBase itemBase) ItemType.KeycardCustomManagement => new ManagementKeycard(keycard), ItemType.KeycardCustomMetalCase => new MetalKeycard(keycard), _ => new Keycard(keycard), - } + }, }, UsableItem usable => usable switch { @@ -340,7 +342,7 @@ public static T Get(ushort serial) ItemType.KeycardCustomManagement => new ManagementKeycard(type), ItemType.KeycardCustomMetalCase => new MetalKeycard(type), _ => new Keycard(type, owner), - } + }, }, UsableItem usable => usable switch { @@ -522,4 +524,4 @@ internal virtual void ReadPickupInfoAfter(Pickup pickup) { } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Jailbird.cs b/EXILED/Exiled.API/Features/Items/Jailbird.cs index 4cc9a59c86..d4d5c60302 100644 --- a/EXILED/Exiled.API/Features/Items/Jailbird.cs +++ b/EXILED/Exiled.API/Features/Items/Jailbird.cs @@ -11,10 +11,13 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + using InventorySystem.Items; using InventorySystem.Items.Autosync; using InventorySystem.Items.Jailbird; + using Mirror; + using UnityEngine; using JailbirdPickup = Pickups.JailbirdPickup; diff --git a/EXILED/Exiled.API/Features/Items/Keycard.cs b/EXILED/Exiled.API/Features/Items/Keycard.cs index e153ebdbda..92d424cd98 100644 --- a/EXILED/Exiled.API/Features/Items/Keycard.cs +++ b/EXILED/Exiled.API/Features/Items/Keycard.cs @@ -9,7 +9,9 @@ namespace Exiled.API.Features.Items { using Exiled.API.Enums; using Exiled.API.Interfaces; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs b/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs index 7497cfef56..20334bb7f1 100644 --- a/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs +++ b/EXILED/Exiled.API/Features/Items/Keycards/CustomKeycardItem.cs @@ -14,10 +14,13 @@ namespace Exiled.API.Features.Items.Keycards using Exiled.API.Extensions; using Exiled.API.Features.Pools; using Exiled.API.Interfaces.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Keycards; + using UnityEngine; /// @@ -199,10 +202,10 @@ public ItemType FindMatch(bool matchDesign, bool matchPerms, bool matchColors) goto add; - cont: + cont: continue; - add: + add: matches.Add(type); } diff --git a/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs b/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs index bbf6b31de7..37ca31f796 100644 --- a/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs +++ b/EXILED/Exiled.API/Features/Items/Keycards/PermissionsProvider.cs @@ -8,9 +8,11 @@ namespace Exiled.API.Features.Items.Keycards { using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items; using InventorySystem.Items.Autosync; using InventorySystem.Items.Keycards; + using Mirror; /// diff --git a/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs b/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs index 0caff46af8..e0a6b4676b 100644 --- a/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs +++ b/EXILED/Exiled.API/Features/Items/Keycards/SingleUseKeycard.cs @@ -12,7 +12,9 @@ namespace Exiled.API.Features.Items.Keycards using Exiled.API.Enums; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pickups.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items; using InventorySystem.Items.Keycards; diff --git a/EXILED/Exiled.API/Features/Items/Marshmallow.cs b/EXILED/Exiled.API/Features/Items/Marshmallow.cs index 349fe342fb..9390c1b331 100644 --- a/EXILED/Exiled.API/Features/Items/Marshmallow.cs +++ b/EXILED/Exiled.API/Features/Items/Marshmallow.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -8,9 +8,14 @@ namespace Exiled.API.Features.Items { using CustomPlayerEffects; + using Exiled.API.Interfaces; + using InventorySystem.Items.MarshmallowMan; + using InventorySystem.Items.Usables; + using PlayerStatsSystem; + using UnityEngine; /// @@ -96,7 +101,7 @@ public void MakeEvil(AhpStat.AhpProcess evilProcess = null) if (Evil) return; - Base.ReleaseEvil(evilProcess ?? EvilAhpProcess ?? Owner.GetModule().ServerAddProcess(450F, 450F, 0F, 1F, 0F, true)); + Base.ReleaseEvil(evilProcess ?? EvilAhpProcess ?? Owner.GetModule().ServerAddProcess(Scp021J.MaxEvilAHP, Scp021J.MaxEvilAHP, 0F, 1F, 0F, true)); } } } \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/MicroHid.cs b/EXILED/Exiled.API/Features/Items/MicroHid.cs index 0495a3b3bc..07cad32048 100644 --- a/EXILED/Exiled.API/Features/Items/MicroHid.cs +++ b/EXILED/Exiled.API/Features/Items/MicroHid.cs @@ -7,14 +7,9 @@ namespace Exiled.API.Features.Items { - using System; - using System.Reflection; - - using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; using InventorySystem.Items.Autosync; - using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.MicroHID; using InventorySystem.Items.MicroHID.Modules; diff --git a/EXILED/Exiled.API/Features/Items/Radio.cs b/EXILED/Exiled.API/Features/Items/Radio.cs index d54abae2d9..449bc6bb21 100644 --- a/EXILED/Exiled.API/Features/Items/Radio.cs +++ b/EXILED/Exiled.API/Features/Items/Radio.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Items { using Enums; + using Exiled.API.Interfaces; using InventorySystem.Items.Radio; diff --git a/EXILED/Exiled.API/Features/Items/Scp127.cs b/EXILED/Exiled.API/Features/Items/Scp127.cs index 2c71fbe4bb..31177095a4 100644 --- a/EXILED/Exiled.API/Features/Items/Scp127.cs +++ b/EXILED/Exiled.API/Features/Items/Scp127.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features.Items using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Firearms.Modules.Scp127; + using UnityEngine; /// @@ -19,12 +20,12 @@ namespace Exiled.API.Features.Items /// public class Scp127 : Firearm { - #pragma warning disable SA1401 +#pragma warning disable SA1401 /// /// Custom amount of max HS. /// internal float? CustomHsMax; - #pragma warning restore SA1401 +#pragma warning restore SA1401 /// /// Initializes a new instance of the class. diff --git a/EXILED/Exiled.API/Features/Items/Scp1344.cs b/EXILED/Exiled.API/Features/Items/Scp1344.cs index 7f96da8903..cd824fc3f0 100644 --- a/EXILED/Exiled.API/Features/Items/Scp1344.cs +++ b/EXILED/Exiled.API/Features/Items/Scp1344.cs @@ -11,6 +11,7 @@ namespace Exiled.API.Features.Items using InventorySystem.Items.Usables; using InventorySystem.Items.Usables.Scp1344; + using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers.Wearables; /// @@ -66,10 +67,8 @@ public Scp1344Status Status /// Whether or not 1344 should be dropped. public void Deactivate(bool dropItem = false) { - if (Status is not(Scp1344Status.Active or Scp1344Status.Stabbing or Scp1344Status.Dropping)) - { + if (Status is not (Scp1344Status.Active or Scp1344Status.Stabbing or Scp1344Status.Dropping)) return; - } Base.Owner.DisableWearables(WearableElements.Scp1344Goggles); Base.ActivateFinalEffects(); @@ -86,4 +85,4 @@ public void Deactivate(bool dropItem = false) /// public void Actived() => Status = Scp1344Status.Stabbing; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Scp1509.cs b/EXILED/Exiled.API/Features/Items/Scp1509.cs index 010aaf666e..7cd4a6eef1 100644 --- a/EXILED/Exiled.API/Features/Items/Scp1509.cs +++ b/EXILED/Exiled.API/Features/Items/Scp1509.cs @@ -12,7 +12,9 @@ namespace Exiled.API.Features.Items using Exiled.API.Enums; using Exiled.API.Interfaces; + using InventorySystem.Items.Scp1509; + using PlayerRoles; /// @@ -176,4 +178,4 @@ public IEnumerable RevivedPlayers UnequipDecayDelay = UnequipDecayDelay, }; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Scp1576.cs b/EXILED/Exiled.API/Features/Items/Scp1576.cs index 3ff4514e4a..1b2551e66e 100644 --- a/EXILED/Exiled.API/Features/Items/Scp1576.cs +++ b/EXILED/Exiled.API/Features/Items/Scp1576.cs @@ -50,4 +50,4 @@ internal Scp1576() /// public void StopTransmitting() => Base.ServerStopTransmitting(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Scp330.cs b/EXILED/Exiled.API/Features/Items/Scp330.cs index 38c9ded765..4df42da51e 100644 --- a/EXILED/Exiled.API/Features/Items/Scp330.cs +++ b/EXILED/Exiled.API/Features/Items/Scp330.cs @@ -290,4 +290,4 @@ internal override void ChangeOwner(Player oldOwner, Player newOwner) Base.Owner = newOwner.ReferenceHub; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Throwable.cs b/EXILED/Exiled.API/Features/Items/Throwable.cs index 721167a3b5..a4b0434632 100644 --- a/EXILED/Exiled.API/Features/Items/Throwable.cs +++ b/EXILED/Exiled.API/Features/Items/Throwable.cs @@ -93,7 +93,7 @@ public void Throw(bool fullForce = true) } /// - /// Cancel the the throws of the item. + /// Cancels the throw of the item. /// public void CancelThrow() => Base.ServerProcessCancellation(); @@ -113,4 +113,4 @@ public void Throw(bool fullForce = true) /// A string containing Throwable-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{PinPullTime}|"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Items/Usable.cs b/EXILED/Exiled.API/Features/Items/Usable.cs index efdff0c2ff..9da85656aa 100644 --- a/EXILED/Exiled.API/Features/Items/Usable.cs +++ b/EXILED/Exiled.API/Features/Items/Usable.cs @@ -12,7 +12,6 @@ namespace Exiled.API.Features.Items using Exiled.API.Interfaces; using InventorySystem; - using InventorySystem.Items; using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables; diff --git a/EXILED/Exiled.API/Features/Lift.cs b/EXILED/Exiled.API/Features/Lift.cs index d191cd6764..8e47b7ba04 100644 --- a/EXILED/Exiled.API/Features/Lift.cs +++ b/EXILED/Exiled.API/Features/Lift.cs @@ -16,9 +16,12 @@ namespace Exiled.API.Features using Exiled.API.Features.Doors; using Exiled.API.Features.Pools; using Exiled.API.Interfaces; + using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; + using UnityEngine; + using Utils; using static Interactables.Interobjects.ElevatorChamber; @@ -83,7 +86,7 @@ internal Lift(ElevatorChamber elevator) /// /// Gets a value of the internal doors list. /// - public IReadOnlyCollection Doors => internalDoorsList.Select(x => Door.Get(x)).ToList(); + public IReadOnlyCollection Doors => internalDoorsList.Select(Door.Get).ToList(); /// /// Gets a of in the . @@ -332,4 +335,4 @@ public void ChangeLock(DoorLockReason lockReason) /// A string containing Lift-related data. public override string ToString() => $"{Type} {Status} [{CurrentLevel}] *{IsLocked}*"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Lockers/Chamber.cs b/EXILED/Exiled.API/Features/Lockers/Chamber.cs index 610fcaa90f..980f5df9f6 100644 --- a/EXILED/Exiled.API/Features/Lockers/Chamber.cs +++ b/EXILED/Exiled.API/Features/Lockers/Chamber.cs @@ -16,8 +16,11 @@ namespace Exiled.API.Features.Lockers using Exiled.API.Extensions; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + using InventorySystem.Items.Pickups; + using MapGeneration.Distributors; + using UnityEngine; /// @@ -304,4 +307,4 @@ public Vector3 GetRandomSpawnPoint() /// . internal static Chamber Get(LockerChamber chamber) => chamber == null ? null : Chambers.TryGetValue(chamber, out Chamber chmb) ? chmb : new(chamber, Locker.Get(x => x.Chambers.Any(x => x.Base == chamber)).FirstOrDefault()); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Lockers/Locker.cs b/EXILED/Exiled.API/Features/Lockers/Locker.cs index 5b3d9e33cf..f4b4164adb 100644 --- a/EXILED/Exiled.API/Features/Lockers/Locker.cs +++ b/EXILED/Exiled.API/Features/Lockers/Locker.cs @@ -16,10 +16,8 @@ namespace Exiled.API.Features.Lockers using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; - using InventorySystem.Items.Pickups; using MapGeneration.Distributors; - using Mirror; using UnityEngine; using BaseLocker = MapGeneration.Distributors.Locker; @@ -225,4 +223,4 @@ internal static void ClearCache() Chamber.Chambers.Clear(); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index 4e8b3547ed..95c13e13c2 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -15,22 +15,33 @@ namespace Exiled.API.Features using System.Linq; using CommandSystem.Commands.RemoteAdmin.Cleanup; + using Decals; + using Enums; + using Exiled.API.Extensions; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups; using Interactables.Interobjects; + using InventorySystem; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; + using Items; + using LightContainmentZoneDecontamination; + using MapGeneration; + using PlayerRoles.Ragdolls; + using RemoteAdmin; + using UnityEngine; + using Utils; using Utils.Networking; @@ -531,4 +542,4 @@ internal static void ClearCache() #pragma warning restore CS0618 } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Npc.cs b/EXILED/Exiled.API/Features/Npc.cs index 893feac92c..242f235091 100644 --- a/EXILED/Exiled.API/Features/Npc.cs +++ b/EXILED/Exiled.API/Features/Npc.cs @@ -14,15 +14,23 @@ namespace Exiled.API.Features using CommandSystem; using CommandSystem.Commands.RemoteAdmin.Dummies; + using Exiled.API.Enums; using Exiled.API.Features.CustomStats; using Exiled.API.Features.Roles; + using Footprinting; + using MEC; + using Mirror; + using NetworkManagerUtils.Dummies; + using PlayerRoles; + using PlayerStatsSystem; + using UnityEngine; /// @@ -102,7 +110,7 @@ public float? MaxDistance set { - if(!value.HasValue) + if (!value.HasValue) return; if (!GameObject.TryGetComponent(out PlayerFollower follower)) @@ -131,7 +139,7 @@ public float? MinDistance set { - if(!value.HasValue) + if (!value.HasValue) return; if (!GameObject.TryGetComponent(out PlayerFollower follower)) @@ -160,7 +168,7 @@ public float? Speed set { - if(!value.HasValue) + if (!value.HasValue) return; if (!GameObject.TryGetComponent(out PlayerFollower follower)) @@ -356,4 +364,4 @@ public void LateDestroy(float time) }); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs b/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs index 9b141f22f9..1bc646df3c 100644 --- a/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/EscapeObjective.cs @@ -9,7 +9,9 @@ namespace Exiled.API.Features.Objectives { using Exiled.API.Enums; using Exiled.API.Interfaces; + using PlayerRoles; + using Respawning.Objectives; using BaseObjective = Respawning.Objectives.EscapeObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs b/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs index 77e95fa5e8..283d3b0d1a 100644 --- a/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/GeneratorActivatedObjective.cs @@ -9,6 +9,7 @@ namespace Exiled.API.Features.Objectives { using Exiled.API.Enums; using Exiled.API.Interfaces; + using Respawning.Objectives; using BaseObjective = Respawning.Objectives.GeneratorActivatedObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs b/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs index 5a9f136ba9..d34fb21611 100644 --- a/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/HumanDamageObjective.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Objectives using Exiled.API.Enums; using Exiled.API.Features.DamageHandlers; using Exiled.API.Interfaces; + using Respawning.Objectives; using BaseObjective = Respawning.Objectives.HumanDamageObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs b/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs index 7856d1845b..bd73b46ebc 100644 --- a/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/HumanKillObjective.cs @@ -10,7 +10,9 @@ namespace Exiled.API.Features.Objectives using Exiled.API.Enums; using Exiled.API.Features.DamageHandlers; using Exiled.API.Interfaces; + using PlayerRoles; + using Respawning.Objectives; using BaseObjective = Respawning.Objectives.HumanKillObjective; diff --git a/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs b/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs index 77dd37f5c7..b6f50b4c31 100644 --- a/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/HumanObjective.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Objectives { using Exiled.API.Interfaces; + using Respawning.Objectives; /// diff --git a/EXILED/Exiled.API/Features/Objectives/Objective.cs b/EXILED/Exiled.API/Features/Objectives/Objective.cs index 7497737b0f..4a4f09388e 100644 --- a/EXILED/Exiled.API/Features/Objectives/Objective.cs +++ b/EXILED/Exiled.API/Features/Objectives/Objective.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,14 +7,15 @@ namespace Exiled.API.Features.Objectives { - using System; using System.Collections.Generic; using System.Linq; using Exiled.API.Enums; using Exiled.API.Features.Core; using Exiled.API.Interfaces; + using PlayerRoles; + using Respawning; using Respawning.Objectives; @@ -69,7 +70,7 @@ internal Objective(FactionObjectiveBase objectiveFootprintBase) ObjectiveType.HumanDamage => FactionInfluenceManager.Objectives.OfType().First(), ObjectiveType.HumanKill => FactionInfluenceManager.Objectives.OfType().First(), ObjectiveType.Escape => FactionInfluenceManager.Objectives.OfType().First(), - _ => null + _ => null, }); /// @@ -89,7 +90,7 @@ public static Objective Get(FactionObjectiveBase factionObjectiveBase) BaseHumanDamageObjective humanDamageObjective => new HumanDamageObjective(humanDamageObjective), BaseHumanKillObjective humanKillObjective => new HumanKillObjective(humanKillObjective), BaseEscapeObjective escapeObjective => new EscapeObjective(escapeObjective), - _ => new Objective(factionObjectiveBase) + _ => new Objective(factionObjectiveBase), }; } diff --git a/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs b/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs index a50a36057f..e4d79ad4b1 100644 --- a/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs +++ b/EXILED/Exiled.API/Features/Objectives/ScpItemPickupObjective.cs @@ -11,7 +11,9 @@ namespace Exiled.API.Features.Objectives using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + using Respawning.Objectives; + using UnityEngine; using BaseObjective = Respawning.Objectives.ScpItemPickupObjective; diff --git a/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs b/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs index ce68921031..b061a06ba4 100644 --- a/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/AmmoPickup.cs @@ -68,4 +68,4 @@ public ushort Ammo /// A string containing AmmoPickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{MaxDisplayedAmmo}| -{Ammo}-"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs b/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs index 3de6897413..aef81f1c79 100644 --- a/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/BodyArmorPickup.cs @@ -18,8 +18,6 @@ namespace Exiled.API.Features.Pickups using InventorySystem.Items; using InventorySystem.Items.Armor; - using UnityEngine; - using BaseBodyArmor = InventorySystem.Items.Armor.BodyArmorPickup; /// @@ -144,4 +142,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs b/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs index 4d7ec52765..1315fc2be4 100644 --- a/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Pickups using System; using Exiled.API.Interfaces; + using InventorySystem.Items; using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Attachments; @@ -117,6 +118,26 @@ public uint Attachments set => Base.Worldmodel.Setup(Base.CurId, Base.Worldmodel.WorldmodelType, value); } + /// + /// Gets or sets the damage for this . + /// + public float Damage { get; set; } + + /// + /// Gets or sets the inaccuracy for this . + /// + public float Inaccuracy { get; set; } + + /// + /// Gets or sets the penetration for this . + /// + public float Penetration { get; set; } + + /// + /// Gets or sets how much fast the value drop over the distance. + /// + public float DamageFalloffDistance { get; set; } + /// /// Initializes the item as if it was spawned naturally by map generation. /// @@ -135,6 +156,10 @@ internal override void ReadItemInfo(Items.Item item) { MaxAmmo = firearm.PrimaryMagazine.ConstantMaxAmmo; AmmoDrain = firearm.AmmoDrain; + Damage = firearm.Damage; + Inaccuracy = firearm.Inaccuracy; + Penetration = firearm.Penetration; + DamageFalloffDistance = firearm.DamageFalloffDistance; } base.ReadItemInfo(item); @@ -153,4 +178,4 @@ protected override void InitializeProperties(ItemBase itemBase) MaxAmmo = magazine.AmmoMax; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs b/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs index 3cdb59898e..d8d9f9bf95 100644 --- a/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs @@ -88,4 +88,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs b/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs index 3d62c428fc..3cb4e21bf6 100644 --- a/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/GrenadePickup.cs @@ -94,4 +94,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs b/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs index 93c18ff7bf..d7f0ef0df2 100644 --- a/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/JailbirdPickup.cs @@ -134,4 +134,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs index 5a80eb35ca..f084899e32 100644 --- a/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/KeycardPickup.cs @@ -87,4 +87,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs index 58e24a105e..d8694292f8 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/CustomKeycardPickup.cs @@ -16,11 +16,14 @@ namespace Exiled.API.Features.Pickups.Keycards using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pools; using Exiled.API.Interfaces.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; + using UnityEngine; /// @@ -164,10 +167,10 @@ public ItemType FindMatch(bool matchDesign, bool matchPerms, bool matchColors) goto add; - cont: + cont: continue; - add: + add: matches.Add(type); } diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs index 9666c24b21..cf6d6e6b82 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/ManagementKeycardPickup.cs @@ -9,9 +9,12 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs index cf1c0ea894..94b34e7c92 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/MetalKeycardPickup.cs @@ -9,9 +9,12 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs index 8a79b0d405..62037fb344 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/SingleUseKeycardPickup.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Pickups.Keycards using Exiled.API.Enums; using Exiled.API.Features.Items; using Exiled.API.Features.Items.Keycards; + using InventorySystem.Items; using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs index 162ec6a721..9417f4c4e2 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/Site02KeycardPickup.cs @@ -9,9 +9,12 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs b/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs index a6874f57d3..a55c810864 100644 --- a/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Keycards/TaskForceKeycardPickup.cs @@ -9,9 +9,12 @@ namespace Exiled.API.Features.Pickups.Keycards { using Exiled.API.Features.Items.Keycards; using Exiled.API.Interfaces.Keycards; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs b/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs index 255c32b6ad..5091387416 100644 --- a/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/MicroHIDPickup.cs @@ -7,8 +7,8 @@ namespace Exiled.API.Features.Pickups { - using Exiled.API.Features.Items; using Exiled.API.Interfaces; + using InventorySystem.Items.MicroHID.Modules; using BaseMicroHID = InventorySystem.Items.MicroHID.MicroHIDPickup; @@ -149,4 +149,4 @@ public bool TryGetFireController(MicroHidFiringMode firingMode, out T module) /// A string containing MicroHIDPickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Energy}|"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Pickup.cs index 5dcceb6135..4c49efbd70 100644 --- a/EXILED/Exiled.API/Features/Pickups/Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Pickup.cs @@ -7,7 +7,6 @@ namespace Exiled.API.Features.Pickups { - using System; using System.Collections.Generic; using System.Linq; @@ -24,7 +23,9 @@ namespace Exiled.API.Features.Pickups using InventorySystem.Items.Usables.Scp244; using Mirror; + using RelativePositioning; + using UnityEngine; using BaseAmmoPickup = InventorySystem.Items.Firearms.Ammo.AmmoPickup; @@ -376,7 +377,7 @@ public static T Get(ItemPickupBase pickupBase) /// /// An of to convert into an of . /// An of containing all existing instances. - public static IEnumerable Get(IEnumerable pickups) => pickups.Select(ipb => Get(ipb)); + public static IEnumerable Get(IEnumerable pickups) => pickups.Select(Get); /// /// Gets an of containing all existing instances given an . @@ -688,4 +689,4 @@ protected virtual void InitializeProperties(ItemBase itemBase) { } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs index a4cd84ef93..6508d90160 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/EffectGrenadeProjectile.cs @@ -47,4 +47,4 @@ internal EffectGrenadeProjectile(ItemType type) /// A string containing EffectGrenadePickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs index 07cdbebefb..47809957a9 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/ExplosionGrenadeProjectile.cs @@ -104,4 +104,4 @@ public float ScpDamageMultiplier /// A string containing ExplosionGrenadePickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs index 8d30856743..361d5428fa 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/FlashbangProjectile.cs @@ -74,4 +74,4 @@ public float SurfaceDistanceIntensifier /// A string containing FlashbangPickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs index f9d5b4f10d..276353262a 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/Projectile.cs @@ -12,10 +12,12 @@ namespace Exiled.API.Features.Pickups.Projectiles using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Interfaces; + using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; + using UnityEngine; using Object = UnityEngine.Object; @@ -170,4 +172,4 @@ public Projectile Spawn(Vector3 position, Quaternion? rotation = null, bool shou /// A string containing ProjectilePickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{IsLocked}- ={InUse}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs index f33d935a97..9e44ea478c 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp018Projectile.cs @@ -7,10 +7,10 @@ namespace Exiled.API.Features.Pickups.Projectiles { - using System; using System.Reflection; using Exiled.API.Interfaces; + using HarmonyLib; using InventorySystem.Items.ThrowableProjectiles; @@ -105,4 +105,4 @@ public float FriendlyFireTime /// A string containing Scp018Pickup-related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{Position}| -{Damage}- ={IgnoreFriendlyFire}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs index 0c5715a9b9..f1a902828c 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/Scp2176Projectile.cs @@ -62,4 +62,4 @@ public bool DropSound /// A string containing Scp2176Pickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{FuseTime}| ={IsAlreadyDetonated}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs b/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs index cafd9be8cb..5a26e9a2ef 100644 --- a/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs +++ b/EXILED/Exiled.API/Features/Pickups/Projectiles/TimeGrenadeProjectile.cs @@ -92,4 +92,4 @@ public void Explode() /// A string containing TimeGrenadePickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{FuseTime}| ={IsAlreadyDetonated}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs b/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs index b2eef73401..80bb879b27 100644 --- a/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/RadioPickup.cs @@ -74,4 +74,4 @@ public bool IsEnabled /// A string containing RadioPickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{BatteryLevel}| -{Range}- /{IsEnabled}/"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs index 935bc636ca..6ea875e2fe 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp1509Pickup.cs @@ -9,6 +9,7 @@ namespace Exiled.API.Features.Pickups { using Exiled.API.Features.Items; using Exiled.API.Interfaces; + using InventorySystem.Items; using InventorySystem.Items.Scp1509; @@ -95,4 +96,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs index 64ab902dc6..805cf32ebe 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp1576Pickup.cs @@ -46,4 +46,4 @@ internal Scp1576Pickup() /// A string containing Scp1576Pickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}*"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs index b7ac0126cf..0652792e3d 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp244Pickup.cs @@ -12,7 +12,7 @@ namespace Exiled.API.Features.Pickups using Exiled.API.Features.DamageHandlers; using Exiled.API.Features.Items; using Exiled.API.Interfaces; - using InventorySystem.Items; + using InventorySystem.Items.Usables.Scp244; using UnityEngine; @@ -127,7 +127,7 @@ public float ActivationDot /// Damages the Scp244Pickup. /// /// The used to deal damage. - /// if the the damage has been deal; otherwise, . + /// if the damage has been dealt; otherwise, . public bool Damage(DamageHandler handler) => Base.Damage(handler.Damage, handler, Vector3.zero); /// @@ -148,4 +148,4 @@ internal override void ReadItemInfo(Item item) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs index a4a971afb7..1ff14d5b15 100644 --- a/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Scp330Pickup.cs @@ -68,4 +68,4 @@ public List Candies /// A string containing Scp330Pickup related data. public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}* |{ExposedCandy}| -{Candies}-"; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs b/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs index 023469e4fe..511e7ce4ac 100644 --- a/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/UsablePickup.cs @@ -68,4 +68,4 @@ protected override void InitializeProperties(ItemBase itemBase) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 5627e8dc91..a377c0a483 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -14,10 +14,14 @@ namespace Exiled.API.Features using System.Runtime.CompilerServices; using Core; + using CustomPlayerEffects; using CustomPlayerEffects.Danger; + using DamageHandlers; + using Enums; + using Exiled.API.Features.Core.Interfaces; using Exiled.API.Features.CustomStats; using Exiled.API.Features.Doors; @@ -28,11 +32,17 @@ namespace Exiled.API.Features using Exiled.API.Features.Roles; using Exiled.API.Interfaces; using Exiled.API.Structs; + using Extensions; + using Footprinting; + using global::Scp914; + using Hints; + using Interactables.Interobjects; + using InventorySystem; using InventorySystem.Disarming; using InventorySystem.Items; @@ -42,24 +52,35 @@ namespace Exiled.API.Features using InventorySystem.Items.Firearms.ShotEvents; using InventorySystem.Items.Usables; using InventorySystem.Items.Usables.Scp330; + using MapGeneration.Distributors; using MapGeneration.Rooms; + using MEC; + using Mirror; using Mirror.LiteNetLib4Mirror; + using PlayerRoles; using PlayerRoles.FirstPersonControl; using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; using PlayerRoles.RoleAssign; using PlayerRoles.Spectating; using PlayerRoles.Voice; + using PlayerStatsSystem; + using RelativePositioning; + using RemoteAdmin; + using RoundRestarting; + using UnityEngine; + using Utils; using Utils.Networking; + using VoiceChat; using VoiceChat.Playbacks; @@ -918,10 +939,7 @@ public float ArtificialHealth if (value > MaxArtificialHealth) MaxArtificialHealth = value; - AhpStat.AhpProcess ahp = ActiveArtificialHealthProcesses.FirstOrDefault(); - - if (ahp is not null) - ahp.CurrentAmount = value; + ActiveArtificialHealthProcesses.FirstOrDefault()?.CurrentAmount = value; } } @@ -938,8 +956,7 @@ public float MaxArtificialHealth AhpStat.AhpProcess ahp = ActiveArtificialHealthProcesses.FirstOrDefault(); - if (ahp is not null) - ahp.Limit = value; + ahp?.Limit = value; } } @@ -1542,7 +1559,7 @@ public static Player Get(string args) /// Contains the updated arguments after processing. /// Determines whether empty entries should be kept in the result. /// An representing the processed players. - public static IEnumerable GetProcessedData(ArraySegment args, int startIndex, out string[] newargs, bool keepEmptyEntries = false) => RAUtils.ProcessPlayerIdOrNamesList(args, startIndex, out newargs, keepEmptyEntries).Select(hub => Get(hub)); + public static IEnumerable GetProcessedData(ArraySegment args, int startIndex, out string[] newargs, bool keepEmptyEntries = false) => RAUtils.ProcessPlayerIdOrNamesList(args, startIndex, out newargs, keepEmptyEntries).Select(Get); /// /// Gets an containing all players processed based on the arguments specified. @@ -2931,7 +2948,7 @@ public void AddItem(Firearm item, IEnumerable identifiers) /// The that was added. public Item AddItem(FirearmPickup pickup, IEnumerable identifiers) { - Firearm firearm = Item.Get(Inventory.ServerAddItem(pickup.Type, ItemAddReason.AdminCommand, pickup.Serial, pickup.Base)); + Firearm firearm = Item.Get(Inventory.ServerAddItem(pickup.Type, ItemAddReason.PickedUp, pickup.Serial, pickup.Base)); if (identifiers is not null) firearm.AddAttachment(identifiers); @@ -4031,8 +4048,7 @@ public void SetCooldownItem(float time, ItemType itemType) /// public override bool Equals(object obj) { - Player player = obj as Player; - return (object)player != null && ReferenceHub == player.ReferenceHub; + return obj is Player player && ReferenceHub == player.ReferenceHub; } /// @@ -4048,7 +4064,7 @@ public override int GetHashCode() /// The second player instance. /// if the values are equal. #pragma warning disable SA1201 - public static bool operator ==(Player player1, Player player2) => player1?.Equals(player2) ?? player2 is null; + public static bool operator ==(Player player1, Player player2) => player1?.Equals(player2) ?? (player2 is null); /// /// Returns whether the two players are different. diff --git a/EXILED/Exiled.API/Features/Plugin.cs b/EXILED/Exiled.API/Features/Plugin.cs index cebeab971f..e2818fb8df 100644 --- a/EXILED/Exiled.API/Features/Plugin.cs +++ b/EXILED/Exiled.API/Features/Plugin.cs @@ -15,9 +15,13 @@ namespace Exiled.API.Features using System.Reflection; using CommandSystem; + using Enums; + using Extensions; + using Interfaces; + using RemoteAdmin; /// @@ -122,9 +126,7 @@ public virtual void OnRegisteringCommands() if (typeof(ParentCommand).IsAssignableFrom(commandHandlerType)) { - ParentCommand parentCommand = GetCommand(commandHandlerType) as ParentCommand; - - if (parentCommand == null) + if (GetCommand(commandHandlerType) is not ParentCommand parentCommand) { if (!toRegister.TryGetValue(commandHandlerType, out List list)) toRegister.Add(commandHandlerType, new() { command }); diff --git a/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs b/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs index 93ebd299d4..a1352d6b8d 100644 --- a/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs +++ b/EXILED/Exiled.API/Features/Pools/DictionaryPool.cs @@ -83,4 +83,4 @@ public KeyValuePair[] ToArrayReturn(Dictionary obj) return array; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pools/HashSetPool.cs b/EXILED/Exiled.API/Features/Pools/HashSetPool.cs index b8749f5faa..06332c0437 100644 --- a/EXILED/Exiled.API/Features/Pools/HashSetPool.cs +++ b/EXILED/Exiled.API/Features/Pools/HashSetPool.cs @@ -56,4 +56,4 @@ public T[] ToArrayReturn(HashSet obj) return array; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pools/IPool.cs b/EXILED/Exiled.API/Features/Pools/IPool.cs index 57a2f3da46..edd40fedf4 100644 --- a/EXILED/Exiled.API/Features/Pools/IPool.cs +++ b/EXILED/Exiled.API/Features/Pools/IPool.cs @@ -25,4 +25,4 @@ public interface IPool /// The object to return, of type . public void Return(T obj); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pools/ListPool.cs b/EXILED/Exiled.API/Features/Pools/ListPool.cs index f0508f7834..dda0918930 100644 --- a/EXILED/Exiled.API/Features/Pools/ListPool.cs +++ b/EXILED/Exiled.API/Features/Pools/ListPool.cs @@ -62,4 +62,4 @@ public T[] ToArrayReturn(List obj) return array; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pools/QueuePool.cs b/EXILED/Exiled.API/Features/Pools/QueuePool.cs index 04b5f3df50..7b3e093a9f 100644 --- a/EXILED/Exiled.API/Features/Pools/QueuePool.cs +++ b/EXILED/Exiled.API/Features/Pools/QueuePool.cs @@ -77,4 +77,4 @@ public T[] ToArrayReturn(Queue obj) return array; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs b/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs index 16d84cc697..edf576e663 100644 --- a/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs +++ b/EXILED/Exiled.API/Features/Pools/StringBuilderPool.cs @@ -52,4 +52,4 @@ public string ToStringReturn(StringBuilder obj) return s; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/PrefabHelper.cs b/EXILED/Exiled.API/Features/PrefabHelper.cs index 22579651ac..fe05eceef2 100644 --- a/EXILED/Exiled.API/Features/PrefabHelper.cs +++ b/EXILED/Exiled.API/Features/PrefabHelper.cs @@ -14,9 +14,12 @@ namespace Exiled.API.Features using Exiled.API.Enums; using Exiled.API.Features.Attributes; + using MapGeneration.Distributors; using MapGeneration.RoomConnectors; + using Mirror; + using UnityEngine; /// @@ -32,7 +35,7 @@ public static class PrefabHelper /// /// Gets a of and their corresponding . /// - public static IReadOnlyDictionary PrefabToGameObjectAndComponent => Prefabs; + public static IReadOnlyDictionary PrefabToGameObjectAndComponent => Prefabs; /// /// Gets a of and their corresponding . @@ -124,7 +127,7 @@ public static GameObject Spawn(PrefabType prefabType, Vector3 position = default PrefabType.HCZTwoSided => 0b00000000, PrefabType.HCZOneSided => 0b00000001, PrefabType.HCZBreakableDoor => 0b00000011, - _ => 0 + _ => 0, }; } diff --git a/EXILED/Exiled.API/Features/Ragdoll.cs b/EXILED/Exiled.API/Features/Ragdoll.cs index 19321ee35d..e743ad4ea2 100644 --- a/EXILED/Exiled.API/Features/Ragdoll.cs +++ b/EXILED/Exiled.API/Features/Ragdoll.cs @@ -12,15 +12,22 @@ namespace Exiled.API.Features using System.Linq; using DeathAnimations; + using Enums; + using Exiled.API.Extensions; using Exiled.API.Interfaces; + using Mirror; + using PlayerRoles; using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.Ragdolls; + using PlayerStatsSystem; + using RelativePositioning; + using UnityEngine; using BaseScp3114Ragdoll = PlayerRoles.PlayableScps.Scp3114.Scp3114Ragdoll; @@ -472,4 +479,4 @@ public void Spawn(NetworkConnection ownerConnection, uint? assetId = null) /// A string containing Ragdoll-related data. public override string ToString() => $"{Owner} ({Name}) [{DeathReason}] *{Role}* |{CreationTime}| ={IsExpired}="; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Recontainer.cs b/EXILED/Exiled.API/Features/Recontainer.cs index dbc31a35bf..4b17861038 100644 --- a/EXILED/Exiled.API/Features/Recontainer.cs +++ b/EXILED/Exiled.API/Features/Recontainer.cs @@ -12,8 +12,11 @@ namespace Exiled.API.Features using System.Linq; using Enums; + using Exiled.API.Features.Doors; + using PlayerRoles.PlayableScps.Scp079; + using UnityEngine; /// @@ -187,7 +190,9 @@ public static bool IsContainmentSequenceSuccessful /// /// The announcement to play. /// The glitchy multiplier. +#pragma warning disable IDE0060 // TODO: glitchyMultiplier is not used public static void PlayAnnouncement(string announcement, float glitchyMultiplier) => Base.PlayAnnouncement(announcement, false, false, null); +#pragma warning restore IDE0060 /// /// Begins the overcharge procedure. diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index fba56ca96d..aeebe336f6 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -12,12 +12,17 @@ namespace Exiled.API.Features using System.Linq; using CustomPlayerEffects; + using Enums; + using Extensions; + using PlayerRoles; + using Respawning; using Respawning.Waves; using Respawning.Waves.Generic; + using UnityEngine; /// @@ -28,6 +33,7 @@ public static class Respawn /// /// Gets the of paused 's. /// + [Obsolete("This is now unused.", true)] public static List PausedWaves { get; } = new(); /// @@ -389,31 +395,43 @@ public static void ForceWave(SpawnableWaveBase spawnableWaveBase) /// Pauses a specific respawn wave by removing it from the active wave list and adding it to the paused wave list. /// /// The representing the wave to pause. - public static void PauseWave(SpawnableFaction spawnableFaction) + public static void PauseWave(SpawnableFaction spawnableFaction) => PauseWave(spawnableFaction, true); + + /// + /// Pauses or resumes the timer of a time-based respawn wave for the specified faction. + /// + /// The faction associated with the respawn wave. + /// True to pause the wave timer, false to resume it. + public static void PauseWave(SpawnableFaction spawnableFaction, bool isForcePause) { if (TryGetWaveBase(spawnableFaction, out SpawnableWaveBase spawnableWaveBase)) { - if (!PausedWaves.Contains(spawnableWaveBase)) - { - PausedWaves.Add(spawnableWaveBase); - } - - if (WaveManager.Waves.Contains(spawnableWaveBase)) + if (spawnableWaveBase is TimeBasedWave timeBasedWave) { - WaveManager.Waves.Remove(spawnableWaveBase); + timeBasedWave.Timer.IsForcefullyPaused = isForcePause; } } } /// - /// Pauses respawn waves by removing them from WaveManager.Waves and storing them in . + /// Pauses all time-based respawn waves by controlling their timers. /// - /// - public static void PauseWaves() + public static void PauseWaves() => PauseWaves(true); + + /// + /// Pauses or resumes all time-based respawn waves by controlling their timers. + /// + /// If true, all time-based waves will be paused. If false, their timers will resume. + /// Unlike ClearWaves, this does not remove waves from the system, it only controls their timer state. + public static void PauseWaves(bool isForcePause = true) { - PausedWaves.Clear(); - PausedWaves.AddRange(WaveManager.Waves); - WaveManager.Waves.Clear(); + foreach (SpawnableWaveBase wave in WaveManager.Waves) + { + if (wave is TimeBasedWave timeBasedWave) + { + timeBasedWave.Timer.IsForcefullyPaused = isForcePause; + } + } } /// @@ -432,50 +450,61 @@ public static void PauseWaves(List spawnableFactions) } /// - /// Resumes respawn waves by filling WaveManager.Waves with values stored in . + /// Pauses the specified list of respawn waves by iterating through each wave + /// and pausing it using the method. /// - /// - /// This also clears . - public static void ResumeWaves() + /// A list of instances representing the waves to pause. + /// True to pause the wave timer, false to resume it. + public static void PauseWaves(List spawnableFactions, bool isForcePause = true) { - WaveManager.Waves.Clear(); - WaveManager.Waves.AddRange(PausedWaves); - PausedWaves.Clear(); + foreach (SpawnableFaction spawnableFaction in spawnableFactions) + { + PauseWave(spawnableFaction, isForcePause); + } } /// - /// Restarts a specific respawn wave by adding it back to the active wave list - /// and removing it from the paused wave list if necessary. + /// Resumes respawn waves. /// - /// - /// The representing the wave to restart. - /// - public static void RestartWave(SpawnableFaction spawnableFaction) + public static void ResumeWaves() { - if (TryGetWaveBase(spawnableFaction, out SpawnableWaveBase spawnableWaveBase)) + foreach (SpawnableWaveBase wave in WaveManager.Waves) { - if (!WaveManager.Waves.Contains(spawnableWaveBase)) - { - WaveManager.Waves.Add(spawnableWaveBase); - } - - if (PausedWaves.Contains(spawnableWaveBase)) + if (wave is TimeBasedWave timeBasedWave) { - PausedWaves.Remove(spawnableWaveBase); + timeBasedWave.Timer.IsForcefullyPaused = false; } } } + /// + /// Restarts a specific respawn wave by adding it back to the active wave list + /// and removing it from the paused wave list if necessary. + /// + /// The representing the wave to restart. + public static void RestartWave(SpawnableFaction spawnableFaction) + { + PauseWave(spawnableFaction, false); + } + + /// + /// Restarts respawn waves by clearing WaveManager.Waves and filling it with new values.. + /// + public static void RestartWaves() => RestartWaves(true); + /// /// Restarts respawn waves by clearing WaveManager.Waves and filling it with new values.. /// - /// - /// This also clears . - public static void RestartWaves() + /// True to reset the spawn interval. + public static void RestartWaves(bool resetSpawnInterval) { - WaveManager.Waves.Clear(); - WaveManager.Waves.AddRange(new List { new ChaosMiniWave(), new ChaosSpawnWave(), new NtfMiniWave(), new NtfSpawnWave() }); - PausedWaves.Clear(); + foreach (SpawnableWaveBase wave in WaveManager.Waves) + { + if (wave is TimeBasedWave timeBasedWave) + { + timeBasedWave.Timer.Reset(resetSpawnInterval); + } + } } /// diff --git a/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs b/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs index 42e6cfe349..230a127c4c 100644 --- a/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs +++ b/EXILED/Exiled.API/Features/Roles/DestroyedRole.cs @@ -7,14 +7,7 @@ namespace Exiled.API.Features.Roles { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using PlayerRoles; - using PlayerRoles.Voice; /// /// Defines a role that represents players with destroyed role. @@ -33,4 +26,4 @@ internal DestroyedRole(PlayerRoleBase baseRole) /// public override RoleTypeId Type { get; } = RoleTypeId.Destroyed; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs b/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs index 632abc33aa..a245812f32 100644 --- a/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs +++ b/EXILED/Exiled.API/Features/Roles/FilmMakerRole.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Roles { using PlayerRoles; + using UnityEngine; using FilmmakerGameRole = PlayerRoles.Filmmaker.FilmmakerRole; diff --git a/EXILED/Exiled.API/Features/Roles/FpcRole.cs b/EXILED/Exiled.API/Features/Roles/FpcRole.cs index e61e866ea7..17294f5236 100644 --- a/EXILED/Exiled.API/Features/Roles/FpcRole.cs +++ b/EXILED/Exiled.API/Features/Roles/FpcRole.cs @@ -11,6 +11,7 @@ namespace Exiled.API.Features.Roles using System.Collections.Generic; using Exiled.API.Features.Pools; + using PlayerRoles; using PlayerRoles.FirstPersonControl; using PlayerRoles.FirstPersonControl.Thirdperson; @@ -18,8 +19,11 @@ namespace Exiled.API.Features.Roles using PlayerRoles.Spectating; using PlayerRoles.Visibility; using PlayerRoles.Voice; + using PlayerStatsSystem; + using RelativePositioning; + using UnityEngine; /// @@ -348,4 +352,4 @@ public void Jump(float? jumpStrength = null) FirstPersonController.FpcModule.Motor.JumpController.ForceJump(strength); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/HumanRole.cs b/EXILED/Exiled.API/Features/Roles/HumanRole.cs index 767a010d45..307376b44b 100644 --- a/EXILED/Exiled.API/Features/Roles/HumanRole.cs +++ b/EXILED/Exiled.API/Features/Roles/HumanRole.cs @@ -9,7 +9,7 @@ namespace Exiled.API.Features.Roles { using PlayerRoles; using PlayerRoles.PlayableScps.HumeShield; - using Respawning; + using Respawning.NamingRules; using HumanGameRole = PlayerRoles.HumanRole; diff --git a/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs b/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs index e0921af831..741d274e0d 100644 --- a/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs +++ b/EXILED/Exiled.API/Features/Roles/IHumeShieldRole.cs @@ -19,4 +19,4 @@ public interface IHumeShieldRole /// HumeShieldModuleBase HumeShieldModule { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/NoneRole.cs b/EXILED/Exiled.API/Features/Roles/NoneRole.cs index ed52752a5a..fe7aeb774f 100644 --- a/EXILED/Exiled.API/Features/Roles/NoneRole.cs +++ b/EXILED/Exiled.API/Features/Roles/NoneRole.cs @@ -30,6 +30,6 @@ internal NoneRole(PlayerRoleBase baseRole) public override RoleTypeId Type { get; } = RoleTypeId.None; /// - public VoiceModuleBase VoiceModule => (Base as NoneGameRole) !.VoiceModule; + public VoiceModuleBase VoiceModule => (Base as NoneGameRole).VoiceModule; } } \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs b/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs index 92ce09fa3f..d8f94198a9 100644 --- a/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs +++ b/EXILED/Exiled.API/Features/Roles/OverwatchRole.cs @@ -40,4 +40,4 @@ internal OverwatchRole(OverwatchGameRole baseRole) /// The overwatch RoleType. public RoleTypeId GetObfuscatedRole() => Base.GetRoleForUser(Owner.ReferenceHub); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/Role.cs b/EXILED/Exiled.API/Features/Roles/Role.cs index 31f53ac040..f6745bcb12 100644 --- a/EXILED/Exiled.API/Features/Roles/Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Role.cs @@ -10,12 +10,16 @@ namespace Exiled.API.Features.Roles using System; using Enums; + using Exiled.API.Features.Core; using Exiled.API.Features.Spawn; using Exiled.API.Interfaces; + using Extensions; + using PlayerRoles; using PlayerRoles.PlayableScps.Scp049.Zombies; + using UnityEngine; using DestroyedGameRole = PlayerRoles.DestroyedRole; @@ -138,7 +142,7 @@ protected Role(PlayerRoleBase baseRole) /// The role. /// The other role. /// if the values are equal. - public static bool operator ==(Role left, Role right) => left?.Equals(right) ?? right is null; + public static bool operator ==(Role left, Role right) => left?.Equals(right) ?? (right is null); /// /// Returns whether the two roles are different. @@ -242,4 +246,4 @@ public virtual void Set(RoleTypeId newRole, SpawnReason reason, RoleSpawnFlags s _ => throw new Exception($"Missing role found in Exiled.API.Features.Roles.Role::Create ({role?.RoleTypeId}). Please contact an Exiled developer."), }; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/Scp049Role.cs b/EXILED/Exiled.API/Features/Roles/Scp049Role.cs index 6283226eb4..05b163d390 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp049Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp049Role.cs @@ -11,13 +11,16 @@ namespace Exiled.API.Features.Roles using System.Linq; using CustomPlayerEffects; + using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.Ragdolls; using PlayerRoles.Subroutines; + using PlayerStatsSystem; + using UnityEngine; using Scp049GameRole = PlayerRoles.PlayableScps.Scp049.Scp049Role; @@ -116,7 +119,7 @@ internal Scp049Role(Scp049GameRole baseRole) /// /// Gets all the dead zombies. /// - public IEnumerable DeadZombies => Scp049ResurrectAbility.DeadZombies.Select(x => Player.Get(x)); + public IEnumerable DeadZombies => Scp049ResurrectAbility.DeadZombies.Select(Player.Get); /// /// Gets all the resurrected players. @@ -362,4 +365,4 @@ public void Sense(Player player) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/Scp079Role.cs b/EXILED/Exiled.API/Features/Roles/Scp079Role.cs index 9d7e308659..37202c1cdb 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp079Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp079Role.cs @@ -12,9 +12,13 @@ namespace Exiled.API.Features.Roles using Exiled.API.Enums; using Exiled.API.Features.Doors; + using Interactables.Interobjects.DoorUtils; + using MapGeneration; + using Mirror; + using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.Scp079; @@ -23,7 +27,9 @@ namespace Exiled.API.Features.Roles using PlayerRoles.PlayableScps.Scp079.Rewards; using PlayerRoles.Subroutines; using PlayerRoles.Voice; + using RelativePositioning; + using Utils.NonAllocLINQ; using Mathf = UnityEngine.Mathf; @@ -621,4 +627,4 @@ public void ActivateTesla(bool consumeEnergy = true) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/Scp096Role.cs b/EXILED/Exiled.API/Features/Roles/Scp096Role.cs index 6e78b6c662..7dba16ecd4 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp096Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp096Role.cs @@ -322,4 +322,4 @@ public void Charge(float cooldown = 1f) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/Scp106Role.cs b/EXILED/Exiled.API/Features/Roles/Scp106Role.cs index 8c5fda149a..fa94fe883e 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp106Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp106Role.cs @@ -10,11 +10,13 @@ namespace Exiled.API.Features.Roles using System.Collections.Generic; using Exiled.API.Enums; + using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; using PlayerRoles.PlayableScps.Scp106; using PlayerRoles.Subroutines; + using PlayerStatsSystem; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs b/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs index a4c9ba78cf..cb1bce9f4f 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp1507Role.cs @@ -66,4 +66,4 @@ internal Scp1507Role(Scp1507GameRole baseRole) /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base is ISpawnableScp spawnableScp ? spawnableScp.GetSpawnChance(alreadySpawned) : 0; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/Scp173Role.cs b/EXILED/Exiled.API/Features/Roles/Scp173Role.cs index f7f603eece..30928530d0 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp173Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp173Role.cs @@ -11,12 +11,15 @@ namespace Exiled.API.Features.Roles using System.Linq; using Exiled.API.Features.Hazards; + using Mirror; + using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; using PlayerRoles.PlayableScps.Scp173; using PlayerRoles.Subroutines; + using UnityEngine; using Scp173GameRole = PlayerRoles.PlayableScps.Scp173.Scp173Role; @@ -162,7 +165,7 @@ public float RemainingTantrumCooldown /// /// Gets a of players that are currently viewing SCP-173. Can be empty. /// - public IEnumerable ObservingPlayers => ObserversTracker.Observers.Select(x => Player.Get(x)); + public IEnumerable ObservingPlayers => ObserversTracker.Observers.Select(Player.Get); /// /// Gets SCP-173's max move speed. diff --git a/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs b/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs index 35a3aa032a..4d685518cd 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Roles using System.Collections.Generic; using Exiled.API.Enums; + using PlayerRoles; using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.HumeShield; diff --git a/EXILED/Exiled.API/Features/Roles/Scp939Role.cs b/EXILED/Exiled.API/Features/Roles/Scp939Role.cs index 222a57670d..42799d47a1 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp939Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp939Role.cs @@ -329,4 +329,4 @@ public void DestroyCurrentMimicPoint() /// The Spawn Chance. public float GetSpawnChance(List alreadySpawned) => Base.GetSpawnChance(alreadySpawned); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs b/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs index d7fbcc7920..1ae9c59cab 100644 --- a/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs +++ b/EXILED/Exiled.API/Features/Roles/SpectatorRole.cs @@ -11,6 +11,7 @@ namespace Exiled.API.Features.Roles using PlayerRoles; using PlayerRoles.Voice; + using UnityEngine; using SpectatorGameRole = PlayerRoles.Spectating.SpectatorRole; @@ -74,4 +75,4 @@ public Player SpectatedPlayer /// public VoiceModuleBase VoiceModule => Base.VoiceModule; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Room.cs b/EXILED/Exiled.API/Features/Room.cs index 846a76509c..bee30fa96c 100644 --- a/EXILED/Exiled.API/Features/Room.cs +++ b/EXILED/Exiled.API/Features/Room.cs @@ -12,18 +12,26 @@ namespace Exiled.API.Features using System.Linq; using Enums; + using Exiled.API.Extensions; using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + using MapGeneration; using MapGeneration.Holidays; using MapGeneration.Rooms; + using MEC; + using Mirror; + using PlayerRoles.PlayableScps.Scp079; + using RelativePositioning; + using UnityEngine; + using Utils.NonAllocLINQ; /// @@ -429,16 +437,16 @@ internal void InternalCreate() Identifier = gameObject.GetComponent(); RoomIdentifierToRoom.Add(Identifier, this); - Zone = Identifier.Zone.GetZone(); - - if (Zone is ZoneType.Unspecified) - Log.Warn($"[ZONETYPE UNKNOWN] {Identifier} Zone : {Identifier?.Zone}"); - Type = FindType(gameObject); if (Type is RoomType.Unknown) Log.Warn($"[ROOMTYPE UNKNOWN] {Identifier} Name : {gameObject?.name.RemoveBracketsOnEndOfName()} Shape : {Identifier?.Shape}"); + Zone = Type is RoomType.Pocket ? ZoneType.Pocket : Identifier.Zone.GetZone(); + + if (Zone is ZoneType.Unspecified) + Log.Warn($"[ZONETYPE UNKNOWN] {Identifier} Zone : {Identifier?.Zone}"); + RoomLightControllers = RoomLightControllersValue.AsReadOnly(); GetComponentsInChildren().ForEach(component => @@ -500,7 +508,7 @@ private static RoomType FindType(GameObject gameObject) "HCZ_Corner_Deep" => RoomType.HczCornerDeep, "HCZ_Straight" => RoomType.HczStraight, "HCZ_Straight_C" => RoomType.HczStraightC, - "HCZ_Straight_PipeRoom"=> RoomType.HczStraightPipeRoom, + "HCZ_Straight_PipeRoom" => RoomType.HczStraightPipeRoom, "HCZ_Straight Variant" => RoomType.HczStraightVariant, "HCZ_ChkpA" => RoomType.HczElevatorA, "HCZ_ChkpB" => RoomType.HczElevatorB, @@ -533,7 +541,7 @@ private static RoomType FindType(GameObject gameObject) "HCZ_EZ_Checkpoint Part" => gameObject.transform.position.z switch { > 95 => RoomType.HczEzCheckpointA, - _ => RoomType.HczEzCheckpointB + _ => RoomType.HczEzCheckpointB, }, _ => RoomType.Unknown, }; @@ -546,4 +554,4 @@ private static string TryRemovePostfixes(string str) return str; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Round.cs b/EXILED/Exiled.API/Features/Round.cs index 02a3407b5a..1ee9b16407 100644 --- a/EXILED/Exiled.API/Features/Round.cs +++ b/EXILED/Exiled.API/Features/Round.cs @@ -259,4 +259,4 @@ public static bool EndRound(bool forceEnd = false) /// public static void Start() => CharacterClassManager.ForceRoundStart(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs b/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs index e8bb6a3f02..de6006d8f8 100644 --- a/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs +++ b/EXILED/Exiled.API/Features/Scp3114Ragdoll.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features { using Exiled.API.Interfaces; + using PlayerRoles; using BaseScp3114Ragdoll = PlayerRoles.PlayableScps.Scp3114.Scp3114Ragdoll; @@ -75,4 +76,4 @@ public bool IsPlayingAnimation set => Base._playingAnimation = value; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Scp559.cs b/EXILED/Exiled.API/Features/Scp559.cs index 246a030d7f..1a0225e446 100644 --- a/EXILED/Exiled.API/Features/Scp559.cs +++ b/EXILED/Exiled.API/Features/Scp559.cs @@ -12,7 +12,9 @@ namespace Exiled.API.Features using System.Linq; using Exiled.API.Interfaces; + using MapGeneration; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Scp914.cs b/EXILED/Exiled.API/Features/Scp914.cs index 7d9ea65818..3088d8849c 100644 --- a/EXILED/Exiled.API/Features/Scp914.cs +++ b/EXILED/Exiled.API/Features/Scp914.cs @@ -13,7 +13,9 @@ namespace Exiled.API.Features using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pools; + using global::Scp914; + using UnityEngine; /// @@ -141,4 +143,4 @@ public static IEnumerable Scp914InputObject(out IEnumerable /// Interact code. public static void Start(Player player = null, Scp914InteractCode code = Scp914InteractCode.Activate) => Scp914Controller.ServerInteract((player ?? Server.Host).ReferenceHub, (byte)code); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Scp956.cs b/EXILED/Exiled.API/Features/Scp956.cs index 49c90a5b36..cdcc2b75ee 100644 --- a/EXILED/Exiled.API/Features/Scp956.cs +++ b/EXILED/Exiled.API/Features/Scp956.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features using Exiled.API.Enums; using Exiled.API.Extensions; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Server.cs b/EXILED/Exiled.API/Features/Server.cs index 0d5809912e..fd90b8d14c 100644 --- a/EXILED/Exiled.API/Features/Server.cs +++ b/EXILED/Exiled.API/Features/Server.cs @@ -11,8 +11,6 @@ namespace Exiled.API.Features using System.Collections.Generic; using System.Reflection; - using Exiled.API.Enums; - using GameCore; using Interfaces; diff --git a/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs b/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs index 405a285098..63f85fa6a4 100644 --- a/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs +++ b/EXILED/Exiled.API/Features/Spawn/LockerSpawnPoint.cs @@ -12,7 +12,9 @@ namespace Exiled.API.Features.Spawn using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features.Lockers; + using UnityEngine; + using YamlDotNet.Serialization; /// @@ -78,4 +80,4 @@ public void GetSpawningInfo(out Locker locker, out Chamber chamber, out Vector3 position = chamber?.GetRandomSpawnPoint() ?? (Offset == Vector3.zero ? locker.Position : locker.Transform.TransformPoint(Offset)); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs b/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs index 97041a2c92..dc219b40a6 100644 --- a/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs +++ b/EXILED/Exiled.API/Features/Spawn/RoomSpawnPoint.cs @@ -56,4 +56,4 @@ public override Vector3 Position set => throw new InvalidOperationException("The position of this type of SpawnPoint cannot be changed."); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs b/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs index 975d5bc77e..a1426f2fa6 100644 --- a/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs +++ b/EXILED/Exiled.API/Features/Spawn/SpawnLocation.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Spawn { using Exiled.API.Interfaces; + using PlayerRoles; using UnityEngine; @@ -45,4 +46,4 @@ public SpawnLocation(RoleTypeId roleType, Vector3 position, float horizontalRota /// public float HorizontalRotation { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs b/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs index 880ea9e35a..66ccfb4f22 100644 --- a/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs +++ b/EXILED/Exiled.API/Features/Spawn/SpawnPoint.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Features.Spawn { using Exiled.API.Interfaces; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/TeslaGate.cs b/EXILED/Exiled.API/Features/TeslaGate.cs index ddc04ac791..dd9893e929 100644 --- a/EXILED/Exiled.API/Features/TeslaGate.cs +++ b/EXILED/Exiled.API/Features/TeslaGate.cs @@ -12,9 +12,13 @@ namespace Exiled.API.Features using System.Linq; using Exiled.API.Interfaces; + using Hazards; + using MEC; + using PlayerRoles; + using UnityEngine; using BaseTeslaGate = global::TeslaGate; @@ -178,7 +182,7 @@ public bool UseInstantBurst /// /// Gets a of which contains all the tantrums to destroy. /// - public IEnumerable TantrumsToDestroy => Base.TantrumsToBeDestroyed.Select(x => Hazard.Get(x)); + public IEnumerable TantrumsToDestroy => Base.TantrumsToBeDestroyed.Select(Hazard.Get); /// /// Gets a of which contains all the players inside the hurt range. @@ -293,4 +297,4 @@ public bool CanBeIdle(Player player) => player is not null && player.IsAlive && public bool CanBeTriggered(Player player) => player is not null && player.IsAlive && !IgnoredPlayers.Contains(player) && !IgnoredRoles.Contains(player.Role) && !IgnoredTeams.Contains(player.Role.Team) && IsPlayerInTriggerRange(player); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index f03d412826..9c58b1df82 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -12,8 +12,11 @@ namespace Exiled.API.Features.Toys using AdminToys; using Enums; + using Exiled.API.Interfaces; + using Footprinting; + using Mirror; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Toys/Light.cs b/EXILED/Exiled.API/Features/Toys/Light.cs index beda646358..d8b1f0041d 100644 --- a/EXILED/Exiled.API/Features/Toys/Light.cs +++ b/EXILED/Exiled.API/Features/Toys/Light.cs @@ -13,6 +13,7 @@ namespace Exiled.API.Features.Toys using AdminToys; using Enums; + using Exiled.API.Interfaces; using UnityEngine; diff --git a/EXILED/Exiled.API/Features/Toys/Primitive.cs b/EXILED/Exiled.API/Features/Toys/Primitive.cs index 5b577c73ff..fe22f7a811 100644 --- a/EXILED/Exiled.API/Features/Toys/Primitive.cs +++ b/EXILED/Exiled.API/Features/Toys/Primitive.cs @@ -7,14 +7,15 @@ namespace Exiled.API.Features.Toys { - using System; using System.Linq; using AdminToys; using Enums; + using Exiled.API.Interfaces; using Exiled.API.Structs; + using UnityEngine; using Object = UnityEngine.Object; @@ -159,4 +160,4 @@ public static Primitive Get(PrimitiveObjectToy primitiveObjectToy) return adminToy is not null ? adminToy as Primitive : new(primitiveObjectToy); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs index c43eb9360f..87a82c7060 100644 --- a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs +++ b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs @@ -12,9 +12,8 @@ namespace Exiled.API.Features.Toys using System.Linq; using Enums; - using Exiled.API.Interfaces; - using Mirror; + using Exiled.API.Interfaces; using PlayerStatsSystem; diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index cd2b182499..f058178111 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -1445,4 +1445,4 @@ private void EndingPlayBack() } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Toys/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 71066b22c3..427467ec6a 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -101,4 +101,4 @@ public static Text Create(Transform parent = null, Vector3? position = null, Qua return toy; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 73a6500faf..0c7c5697a6 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -114,7 +114,7 @@ public static Waypoint Create(Transform parent = null, Vector3? position = null, { Priority = priority, VisualizeBounds = visualizeBounds, - BoundsSize = scale ?? Vector3.one * WaypointToy.MaxBounds, + BoundsSize = scale ?? (Vector3.one * WaypointToy.MaxBounds), LocalPosition = position ?? Vector3.zero, LocalRotation = rotation ?? Quaternion.identity, }; diff --git a/EXILED/Exiled.API/Features/Warhead.cs b/EXILED/Exiled.API/Features/Warhead.cs index f765905410..652377647d 100644 --- a/EXILED/Exiled.API/Features/Warhead.cs +++ b/EXILED/Exiled.API/Features/Warhead.cs @@ -11,9 +11,13 @@ namespace Exiled.API.Features using System.Collections.Generic; using Enums; + using Exiled.API.Extensions; + using Interactables.Interobjects.DoorUtils; + using Mirror; + using UnityEngine; /// @@ -34,7 +38,7 @@ public static class Warhead /// /// Gets the cached component. /// - public static AlphaWarheadOutsitePanel OutsitePanel => field != null ? field : (field = UnityEngine.Object.FindFirstObjectByType()); + public static AlphaWarheadOutsitePanel OutsitePanel => field?.gameObject != null ? field : (field = UnityEngine.Object.FindFirstObjectByType()); /// /// Gets the of the warhead lever. @@ -238,7 +242,7 @@ public static void Start() public static void Start(bool isAutomatic, bool suppressSubtitles = false, Player trigger = null) { Controller.InstantPrepare(); - Controller.StartDetonation(isAutomatic, suppressSubtitles, trigger == null ? null : trigger.ReferenceHub); + Controller.StartDetonation(isAutomatic, suppressSubtitles, trigger?.ReferenceHub); } /// @@ -290,4 +294,4 @@ public static void Start(bool isAutomatic, bool suppressSubtitles = false, Playe /// Whether the given position is prone to being detonated. public static bool CanBeDetonated(Vector3 pos, bool includeOnlyLifts = false) => AlphaWarheadController.CanBeDetonated(pos, includeOnlyLifts); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Waves/TimedWave.cs b/EXILED/Exiled.API/Features/Waves/TimedWave.cs index 6e9a5c55bf..ebded06851 100644 --- a/EXILED/Exiled.API/Features/Waves/TimedWave.cs +++ b/EXILED/Exiled.API/Features/Waves/TimedWave.cs @@ -11,7 +11,9 @@ namespace Exiled.API.Features.Waves using System.Linq; using Exiled.API.Enums; + using PlayerRoles; + using Respawning; using Respawning.Announcements; using Respawning.Waves; @@ -67,7 +69,7 @@ public class TimedWave Faction.FoundationStaff when IsMiniWave => SpawnableFaction.NtfMiniWave, Faction.FoundationStaff => SpawnableFaction.NtfWave, Faction.FoundationEnemy when IsMiniWave => SpawnableFaction.ChaosMiniWave, - _ => SpawnableFaction.ChaosWave + _ => SpawnableFaction.ChaosWave, }; /// @@ -96,7 +98,7 @@ public class TimedWave public static bool TryGetTimedWaves(Faction faction, out List waves) { List spawnableWaveBases = WaveManager.Waves.Where(w => w is TimeBasedWave wave && wave.TargetFaction == faction).ToList(); - if(!spawnableWaveBases.Any()) + if (!spawnableWaveBases.Any()) { waves = null; return false; @@ -115,7 +117,7 @@ public static bool TryGetTimedWaves(Faction faction, out List waves) public static bool TryGetTimedWaves(Team team, out List waves) { List spawnableWaveBases = WaveManager.Waves.Where(w => w is TimeBasedWave wave && wave.TargetFaction.GetSpawnableTeam() == team).ToList(); - if(!spawnableWaveBases.Any()) + if (!spawnableWaveBases.Any()) { waves = null; return false; diff --git a/EXILED/Exiled.API/Features/Waves/WaveTimer.cs b/EXILED/Exiled.API/Features/Waves/WaveTimer.cs index b99f2cf2bf..df96fee7cc 100644 --- a/EXILED/Exiled.API/Features/Waves/WaveTimer.cs +++ b/EXILED/Exiled.API/Features/Waves/WaveTimer.cs @@ -15,8 +15,6 @@ namespace Exiled.API.Features.Waves using PlayerRoles; - using Respawning; - using Respawning.Waves; /// diff --git a/EXILED/Exiled.API/Features/Window.cs b/EXILED/Exiled.API/Features/Window.cs index 2d327ff0c4..a1f92bc26f 100644 --- a/EXILED/Exiled.API/Features/Window.cs +++ b/EXILED/Exiled.API/Features/Window.cs @@ -12,10 +12,13 @@ namespace Exiled.API.Features using System.Linq; using DamageHandlers; + using Enums; + using Exiled.API.Extensions; using Exiled.API.Features.Doors; using Exiled.API.Interfaces; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Features/Workstation.cs b/EXILED/Exiled.API/Features/Workstation.cs index ae4b2612d3..2bc63e1e5e 100644 --- a/EXILED/Exiled.API/Features/Workstation.cs +++ b/EXILED/Exiled.API/Features/Workstation.cs @@ -14,9 +14,11 @@ namespace Exiled.API.Features using Exiled.API.Enums; using Exiled.API.Interfaces; + using InventorySystem.Items.Firearms.Attachments; + using MapGeneration.Distributors; - using Mirror; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs b/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs index 3bd096a2a7..c0ffcb97d2 100644 --- a/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs +++ b/EXILED/Exiled.API/Interfaces/Audio/IAudioFilter.cs @@ -23,4 +23,4 @@ public interface IAudioFilter /// void Reset(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs b/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs index ad9c9caea9..32eeaf798f 100644 --- a/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs +++ b/EXILED/Exiled.API/Interfaces/Audio/ILiveSource.cs @@ -13,4 +13,4 @@ namespace Exiled.API.Interfaces.Audio public interface ILiveSource { } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs b/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs index 6f0423b86f..7ab6211c81 100644 --- a/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs +++ b/EXILED/Exiled.API/Interfaces/Audio/IPcmSource.cs @@ -56,4 +56,4 @@ public interface IPcmSource : IDisposable /// void Reset(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/IPosition.cs b/EXILED/Exiled.API/Interfaces/IPosition.cs index 467495137a..a169aa2965 100644 --- a/EXILED/Exiled.API/Interfaces/IPosition.cs +++ b/EXILED/Exiled.API/Interfaces/IPosition.cs @@ -19,4 +19,4 @@ public interface IPosition /// public Vector3 Position { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/IRotation.cs b/EXILED/Exiled.API/Interfaces/IRotation.cs index f7e244b19b..c7f1090d79 100644 --- a/EXILED/Exiled.API/Interfaces/IRotation.cs +++ b/EXILED/Exiled.API/Interfaces/IRotation.cs @@ -19,4 +19,4 @@ public interface IRotation /// public Quaternion Rotation { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/IValidator.cs b/EXILED/Exiled.API/Interfaces/IValidator.cs new file mode 100644 index 0000000000..f9e2004ee1 --- /dev/null +++ b/EXILED/Exiled.API/Interfaces/IValidator.cs @@ -0,0 +1,22 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) ExMod Team. All rights reserved. +// Licensed under the CC BY-SA 3.0 license. +// +// ----------------------------------------------------------------------- + +namespace Exiled.API.Interfaces +{ + /// + /// Interface for all validations attributes. + /// + public interface IValidator + { + /// + /// Checks if is satisfying this attributes condition. + /// + /// Value to check. + /// Whether the value has passed check. + public bool Check(object other); + } +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/IWorldSpace.cs b/EXILED/Exiled.API/Interfaces/IWorldSpace.cs index 0df54e81e9..f17d2219fc 100644 --- a/EXILED/Exiled.API/Interfaces/IWorldSpace.cs +++ b/EXILED/Exiled.API/Interfaces/IWorldSpace.cs @@ -15,4 +15,4 @@ namespace Exiled.API.Interfaces public interface IWorldSpace : IPosition, IRotation { } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs b/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs index d724f997ea..fbc1b980aa 100644 --- a/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs +++ b/EXILED/Exiled.API/Interfaces/Keycards/ILabelKeycard.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Interfaces.Keycards { using Exiled.API.Features.Items.Keycards; + using UnityEngine; /// diff --git a/EXILED/Exiled.API/Structs/Audio/TrackData.cs b/EXILED/Exiled.API/Structs/Audio/TrackData.cs index 93f549369f..596b137d23 100644 --- a/EXILED/Exiled.API/Structs/Audio/TrackData.cs +++ b/EXILED/Exiled.API/Structs/Audio/TrackData.cs @@ -71,4 +71,4 @@ public readonly string FormattedDuration } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.API/Structs/PrimitiveSettings.cs b/EXILED/Exiled.API/Structs/PrimitiveSettings.cs index 24fcc04393..0da6238ce4 100644 --- a/EXILED/Exiled.API/Structs/PrimitiveSettings.cs +++ b/EXILED/Exiled.API/Structs/PrimitiveSettings.cs @@ -8,6 +8,7 @@ namespace Exiled.API.Structs { using AdminToys; + using UnityEngine; /// diff --git a/EXILED/Exiled.CreditTags/Enums/InfoSide.cs b/EXILED/Exiled.CreditTags/Enums/InfoSide.cs index 9d87360d4b..7bf491865a 100644 --- a/EXILED/Exiled.CreditTags/Enums/InfoSide.cs +++ b/EXILED/Exiled.CreditTags/Enums/InfoSide.cs @@ -18,7 +18,7 @@ public enum InfoSide Badge, /// - /// Uses Custom Player Info area + /// Uses Custom Player Info area. /// CustomPlayerInfo, diff --git a/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs b/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs index 06c30e30fb..4d1bfd0bed 100644 --- a/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs +++ b/EXILED/Exiled.CreditTags/Events/CreditsHandler.cs @@ -9,6 +9,7 @@ namespace Exiled.CreditTags.Events { using Exiled.CreditTags.Features; using Exiled.Events.EventArgs.Player; + using MEC; using static CreditTags; diff --git a/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs b/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs index ac3cc91781..9092ae4056 100644 --- a/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs +++ b/EXILED/Exiled.CreditTags/Features/DatabaseHandler.cs @@ -12,6 +12,7 @@ namespace Exiled.CreditTags.Features using System.IO; using Cryptography; + using Exiled.API.Features; using Exiled.CreditTags.Enums; @@ -55,7 +56,7 @@ static DatabaseHandler() /// /// Gets the path to the cache directory. /// - private static DirectoryInfo CacheDirectory { get; } = new (Path.Combine(Paths.Configs, "CreditTags")); + private static DirectoryInfo CacheDirectory { get; } = new(Path.Combine(Paths.Configs, "CreditTags")); /// /// Gets the path to the cache file. diff --git a/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs b/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs index b6ceaee015..15aa4ae1e9 100644 --- a/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs +++ b/EXILED/Exiled.CreditTags/Features/ThreadSafeRequest.cs @@ -10,7 +10,9 @@ namespace Exiled.CreditTags.Features using System.Collections.Generic; using Exiled.API.Features; + using MEC; + using UnityEngine.Networking; internal sealed class ThreadSafeRequest diff --git a/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs b/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs index 54f478d7ce..219f9e8aba 100644 --- a/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs +++ b/EXILED/Exiled.CustomItems/API/EventArgs/OwnerEscapingEventArgs.cs @@ -7,18 +7,11 @@ namespace Exiled.CustomItems.API.EventArgs { - using System.Collections.Generic; - - using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.CustomItems.API.Features; using Exiled.Events.EventArgs.Player; - using PlayerRoles; - - using Respawning; - /// /// Contains all information of a before a escapes. /// diff --git a/EXILED/Exiled.CustomItems/API/Extensions.cs b/EXILED/Exiled.CustomItems/API/Extensions.cs index b527a2191a..9fbfdc60e2 100644 --- a/EXILED/Exiled.CustomItems/API/Extensions.cs +++ b/EXILED/Exiled.CustomItems/API/Extensions.cs @@ -55,7 +55,7 @@ public static void ResetInventory(this Player player, IEnumerable newIte public static void Register(this IEnumerable customItems) { if (customItems is null) - throw new ArgumentNullException("customItems"); + throw new ArgumentNullException(nameof(customItems)); foreach (CustomItem customItem in customItems) customItem.TryRegister(); @@ -74,7 +74,7 @@ public static void Register(this IEnumerable customItems) public static void Unregister(this IEnumerable customItems) { if (customItems is null) - throw new ArgumentNullException("customItems"); + throw new ArgumentNullException(nameof(customItems)); foreach (CustomItem customItem in customItems) customItem.TryUnregister(); diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs b/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs index c1a77f6351..4b1e23ef21 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs @@ -18,6 +18,7 @@ namespace Exiled.CustomItems.API.Features using Exiled.Events.EventArgs.Player; using InventorySystem.Items.Armor; + using MEC; /// diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs b/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs index 68f8d07818..7ac099f9bd 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomGoggles.cs @@ -245,4 +245,4 @@ private void RemoveSafely(ReferenceHub hub) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs b/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs index feafdae9c2..00ee5157a5 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomGrenade.cs @@ -11,15 +11,12 @@ namespace Exiled.CustomItems.API.Features using Exiled.API.Extensions; using Exiled.API.Features; - using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pickups.Projectiles; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Map; using Exiled.Events.EventArgs.Player; - using Footprinting; - using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Pickups; @@ -225,4 +222,4 @@ private void OnInternalChangedIntoGrenade(ChangedIntoGrenadeEventArgs ev) ev.Projectile.GameObject.AddComponent().Init((ev.Pickup.PreviousOwner ?? Server.Host).GameObject, ev.Projectile.Base); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs b/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs index e131db7086..2b7356c0b6 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomItem.cs @@ -26,18 +26,21 @@ namespace Exiled.CustomItems.API.Features using Exiled.Events.EventArgs.Player; using Exiled.Events.EventArgs.Scp914; using Exiled.Loader; + using InventorySystem.Items.Pickups; + using MEC; + using PlayerRoles; + using UnityEngine; + using YamlDotNet.Serialization; using static CustomItems; - using BaseFirearmPickup = InventorySystem.Items.Firearms.FirearmPickup; using Firearm = Exiled.API.Features.Items.Firearm; using Item = Exiled.API.Features.Items.Item; - using Map = Exiled.API.Features.Map; using Player = Exiled.API.Features.Player; using UpgradingPickupEventArgs = Exiled.Events.EventArgs.Scp914.UpgradingPickupEventArgs; @@ -1106,4 +1109,4 @@ private void OnInternalUpgradingPickup(UpgradingPickupEventArgs ev) }); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs b/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs index 1777953129..3347c4b44f 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs @@ -21,7 +21,9 @@ namespace Exiled.CustomItems.API.Features using Exiled.API.Interfaces.Keycards; using Exiled.Events.EventArgs.Item; using Exiled.Events.EventArgs.Player; + using InventorySystem.Items.Keycards; + using UnityEngine; /// diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs index cc2e7f25bc..537ce96291 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs @@ -351,4 +351,4 @@ private void OnInternalChangingAttachment(ChangingAttachmentsEventArgs ev) OnChangingAttachment(ev); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomItems/Commands/Give.cs b/EXILED/Exiled.CustomItems/Commands/Give.cs index cc63ed2228..d4083c6097 100644 --- a/EXILED/Exiled.CustomItems/Commands/Give.cs +++ b/EXILED/Exiled.CustomItems/Commands/Give.cs @@ -18,8 +18,6 @@ namespace Exiled.CustomItems.Commands using Exiled.Permissions.Extensions; using RemoteAdmin; - using UnityStandardAssets.Effects; - using Utils; /// /// The command to give a player an item. @@ -127,4 +125,4 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s /// private bool CheckEligible(Player player) => player.IsAlive && !player.IsCuffed && (player.Items.Count < 8); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomItems/Commands/Main.cs b/EXILED/Exiled.CustomItems/Commands/Main.cs index 7aba0b0366..e3557d1a66 100644 --- a/EXILED/Exiled.CustomItems/Commands/Main.cs +++ b/EXILED/Exiled.CustomItems/Commands/Main.cs @@ -33,7 +33,7 @@ public Main() public override string[] Aliases { get; } = { "ci", "cis" }; /// - public override string Description { get; } = string.Empty; + public override string Description { get; } = "The parent command for EXILED custom items"; /// public override void LoadGeneratedCommands() diff --git a/EXILED/Exiled.CustomItems/Events/MapHandler.cs b/EXILED/Exiled.CustomItems/Events/MapHandler.cs index ed1ae61970..bb9966ba01 100644 --- a/EXILED/Exiled.CustomItems/Events/MapHandler.cs +++ b/EXILED/Exiled.CustomItems/Events/MapHandler.cs @@ -9,6 +9,7 @@ namespace Exiled.CustomItems.Events { using Exiled.API.Features; using Exiled.CustomItems.API.Features; + using MEC; /// diff --git a/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs b/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs index 8efcc98fb7..da551cd4f1 100644 --- a/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs +++ b/EXILED/Exiled.CustomItems/Patches/PlayerInventorySee.cs @@ -76,4 +76,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstruction); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomRoles/API/Extensions.cs b/EXILED/Exiled.CustomRoles/API/Extensions.cs index 8a0821216d..6cd23c603d 100644 --- a/EXILED/Exiled.CustomRoles/API/Extensions.cs +++ b/EXILED/Exiled.CustomRoles/API/Extensions.cs @@ -124,4 +124,4 @@ public static void Unregister(this IEnumerable customRoles) /// The the has selected, or . public static ActiveAbility? GetSelectedAbility(this Player player) => !ActiveAbility.AllActiveAbilities.TryGetValue(player, out HashSet abilities) ? null : abilities.FirstOrDefault(a => a.Check(player, CheckType.Selected)); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs b/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs index cadc7c63f0..9b823fbf95 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/ActiveAbility.cs @@ -141,7 +141,7 @@ public virtual bool Check(Player player, CheckType type) CheckType.Active => ActivePlayers.Contains(player), CheckType.Selected => SelectedPlayers.Contains(player), CheckType.Available => Players.Contains(player), - _ => throw new ArgumentOutOfRangeException(nameof(type), type, null) + _ => throw new ArgumentOutOfRangeException(nameof(type), type, null), }; return result; diff --git a/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs b/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs index 1528d08fa3..91198b9e3b 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/CustomAbility.cs @@ -166,8 +166,7 @@ public static IEnumerable RegisterAbilities(bool skipReflection = } } - if (customAbility is null) - customAbility = (CustomAbility)Activator.CreateInstance(type); + customAbility ??= (CustomAbility)Activator.CreateInstance(type); if (customAbility.TryRegister()) abilities.Add(customAbility); @@ -209,8 +208,7 @@ public static IEnumerable RegisterAbilities(IEnumerable tar } } - if (customAbility is null) - customAbility = (CustomAbility)Activator.CreateInstance(type); + customAbility ??= (CustomAbility)Activator.CreateInstance(type); if (customAbility.TryRegister()) abilities.Add(customAbility); @@ -311,7 +309,7 @@ public void RemoveAbility(Player player) /// True if the ability registered properly. internal bool TryRegister() { - if (!CustomRoles.Instance!.Config.IsEnabled) + if (!CustomRoles.Instance.Config.IsEnabled) return false; if (!Registered.Contains(this)) diff --git a/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs b/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs index f2dd9bc8d8..9f11652d14 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs @@ -25,8 +25,11 @@ namespace Exiled.CustomRoles.API.Features using Exiled.CustomItems.API.Features; using Exiled.Events.EventArgs.Player; using Exiled.Loader; + using InventorySystem.Configs; + using MEC; + using PlayerRoles; using UnityEngine; @@ -643,7 +646,7 @@ public virtual void AddRole(Player player) ability.AddAbility(player); } - if (CustomRoles.Instance!.Config.GotRoleHint.Show) + if (CustomRoles.Instance.Config.GotRoleHint.Show) ShowMessage(player); ShowBroadcast(player); @@ -807,7 +810,7 @@ public bool TryAddFriendlyFire(Dictionary ffRules, bool overw /// True if the role registered properly. internal bool TryRegister() { - if (!CustomRoles.Instance!.Config.IsEnabled) + if (!CustomRoles.Instance.Config.IsEnabled) return false; if (!Registered.Contains(this)) @@ -892,7 +895,7 @@ protected Vector3 GetSpawnPosition() } float totalchance = 0f; - List<(float chance, Vector3 pos)> spawnPointPool = new(4); + List<(float Chance, Vector3 Pos)> spawnPointPool = new(4); void Add(Vector3 pos, float chance) { @@ -985,7 +988,7 @@ protected virtual void UnsubscribeEvents() /// Shows the spawn message to the player. /// /// The to show the message to. - protected virtual void ShowMessage(Player player) => player.ShowHint(string.Format(CustomRoles.Instance!.Config.GotRoleHint.Content, Name, Description), CustomRoles.Instance.Config.GotRoleHint.Duration); + protected virtual void ShowMessage(Player player) => player.ShowHint(string.Format(CustomRoles.Instance.Config.GotRoleHint.Content, Name, Description), CustomRoles.Instance.Config.GotRoleHint.Duration); /// /// Shows the spawn broadcast to the player. diff --git a/EXILED/Exiled.CustomRoles/API/Features/Enums/KeypressActivationType.cs b/EXILED/Exiled.CustomRoles/API/Features/Enums/AbilityKeypressTriggerType.cs similarity index 93% rename from EXILED/Exiled.CustomRoles/API/Features/Enums/KeypressActivationType.cs rename to EXILED/Exiled.CustomRoles/API/Features/Enums/AbilityKeypressTriggerType.cs index d63845ff70..3ba1d84bc7 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/Enums/KeypressActivationType.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/Enums/AbilityKeypressTriggerType.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. // diff --git a/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs b/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs index fb636665a8..5e6ba3ab31 100644 --- a/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs +++ b/EXILED/Exiled.CustomRoles/API/Features/Enums/CheckType.cs @@ -13,7 +13,7 @@ namespace Exiled.CustomRoles.API.Features.Enums public enum CheckType { /// - /// Check if the ability is available to the player. (DOES NOT CHECK COOLDOWNS) + /// Check if the ability is available to the player. (DOES NOT CHECK COOLDOWNS). /// Available, diff --git a/EXILED/Exiled.CustomRoles/Commands/Get.cs b/EXILED/Exiled.CustomRoles/Commands/Get.cs index 7d96d5f6b4..acaf661554 100644 --- a/EXILED/Exiled.CustomRoles/Commands/Get.cs +++ b/EXILED/Exiled.CustomRoles/Commands/Get.cs @@ -14,13 +14,13 @@ namespace Exiled.CustomRoles.Commands using System.Text; using CommandSystem; + using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.CustomRoles.API; using Exiled.CustomRoles.API.Features; using Exiled.Permissions.Extensions; - using HarmonyLib; /// /// The command to get specified player(s) current custom roles. diff --git a/EXILED/Exiled.CustomRoles/Commands/Parent.cs b/EXILED/Exiled.CustomRoles/Commands/Parent.cs index fd42b5e497..c5a46a0e7a 100644 --- a/EXILED/Exiled.CustomRoles/Commands/Parent.cs +++ b/EXILED/Exiled.CustomRoles/Commands/Parent.cs @@ -33,7 +33,7 @@ public Parent() public override string[] Aliases { get; } = { "cr", "crs" }; /// - public override string Description { get; } = string.Empty; + public override string Description { get; } = "The parent command for EXILED custom roles"; /// public override void LoadGeneratedCommands() diff --git a/EXILED/Exiled.CustomRoles/CustomRoles.cs b/EXILED/Exiled.CustomRoles/CustomRoles.cs index a66457b3bd..fc7a3e4333 100644 --- a/EXILED/Exiled.CustomRoles/CustomRoles.cs +++ b/EXILED/Exiled.CustomRoles/CustomRoles.cs @@ -82,4 +82,4 @@ public override void OnDisabled() base.OnDisabled(); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs b/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs index 47a153221d..23b27aac2f 100644 --- a/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs +++ b/EXILED/Exiled.CustomRoles/Events/PlayerHandlers.cs @@ -9,7 +9,6 @@ namespace Exiled.CustomRoles.Events { using System; using System.Collections.Generic; - using System.Threading; using Exiled.API.Enums; using Exiled.API.Features; diff --git a/EXILED/Exiled.Events/Commands/Config/Merge.cs b/EXILED/Exiled.Events/Commands/Config/Merge.cs index c6cf79042d..c8d5ff08b1 100644 --- a/EXILED/Exiled.Events/Commands/Config/Merge.cs +++ b/EXILED/Exiled.Events/Commands/Config/Merge.cs @@ -9,12 +9,13 @@ namespace Exiled.Events.Commands.Config { using System; using System.Collections.Generic; - using System.Linq; - using API.Enums; - using API.Features; - using API.Interfaces; using CommandSystem; + + using Exiled.API.Enums; + using Exiled.API.Features; + using Exiled.API.Interfaces; + using Loader; /// diff --git a/EXILED/Exiled.Events/Commands/Config/Split.cs b/EXILED/Exiled.Events/Commands/Config/Split.cs index 34816af579..a083e4388c 100644 --- a/EXILED/Exiled.Events/Commands/Config/Split.cs +++ b/EXILED/Exiled.Events/Commands/Config/Split.cs @@ -9,12 +9,13 @@ namespace Exiled.Events.Commands.Config { using System; using System.Collections.Generic; - using System.Linq; - using API.Enums; - using API.Features; - using API.Interfaces; using CommandSystem; + + using Exiled.API.Enums; + using Exiled.API.Features; + using Exiled.API.Interfaces; + using Loader; /// diff --git a/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs b/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs index 4169b84cd7..54fc5e4260 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/Disable.cs @@ -9,9 +9,11 @@ namespace Exiled.Events.Commands.PluginManager { using System; - using API.Interfaces; using CommandSystem; + + using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; + using RemoteAdmin; /// diff --git a/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs b/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs index 36b6aa1ecd..59350f2500 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/Enable.cs @@ -12,10 +12,12 @@ namespace Exiled.Events.Commands.PluginManager using System.Linq; using System.Reflection; - using API.Interfaces; using CommandSystem; + using Exiled.API.Features; + using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; + using RemoteAdmin; /// @@ -92,4 +94,4 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s return true; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs b/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs index 1f9a62c13d..f789174a33 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/PluginManager.cs @@ -39,4 +39,4 @@ protected override bool ExecuteParent(ArraySegment arguments, ICommandSe return false; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Commands/PluginManager/Show.cs b/EXILED/Exiled.Events/Commands/PluginManager/Show.cs index 0b9f4d5459..edaac0d85e 100644 --- a/EXILED/Exiled.Events/Commands/PluginManager/Show.cs +++ b/EXILED/Exiled.Events/Commands/PluginManager/Show.cs @@ -12,11 +12,10 @@ namespace Exiled.Events.Commands.PluginManager using System.Linq; using System.Text; - using API.Features.Pools; - using API.Interfaces; - using CommandSystem; + using Exiled.API.Features.Pools; + using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; using RemoteAdmin; diff --git a/EXILED/Exiled.Events/Commands/Reload/Configs.cs b/EXILED/Exiled.Events/Commands/Reload/Configs.cs index 05f75a07ed..12beb34a1b 100644 --- a/EXILED/Exiled.Events/Commands/Reload/Configs.cs +++ b/EXILED/Exiled.Events/Commands/Reload/Configs.cs @@ -9,10 +9,9 @@ namespace Exiled.Events.Commands.Reload { using System; - using API.Interfaces; - using CommandSystem; + using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; using Loader; @@ -63,4 +62,4 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s return haveBeenReloaded; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Commands/Reload/Translations.cs b/EXILED/Exiled.Events/Commands/Reload/Translations.cs index 99459b3f19..d2c4132b0d 100644 --- a/EXILED/Exiled.Events/Commands/Reload/Translations.cs +++ b/EXILED/Exiled.Events/Commands/Reload/Translations.cs @@ -9,10 +9,9 @@ namespace Exiled.Events.Commands.Reload { using System; - using API.Interfaces; - using CommandSystem; + using Exiled.API.Interfaces; using Exiled.Permissions.Extensions; using Loader; diff --git a/EXILED/Exiled.Events/Commands/TpsCommand.cs b/EXILED/Exiled.Events/Commands/TpsCommand.cs index 14c0def05e..15ca3d44c9 100644 --- a/EXILED/Exiled.Events/Commands/TpsCommand.cs +++ b/EXILED/Exiled.Events/Commands/TpsCommand.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.Commands using System; using CommandSystem; + using Exiled.API.Features; /// @@ -35,7 +36,7 @@ public bool Execute(ArraySegment arguments, ICommandSender sender, out s { > 0.9 => "green", > 0.5 => "yellow", - _ => "red" + _ => "red", }; response = $"{Server.SmoothTps}/{Server.MaxTps}"; diff --git a/EXILED/Exiled.Events/Config.cs b/EXILED/Exiled.Events/Config.cs index fd244f699b..c4f94d76a8 100644 --- a/EXILED/Exiled.Events/Config.cs +++ b/EXILED/Exiled.Events/Config.cs @@ -9,7 +9,7 @@ namespace Exiled.Events { using System.ComponentModel; - using API.Interfaces; + using Exiled.API.Interfaces; /// public sealed class Config : IConfig @@ -111,4 +111,4 @@ public sealed class Config : IConfig [Description("Whether to log RA commands.")] public bool LogRaCommands { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs index d5dbbef859..c7c2c633df 100644 --- a/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Cassie/SendingCassieMessageEventArgs.cs @@ -11,8 +11,11 @@ namespace Exiled.Events.EventArgs.Cassie using System.Text; using Exiled.API.Features.Pools; + using global::Cassie; + using Interfaces; + using Subtitles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs index bb523f3d75..7abe187114 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IAttackerEvent.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; - using API.Features.DamageHandlers; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; /// /// Event args for when a player is taking damage. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs index 8c44ab58b6..d86189d40b 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/ICameraEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; + using Exiled.API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs index eaa1babdcc..1a8711d078 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IConsumableEvent.cs @@ -19,4 +19,4 @@ public interface IConsumableEvent : IItemEvent /// public Consumable Consumable { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs index 0cf0ba2810..f27c8c0ec6 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IFirearmEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features.Items; + using Exiled.API.Features.Items; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs index 5cddb0a8fb..265aa5a2d7 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IGeneratorEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; + using Exiled.API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs index c2fcb61da9..bde0b9c466 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IItemEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features.Items; + using Exiled.API.Features.Items; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs index bc17988cc2..ee42510c79 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IMicroHIDEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features.Items; + using Exiled.API.Features.Items; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs index fec096f0b3..2f2e7d9962 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IPlayerEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; + using Exiled.API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs index c15fbc028a..1889c43cd7 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IRagdollEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; + using Exiled.API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs index 0ff4df980b..64bac5ca77 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/IRoomEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; + using Exiled.API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs b/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs index 7f79c1b15d..fcc91cc850 100644 --- a/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs +++ b/EXILED/Exiled.Events/EventArgs/Interfaces/ITeslaEvent.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Interfaces { - using API.Features; + using Exiled.API.Features; /// /// Event args used for all related events. diff --git a/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs index 8e491ee0b1..995daa4b2f 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/CacklingEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.MarshmallowMan; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs index 6e76f8b7a6..f339e8c5ed 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChangingAmmoEventArgs.cs @@ -65,4 +65,4 @@ public ChangingAmmoEventArgs(InventorySystem.Items.ItemBase firearm, byte oldAmm /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs index 6f4dc2ef60..d8dcfc1883 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChangingAttachmentsEventArgs.cs @@ -10,11 +10,10 @@ namespace Exiled.Events.EventArgs.Item using System.Collections.Generic; using System.Linq; - using API.Features; - using API.Features.Items; - using API.Structs; - using Exiled.API.Extensions; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using Exiled.API.Structs; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs index a70c37fde7..510a4718d6 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features.Pickups; using Interfaces; + using InventorySystem.Items.MicroHID.Modules; using InventorySystem.Items.Pickups; diff --git a/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs index 98f2588187..e9ec5fd5ea 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ChargingJailbirdEventArgs.cs @@ -49,4 +49,4 @@ public ChargingJailbirdEventArgs(ReferenceHub player, InventorySystem.Items.Item /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs index ad3feef017..4252578733 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/DisruptorFiringEventArgs.cs @@ -8,9 +8,10 @@ namespace Exiled.Events.EventArgs.Item { using Exiled.API.Features.Pickups; + using Interfaces; + using InventorySystem.Items.Firearms.Modules; - using InventorySystem.Items.Pickups; /// /// Contains all information before a pickup shoot while on the ground. diff --git a/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs index 283fd4910f..23c20404b1 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/InspectedItemEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs index 5bb7cb4077..2e51f8d305 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/InspectingItemEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs index 1bfbcd529e..f7fe990ce5 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangedWearStateEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Jailbird; /// @@ -56,4 +57,4 @@ public JailbirdChangedWearStateEventArgs(InventorySystem.Items.ItemBase jailbird /// public Item Item => Jailbird; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs index bf7ac51d95..31c15e72e6 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChangingWearStateEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Jailbird; /// @@ -61,4 +62,4 @@ public JailbirdChangingWearStateEventArgs(InventorySystem.Items.ItemBase jailbir /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs index d583f22b3f..f6adb9770b 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/JailbirdChargeCompleteEventArgs.cs @@ -49,4 +49,4 @@ public JailbirdChargeCompleteEventArgs(ReferenceHub player, InventorySystem.Item /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs index 11f82ddbb4..50b8b39e49 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/KeycardInteractingEventArgs.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using Interactables.Interobjects.DoorUtils; using BaseKeycardPickup = InventorySystem.Items.Keycards.KeycardPickup; diff --git a/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs index d2d927d95a..ab58078c81 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/PunchingEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Item using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.MarshmallowMan; /// diff --git a/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs index a7cdb73f70..3d6764df0a 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/ReceivingPreferenceEventArgs.cs @@ -10,11 +10,10 @@ namespace Exiled.Events.EventArgs.Item using System.Collections.Generic; using System.Linq; - using API.Features; - using API.Structs; - using Exiled.API.Enums; using Exiled.API.Extensions; + using Exiled.API.Features; + using Exiled.API.Structs; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs index 0d97d9da16..8c768a5379 100644 --- a/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Item/SwingingEventArgs.cs @@ -49,4 +49,4 @@ public SwingingEventArgs(ReferenceHub player, InventorySystem.Items.ItemBase swi /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs index e0e7fb8931..1e6ec08d27 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingChaosEntranceEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,6 +11,7 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Waves; using Exiled.Events.EventArgs.Interfaces; + using Respawning.Announcements; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs index fd5a8f417e..0d3e0121d9 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingNtfEntranceEventArgs.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Waves; + using Interfaces; + using Respawning.Announcements; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs index d8d38cc474..b693cfc0b9 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/AnnouncingScpTerminationEventArgs.cs @@ -9,9 +9,10 @@ namespace Exiled.Events.EventArgs.Map { using System; - using API.Features; - using API.Features.DamageHandlers; - using API.Features.Roles; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; + using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs index 197c741949..e0439cfbe8 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/ChangedIntoGrenadeEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Pickups; using Exiled.API.Features.Pickups.Projectiles; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.ThrowableProjectiles; /// @@ -41,4 +42,4 @@ public ChangedIntoGrenadeEventArgs(TimedGrenadePickup pickup, ThrownProjectile p /// Pickup IPickupEvent.Pickup => Pickup; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs index c2a8fbe9aa..4d62722f63 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/ElevatorSequencesUpdatedEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs index 205500cf60..d480492ce9 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/FillingLockerEventArgs.cs @@ -10,7 +10,9 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Lockers; using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Pickups; + using MapGeneration.Distributors; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs index 15725ac6c6..32f7ef7ceb 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/GeneratingEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,7 +9,6 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Enums; using Exiled.Events.EventArgs.Interfaces; - using UnityEngine; /// /// Contains all information after the server generates a seed, but before the map is generated. diff --git a/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs index b6187bb2ba..856950f7e6 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/GeneratorActivatingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Map { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs index faa0b772a4..f41b0bc637 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PickupAddedEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Pickups; /// @@ -32,4 +33,4 @@ public PickupAddedEventArgs(ItemPickupBase pickupBase) /// public Pickup Pickup { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs index 49bba314cc..1661f669c3 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PickupDestroyedEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Pickups; /// @@ -32,4 +33,4 @@ public PickupDestroyedEventArgs(ItemPickupBase pickupBase) /// public Pickup Pickup { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs index 8a066fbaf9..da482dee23 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PlacingBulletHoleEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Map { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; using UnityEngine; diff --git a/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs index 3dcef688d2..a47ccaf63b 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/PlacingPickupIntoPocketDimensionEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Pickups; using UnityEngine; diff --git a/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs index 263deba65c..b751b05c80 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/Scp244SpawningEventArgs.cs @@ -7,10 +7,13 @@ namespace Exiled.Events.EventArgs.Map { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pickups; + using Interfaces; + using InventorySystem.Items.Usables.Scp244; + using MapGeneration; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs index 4476b88419..6c83d590bd 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/SpawningItemEventArgs.cs @@ -10,7 +10,9 @@ namespace Exiled.Events.EventArgs.Map using Exiled.API.Features.Doors; using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Pickups; /// diff --git a/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs index 179c244e83..8717f22371 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/SpawningRoomConnectorEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using MapGeneration.RoomConnectors; using MapGeneration.RoomConnectors.Spawners; @@ -55,4 +56,4 @@ public SpawningRoomConnectorEventArgs(RoomConnectorSpawnpointBase roomConnectorS /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs index 2e455ff305..1bc1c3b0ce 100644 --- a/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Map/SpawningTeamVehicleEventArgs.cs @@ -8,7 +8,7 @@ namespace Exiled.Events.EventArgs.Map { using Exiled.Events.EventArgs.Interfaces; - using Respawning; + using Respawning.Waves; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs index 8050e534bf..dfafdd0808 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ActivatingGeneratorEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs index 65504085ed..e6c1004b80 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWarheadPanelEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs index e035556555..a10068d1c8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ActivatingWorkstationEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs index 945295631a..9e9b2a932b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/AimingDownSightEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs index 0c060df6dc..d4814305df 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/BannedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs index 5679b15f76..5fea86b4c6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/BanningEventArgs.cs @@ -9,9 +9,10 @@ namespace Exiled.Events.EventArgs.Player { using System.Reflection; - using API.Features; using CommandSystem; + using Exiled.API.Features; + /// /// Contains all information before banning a player from the server. /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs index 19435c5250..71a39402c7 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/CancelledItemUseEventArgs.cs @@ -7,9 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Usables; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs index a030f171c2..f2e9778d81 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/CancellingItemUseEventArgs.cs @@ -7,9 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Usables; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs index cd5e3447a9..06fdc3ef0e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangedEmotionEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs index 2381256901..42dfc76855 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangedItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; @@ -50,4 +50,4 @@ public ChangedItemEventArgs(Player player, ItemBase oldItem) /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs index 5df04b729e..329aaa2a54 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangedRatioEventArgs.cs @@ -51,4 +51,4 @@ public ChangedRatioEventArgs(ReferenceHub player, float oldratio, float newratio /// public AspectRatioType NewRatio { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs index 8ee98adb01..1579036d2a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingDangerStateEventArgs.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.EventArgs.Player { using CustomPlayerEffects.Danger; + using Exiled.API.Enums; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs index 699848459b..08fe6b0a82 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingDisruptorModeEventArgs.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.EventArgs.Player using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items; /// @@ -43,4 +44,4 @@ public ChangingDisruptorModeEventArgs(ItemBase firearm, bool mode) /// public Player Player => Item.Owner; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs index 759f1fa9ed..71a691b25c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingEmotionEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs index feffd9882d..54ec5d2f11 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingGroupEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs index ee305c7ada..97fdd988b4 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingItemEventArgs.cs @@ -9,8 +9,8 @@ namespace Exiled.Events.EventArgs.Player { using System; - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs index 3e3c1eee9c..4240a4482d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingMicroHIDStateEventArgs.cs @@ -7,14 +7,12 @@ namespace Exiled.Events.EventArgs.Player { - using System; + using Exiled.API.Features; + using Exiled.API.Features.Items; - using API.Features; - using API.Features.Items; using Interfaces; using InventorySystem.Items; - using InventorySystem.Items.MicroHID; using InventorySystem.Items.MicroHID.Modules; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs index 36d5240158..5c8c6e4ff4 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingMoveStateEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs index c00696a759..e73f6e9cff 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingRadioPresetEventArgs.cs @@ -7,9 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs index 92adf3b91a..f1f05804a5 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingRoleEventArgs.cs @@ -10,14 +10,18 @@ namespace Exiled.Events.EventArgs.Player using System.Collections.Generic; using System.Linq; - using API.Enums; - using API.Features; + using Exiled.API.Enums; using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.API.Features.Pools; + using Interfaces; + using InventorySystem; + using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; + using PlayerRoles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs index c50f5d6116..c39918116e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ChangingSpectatedPlayerEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs index c33b0bcc0f..348316e0a6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ClosingGeneratorEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using MapGeneration.Distributors; /// @@ -43,4 +44,4 @@ public ClosingGeneratorEventArgs(Player player, Scp079Generator generator) /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs index 0e48f83a8b..ec72c82b78 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ConsumingItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; @@ -46,4 +46,4 @@ public ConsumingItemEventArgs(ReferenceHub hub, InventorySystem.Items.Usables.Co /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs index 4ed1981db1..177cb27f4c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingDoorEventArgs.cs @@ -9,8 +9,11 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.API.Features.Doors; + using Footprinting; + using Interactables.Interobjects.DoorUtils; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs index 7132b6088e..891e669d57 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs @@ -9,9 +9,9 @@ namespace Exiled.Events.EventArgs.Player { using AdminToys; - using API.Features; - using API.Features.Items; - using API.Features.Toys; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using Exiled.API.Features.Toys; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs index 03e4aa1fa8..94bc523a82 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingWindowEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.DamageHandlers; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; using Interfaces; @@ -33,9 +33,11 @@ public class DamagingWindowEventArgs : IPlayerEvent, IDeniableEvent public DamagingWindowEventArgs(BreakableWindow window, float damage, DamageHandlerBase handler) { Window = Window.Get(window); - Handler = new DamageHandler(handler is AttackerDamageHandler attackerDamageHandler ? Player.Get(attackerDamageHandler.Attacker.Hub) : null, handler); - Handler.Damage = damage; Player = Handler.Attacker; + Handler = new DamageHandler(handler is AttackerDamageHandler attackerDamageHandler ? Player.Get(attackerDamageHandler.Attacker.Hub) : null, handler) + { + Damage = damage, + }; } /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs index 20ce6f84d0..6eded5ff67 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DeactivatingWorkstationEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs index 219838dc6f..504fbbdf4f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DestroyingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; @@ -35,4 +35,4 @@ public DestroyingEventArgs(Player player) /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs index 24e91e6870..9e6c119f43 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DiedEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.DamageHandlers; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs index 78d229d08f..3550bf9905 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppedAmmoEventArgs.cs @@ -9,10 +9,11 @@ namespace Exiled.Events.EventArgs.Player { using System.Collections.Generic; - using API.Enums; - using API.Features; + using Exiled.API.Enums; using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.API.Features.Pickups; + using Interfaces; using AmmoPickup = API.Features.Pickups.AmmoPickup; @@ -71,4 +72,4 @@ public DroppedAmmoEventArgs(Player player, ItemType itemType, ushort amount, Lis /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs index c315553660..11ecf5c7c6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppedItemEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pickups; + using Interfaces; + using InventorySystem.Items.Pickups; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs index 999516aef2..bcef3e3911 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppingAmmoEventArgs.cs @@ -7,9 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using API.Enums; - using API.Features; + using Exiled.API.Enums; using Exiled.API.Extensions; + using Exiled.API.Features; + using Interfaces; using PlayerRoles; @@ -78,4 +79,4 @@ public bool IsAllowed /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs index 16006c8164..712b8963a2 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppingItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs index dd9c80aa35..9273188f7f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DroppingNothingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs index 2073d62678..0f9aa9f844 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DryfiringWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs index 9919ac0899..63cbc5e5e8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DyingEventArgs.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.EventArgs.Player using System.Collections.Generic; using System.Linq; - using API.Features; - using API.Features.DamageHandlers; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; + using Exiled.API.Features.Items; using Interfaces; @@ -37,9 +37,7 @@ public DyingEventArgs(Player target, DamageHandlerBase damageHandler) { DamageHandler = new CustomDamageHandler(target, damageHandler); Player = target; -#pragma warning disable CS0618 ItemsToDrop = Player.Items.ToList(); -#pragma warning restore CS0618 Attacker = DamageHandler.BaseIs(out CustomAttackerHandler attackerDamageHandler) ? attackerDamageHandler.Attacker : null; } diff --git a/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs index d4594b42b3..2286cfe056 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EarningAchievementEventArgs.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.EventArgs.Player { using Achievements; + using Exiled.API.Features; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs index dc61bef74e..fb87567110 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EnteringEnvironmentalHazardEventArgs.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Hazards; + using Hazards; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs index 0d8a82d3f6..398600ebba 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EnteringKillerCollisionEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs index 2b66874acd..1ea381387b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EnteringPocketDimensionEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs index 7333b3b3f8..6717ff03ff 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EscapingEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; using Exiled.API.Enums; + using Exiled.API.Features; + using Interfaces; using PlayerRoles; @@ -62,4 +63,4 @@ public EscapeScenario EscapeScenario /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs index 841edfdcf6..5426880210 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs index e0b24de298..6043c9285e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ExitingEnvironmentalHazardEventArgs.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Hazards; + using Hazards; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs index c2727317aa..0618e8cb7f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ExplodingMicroHIDEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.MicroHID; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs index 620178368c..2579fcb43d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs @@ -7,9 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using System; - - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs index 954d2f39e8..a7e92b0d45 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/FlippingCoinEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using Interfaces; + using InventorySystem.Items.Coin; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs index 7f2d8c34c3..4d5ff2803a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HandcuffingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs index d9d18adc0e..b8bfdcf015 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HitEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,8 +10,10 @@ namespace Exiled.Events.EventArgs.Player using System.Collections.Generic; using System.Linq; - using API.Features; + using Exiled.API.Features; + using Interfaces; + using PlayerRoles.PlayableScps.Subroutines; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs index b42a7ab209..d970db90c9 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HurtEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.DamageHandlers; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs index f328bddd20..7da8ade642 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/HurtingEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.DamageHandlers; + using Exiled.API.Features; + using Exiled.API.Features.DamageHandlers; + using Interfaces; + using PlayerStatsSystem; using CustomAttackerHandler = API.Features.DamageHandlers.AttackerDamageHandler; diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs index f73f97451a..83d93bfd34 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs index 509b8bc329..3cde5a1883 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingDoorEventArgs.cs @@ -7,10 +7,12 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Doors; + using Interactables; using Interactables.Interobjects.DoorUtils; + using Interfaces; /// @@ -74,4 +76,4 @@ public InteractingDoorEventArgs(Player player, DoorVariant door, byte colliderId /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs index 9efbad6105..9e3013178c 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingEmergencyButtonEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Player using Exiled.API.Features; using Exiled.API.Features.Doors; using Exiled.Events.EventArgs.Interfaces; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs index b7cc7f3b5c..f598b07eb6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingLockerEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Lockers; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs index 9555a12861..89ea9e7037 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs @@ -11,9 +11,9 @@ namespace Exiled.Events.EventArgs.Player using AdminToys; - using API.Enums; - using API.Features; - using API.Features.Toys; + using Exiled.API.Enums; + using Exiled.API.Features; + using Exiled.API.Features.Toys; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs index d17296909b..d7c59cfb50 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/IntercomSpeakingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs index 71c4cef39a..25ccce6f1b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/IssuingMuteEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs index 64b15a6888..a10eb18bf8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/JoinedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs index 410897b531..e25552d149 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/JumpingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs index b99b6051b4..040e2d3e0b 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/KickedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs index 3fc6c1221d..bae8413450 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/KickingEventArgs.cs @@ -9,8 +9,10 @@ namespace Exiled.Events.EventArgs.Player { using System.Reflection; - using API.Features; using CommandSystem; + + using Exiled.API.Features; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs index 1ef0bac618..6e41af086d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/LandingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs index 84e5e8735a..057849e6f7 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/LeftEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs index e0522ed31a..4ab397d828 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/MakingNoiseEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs index fc1024823f..1b66453503 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/MicroHIDOpeningDoorEventArgs.cs @@ -12,6 +12,7 @@ namespace Exiled.Events.EventArgs.Player using Exiled.Events.EventArgs.Interfaces; using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.MicroHID; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs index 13dc43febf..472da40bcb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/OpeningGeneratorEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs index f71781e3b7..0e61c47e8e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/PickingUpItemEventArgs.cs @@ -52,4 +52,4 @@ public PickingUpItemEventArgs(ReferenceHub referenceHub, ItemPickupBase pickup, /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs index 41574b280c..4ea90f622d 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/PlayingAudioLogEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs index 038a3e16c4..b323e997bb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReceivingEffectEventArgs.cs @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using CustomPlayerEffects; + using Exiled.API.Features; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs index b12fe11972..8620534e04 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReceivingGunSoundEventArgs.cs @@ -7,11 +7,10 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; - using AudioPooling; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; using UnityEngine; @@ -98,4 +97,4 @@ public ReceivingGunSoundEventArgs(ReferenceHub hub, InventorySystem.Items.Firear /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs index 4b491f739a..2261640c97 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReceivingVoiceMessageEventArgs.cs @@ -9,7 +9,9 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles.Voice; + using VoiceChat.Networking; /// @@ -57,4 +59,4 @@ public ReceivingVoiceMessageEventArgs(Player receiver, Player sender, VoiceModul /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs index 464f2db6c5..6e30138b89 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReloadedWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs index a33a3cabbc..d1edfe37c0 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReloadingWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; @@ -47,4 +47,4 @@ public ReloadingWeaponEventArgs(InventorySystem.Items.Firearms.Firearm firearm, /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs index cef326e42d..5569f47e76 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RemovedHandcuffsEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Enums; - using API.Features; + using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; /// @@ -44,4 +44,4 @@ public RemovedHandcuffsEventArgs(Player cuffer, Player target, UncuffReason uncu /// public UncuffReason UncuffReason { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs index 782d77f0fb..bd683b6f25 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RemovingHandcuffsEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Enums; - using API.Features; + using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs index cb949391ca..e757034c37 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ReservedSlotsCheckEventArgs.cs @@ -74,4 +74,4 @@ public ReservedSlotEventResult Result } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs index 599ac864bf..871f831155 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RevokingMuteEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs index c640b78217..469d5811d1 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RoomChangedEventArgs.cs @@ -42,4 +42,4 @@ public RoomChangedEventArgs(ReferenceHub player, RoomIdentifier oldRoom, RoomIde /// public Room NewRoom { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs index 515d8c7b04..c0286f7edb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/RotatingRevolverEventArgs.cs @@ -7,15 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; - - using Exiled.API.Features.Items.FirearmModules.Primary; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; - using InventorySystem.Items.Firearms.Modules; - using FirearmBase = InventorySystem.Items.Firearms.Firearm; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs index 47b568d667..ef098bd4d7 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.EventArgs.Player { using CustomPlayerEffects; + using Exiled.API.Features; using Exiled.API.Features.DamageHandlers; using Exiled.Events.EventArgs.Interfaces; @@ -64,4 +65,4 @@ public SavingByAntiScp207EventArgs(ReferenceHub player, float damageAmount, Dama /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs index 6dce01109c..bef34edd65 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/Scp1576TransmissionEndedEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using Interfaces; + using InventorySystem.Items.Usables.Scp1576; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs index 921be7a267..5903268c82 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SendingAdminChatMessageEventsArgs.cs @@ -8,12 +8,8 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features; - using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; - using InventorySystem.Items.Pickups; - using InventorySystem.Searching; - /// /// Contains all information before a player sends a message in AdminChat. /// @@ -53,4 +49,4 @@ public SendingAdminChatMessageEventsArgs(Player player, string message, bool isA /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs index c1041453ab..636d3fec80 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SendingGunSoundEventArgs.cs @@ -6,11 +6,10 @@ // ----------------------------------------------------------------------- namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; - using AudioPooling; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; using UnityEngine; @@ -83,4 +82,4 @@ public SendingGunSoundEventArgs(InventorySystem.Items.Firearms.Firearm firearm, /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs index 1ea8a6df71..f4ef316f08 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SendingValidCommandEventArgs.cs @@ -8,11 +8,11 @@ namespace Exiled.Events.EventArgs.Player { using CommandSystem; + using Exiled.API.Features; - using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using LabApi.Features.Enums; - using RemoteAdmin; /// /// Contains all information before a player sends the command. @@ -76,4 +76,4 @@ public SendingValidCommandEventArgs(Player player, ICommand command, CommandType /// public ICommand Command { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs index 1c96ff88f9..3ecddd2c87 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SentValidCommandEventArgs.cs @@ -8,11 +8,11 @@ namespace Exiled.Events.EventArgs.Player { using CommandSystem; + using Exiled.API.Features; - using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using LabApi.Features.Enums; - using RemoteAdmin; /// /// Contains all information after a player sends the command. @@ -80,4 +80,4 @@ public SentValidCommandEventArgs(Player player, ICommand command, CommandType co /// public ICommand Command { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs index 3c2f9d12b6..8195b894a1 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ShootingEventArgs.cs @@ -7,10 +7,13 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; + using InventorySystem.Items.Firearms.Modules.Misc; + using UnityEngine; using BaseFirearm = InventorySystem.Items.Firearms.Firearm; diff --git a/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs index 18d2303353..41ee8ac4f2 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ShotEventArgs.cs @@ -7,10 +7,13 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; + using InventorySystem.Items.Firearms.Modules; + using UnityEngine; /// @@ -106,4 +109,4 @@ public ShotEventArgs(HitscanHitregModuleBase hitregModule, RaycastHit hitInfo, I /// public bool CanSpawnImpactEffects { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs index aa231bce41..b4364b8200 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawnedEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.API.Features.Roles; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs index a500495017..d8e41a57f6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawnedRagdollEventArgs.cs @@ -7,14 +7,17 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; using PlayerRoles; using PlayerRoles.Ragdolls; + using PlayerStatsSystem; + using RelativePositioning; + using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs index 785ff5a3cc..73413e42c1 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawningEventArgs.cs @@ -12,7 +12,9 @@ namespace Exiled.Events.EventArgs.Player using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles; + using UnityEngine; /// @@ -75,4 +77,4 @@ public SpawningEventArgs(Player player, Vector3 position, float rotation, Player /// public Role NewRole { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs index 9212024a25..9694a53946 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SpawningRagdollEventArgs.cs @@ -7,13 +7,17 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; + using Interfaces; using PlayerRoles; using PlayerRoles.Ragdolls; + using PlayerStatsSystem; + using RelativePositioning; + using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs index 002e6a9b8f..89f201ee26 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/StayingOnEnvironmentalHazardEventArgs.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.EventArgs.Player { using Exiled.API.Features.Hazards; + using Hazards; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs index 6462c655d8..87f61e1835 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/StoppingGeneratorEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using MapGeneration.Distributors; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs index ee1b36558a..32e04847ce 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ThrowingRequestEventArgs.cs @@ -50,4 +50,4 @@ public ThrowingRequestEventArgs(Player player, ThrowableItem item, ThrowableNetw /// public ThrowRequest RequestType { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs index 14ab42de1e..48238a8e60 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/ThrownProjectileEventArgs.cs @@ -54,4 +54,4 @@ public ThrownProjectileEventArgs(ThrownProjectile projectile, Player player, Thr /// public Pickup Pickup => Projectile; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs index 183476b48a..6ffaa716e3 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingFlashlightEventArgs.cs @@ -7,10 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; + using InventorySystem.Items.ToggleableLights; /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs index 65ea273731..c0f397f7cf 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingNoClipEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs index 7b0c68d7a6..95dc42d62a 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingRadioEventArgs.cs @@ -7,10 +7,11 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; + using InventorySystem.Items.Radio; /// @@ -64,4 +65,4 @@ public TogglingRadioEventArgs(Player player, RadioItem radio, bool newState, boo /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs index 3c6f2f7886..cb30b5dc42 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TogglingWeaponFlashlightEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs index 6c897ba955..908c3c1ffb 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/TriggeringTeslaEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs index 69a37671dc..e3be85338e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UnloadedWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs index 2ac5ce4a2f..1cc14e9f77 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UnloadingWeaponEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; @@ -51,4 +51,4 @@ public UnloadingWeaponEventArgs(InventorySystem.Items.Firearms.Firearm firearm, /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs index 77541732d0..63c5ce8a4f 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UnlockingGeneratorEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs index c6aeed7ffb..3d57657aed 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsedItemEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs index 027d0a36c4..51b133fce6 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingItemCompletedEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; using InventorySystem.Items.Usables; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs index 317d6ddbeb..e11878f465 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingItemEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; using InventorySystem.Items.Usables; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs index 2cfe7fee35..c87c0ade86 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingMicroHIDEnergyEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs index 3b3af1c73f..340f07bd0e 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/UsingRadioBatteryEventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs index ec1d841365..d0586ecd65 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/VerifiedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Player { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs index 5a488c3d2e..06b6500a71 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/VoiceChattingEventArgs.cs @@ -58,4 +58,4 @@ public VoiceChattingEventArgs(Player player, VoiceModuleBase voiceModule, VoiceM /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs index a6144bbb8c..3fe1d31ba6 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/ActivatingSenseEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp049 { - using API.Features; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; using Scp049Role = API.Features.Roles.Scp049Role; @@ -61,4 +61,4 @@ public ActivatingSenseEventArgs(Player player, Player target, bool isAllowed = t /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs index fc773a7fcb..f6767158ca 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingRecallEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Scp049 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; + using PlayerRoles.Ragdolls; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs index 43baf5987b..d8c918c99d 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/FinishingSenseEventArgs.cs @@ -63,4 +63,4 @@ public FinishingSenseEventArgs(ReferenceHub scp049, ReferenceHub target, double /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs index e859023690..c261aae666 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/SendingCallEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp049 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs index 93757c990a..d591160096 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp049/StartingRecallEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp049 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// @@ -60,4 +61,4 @@ public StartingRecallEventArgs(Player player, Ragdoll ragdoll, bool isAllowed = /// public Ragdoll Ragdoll { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs index 56aff95ac3..43fd31568e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumedCorpseEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp0492 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; using PlayerRoles.PlayableScps.Scp049.Zombies; @@ -50,4 +51,4 @@ public ConsumedCorpseEventArgs(ReferenceHub player, BasicRagdoll ragDoll) /// public float ConsumeHeal { get; set; } = ZombieConsumeAbility.ConsumeHeal; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs index 06de15a086..94c539686e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp0492/ConsumingCorpseEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp0492 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; using PlayerRoles.PlayableScps.Scp049.Zombies; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs index d827bbd254..b93d7a3775 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/ChangingSpeakerStatusEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp079 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs index 973cbfe84d..ecfcc677e4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/GainingExperienceEventArgs.cs @@ -9,11 +9,10 @@ namespace Exiled.Events.EventArgs.Scp079 { using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles; using PlayerRoles.PlayableScps.Scp079; - using Scp079Role = API.Features.Roles.Scp079Role; - /// /// Contains all information before SCP-079 gains experience. /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs index 57eeae5ded..54c781883e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/GainingLevelEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp079 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs index cae1c775e2..33d635bed1 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/LosingSignalEventArgs.cs @@ -41,4 +41,4 @@ public LosingSignalEventArgs(ReferenceHub player) /// public API.Features.Roles.Scp079Role Scp079 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs index 247eb5c20f..38f8dd2ee8 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/LostSignalEventArgs.cs @@ -35,4 +35,4 @@ public LostSignalEventArgs(ReferenceHub player) /// public API.Features.Roles.Scp079Role Scp079 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs index 811dca1977..065658655e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/PingingEventArgs.cs @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Scp079 { - using API.Features; - using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; using RelativePositioning; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs index c897dd1a5f..4be20db3cb 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainedEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp079 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// @@ -57,4 +58,4 @@ public RecontainedEventArgs(Player player, PlayerRoles.PlayableScps.Scp079.Scp07 /// public bool IsAutomatic { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs index 5bde59481d..d344068959 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs @@ -39,4 +39,4 @@ public RecontainingEventArgs(BreakableWindow recontainer) /// public bool IsAutomatic { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs index 513a7d266a..6c1705e4c5 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/RoomBlackoutEventArgs.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.EventArgs.Scp079 { using Exiled.API.Features; - using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; using MapGeneration; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs index e93c97772e..3ee025e03a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/TriggeringDoorEventArgs.cs @@ -7,10 +7,11 @@ namespace Exiled.Events.EventArgs.Scp079 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Doors; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; + using Interactables.Interobjects.DoorUtils; using Player; diff --git a/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs index 6f23053ee4..e7eb9cb02e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp079/ZoneBlackoutEventArgs.cs @@ -11,10 +11,10 @@ namespace Exiled.Events.EventArgs.Scp079 using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using MapGeneration; - using PlayerRoles.PlayableScps.Scp079; - using Scp079Role = API.Features.Roles.Scp079Role; + using PlayerRoles.PlayableScps.Scp079; /// /// Contains all information before SCP-079 lockdowns a room. @@ -92,4 +92,4 @@ public ZoneBlackoutEventArgs(ReferenceHub player, FacilityZone zone, float auxil /// public API.Features.Roles.Scp079Role Scp079 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs index 13e0660a7e..dfd9b25120 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/AddingTargetEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs index c025e712ce..5a35f807f3 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/CalmingDownEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs index 299ce58675..6f40cd9fdc 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/ChargingEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs index 67ce2db693..d931149bd8 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/EnragingEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs index 1dc1934942..f5afec9bf7 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/RemovingTargetEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs index 22052c0350..648199d227 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/StartPryingGateEventArgs.cs @@ -7,10 +7,11 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; - using API.Features.Doors; + using Exiled.API.Features; + using Exiled.API.Features.Doors; using Interactables.Interobjects; + using Interfaces; using Scp096Role = API.Features.Roles.Scp096Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs index 803d7ddbcc..288ea9f8fe 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp096/TryingNotToCryEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Scp096 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Doors; + using Interfaces; + using UnityEngine; using Scp096Role = API.Features.Roles.Scp096Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs index b501c112c9..26aba1480c 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp106/ExitStalkingEventArgs.cs @@ -7,7 +7,8 @@ namespace Exiled.Events.EventArgs.Scp106 { - using API.Features; + using Exiled.API.Features; + using Interfaces; using Scp106Role = API.Features.Roles.Scp106Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs index b94a3db6ff..cb3a10626b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp106/StalkingEventArgs.cs @@ -7,8 +7,10 @@ namespace Exiled.Events.EventArgs.Scp106 { - using API.Features; + using Exiled.API.Features; + using Interfaces; + using PlayerRoles.PlayableScps.Scp106; using Scp106Role = API.Features.Roles.Scp106Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs index 52f503cf6a..9e5067f528 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp106/TeleportingEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp106 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; using UnityEngine; diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs index 533ccbb5ce..da3268e6f2 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/GainedExperienceEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs index 6a1d7b738b..86b22c14df 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/GainingExperienceEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs index 10810403d5..8c77180c9e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/TalkedEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs index b8934566a8..614551c797 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp127/TalkingEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Scp127 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Firearms.Modules.Scp127; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs index c5c772529f..7c8c6b287e 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangedStatusEventArgs.cs @@ -56,4 +56,4 @@ public ChangedStatusEventArgs(ItemBase item, Scp1344Status scp1344Status) [Obsolete("Please use ChangingStatusEventArgs::IsAllowed instead of this", true)] public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs index 6cf7449e99..4330cc41ce 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/ChangingStatusEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Scp1344 { using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items; using InventorySystem.Items.Usables.Scp1344; @@ -61,4 +62,4 @@ public ChangingStatusEventArgs(ItemBase item, Scp1344Status scp1344StatusNew, Sc /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs index 79ec6925ee..c00535c169 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatedEventArgs.cs @@ -41,4 +41,4 @@ public DeactivatedEventArgs(Item item) /// public Scp1344 Scp1344 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs index 8ff103fa53..680041f5df 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1344/DeactivatingEventArgs.cs @@ -54,4 +54,4 @@ public DeactivatingEventArgs(Item item, bool isAllowed = true) /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs index c58330e252..e3f92113bc 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1507/AttackingDoorEventArgs.cs @@ -13,6 +13,7 @@ namespace Exiled.Events.EventArgs.Scp1507 using Exiled.API.Features.Doors; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; + using Interactables.Interobjects.DoorUtils; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs index 376eba5abf..1806cc8eb4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1507/SpawningFlamingosEventArgs.cs @@ -13,8 +13,8 @@ namespace Exiled.Events.EventArgs.Scp1507 using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles.PlayableScps.Scp1507; - using Utils.NonAllocLINQ; /// /// Contains all information before flamingos get spawned. @@ -30,7 +30,7 @@ public class SpawningFlamingosEventArgs : IDeniableEvent, IPlayerEvent public SpawningFlamingosEventArgs(Player newAlpha, bool isAllowed = true) { Player = newAlpha; - SpawnablePlayers = ReferenceHub.AllHubs.Where(Scp1507Spawner.ValidatePlayer).Select(x => Player.Get(x)).ToHashSet(); + SpawnablePlayers = ReferenceHub.AllHubs.Where(Scp1507Spawner.ValidatePlayer).Select(Player.Get).ToHashSet(); IsAllowed = isAllowed; } diff --git a/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs index 0121d02d95..09eb92c630 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs @@ -12,6 +12,7 @@ namespace Exiled.Events.EventArgs.Scp1507 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs index 4484f3b730..90e3fd07cd 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1509/ResurrectingEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,7 +10,9 @@ namespace Exiled.Events.EventArgs.Scp1509 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Scp1509; + using PlayerRoles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs index cbc9b54106..17d8d7c63c 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp1509/TriggeringAttackEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Scp1509 using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Interfaces; + using InventorySystem.Items.Scp1509; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs index b47ee821c6..6df42adb33 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/AddingObserverEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Scp173 { using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs index d1ee0750bf..005499bb89 100755 --- a/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs @@ -54,4 +54,4 @@ public BeingObservedEventArgs(API.Features.Player target, API.Features.Player sc /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs index 95f3e2a084..36990b3464 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingEventArgs.cs @@ -9,7 +9,7 @@ namespace Exiled.Events.EventArgs.Scp173 { using System.Collections.Generic; - using API.Features; + using Exiled.API.Features; using Interfaces; @@ -73,4 +73,4 @@ public BlinkingEventArgs(Player player, List targets, Vector3 blinkPos) /// public Scp173Role Scp173 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs index f526d55c38..af7b57a865 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/BlinkingRequestEventArgs.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.EventArgs.Scp173 using System.Collections.Generic; using System.Linq; - using API.Features; + using Exiled.API.Features; + using Interfaces; using Scp173Role = API.Features.Roles.Scp173Role; @@ -33,7 +34,7 @@ public BlinkingRequestEventArgs(Player player, HashSet targets) { Player = player; Scp173 = player.Role.As(); - Targets = targets.Select(target => Player.Get(target)).ToList(); + Targets = targets.Select(Player.Get).ToList(); } /// @@ -54,4 +55,4 @@ public BlinkingRequestEventArgs(Player player, HashSet targets) /// public Scp173Role Scp173 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs index 70ed06bdf4..6b651d01a4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/PlacingTantrumEventArgs.cs @@ -13,6 +13,7 @@ namespace Exiled.Events.EventArgs.Scp173 using Exiled.Events.EventArgs.Interfaces; using Hazards; + using PlayerRoles.Subroutines; using Scp173Role = API.Features.Roles.Scp173Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs index a941cfeea6..c4db144aec 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/RemovedObserverEventArgs.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Scp173 { using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs index 32216ba9e0..df671cccc2 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp173/UsingBreakneckSpeedsEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp173 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// @@ -54,4 +55,4 @@ public UsingBreakneckSpeedsEventArgs(Player player, bool isActivationRequested, /// public Scp173Role Scp173 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs index d8550dd4e4..808c41a500 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp244/OpeningScp244EventArgs.cs @@ -38,4 +38,4 @@ public OpeningScp244EventArgs(Scp244DeployablePickup pickup) /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs index ab00eaab12..cc53b717a8 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp244/UsingScp244EventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Scp244 { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; @@ -53,4 +53,4 @@ public UsingScp244EventArgs(Scp244Item scp244, Player player, bool isAllowed = t /// public Player Player { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs index 1bb5773188..c891012223 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/FindingPositionEventArgs.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.EventArgs.Scp2536 { using Christmas.Scp2536; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs index d4935e6c92..193e057934 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/FoundPositionEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -8,6 +8,7 @@ namespace Exiled.Events.EventArgs.Scp2536 { using Christmas.Scp2536; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs index 4ecd4af405..7e1297d2da 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/GrantingGiftEventArgs.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.EventArgs.Scp2536 { using Christmas.Scp2536; + using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs index b952ed7fe3..8cc44aec2a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp2536/OpeningGiftEventArgs.cs @@ -7,7 +7,6 @@ namespace Exiled.Events.EventArgs.Scp2536 { - using Christmas.Scp2536; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs index 49488a20bf..af9abfcf79 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs @@ -11,7 +11,6 @@ namespace Exiled.Events.EventArgs.Scp3114 using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; - using Exiled.Events.Patches.Events.Scp3114; /// /// Contains all information before SCP-3114 changes its dancing status. diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs index b7c7d4bf6b..5f74301a1b 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisedEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs index 050b4beb5b..3296b107d1 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DisguisingEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs index cab47ebc91..4bd687b7d5 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealedEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs index 215ffd1771..b19db42e62 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/RevealingEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs index 41a01cdce7..3562415936 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/SlappedEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; + using PlayerRoles.PlayableScps.Subroutines; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs index 94b45227c4..bb803f6606 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/StranglingEventArgs.cs @@ -7,9 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; + using Interfaces; - using PlayerRoles.PlayableScps.Scp3114; using Scp3114Role = Exiled.API.Features.Roles.Scp3114Role; @@ -51,4 +51,4 @@ public StranglingEventArgs(ReferenceHub hub, ReferenceHub target) /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs index f63aaba952..9d067c1a0a 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/TryUseBodyEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs index 7fa402479a..d861a41285 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/VoiceLinesEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp3114 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; using static PlayerRoles.PlayableScps.Scp3114.Scp3114VoiceLines; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs index dbb905ee8a..af5d2b7e80 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/DroppingScp330EventArgs.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.EventArgs.Scp330 { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs index 74633d8c61..0f7f0a5123 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/EatenScp330EventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp330 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; using InventorySystem.Items.Usables.Scp330; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs index ab15aa1d6b..b84aafaf61 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/EatingScp330EventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp330 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Interfaces; using InventorySystem.Items.Usables.Scp330; diff --git a/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs index d706ea289d..c0b6ba40ab 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp330/InteractingScp330EventArgs.cs @@ -7,8 +7,10 @@ namespace Exiled.Events.EventArgs.Scp330 { - using API.Features; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using Interfaces; using InventorySystem.Items.Usables.Scp330; @@ -40,10 +42,10 @@ public InteractingScp330EventArgs(ReferenceHub referenceHub, int usage, bool sho { Player = Player.Get(referenceHub); UsageCount = usage; - ShouldSever = usage >= 2; + ShouldSever = shouldSever; ShouldPlaySound = shouldPlaySound; IsAllowed = Player.IsHuman; - Candy = Scp330Candies.GetRandom(); + Candy = candy; } /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs index 6e3a81f06a..8efc9cf7d6 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.EventArgs.Scp559 using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs index 1309a55978..491b626b00 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/ActivatingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp914 { - using API.Features; + using Exiled.API.Features; using global::Scp914; diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs index 4874f9de7b..ddde646524 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/ChangingKnobSettingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp914 { - using API.Features; + using Exiled.API.Features; using global::Scp914; diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs index 4bd590dc55..fb77bcc015 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedInventoryItemEventArgs.cs @@ -7,12 +7,14 @@ namespace Exiled.Events.EventArgs.Scp914 { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using global::Scp914; + using Interfaces; + using InventorySystem.Items; - using InventorySystem.Items.Pickups; /// /// Contains all information before SCP-914 upgrades an item. diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs index 5bd2c9d952..8ead02480c 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradedPickupEventArgs.cs @@ -9,8 +9,11 @@ namespace Exiled.Events.EventArgs.Scp914 { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using global::Scp914; + using InventorySystem.Items.Pickups; + using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs index 667320e57e..b46ec984aa 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingInventoryItemEventArgs.cs @@ -7,10 +7,13 @@ namespace Exiled.Events.EventArgs.Scp914 { - using API.Features; - using API.Features.Items; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using global::Scp914; + using Interfaces; + using InventorySystem.Items; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs index 691db20a15..9a6fb7f4b5 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPickupEventArgs.cs @@ -9,8 +9,11 @@ namespace Exiled.Events.EventArgs.Scp914 { using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Interfaces; + using global::Scp914; + using InventorySystem.Items.Pickups; + using UnityEngine; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs index cf4487eccc..268f2cba15 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp914/UpgradingPlayerEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp914 { - using API.Features; + using Exiled.API.Features; using global::Scp914; diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs index 982fbd09fd..48b6c05313 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/ChangingFocusEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs index 8ce4a1f1a2..5f82547a40 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/ClawedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs index 387f0467cb..30125cb3e0 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/LungingEventArgs.cs @@ -7,8 +7,10 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; + using Exiled.API.Features.Roles; + using Interfaces; /// @@ -36,4 +38,4 @@ public LungingEventArgs(Player player) /// public Scp939Role Scp939 { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs index d2545aad3d..0d53bbe6a4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlacedAmnesticCloudEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; - using API.Features.Hazards; + using Exiled.API.Features; + using Exiled.API.Features.Hazards; + using Interfaces; + using PlayerRoles.PlayableScps.Scp939; using Scp939Role = API.Features.Roles.Scp939Role; diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs index 3d77ff708d..9571fb98cc 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingAmnesticCloudEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs index a761942caf..3428e7a171 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlacingMimicPointEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Scp939 using Exiled.API.Features; using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Interfaces; + using RelativePositioning; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs index 269bb3ea3b..698ba3f498 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingFootstepEventArgs.cs @@ -7,8 +7,10 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; + using Exiled.API.Features.Roles; + using Interfaces; /// @@ -54,4 +56,4 @@ public PlayingFootstepEventArgs(Player target, Player player, bool isAllowed = t /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs index 675884707c..12011c7547 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingSoundEventArgs.cs @@ -7,9 +7,11 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; + using PlayerRoles.PlayableScps.Scp939.Mimicry; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs index b744934b8c..7fd8ec4862 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/PlayingVoiceEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs index 60133cc196..c8f60d96ed 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/SavingVoiceEventArgs.cs @@ -7,8 +7,9 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs index e75a835f44..a6dc837cc9 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/UpdatedCloudStateEventArgs.cs @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Hazards; - using Exiled.API.Features.Roles; + using Interfaces; using PlayerRoles.PlayableScps.Scp939; @@ -38,6 +38,7 @@ public UpdatedCloudStateEventArgs(ReferenceHub hub, Scp939AmnesticCloudInstance. { Player = Player.Get(hub); AmnesticCloud = Hazard.Get(cloud); + NewState = cloudState; Scp939 = Player.Role.As(); } diff --git a/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs index fa3a93f300..6d50ae98d4 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp939/ValidatingVisibilityEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,10 +7,10 @@ namespace Exiled.Events.EventArgs.Scp939 { - using API.Features; - using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.API.Features.Roles; + using Interfaces; /// @@ -36,7 +36,7 @@ public ValidatingVisibilityEventArgs(Scp939VisibilityState state, ReferenceHub p Scp939 = Player.Role.As(); Target = Player.Get(target); TargetVisibilityState = state; - IsAllowed = TargetVisibilityState is not(Scp939VisibilityState.NotSeen or Scp939VisibilityState.None); + IsAllowed = TargetVisibilityState is not (Scp939VisibilityState.NotSeen or Scp939VisibilityState.None); IsLateSeen = TargetVisibilityState is Scp939VisibilityState.SeenByRange; } @@ -69,4 +69,4 @@ public ValidatingVisibilityEventArgs(Scp939VisibilityState state, ReferenceHub p /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs index 84c4457973..aaa305cc1f 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/ChoosingStartTeamQueueEventArgs.cs @@ -12,7 +12,9 @@ namespace Exiled.Events.EventArgs.Server using System.Text; using Exiled.API.Features.Pools; + using Interfaces; + using PlayerRoles; /// diff --git a/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs index def486974b..d685cbab5b 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/CompletingObjectiveEventArgs.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,6 +9,7 @@ namespace Exiled.Events.EventArgs.Server { using Exiled.API.Features.Objectives; using Exiled.Events.EventArgs.Interfaces; + using Respawning.Objectives; /// diff --git a/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs index 2e5c11dc05..c919f8ac1b 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/EndingRoundEventArgs.cs @@ -9,7 +9,8 @@ namespace Exiled.Events.EventArgs.Server { using System; - using API.Enums; + using Exiled.API.Enums; + using Interfaces; /// diff --git a/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs index 02d1d6b984..834c0b516c 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/LocalReportingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Server { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs index b102bdb377..4eedf333dd 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/ReportingCheaterEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Server { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs index d3d62667a0..e8543f64a7 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs @@ -12,7 +12,7 @@ namespace Exiled.Events.EventArgs.Server using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; - using Respawning; + using Respawning.Waves; /// @@ -41,4 +41,4 @@ public RespawnedTeamEventArgs(SpawnableWaveBase wave, IEnumerable /// public SpawnableWaveBase Wave { get; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs index 6e017b2816..b334d64ef6 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs @@ -7,15 +7,15 @@ namespace Exiled.Events.EventArgs.Server { - using System; using System.Collections.Generic; using Exiled.API.Features; using Exiled.API.Features.Waves; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles; using PlayerRoles.Spectating; - using Respawning; + using Respawning.Objectives; using Respawning.Waves; @@ -100,4 +100,4 @@ public int MaximumRespawnAmount /// public Queue SpawnQueue { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs index 0e614d8a64..460747d00d 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RoundEndedEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Server { - using API.Enums; + using Exiled.API.Enums; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs index b97f309edf..10de2a7c6e 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RoundStartingEventArgs.cs @@ -7,12 +7,6 @@ namespace Exiled.Events.EventArgs.Server { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - using Exiled.Events.EventArgs.Interfaces; /// @@ -59,4 +53,4 @@ public RoundStartingEventArgs(short timeLeft, short originalTimeLeft, int topPla /// public bool IsAllowed { get; set; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs index dd62947778..689ebd12f0 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/SelectingRespawnTeamEventArgs.cs @@ -10,6 +10,7 @@ namespace Exiled.Events.EventArgs.Server using Exiled.API.Enums; using Exiled.API.Features.Waves; using Exiled.Events.EventArgs.Interfaces; + using Respawning.Waves; /// diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs index 407cdfd762..b3cce5d9a4 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/ChangingLeverStatusEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Warhead { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs index 389677132c..9c63e9ec19 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/DeadmanSwitchInitiatingEventArgs.cs @@ -17,4 +17,4 @@ public class DeadmanSwitchInitiatingEventArgs : IDeniableEvent /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs index d9c00e9da4..4cc024c942 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/DetonatingEventArgs.cs @@ -17,4 +17,4 @@ public class DetonatingEventArgs : IDeniableEvent /// public bool IsAllowed { get; set; } = true; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs index 403380511b..71eff5af38 100644 --- a/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Warhead/StoppingEventArgs.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.EventArgs.Warhead { - using API.Features; + using Exiled.API.Features; using Interfaces; diff --git a/EXILED/Exiled.Events/Events.cs b/EXILED/Exiled.Events/Events.cs index f01919aff5..980d245cb2 100644 --- a/EXILED/Exiled.Events/Events.cs +++ b/EXILED/Exiled.Events/Events.cs @@ -10,19 +10,23 @@ namespace Exiled.Events using System; using System.Diagnostics; - using API.Enums; - using API.Features; using CentralAuth; + + using Exiled.API.Enums; + using Exiled.API.Features; using Exiled.API.Features.Core.UserSettings; using Exiled.Events.Features; - using HarmonyLib; + using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables; + using PlayerRoles.Ragdolls; using PlayerRoles.RoleAssign; using Respawning; + using UnityEngine.SceneManagement; + using UserSettings.ServerSpecific; /// @@ -149,8 +153,8 @@ public void Patch() { Patcher = new Patcher(); #if DEBUG - bool lastDebugStatus = Harmony.DEBUG; - Harmony.DEBUG = true; + bool lastDebugStatus = HarmonyLib.Harmony.DEBUG; + HarmonyLib.Harmony.DEBUG = true; #endif Patcher.PatchAll(!Config.UseDynamicPatching, out int failedPatch); @@ -159,7 +163,7 @@ public void Patch() else Log.Error($"Patching failed! There are {failedPatch} broken patches."); #if DEBUG - Harmony.DEBUG = lastDebugStatus; + HarmonyLib.Harmony.DEBUG = lastDebugStatus; #endif } catch (Exception exception) @@ -179,4 +183,4 @@ public void Unpatch() Log.Debug("All events have been unpatched complete. Goodbye!"); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Exiled.Events.csproj b/EXILED/Exiled.Events/Exiled.Events.csproj index c8d9aa1cd1..e686633b20 100644 --- a/EXILED/Exiled.Events/Exiled.Events.csproj +++ b/EXILED/Exiled.Events/Exiled.Events.csproj @@ -18,7 +18,7 @@ - + diff --git a/EXILED/Exiled.Events/Features/Event.cs b/EXILED/Exiled.Events/Features/Event.cs index 7c2d146635..8d27e46b02 100644 --- a/EXILED/Exiled.Events/Features/Event.cs +++ b/EXILED/Exiled.Events/Features/Event.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.Features using System; using System.Buffers; using System.Collections.Generic; - using System.Linq; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; @@ -33,15 +32,11 @@ namespace Exiled.Events.Features /// public class Event : IExiledEvent { - private record Registration(CustomEventHandler handler, int priority); - - private record AsyncRegistration(CustomAsyncEventHandler handler, int priority); - private static readonly List EventsValue = new(); - private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); + private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); - private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); + private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); private readonly List innerEvent = new(); @@ -138,7 +133,7 @@ public void Subscribe(CustomEventHandler handler, int priority) if (handler == null) return; - Registration registration = new Registration(handler, priority); + Registration registration = new(handler, priority); int index = innerEvent.BinarySearch(registration, RegisterComparable); if (index < 0) { @@ -146,7 +141,7 @@ public void Subscribe(CustomEventHandler handler, int priority) } else { - while (index < innerEvent.Count && innerEvent[index].priority == priority) + while (index < innerEvent.Count && innerEvent[index].Priority == priority) index++; innerEvent.Insert(index, registration); } @@ -177,7 +172,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) if (handler == null) return; - AsyncRegistration registration = new AsyncRegistration(handler, 0); + AsyncRegistration registration = new(handler, 0); int index = innerAsyncEvent.BinarySearch(registration, AsyncRegisterComparable); if (index < 0) { @@ -185,7 +180,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) } else { - while (index < innerAsyncEvent.Count && innerAsyncEvent[index].priority == priority) + while (index < innerAsyncEvent.Count && innerAsyncEvent[index].Priority == priority) index++; innerAsyncEvent.Insert(index, registration); } @@ -197,7 +192,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) /// The handler to add. public void Unsubscribe(CustomEventHandler handler) { - int index = innerEvent.FindIndex(p => p.handler == handler); + int index = innerEvent.FindIndex(p => p.Handler == handler); if (index != -1) innerEvent.RemoveAt(index); } @@ -208,7 +203,7 @@ public void Unsubscribe(CustomEventHandler handler) /// The handler to add. public void Unsubscribe(CustomAsyncEventHandler handler) { - int index = innerAsyncEvent.FindIndex(p => p.handler == handler); + int index = innerAsyncEvent.FindIndex(p => p.Handler == handler); if (index != -1) innerAsyncEvent.RemoveAt(index); } @@ -241,15 +236,15 @@ internal void BlendedInvoke() for (int i = 0; i < count; i++) { - if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].priority >= localInnerAsyncEvent[asyncEventIndex].priority)) + if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].Priority >= localInnerAsyncEvent[asyncEventIndex].Priority)) { try { - localInnerEvent[eventIndex].handler(); + localInnerEvent[eventIndex].Handler(); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[eventIndex].handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[eventIndex].Handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } eventIndex++; @@ -258,11 +253,11 @@ internal void BlendedInvoke() { try { - Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].handler()); + Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].Handler()); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } asyncEventIndex++; @@ -290,11 +285,11 @@ internal void InvokeNormal() { try { - localInnerEvent[i].handler(); + localInnerEvent[i].Handler(); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[i].handler.Method.Name}\" of the class \"{localInnerEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[i].Handler.Method.Name}\" of the class \"{localInnerEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -318,11 +313,11 @@ internal void InvokeAsync() { try { - Timing.RunCoroutine(localInnerAsyncEvent[i].handler()); + Timing.RunCoroutine(localInnerAsyncEvent[i].Handler()); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[i].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[i].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -331,5 +326,9 @@ internal void InvokeAsync() ArrayPool.Shared.Return(localInnerAsyncEvent, true); } } + + private record Registration(CustomEventHandler Handler, int Priority); + + private record AsyncRegistration(CustomAsyncEventHandler Handler, int Priority); } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Features/Event{T}.cs b/EXILED/Exiled.Events/Features/Event{T}.cs index 40fdb85be7..095cb17b40 100644 --- a/EXILED/Exiled.Events/Features/Event{T}.cs +++ b/EXILED/Exiled.Events/Features/Event{T}.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.Features using System; using System.Buffers; using System.Collections.Generic; - using System.Linq; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; @@ -38,15 +37,11 @@ namespace Exiled.Events.Features /// The specified that the event will use. public class Event : IExiledEvent { - private record Registration(CustomEventHandler handler, int priority); - - private record AsyncRegistration(CustomAsyncEventHandler handler, int priority); - private static readonly Dictionary> TypeToEvent = new(); - private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); + private static readonly IComparer RegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); - private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.priority - x.priority); + private static readonly IComparer AsyncRegisterComparable = Comparer.Create((x, y) => y.Priority - x.Priority); private readonly List innerEvent = new(); @@ -143,7 +138,7 @@ public void Subscribe(CustomEventHandler handler, int priority) if (handler == null) return; - Registration registration = new Registration(handler, priority); + Registration registration = new(handler, priority); int index = innerEvent.BinarySearch(registration, RegisterComparable); if (index < 0) { @@ -151,7 +146,7 @@ public void Subscribe(CustomEventHandler handler, int priority) } else { - while (index < innerEvent.Count && innerEvent[index].priority == priority) + while (index < innerEvent.Count && innerEvent[index].Priority == priority) index++; innerEvent.Insert(index, registration); } @@ -182,7 +177,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) if (handler == null) return; - AsyncRegistration registration = new AsyncRegistration(handler, 0); + AsyncRegistration registration = new(handler, 0); int index = innerAsyncEvent.BinarySearch(registration, AsyncRegisterComparable); if (index < 0) { @@ -190,7 +185,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) } else { - while (index < innerAsyncEvent.Count && innerAsyncEvent[index].priority == priority) + while (index < innerAsyncEvent.Count && innerAsyncEvent[index].Priority == priority) index++; innerAsyncEvent.Insert(index, registration); } @@ -202,7 +197,7 @@ public void Subscribe(CustomAsyncEventHandler handler, int priority) /// The handler to add. public void Unsubscribe(CustomEventHandler handler) { - int index = innerEvent.FindIndex(p => p.handler == handler); + int index = innerEvent.FindIndex(p => p.Handler == handler); if (index != -1) innerEvent.RemoveAt(index); } @@ -213,7 +208,7 @@ public void Unsubscribe(CustomEventHandler handler) /// The handler to add. public void Unsubscribe(CustomAsyncEventHandler handler) { - int index = innerAsyncEvent.FindIndex(p => p.handler == handler); + int index = innerAsyncEvent.FindIndex(p => p.Handler == handler); if (index != -1) innerAsyncEvent.RemoveAt(index); } @@ -247,15 +242,15 @@ internal void BlendedInvoke(T arg) for (int i = 0; i < count; i++) { - if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].priority >= localInnerAsyncEvent[asyncEventIndex].priority)) + if (eventIndex < syncCount && (asyncEventIndex >= asyncCount || localInnerEvent[eventIndex].Priority >= localInnerAsyncEvent[asyncEventIndex].Priority)) { try { - localInnerEvent[eventIndex].handler(arg); + localInnerEvent[eventIndex].Handler(arg); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[eventIndex].handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[eventIndex].Handler.Method.Name}\" of the class \"{localInnerEvent[eventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } eventIndex++; @@ -264,11 +259,11 @@ internal void BlendedInvoke(T arg) { try { - Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].handler(arg)); + Timing.RunCoroutine(localInnerAsyncEvent[asyncEventIndex].Handler(arg)); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[asyncEventIndex].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } asyncEventIndex++; @@ -296,11 +291,11 @@ internal void InvokeNormal(T arg) { try { - localInnerEvent[i].handler(arg); + localInnerEvent[i].Handler(arg); } catch (Exception ex) { - Log.Error($"Method \"{localInnerEvent[i].handler.Method.Name}\" of the class \"{localInnerEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerEvent[i].Handler.Method.Name}\" of the class \"{localInnerEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -324,11 +319,11 @@ internal void InvokeAsync(T arg) { try { - Timing.RunCoroutine(localInnerAsyncEvent[i].handler(arg)); + Timing.RunCoroutine(localInnerAsyncEvent[i].Handler(arg)); } catch (Exception ex) { - Log.Error($"Method \"{localInnerAsyncEvent[i].handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); + Log.Error($"Method \"{localInnerAsyncEvent[i].Handler.Method.Name}\" of the class \"{localInnerAsyncEvent[i].Handler.Method.ReflectedType.FullName}\" caused an exception when handling the event \"{GetType().FullName}\"\n{ex}"); } } } @@ -337,5 +332,9 @@ internal void InvokeAsync(T arg) ArrayPool.Shared.Return(localInnerAsyncEvent, true); } } + + private record Registration(CustomEventHandler Handler, int Priority); + + private record AsyncRegistration(CustomAsyncEventHandler Handler, int Priority); } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Features/Patcher.cs b/EXILED/Exiled.Events/Features/Patcher.cs index cbc739fb35..7ece301802 100644 --- a/EXILED/Exiled.Events/Features/Patcher.cs +++ b/EXILED/Exiled.Events/Features/Patcher.cs @@ -16,6 +16,7 @@ namespace Exiled.Events.Features using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Interfaces; + using HarmonyLib; /// @@ -154,4 +155,4 @@ public void UnpatchAll() /// A of all patch types. internal static HashSet GetAllPatchTypes() => Assembly.GetExecutingAssembly().GetTypes().Where((type) => type.CustomAttributes.Any((customAtt) => customAtt.AttributeType == typeof(HarmonyPatch))).ToHashSet(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs b/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs index 2d4ebf971e..7c830f1310 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/AdminToyList.cs @@ -24,4 +24,4 @@ internal static class AdminToyList /// The destroyed ragdoll. public static void OnRemovedAdminToys(AdminToys.AdminToyBase adminToy) => API.Features.Toys.AdminToy.BaseToAdminToy.Remove(adminToy); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs b/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs index 9e9f6eacd7..4ebaf9759e 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/ClientStarted.cs @@ -13,8 +13,11 @@ namespace Exiled.Events.Handlers.Internal using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Attributes; + using Mirror; + using PlayerRoles.Ragdolls; + using UnityEngine; /// @@ -65,7 +68,9 @@ public static void OnClientStarted() PrefabAttribute attribute = prefabType.GetPrefabAttribute(); if (prefabs.TryGetValue(attribute.AssetId, out (GameObject, Component) tuple)) { - GameObject gameObject = tuple.Item1; + if (attribute.Name != tuple.Item1.name) + Log.Warn($"Not valid Name {prefabType}: {attribute.Name} ({attribute.AssetId}) -> {tuple.Item1.name} ({attribute.AssetId})"); + PrefabHelper.Prefabs.Add(prefabType, prefabs.FirstOrDefault(prefab => prefab.Key == attribute.AssetId || prefab.Value.Item1.name.Contains(attribute.Name)).Value); prefabs.Remove(attribute.AssetId); continue; @@ -74,6 +79,8 @@ public static void OnClientStarted() KeyValuePair? value = prefabs.FirstOrDefault(x => x.Value.Item1.name == attribute.Name); if (value.HasValue) { + Log.Warn($"Not valid AssetId {prefabType}: {attribute.Name} ({attribute.AssetId}) -> {value.Value.Value.Item1.name} ({value.Value.Key})"); + PrefabHelper.Prefabs.Add(prefabType, prefabs.FirstOrDefault(prefab => prefab.Key == attribute.AssetId || prefab.Value.Item1.name.Contains(attribute.Name)).Value); prefabs.Remove(value.Value.Key); continue; diff --git a/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs b/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs index c7f0a36698..14abd46be7 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/ExplodingGrenade.cs @@ -7,7 +7,6 @@ namespace Exiled.Events.Handlers.Internal { - using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Map; /// @@ -21,4 +20,4 @@ public static void OnChangedIntoGrenade(ChangedIntoGrenadeEventArgs ev) ev.Pickup.WriteProjectileInfo(ev.Projectile); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs b/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs index 60ec679791..fe545f2e48 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/MapGenerated.cs @@ -7,10 +7,8 @@ namespace Exiled.Events.Handlers.Internal { - using System.Collections.Generic; - using System.Linq; + using Exiled.API.Features; - using API.Features; using Exiled.API.Features.Lockers; using MEC; diff --git a/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs b/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs index 88c6aa43c9..f1062dddb2 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/PickupEvent.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.Handlers.Internal { using Exiled.API.Features.Pickups; + using InventorySystem.Items.Pickups; /// @@ -34,4 +35,4 @@ public static void OnRemovedPickup(ItemPickupBase itemPickupBase) Pickup.BaseToPickup.Remove(itemPickupBase); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs b/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs index 4c2b955631..cbff088505 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/RagdollList.cs @@ -28,4 +28,4 @@ internal static class RagdollList /// The destroyed ragdoll. public static void OnRemovedRagdoll(BasicRagdoll ragdoll) => Ragdoll.BasicRagdollToRagdoll.Remove(ragdoll); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Internal/Round.cs b/EXILED/Exiled.Events/Handlers/Internal/Round.cs index ac058b4629..73b578d33c 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/Round.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/Round.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Handlers.Internal using System.Linq; using CentralAuth; + using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features; @@ -24,14 +25,16 @@ namespace Exiled.Events.Handlers.Internal using Exiled.Events.EventArgs.Scp049; using Exiled.Loader; using Exiled.Loader.Features; - using Interactables.Interobjects.DoorUtils; + using InventorySystem; using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Attachments.Components; using InventorySystem.Items.Usables; using InventorySystem.Items.Usables.Scp330; + using PlayerRoles; using PlayerRoles.RoleAssign; + using Utils.NonAllocLINQ; /// @@ -40,7 +43,7 @@ namespace Exiled.Events.Handlers.Internal internal static class Round { /// - public static void OnServerOnUsingCompleted(ReferenceHub hub, UsableItem usable) => Handlers.Player.OnUsedItem(new (hub, usable, false)); + public static void OnServerOnUsingCompleted(ReferenceHub hub, UsableItem usable) => Handlers.Player.OnUsedItem(new(hub, usable, false)); /// public static void OnWaitingForPlayers() @@ -174,4 +177,4 @@ private static void GenerateAttachments() } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs b/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs index 55b9d0738b..5ebd2c2285 100644 --- a/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs +++ b/EXILED/Exiled.Events/Handlers/Internal/SceneUnloaded.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.Handlers.Internal { - using API.Features; - using Exiled.API.Features.Toys; + using Exiled.API.Features; + using UnityEngine.SceneManagement; #pragma warning disable SA1611 // Element parameters should be documented diff --git a/EXILED/Exiled.Events/Handlers/Item.cs b/EXILED/Exiled.Events/Handlers/Item.cs index d4344493b0..50cd5425b9 100644 --- a/EXILED/Exiled.Events/Handlers/Item.cs +++ b/EXILED/Exiled.Events/Handlers/Item.cs @@ -21,7 +21,7 @@ public static class Item /// /// Invoked before the ammo of an firearm are changed. /// - public static Event ChangingAmmo { get; set; } = new (); + public static Event ChangingAmmo { get; set; } = new(); /// /// Invoked before item attachments are changed. diff --git a/EXILED/Exiled.Events/Handlers/Player.cs b/EXILED/Exiled.Events/Handlers/Player.cs index 9ef0015750..c2ffca618f 100644 --- a/EXILED/Exiled.Events/Handlers/Player.cs +++ b/EXILED/Exiled.Events/Handlers/Player.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.Handlers using System; using Exiled.API.Enums; - using Exiled.API.Features; #pragma warning disable IDE0079 #pragma warning disable IDE0060 @@ -30,7 +29,7 @@ public class Player /// /// Invoked after a player triggers the attack as an SCP. /// - public static Event Hit { get; set; } = new (); + public static Event Hit { get; set; } = new(); /// /// Invoked before authenticating a . @@ -87,7 +86,7 @@ public class Player /// /// Invoked before a finishes using a . In other words, it is invoked after the animation finishes but before the is actually used. /// - public static Event UsingItemCompleted { get; set; } = new (); + public static Event UsingItemCompleted { get; set; } = new(); /// /// Invoked after a uses an . @@ -1446,4 +1445,4 @@ public static void OnItemRemoved(ReferenceHub referenceHub, InventorySystem.Item /// The instance. public static void OnScp1576TransmissionEnded(Scp1576TransmissionEndedEventArgs ev) => Scp1576TransmissionEnded.InvokeSafely(ev); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Scp049.cs b/EXILED/Exiled.Events/Handlers/Scp049.cs index f4a2010794..34a1bbfe83 100644 --- a/EXILED/Exiled.Events/Handlers/Scp049.cs +++ b/EXILED/Exiled.Events/Handlers/Scp049.cs @@ -83,4 +83,4 @@ public static class Scp049 /// The instance. public static void OnAttacking(AttackingEventArgs ev) => Attacking.InvokeSafely(ev); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Scp0492.cs b/EXILED/Exiled.Events/Handlers/Scp0492.cs index 0d03a3727f..11466dfec2 100644 --- a/EXILED/Exiled.Events/Handlers/Scp0492.cs +++ b/EXILED/Exiled.Events/Handlers/Scp0492.cs @@ -20,7 +20,7 @@ public class Scp0492 /// /// Invoked before a player triggers the bloodlust effect for 049-2. /// - public static Event TriggeringBloodlust { get; set; } = new (); + public static Event TriggeringBloodlust { get; set; } = new(); /// /// Called after 049-2 gets his benefits from consumed ability. @@ -50,4 +50,4 @@ public class Scp0492 /// instance. public static void OnConsumingCorpse(ConsumingCorpseEventArgs ev) => ConsumingCorpse.InvokeSafely(ev); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Scp127.cs b/EXILED/Exiled.Events/Handlers/Scp127.cs index bfdb1bcada..9c111ed0d6 100644 --- a/EXILED/Exiled.Events/Handlers/Scp127.cs +++ b/EXILED/Exiled.Events/Handlers/Scp127.cs @@ -9,6 +9,7 @@ namespace Exiled.Events.Handlers { using Exiled.Events.EventArgs.Scp127; using Exiled.Events.Features; + using LabApi.Events.Arguments.Scp127Events; #pragma warning disable SA1623 diff --git a/EXILED/Exiled.Events/Handlers/Scp1344.cs b/EXILED/Exiled.Events/Handlers/Scp1344.cs index e3cd688c7c..79ae3376ab 100644 --- a/EXILED/Exiled.Events/Handlers/Scp1344.cs +++ b/EXILED/Exiled.Events/Handlers/Scp1344.cs @@ -72,4 +72,4 @@ public static class Scp1344 /// The instance. public static void OnChangedStatus(ChangedStatusEventArgs ev) => ChangedStatus.InvokeSafely(ev); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Scp173.cs b/EXILED/Exiled.Events/Handlers/Scp173.cs index b5d577d5cd..cc5ba216c8 100644 --- a/EXILED/Exiled.Events/Handlers/Scp173.cs +++ b/EXILED/Exiled.Events/Handlers/Scp173.cs @@ -94,4 +94,4 @@ public static class Scp173 /// The instance. public static void OnRemovedObserver(RemovedObserverEventArgs ev) => RemovedObserver.InvokeSafely(ev); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Handlers/Server.cs b/EXILED/Exiled.Events/Handlers/Server.cs index caef937bff..7356338ef5 100644 --- a/EXILED/Exiled.Events/Handlers/Server.cs +++ b/EXILED/Exiled.Events/Handlers/Server.cs @@ -9,7 +9,6 @@ namespace Exiled.Events.Handlers { using System.Collections.Generic; - using Respawning; using Respawning.Waves; #pragma warning disable SA1623 // Property summary documentation should match accessors @@ -266,4 +265,4 @@ public static class Server /// The instance. public static void OnCompletingObjective(CompletingObjectiveEventArgs ev) => CompletingObjective.InvokeSafely(ev); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs b/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs index 1e7b55e3a8..9e184b1aba 100644 --- a/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Cassie/SendingCassieMessage.cs @@ -11,13 +11,16 @@ namespace Exiled.Events.Patches.Events.Cassie using System.Linq; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Cassie; + using global::Cassie; + using Handlers; + using HarmonyLib; - using Respawning; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs b/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs index fec7811ecf..7454f3bd42 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/Cackling.cs @@ -10,11 +10,12 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; + using HarmonyLib; + using InventorySystem.Items.MarshmallowMan; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs index 7ef8824daf..c658520201 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAmmo.cs @@ -7,21 +7,12 @@ namespace Exiled.Events.Patches.Events.Item { - using System.Collections.Generic; - using System.Reflection.Emit; - - using API.Features.Pools; using Exiled.Events.Attributes; - using Exiled.Events.EventArgs.Item; using Handlers; - using HarmonyLib; - using InventorySystem.Items.Firearms; - using static HarmonyLib.AccessTools; - /// /// Patches . /// Adds the event. diff --git a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs index 6e45fbd152..29ae01023b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/ChangingAttachments.cs @@ -8,12 +8,10 @@ namespace Exiled.Events.Patches.Events.Item { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; - using API.Features; - using API.Features.Items; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs b/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs index 889cbada1c..69b24013bd 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/DisruptorFiring.cs @@ -10,17 +10,18 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; using Exiled.API.Features.Pickups; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; + using Footprinting; + using HarmonyLib; + using InventorySystem.Items; using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Extensions; - using InventorySystem.Items.Firearms.Modules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs b/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs index 4ba2d307e8..f45ca975ef 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/Inspect.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -15,7 +15,9 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; + using HarmonyLib; + using InventorySystem.Items.Firearms.Modules; using InventorySystem.Items.Jailbird; using InventorySystem.Items.Keycards; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs index 653afada85..57fcbaca50 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdPatch.cs @@ -12,10 +12,15 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; + using Handlers; + using HarmonyLib; + using InventorySystem.Items.Jailbird; + using Mirror; + using NorthwoodLib.Pools; using static HarmonyLib.AccessTools; @@ -76,43 +81,43 @@ private static bool HandleJailbird(JailbirdItem instance, JailbirdMessageType me switch (messageType) { case JailbirdMessageType.AttackTriggered: - { - SwingingEventArgs ev = new(instance.Owner, instance); + { + SwingingEventArgs ev = new(instance.Owner, instance); - Item.OnSwinging(ev); + Item.OnSwinging(ev); - return ev.IsAllowed; - } + return ev.IsAllowed; + } case JailbirdMessageType.ChargeLoadTriggered: - { - ChargingJailbirdEventArgs ev = new(instance.Owner, instance); + { + ChargingJailbirdEventArgs ev = new(instance.Owner, instance); - Item.OnChargingJailbird(ev); - if (ev.IsAllowed) - return true; + Item.OnChargingJailbird(ev); + if (ev.IsAllowed) + return true; - ev.Player.RemoveHeldItem(destroy: false); - ev.Player.CurrentItem = ev.Item; - return false; - } + ev.Player.RemoveHeldItem(destroy: false); + ev.Player.CurrentItem = ev.Item; + return false; + } case JailbirdMessageType.ChargeStarted: - { - JailbirdChargeCompleteEventArgs ev = new(instance.Owner, instance); + { + JailbirdChargeCompleteEventArgs ev = new(instance.Owner, instance); - Item.OnJailbirdChargeComplete(ev); - if (ev.IsAllowed) - return true; + Item.OnJailbirdChargeComplete(ev); + if (ev.IsAllowed) + return true; - ev.Player.RemoveHeldItem(destroy: false); - ev.Player.AddItem(ev.Item); - return false; - } + ev.Player.RemoveHeldItem(destroy: false); + ev.Player.AddItem(ev.Item); + return false; + } default: return true; } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs index cd4499e115..8918a88768 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/JailbirdWearState.cs @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; + using HarmonyLib; + using InventorySystem.Items.Jailbird; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs b/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs index 62faa353cd..af222f2c7a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/KeycardInteracting.cs @@ -10,10 +10,11 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pickups; - using API.Features.Pools; using Attributes; + + using Exiled.API.Features; + using Exiled.API.Features.Pickups; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Item; using Footprinting; @@ -21,6 +22,7 @@ namespace Exiled.Events.Patches.Events.Item using HarmonyLib; using Interactables.Interobjects.DoorUtils; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs b/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs index 15c74b57b1..08c22a8c66 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/Punching.cs @@ -10,11 +10,12 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; + using HarmonyLib; + using InventorySystem.Items.MarshmallowMan; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs b/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs index 324c8cb6d4..c3df3a6776 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/ReceivingPreference.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Item using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; diff --git a/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs b/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs index 7d54efe70f..cb1d21b71a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs +++ b/EXILED/Exiled.Events/Patches/Events/Item/UsingRadioPickupBattery.cs @@ -12,7 +12,9 @@ namespace Exiled.Events.Patches.Events.Item using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Item; + using HarmonyLib; + using InventorySystem.Items.Radio; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs index 3033a0327d..d48225d34c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingChaosEntrance.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -16,8 +16,11 @@ namespace Exiled.Events.Patches.Events.Map using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using HarmonyLib; + using Respawning.Announcements; + using Subtitles; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs index 23882fa6c1..f91f64c17c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingDecontamination.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; @@ -30,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Map [HarmonyPatch(typeof(DecontaminationController), nameof(DecontaminationController.UpdateSpeaker))] internal static class AnnouncingDecontamination { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs index 75cf10177c..99822f8fc6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfEntrance.cs @@ -7,17 +7,19 @@ namespace Exiled.Events.Patches.Events.Map { - using System; using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; using System.Text.RegularExpressions; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using Handlers; + using HarmonyLib; + using Respawning.Announcements; using Respawning.NamingRules; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs index 018362acde..3c2a295484 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingNtfMiniEntrance.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,11 +10,15 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using Handlers; + using HarmonyLib; + using Respawning.Announcements; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs index 5064239e03..084cbc2440 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs @@ -12,13 +12,15 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; - using Exiled.Events.Handlers; + using Footprinting; + using global::Cassie; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs b/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs index 8236e2c485..fbce1e7320 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/BreakingScp2176.cs @@ -10,12 +10,16 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using Footprinting; + using HarmonyLib; + using InventorySystem.Items.ThrowableProjectiles; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs index 30ec11522f..58453f2874 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ChangingIntoGrenade.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs b/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs index 6c8ad469a3..16cbf115fe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/Decontaminating.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; @@ -30,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Map [HarmonyPatch(typeof(DecontaminationController), nameof(DecontaminationController.FinishDecontamination))] internal static class Decontaminating { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs b/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs index 098a5852ae..a623790fcd 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ElevatorSequencesUpdated.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,7 +9,9 @@ namespace Exiled.Events.Patches.Events.Map { using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using HarmonyLib; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs index b01df68276..c21f7e8779 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs @@ -11,13 +11,16 @@ namespace Exiled.Events.Patches.Events.Map using System.Linq; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using Exiled.API.Extensions; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Map; using Exiled.Events.Patches.Generic; + using HarmonyLib; + using InventorySystem.Items.ThrowableProjectiles; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs index ad35198c58..2a544767d9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs b/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs index 0816e0934e..c72e70dd72 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/FillingLocker.cs @@ -66,4 +66,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs b/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs index ce68e1588d..1c14a8d8a1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -18,10 +18,14 @@ namespace Exiled.Events.Patches.Events.Map using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using HarmonyLib; + using LabApi.Events.Arguments.ServerEvents; + using MapGeneration; using MapGeneration.Holidays; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -521,7 +525,7 @@ private static void FakeSpawn(AtlasZoneGenerator gen, AtlasInterpretation interp Spawned.Add(new AtlasZoneGenerator.SpawnedRoomData { ChosenCandidate = spawnableRoom, - Instance = null!, + Instance = null, Interpretation = interpretation, }); @@ -545,7 +549,7 @@ private static void FakeSpawn(AtlasZoneGenerator gen, AtlasInterpretation interp Spawned.Add(new AtlasZoneGenerator.SpawnedRoomData { ChosenCandidate = room, - Instance = null!, + Instance = null, Interpretation = interpretation, }); diff --git a/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs b/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs index dad7714174..578782d10c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/GeneratorActivating.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Diagnostics; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs b/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs index ff3a09dfa8..bc8da0cc5e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/PlacingBulletHole.cs @@ -11,13 +11,19 @@ namespace Exiled.Events.Patches.Events.Map using System.Linq; using System.Reflection.Emit; - using API.Features.Pools; using Attributes; + using Decals; + + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Map; + using Handlers; + using HarmonyLib; + using InventorySystem.Items.Firearms.Modules; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs index d82c118797..ea127c946f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/PlacingPickupIntoPocketDimension.cs @@ -7,14 +7,15 @@ namespace Exiled.Events.Patches.Events.Map { - using System.Collections.Generic; - using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using Handlers; + using HarmonyLib; + using InventorySystem.Items.Pickups; - using Mirror; + using PlayerRoles.PlayableScps.Scp106; using static PlayerRoles.PlayableScps.Scp106.Scp106PocketItemManager; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs b/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs index 449fd14c57..3ee65548c0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/Scp244Spawning.cs @@ -8,18 +8,21 @@ namespace Exiled.Events.Patches.Events.Map { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; - using Exiled.API.Features.Pickups; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using HarmonyLib; + using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables.Scp244; + using MapGeneration; + using Mirror; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs b/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs index bac813d138..e932c0c6ef 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/SpawningItem.cs @@ -10,13 +10,13 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Doors; - using API.Features.Pools; - using Attributes; using EventArgs.Map; + using Exiled.API.Features.Doors; + using Exiled.API.Features.Pools; + using HarmonyLib; using Interactables.Interobjects.DoorUtils; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs b/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs index 4d6a72a8f9..f5d5f20da6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/SpawningRoomConnector.cs @@ -17,7 +17,9 @@ namespace Exiled.Events.Patches.Events.Map using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; + using HarmonyLib; + using MapGeneration; using MapGeneration.RoomConnectors.Spawners; diff --git a/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs b/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs index cbc12540eb..e2449ec261 100644 --- a/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs +++ b/EXILED/Exiled.Events/Patches/Events/Map/TurningOffLights.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Map using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Map; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs index d7c8be8354..9b764e9e5d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWarheadPanel.cs @@ -8,14 +8,16 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Diagnostics; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using Interactables.Interobjects.DoorUtils; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs index 4dec7db382..b47a21d98a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ActivatingWorkstation.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs b/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs index 737ff4ead2..83ba4a1fc6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Aiming.cs @@ -10,16 +10,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Extensions; using Exiled.API.Features.Pools; - using Exiled.Events.Attributes; - using Exiled.Events.EventArgs.Player; - using Exiled.Events.Handlers; using HarmonyLib; + using InventorySystem.Items.Firearms.Modules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs b/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs index f8486d05fc..96c2c708e1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Banned.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs b/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs index 573c2bd820..c6a0a26344 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Banning.cs @@ -10,12 +10,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; using CommandSystem; + + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using Footprinting; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs index 1cc7dfc8a9..faaad99f57 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs @@ -10,11 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; using CentralAuth; + + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -83,4 +86,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs index 465935ad7a..0ed278469a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedItem.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -29,7 +29,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(Inventory), nameof(Inventory.CurInstance), MethodType.Setter)] internal static class ChangedItem { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); int index = newInstructions.Count - 1; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs index 071e1c5fe1..ce5e44d505 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedRoom.cs @@ -14,9 +14,13 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; + using HarmonyLib; + using MapGeneration; + using PlayerRoles; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -66,4 +70,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs index 11030dddd8..7afe94bbd5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDangerState.cs @@ -14,12 +14,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CustomPlayerEffects.Danger; + using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs index 1263f56daa..caf13eed8c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingDisruptorMode.cs @@ -13,9 +13,11 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; using InventorySystem.Items.Firearms.Modules; + using Mirror; using static HarmonyLib.AccessTools; @@ -67,4 +69,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs index 3e94bf497b..846320aac2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingGroup.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -92,4 +92,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs index fa964cad82..646fd7de25 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingItem.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Items; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Items; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs index fdab782419..e945ba24a8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMicroHIDState.cs @@ -8,15 +8,15 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; - using API.Features.Items; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items.MicroHID; using InventorySystem.Items.MicroHID.Modules; @@ -101,4 +101,4 @@ private static bool CallPickupEvent(ushort serial, ref MicroHidPhase phase) return ev.IsAllowed; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs index 5c9879f7ca..94e93456fe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingMoveState.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs index ad77fa94ba..ddc7c834a2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRadioPreset.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -97,4 +97,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs index 5a0768d7f8..fd9e1c4e61 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingRoleAndSpawned.cs @@ -12,25 +12,25 @@ namespace Exiled.Events.Patches.Events.Player using System.Linq; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - using API.Features.Roles; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.API.Features.Roles; + using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem; - using InventorySystem.Configs; using InventorySystem.Items; - using InventorySystem.Items.Armor; using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables.Scp1344; + using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; - using Mirror; using PlayerRoles; using static HarmonyLib.AccessTools; - using static UnityEngine.GraphicsBuffer; using Player = Handlers.Player; @@ -197,7 +197,7 @@ private static void ChangeInventory(ChangingRoleEventArgs ev) Inventory inventory = ev.Player.Inventory; if (InventoryItemProvider.KeepItemsAfterEscaping && ev.Reason == API.Enums.SpawnReason.Escaped) { - List list = new List(); + List list = new(); HashSet hashSet = HashSetPool.Pool.Get(); foreach (KeyValuePair item2 in inventory.UserInventory.Items) @@ -241,4 +241,4 @@ private static void ChangeInventory(ChangingRoleEventArgs ev) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs index 52617181a2..ae911e7917 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangingSpectatedPlayerPatch.cs @@ -10,11 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using PlayerRoles; using PlayerRoles.Spectating; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs index 85e9f6698f..e71926d609 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ConsumingItem.cs @@ -75,4 +75,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs index 3b693af58e..a262608e3d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DamagingDoor.cs @@ -10,16 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - - using Exiled.Events.Attributes; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using Handlers; using HarmonyLib; + using Interactables.Interobjects; - using Interactables.Interobjects.DoorUtils; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs index 2687d9b0e7..ac7b873f44 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DamagingShootingTarget.cs @@ -12,8 +12,8 @@ namespace Exiled.Events.Patches.Events.Player using AdminToys; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs b/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs index f8db09f753..0d4d002567 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DamagingWindow.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.DamageHandlers; - using API.Features.Pools; + using Exiled.API.Features.DamageHandlers; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs b/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs index a31db55d0b..ad9acd6009 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DeactivatingWorkstation.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs b/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs index 5b1b6ac58a..c5cd661dc1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Destroying.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using System.Runtime.CompilerServices; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs b/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs index 3ec5e18953..759b3632d7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DrinkingCoffee.cs @@ -15,6 +15,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs b/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs index 180a0bd115..84537ce483 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Linq; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs index f5802d2a84..5b8b63b66a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DroppingItem.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs b/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs index 9ea721c3b6..20566d1349 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/DryFire.cs @@ -56,7 +56,7 @@ internal static IEnumerable GetInstructions(CodeInstruction sta yield return new(OpCodes.Brfalse_S, ret); } - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -123,7 +123,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs b/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs index 8acd20cb62..0c42bce6ed 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EarningAchievement.cs @@ -12,8 +12,8 @@ namespace Exiled.Events.Patches.Events.Player using Achievements; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -77,4 +77,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs b/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs index a7d4475693..2df58c54c6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Emotion.cs @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; using static HarmonyLib.AccessTools; @@ -67,7 +69,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs index 59259d210c..f8038bcdc3 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringKillerCollision.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs index f0dbbef923..0f8e063d7a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringPocketDimension.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs index c98d661747..e17f9752ee 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringSinkholeEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs index b1d8fa813d..409524e490 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EnteringTantrumEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs b/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs index 87ad9273bb..060fd61672 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs @@ -13,12 +13,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using EventArgs.Player; + + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.API.Features.Roles; using Exiled.Events.Attributes; + using HarmonyLib; + using LabApi.Events.Arguments.PlayerEvents; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs index 03153ab7a5..3597f76d21 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs @@ -8,11 +8,10 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -21,8 +20,6 @@ namespace Exiled.Events.Patches.Events.Player using PlayerRoles.FirstPersonControl; using PlayerRoles.PlayableScps.Scp106; - using UnityEngine; - using static HarmonyLib.AccessTools; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs index 677a7dbda8..81d1b47cd5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ExitingSinkholeEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs index 113155064e..7e1bcece75 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ExitingTantrumEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs b/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs index 2fdf38da46..64855a893c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ExplodingMicroHID.cs @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items.MicroHID.Modules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs index 5e4a7cfcb6..a5cb3ba790 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/FailingEscapePocketDimension.cs @@ -10,15 +10,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using UnityEngine; - using static HarmonyLib.AccessTools; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs b/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs index 4ec1ce8c9f..d79e200c29 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/FlippingCoin.cs @@ -10,13 +10,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items; using InventorySystem.Items.Coin; + using Mirror; using static HarmonyLib.AccessTools; @@ -83,4 +85,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs b/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs index 11e53cd79a..ed2ede6b71 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Healing.cs @@ -11,11 +11,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using PlayerStatsSystem; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs b/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs index 2002397b50..568a6b8f9d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Hit.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -10,11 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using Attributes; + + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.PlayableScps.Subroutines; using PlayerRoles.Subroutines; @@ -29,7 +32,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(ScpAttackAbilityBase), nameof(ScpAttackAbilityBase.ServerPerformAttack))] public class Hit { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs b/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs index ffd5392b06..f77e680ec2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Hurting.cs @@ -10,12 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - using API.Features.Roles; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; - using Exiled.Events.EventArgs.Scp079; - using Exiled.Events.Handlers; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs b/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs index 3c6c6e7f30..4d39378981 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Interacted.cs @@ -10,12 +10,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using Interactables; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs index ddd406ac1f..7b341892c0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingDoor.cs @@ -11,11 +11,16 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; using Attributes; + using EventArgs.Player; + + using Exiled.API.Features.Pools; + using HarmonyLib; + using Interactables.Interobjects.DoorUtils; + using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; @@ -171,7 +176,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs index 39382fd680..4a13be49f0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs index dcde1d57eb..6629cbcc70 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingEmergencyButton.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -16,7 +16,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs index ade2d45a67..ec52a34a24 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingGenerator.cs @@ -13,7 +13,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs index 3ce7b9aeee..18864269a7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingLocker.cs @@ -11,12 +11,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using MapGeneration.Distributors; using static HarmonyLib.AccessTools; @@ -29,7 +31,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(Locker), nameof(Locker.ServerInteract))] internal static class InteractingLocker { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs index 131705bf4b..85ecd07ef3 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingShootingTarget.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs b/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs index 08542cd432..1f995b12ff 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs @@ -8,10 +8,9 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Diagnostics; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -72,4 +71,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs b/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs index e7b92c0426..a94ac61ad6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/IssuingMute.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs b/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs index 18421e5044..75e66beb5b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Joined.cs @@ -12,7 +12,7 @@ namespace Exiled.Events.Patches.Events.Player using System; - using API.Features; + using Exiled.API.Features; using Exiled.Events.EventArgs.Player; using Exiled.Loader.Features; @@ -61,4 +61,4 @@ private static void Postfix(ReferenceHub __instance) CallEvent(__instance, out _); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs b/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs index 6f50676792..ff3bac88e1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs b/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs index cf6a9261d0..73214335ad 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Kicked.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs b/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs index 0ab9467d61..5943b4cf8f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Kicking.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CommandSystem; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs b/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs index ac28cd901a..4b9ff3291f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Landing.cs @@ -10,13 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using Exiled.Events.Handlers; + using HarmonyLib; + using PlayerRoles.FirstPersonControl; - using PlayerRoles.FirstPersonControl.Thirdperson; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Left.cs b/EXILED/Exiled.Events/Patches/Events/Player/Left.cs index 3621429dce..8c4b5eaaf8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Left.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Left.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; @@ -28,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(CustomNetworkManager), nameof(CustomNetworkManager.OnServerDisconnect), typeof(NetworkConnectionToClient))] internal static class Left { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs b/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs index eb64428da5..f3b4f42e4d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/MakingNoise.cs @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using PlayerRoles.FirstPersonControl.Thirdperson; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs b/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs index a631bdd812..9587ff3040 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/MicroHIDOpeningDoor.cs @@ -11,10 +11,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using Attributes; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using InventorySystem.Items.MicroHID.Modules; using static HarmonyLib.AccessTools; @@ -72,4 +74,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs index b4ad99a32a..88cb84bec9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUp330.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -20,8 +20,6 @@ namespace Exiled.Events.Patches.Events.Player using static HarmonyLib.AccessTools; - using Player = API.Features.Player; - /// /// Patches the method to add the /// event. diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs index 17c16af893..270cdb6da8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpAmmo.cs @@ -10,12 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using InventorySystem.Items.Pickups; using InventorySystem.Searching; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs index b7d09303bd..3c895bd058 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpArmor.cs @@ -11,8 +11,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs index 23ed931424..8c5305e3a9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpItem.cs @@ -11,8 +11,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs index daeae1f672..5984ae2d43 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PickingUpScp244.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs b/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs index 4e09d7d062..4212f57ba0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PlayingAudioLog.cs @@ -10,11 +10,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using MapGeneration.Spawnables; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs b/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs index 10386c48d1..2660447758 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/PreAuthenticating.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -28,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(CustomLiteNetLib4MirrorTransport), nameof(CustomLiteNetLib4MirrorTransport.ProcessConnectionRequest))] internal static class PreAuthenticating { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -39,7 +39,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs b/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs index 559af2a032..157e37b66a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ProcessDisarmMessage.cs @@ -7,13 +7,13 @@ namespace Exiled.Events.Patches.Events.Player { - #pragma warning disable SA1402 // File may only contain a single type +#pragma warning disable SA1402 // File may only contain a single type using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs index 46881a8d6d..c93e75c798 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingGunSound.cs @@ -183,4 +183,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs index 707743a243..6ed6f26308 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingStatusEffect.cs @@ -10,11 +10,10 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - using CustomPlayerEffects; - using Exiled.Events.Attributes; + + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs index fcefcbbd0d..9fae37e842 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReceivingVoiceMessage.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs index 96152eafbe..e325480829 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReloadedAndUnloaded.cs @@ -11,23 +11,17 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using InventorySystem.Items.Autosync; - using InventorySystem.Items.Firearms; + using InventorySystem.Items.Firearms.Modules; - using InventorySystem.Items.Firearms.Modules.Misc; - using InventorySystem.Searching; - using Mirror; - using UnityEngine; using static HarmonyLib.AccessTools; - using Player = API.Features.Player; - /// /// Patches to add missing event handler to the /// and . diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs b/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs index 68c3c315bc..adc3d4ac97 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ReservedSlotPatch.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs b/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs index 827960840f..0813987c6f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/RevokingMute.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs b/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs index 7dd1ea6065..4445af13fe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/RotatingRevolver.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Extensions; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; @@ -20,6 +19,7 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.Events.Handlers; using HarmonyLib; + using InventorySystem.Items.Firearms.Modules; using static HarmonyLib.AccessTools; @@ -32,7 +32,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(CylinderAmmoModule), nameof(CylinderAmmoModule.RotateCylinder))] internal class RotatingRevolver { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs b/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs index daa9f0c6fb..138214adf2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CustomPlayerEffects; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -92,4 +93,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs b/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs index 2f81bec7c7..385abdfd68 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Scp1576TransmissionEnded.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Events.Player using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items.Usables.Scp1576; using static HarmonyLib.AccessTools; @@ -22,38 +24,36 @@ namespace Exiled.Events.Patches.Events.Player /// Patches to add event. /// [EventPatch(typeof(Handlers.Player), nameof(Handlers.Player.Scp1576TransmissionEnded))] - [HarmonyPatch(typeof(InventorySystem.Items.Usables.Scp1576.Scp1576Item), nameof(Scp1576Item.ServerStopTransmitting))] + [HarmonyPatch(typeof(Scp1576Item), nameof(Scp1576Item.ServerStopTransmitting))] public class Scp1576TransmissionEnded { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { - List newInstructions = ListPool.Pool.Get(instructions); + List newInstructions = ListPool.Pool.Get(instructions); - int index = newInstructions.Count - 1; + int index = newInstructions.Count - 1; - newInstructions.InsertRange( - index, - new[] - { - // Player.Get(base.Owner) - new CodeInstruction(OpCodes.Ldarg_0), - new CodeInstruction(OpCodes.Callvirt, PropertyGetter(typeof(Scp1576Item), nameof(Scp1576Item.Owner))), - new CodeInstruction(OpCodes.Call, Method(typeof(API.Features.Player), nameof(API.Features.Player.Get), new[] { typeof(ReferenceHub) })), + newInstructions.InsertRange(index, new[] + { + // Player.Get(base.Owner) + new CodeInstruction(OpCodes.Ldarg_0), + new CodeInstruction(OpCodes.Callvirt, PropertyGetter(typeof(Scp1576Item), nameof(Scp1576Item.Owner))), + new CodeInstruction(OpCodes.Call, Method(typeof(API.Features.Player), nameof(API.Features.Player.Get), new[] { typeof(ReferenceHub) })), - // this - new CodeInstruction(OpCodes.Ldarg_0), + // this + new CodeInstruction(OpCodes.Ldarg_0), - // Scp1576TransmissionEndedEventArgs ev = new(Player, this) - new CodeInstruction(OpCodes.Newobj, GetDeclaredConstructors(typeof(Scp1576TransmissionEndedEventArgs))[0]), + // Scp1576TransmissionEndedEventArgs ev = new(Player, this) + new CodeInstruction(OpCodes.Newobj, GetDeclaredConstructors(typeof(Scp1576TransmissionEndedEventArgs))[0]), - // OnScp1576TransmissionEnded(ev) - new CodeInstruction(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnScp1576TransmissionEnded))), - }); + // OnScp1576TransmissionEnded(ev) + new CodeInstruction(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnScp1576TransmissionEnded))), + }); - for (int i = 0; i < newInstructions.Count; i++) - yield return newInstructions[i]; + for (int i = 0; i < newInstructions.Count; i++) + yield return newInstructions[i]; - ListPool.Pool.Return(newInstructions); + ListPool.Pool.Return(newInstructions); } } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs b/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs index c05e73f0c7..a872bbb5c5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SearchingPickupEvent.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -146,4 +146,4 @@ private static float SafeGetTime(SearchingPickupEventArgs ev, SearchCoordinator return coordinator.SessionPipe.Request.Target.SearchTimeForPlayer(coordinator.Hub); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs index cf74131a00..6adbfea602 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingAdminChatMessage.cs @@ -10,15 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; - using InventorySystem.Items.Pickups; - using InventorySystem.Searching; using RemoteAdmin; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs index 203a31dc51..fc0d604781 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingGunSound.cs @@ -138,4 +138,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs index e1ff66c95a..6fc0be997a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidGameConsoleCommand.cs @@ -7,18 +7,20 @@ namespace Exiled.Events.Patches.Events.Player { - using System; using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using CommandSystem; + + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using LabApi.Features.Enums; + using RemoteAdmin; using static HarmonyLib.AccessTools; @@ -167,4 +169,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs index a9a0f9d9fb..0934d04b05 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SendingValidRACommand.cs @@ -11,14 +11,17 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using CommandSystem; + + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; + using LabApi.Features.Enums; + using RemoteAdmin; using static HarmonyLib.AccessTools; @@ -167,4 +170,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs b/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs index ac526807b8..e50f6b7a28 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Shooting.cs @@ -7,16 +7,17 @@ namespace Exiled.Events.Patches.Events.Player { - using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items.Firearms.Modules.Misc; using static HarmonyLib.AccessTools; @@ -100,9 +101,9 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs b/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs index af8b3a6c20..c502d5984b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Spawning.cs @@ -8,16 +8,17 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; using PlayerRoles.FirstPersonControl.Spawnpoints; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -87,4 +88,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs b/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs index 413e29bc51..2a2a98760b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SpawningRagdoll.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -136,4 +135,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs index b89eac29eb..5f6ac2536a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnEnvironmentalHazard.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -30,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(EnvironmentalHazard), nameof(EnvironmentalHazard.OnStay))] internal static class StayingOnEnvironmentalHazard { - internal static CodeInstruction[] GetInstructions(Label ret) => new CodeInstruction[] + internal static CodeInstruction[] GetInstructions() => new CodeInstruction[] { // Player.Get(player) new(OpCodes.Ldarg_1), @@ -46,15 +46,11 @@ internal static class StayingOnEnvironmentalHazard new(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnStayingOnEnvironmentalHazard))), }; - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); - Label ret = generator.DefineLabel(); - - newInstructions.InsertRange(0, GetInstructions(ret)); - - newInstructions[newInstructions.Count - 1].WithLabels(ret); + newInstructions.InsertRange(0, GetInstructions()); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs index 19e6863645..56b4919d41 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnSinkholeEnvironmentalHazard.cs @@ -8,10 +8,10 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; + using HarmonyLib; using Hazards; @@ -24,15 +24,11 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(SinkholeEnvironmentalHazard), nameof(SinkholeEnvironmentalHazard.OnStay))] internal static class StayingOnSinkholeEnvironmentalHazard { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); - Label ret = generator.DefineLabel(); - - newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions(ret)); - - newInstructions[newInstructions.Count - 1].WithLabels(ret); + newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions()); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs index de0f5b7ca9..b9d2fcc9ff 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/StayingOnTantrumEnvironmentalHazard.cs @@ -8,10 +8,11 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; + using HarmonyLib; using Hazards; @@ -24,15 +25,11 @@ namespace Exiled.Events.Patches.Events.Player [HarmonyPatch(typeof(TantrumEnvironmentalHazard), nameof(TantrumEnvironmentalHazard.OnStay))] internal static class StayingOnTantrumEnvironmentalHazard { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); - Label ret = generator.DefineLabel(); - - newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions(ret)); - - newInstructions[newInstructions.Count - 1].WithLabels(ret); + newInstructions.InsertRange(0, StayingOnEnvironmentalHazard.GetInstructions()); for (int z = 0; z < newInstructions.Count; z++) yield return newInstructions[z]; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs b/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs index 0b2a10d46d..474859a8e4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ThrowingRequest.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs b/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs index d4ecc59a65..0078a8db87 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/ThrownProjectile.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -69,4 +70,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs index 91f8aa87ad..01f77f1c20 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingFlashlight.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; @@ -68,4 +69,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs index 9b6ebab9ce..fb2602f419 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingNoClip.cs @@ -10,10 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - - using Exiled.API.Features.Roles; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs index 70a04812e2..46eb04a6a4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingOverwatch.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; using CommandSystem.Commands.RemoteAdmin; + + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs index 3b8b66ed5d..54fd3e6e66 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingRadio.cs @@ -108,4 +108,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs b/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs index 88fd7d7cd7..09aa48a3be 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TogglingWeaponFlashlight.cs @@ -10,7 +10,6 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using Exiled.API.Extensions; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs b/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs index ccf67613bc..734ce34ad0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/TriggeringTesla.cs @@ -8,14 +8,14 @@ namespace Exiled.Events.Patches.Events.Player { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pools; - using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using LabApi.Events.Arguments.PlayerEvents; using LabApi.Events.Handlers; @@ -127,4 +127,4 @@ private static void TriggeringTeslaEvent(BaseTeslaGate baseTeslaGate, ref bool i } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs index 4aab1c1327..208a9b9ee4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsedItemByHolstering.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,12 +11,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection.Emit; using CustomPlayerEffects; - using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items.Usables; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs index ec10d374a6..fe4a09b96d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingAndCancellingItemUse.cs @@ -11,17 +11,15 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using CustomPlayerEffects; + + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; using HarmonyLib; using InventorySystem.Items.Usables; - using LabApi.Events.Arguments.PlayerEvents; - using Utils.Networking; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs index 5a89cf2ba6..30ecb92fea 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingItemCompleted.cs @@ -10,14 +10,14 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; using HarmonyLib; using InventorySystem.Items.Usables; + using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs index 115ffc8391..30817d44c5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingMicroHIDEnergy.cs @@ -10,10 +10,12 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; + using HarmonyLib; + using InventorySystem.Items.MicroHID.Modules; using static HarmonyLib.AccessTools; @@ -81,4 +83,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs b/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs index 1baf62c851..bca01e1ddb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/UsingRadioBattery.cs @@ -10,8 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs b/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs index 7b274bc7c1..b029e90350 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs @@ -13,11 +13,13 @@ namespace Exiled.Events.Patches.Events.Player using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; using CentralAuth; + using Exiled.API.Extensions; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Player; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs b/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs index 17ba25773c..97da7328b4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/VoiceChatting.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Player using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs index 849ba4ae93..48f4dab1af 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/ActivatingSense.cs @@ -12,16 +12,12 @@ namespace Exiled.Events.Patches.Events.Scp049 using Exiled.API.Features; using Exiled.API.Features.Pools; - using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; + using HarmonyLib; - using Mirror; - using PlayerRoles; - using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.Subroutines; - using Utils.Networking; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs index 0786079299..34fe444301 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/Attacking.cs @@ -14,9 +14,10 @@ namespace Exiled.Events.Patches.Events.Scp049 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp049; - using PlayerRoles.Subroutines; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs index 6ea1385c8c..0d69554754 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp049 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs index 9a63f16e7e..22e9ea8a40 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/FinishingSense.cs @@ -11,9 +11,10 @@ namespace Exiled.Events.Patches.Events.Scp049 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; + using HarmonyLib; using PlayerRoles.PlayableScps.Scp049; @@ -255,4 +256,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs index 275313384b..baeb1eef2e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/SendingCall.cs @@ -12,7 +12,6 @@ namespace Exiled.Events.Patches.Events.Scp049 using Exiled.API.Features; using Exiled.API.Features.Pools; - using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs b/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs index 044e074872..57e094ea7d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp049/StartingRecall.cs @@ -9,11 +9,13 @@ namespace Exiled.Events.Patches.Events.Scp049 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp049; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.Ragdolls; @@ -71,4 +73,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs index 592dd3a7b1..7c7e8e8836 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consumed.cs @@ -10,17 +10,15 @@ namespace Exiled.Events.Patches.Events.Scp0492 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - - using Exiled.API.Extensions; - using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp0492; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.Subroutines; - using PlayerStatsSystem; using static HarmonyLib.AccessTools; @@ -83,4 +81,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs index 5422d0b2e2..2c326f207a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp0492/Consuming.cs @@ -10,13 +10,12 @@ namespace Exiled.Events.Patches.Events.Scp0492 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - - using Exiled.API.Extensions; - using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp0492; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp049; using PlayerRoles.PlayableScps.Scp049.Zombies; using PlayerRoles.Subroutines; @@ -31,7 +30,7 @@ namespace Exiled.Events.Patches.Events.Scp0492 [HarmonyPatch(typeof(ZombieConsumeAbility), nameof(ZombieConsumeAbility.ServerValidateBegin))] public class Consuming { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs b/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs index 32cd7264d0..09a4844d33 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp0492/TriggeringBloodlustEvent.cs @@ -28,7 +28,7 @@ namespace Exiled.Events.Patches.Events.Scp0492 [HarmonyPatch(typeof(ZombieBloodlustAbility), nameof(ZombieBloodlustAbility.AnyTargets))] internal static class TriggeringBloodlustEvent { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); Label continueLabel = newInstructions[newInstructions.FindIndex(i => i.opcode == OpCodes.Leave_S) + 1].labels[0]; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs index 3afb14f354..4f251f68ef 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingCamera.cs @@ -11,14 +11,17 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; using HarmonyLib; + using LabApi.Events.Arguments.Scp079Events; + using Mirror; + using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.PlayableScps.Scp079.Cameras; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs index 2cd42b575f..8be79fbfb3 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ChangingSpeakerStatus.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; @@ -100,4 +100,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs index 2173ed5f07..b161d569b2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ElevatorTeleporting.cs @@ -10,12 +10,15 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; + using HarmonyLib; + using Mirror; + using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.PlayableScps.Scp079.Cameras; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs index 057c8ee31e..b1d9888006 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingExperience.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs index d82b1d0ff6..30c0c5b58c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/GainingLevel.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs index bde75b05d9..97a7e4e3c4 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/InteractingTesla.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs index 1688c3d9bf..fa4c2930c0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/LockingDown.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; @@ -57,7 +57,7 @@ private static IEnumerable Transpiler(IEnumerable), nameof(StandardSubroutine.Owner))), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs index 4583f447f2..d5de957dc5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/Lost.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs index d2677745de..37c9e52b1f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/Pinging.cs @@ -8,18 +8,20 @@ namespace Exiled.Events.Patches.Events.Scp079 { using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; + using HarmonyLib; - using Mirror; + using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.PlayableScps.Scp079.Pinging; using PlayerRoles.Subroutines; + using RelativePositioning; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -71,7 +73,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs index 680bbbf0dd..c6dd1b844d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs @@ -65,4 +65,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs index 0ede86b0d9..3490cbf591 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/RoomBlackout.cs @@ -10,10 +10,12 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.Subroutines; @@ -161,4 +163,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs index fa6ecb2bc2..a0aa8b4f99 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/TriggeringDoor.cs @@ -10,14 +10,16 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; using Exiled.API.Features.Doors; - + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; using Exiled.Events.Handlers; + using HarmonyLib; + using Interactables.Interobjects.DoorUtils; + using PlayerRoles.PlayableScps.Scp079; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs b/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs index 12e0dc375f..dde75796bf 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp079/ZoneBlackout.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp079 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; using Exiled.API.Extensions; - using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp079; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs index 3a17a255e4..9d44ac1a21 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/AddingTarget.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs index cb6cf1fa7e..9c742f56f7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/CalmingDown.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs index a4763fed00..26ab618bed 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/Charging.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs index 85c02bab9c..5fba31a01f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/Enraging.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs index 869988bda6..47ed33bac0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/RemovingTarget.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,16 +7,16 @@ namespace Exiled.Events.Patches.Events.Scp096 { - using System; using System.Collections.Generic; - using System.Diagnostics; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp096; using PlayerRoles.Subroutines; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs index e1d8b5b690..e39c1ca18a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/StartPryingGate.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs b/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs index 247934beb7..22822c1226 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp096/TryingNotToCry.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp096 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp096; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs index 92c28c0548..901c5a0a2b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/Attacking.cs @@ -8,14 +8,15 @@ namespace Exiled.Events.Patches.Events.Scp106 { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp106; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs index 4265abef8b..1580c1b345 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/ExitStalking.cs @@ -10,10 +10,11 @@ namespace Exiled.Events.Patches.Events.Scp106 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; + using HarmonyLib; using PlayerRoles.PlayableScps.Scp106; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs index 2ffad3da94..ab823ced8e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/Stalking.cs @@ -8,13 +8,13 @@ namespace Exiled.Events.Patches.Events.Scp106 { using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; + using HarmonyLib; using PlayerRoles.PlayableScps.Scp106; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs b/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs index fd1f8ba42e..0078cf8876 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp106/Teleporting.cs @@ -10,12 +10,15 @@ namespace Exiled.Events.Patches.Events.Scp106 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp106; using Exiled.Events.Handlers; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp106; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -88,4 +91,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs b/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs index ca0bbe8e35..6d30ba8dc0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1344/Deactivating.cs @@ -4,7 +4,6 @@ // Licensed under the CC BY-SA 3.0 license. // // ----------------------------------------------------------------------- - #pragma warning disable SA1313 // Parameter names should begin with lower-case letter namespace Exiled.Events.Patches.Events.Scp1344 @@ -16,12 +15,9 @@ namespace Exiled.Events.Patches.Events.Scp1344 using HarmonyLib; using InventorySystem.Items.Usables.Scp1344; - using InventorySystem.Items.Usables.Scp244; using UnityEngine; - using static PlayerList; - /// /// Patches . /// Adds the event, @@ -84,4 +80,4 @@ private static bool StopDeactivation(Scp1344Item instance, Scp1344Status newStat return false; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs b/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs index b4db23211a..588d770620 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1344/Status.cs @@ -7,7 +7,6 @@ namespace Exiled.Events.Patches.Events.Scp1344 { - using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; @@ -15,6 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp1344 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1344; + using HarmonyLib; using InventorySystem.Items.Usables.Scp1344; @@ -108,4 +108,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs index 76e5dcb1ef..49ddc17a0b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs @@ -15,7 +15,9 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs index cb9a6d3cb6..23329274ff 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs @@ -15,7 +15,9 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs index 0fbaa80f10..6b5c747348 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/SpawningFlamingos.cs @@ -16,7 +16,9 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs index 34118b901e..4a90822497 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs @@ -15,7 +15,9 @@ namespace Exiled.Events.Patches.Events.Scp1507 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1507; + using HarmonyLib; + using InventorySystem.Items.FlamingoTapePlayer; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs b/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs index 214aa79aec..df8c952455 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1509/InspectingAndTriggeringAttack.cs @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Scp1509 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Item; using Exiled.Events.EventArgs.Scp1509; + using HarmonyLib; + using InventorySystem.Items.Scp1509; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs b/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs index cf9c490079..2556926d52 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1509/Resurrecting.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Scp1509 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp1509; + using HarmonyLib; + using InventorySystem.Items.Scp1509; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs index a2c276d9d8..1c94b9f300 100755 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs @@ -7,17 +7,13 @@ namespace Exiled.Events.Patches.Events.Scp173 { - using System; using System.Collections.Generic; - using System.Linq; - using System.Reflection; using System.Reflection.Emit; - using API.Features; - using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; + using HarmonyLib; using PlayerRoles.PlayableScps; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs index c828cd8b70..a59d229a39 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/Blinking.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Linq; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs index 0972c96386..abddf10ae9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/BlinkingRequest.cs @@ -8,12 +8,10 @@ namespace Exiled.Events.Patches.Events.Scp173 { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs index 4f3cee3a94..fe1eee3e3b 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/Observers.cs @@ -10,11 +10,14 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; using Attributes; + + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Scp173; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp173; using PlayerRoles.Subroutines; @@ -64,8 +67,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable), nameof(StandardSubroutine.Owner))), + new(OpCodes.Callvirt, PropertyGetter(typeof(StandardSubroutine), nameof(StandardSubroutine.Owner))), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), // Player.Get(ply); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs index 9da814466b..62359a7c27 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/PlacingTantrum.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs index 8e3c718ce4..f3ee4d7005 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/UsingBreakneckSpeeds.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp173 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; @@ -85,4 +85,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs b/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs index fe511401fe..060fea6351 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp244/DamagingScp244.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp244 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.DamageHandlers; - using API.Features.Pools; + using Exiled.API.Features.DamageHandlers; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp244; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs b/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs index ce12d65377..bd389e767a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp244/UpdateScp244.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Events.Scp244 using System.Diagnostics; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp244; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs b/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs index 8b03fa883f..bb7e8d1ba8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp244/UsingScp244.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp244 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp244; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs index 8fbaa35ed1..387831a899 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs @@ -11,13 +11,13 @@ namespace Exiled.Events.Patches.Events.Scp2536 using System.Reflection.Emit; using Christmas.Scp2536; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; - using Exiled.Events.EventArgs.Scp244; using Exiled.Events.EventArgs.Scp2536; + using HarmonyLib; - using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs index dd942042fb..257c1cb863 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/FoundPosition.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,10 +11,12 @@ namespace Exiled.Events.Patches.Events.Scp2536 using System.Reflection.Emit; using Christmas.Scp2536; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp2536; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs index 855523f1e3..0e6a00de6e 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/GrantingGift.cs @@ -12,10 +12,12 @@ namespace Exiled.Events.Patches.Events.Scp2536 using Christmas.Scp2536; using Christmas.Scp2536.Gifts; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp2536; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs b/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs index 60c8fe059b..b10785d328 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp2536/OpeningGift.cs @@ -11,10 +11,12 @@ namespace Exiled.Events.Patches.Events.Scp2536 using System.Reflection.Emit; using Christmas.Scp2536; + using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp2536; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs index 53798e1a31..197a852ab8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Dancing.cs @@ -8,16 +8,14 @@ namespace Exiled.Events.Patches.Events.Scp3114 { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; - using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Pools; - using Exiled.API.Features.Roles; using Exiled.Events.EventArgs.Scp3114; + using HarmonyLib; - using Mirror; + using PlayerRoles.PlayableScps.Scp3114; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs index 515b59a856..f6a8244858 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Disguising.cs @@ -98,4 +98,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs index b49b32622b..82b403bcba 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Slapped.cs @@ -8,7 +8,6 @@ namespace Exiled.Events.Patches.Events.Scp3114 { using System.Collections.Generic; - using System.Linq; using System.Reflection.Emit; using Exiled.API.Features.Pools; @@ -17,6 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp3114 using Exiled.Events.Handlers; using HarmonyLib; + using PlayerRoles.PlayableScps.Scp3114; using PlayerRoles.PlayableScps.Subroutines; @@ -69,4 +69,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs index c0dbbe2ef8..d1926cbfcd 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/Strangling.cs @@ -14,13 +14,13 @@ namespace Exiled.Events.Patches.Events.Scp3114 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp3114; using Exiled.Events.Handlers; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp3114; using static HarmonyLib.AccessTools; - using Player = API.Features.Player; - /// /// Patches to add the event. /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs b/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs index 5ff62d8112..ff45998d30 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp3114/TryUseBody.cs @@ -78,4 +78,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs index 6004294efa..2fcb30d653 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/DroppingCandy.cs @@ -10,23 +10,19 @@ namespace Exiled.Events.Patches.Events.Scp330 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp330; using Handlers; using HarmonyLib; + using InventorySystem.Items; - using InventorySystem.Items.Pickups; using InventorySystem.Items.Usables.Scp330; - using Mirror; - using static HarmonyLib.AccessTools; - using Player = API.Features.Player; - /// /// Patches the method to add the /// event. diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs index 5ac86c50fe..2cb52ad65c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/EatingScp330.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Events.Scp330 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp330; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs index b7e714470a..dc92656f2f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs @@ -7,26 +7,21 @@ namespace Exiled.Events.Patches.Events.Scp330 { - using InventorySystem.Items; - -#pragma warning disable SA1402 -#pragma warning disable SA1313 - using System.Collections.Generic; using System.Reflection.Emit; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp330; + using HarmonyLib; + using Interactables.Interobjects; - using InventorySystem; + using InventorySystem.Items.Usables.Scp330; using static HarmonyLib.AccessTools; - using Player = API.Features.Player; - /// /// Patches the method to add the /// event. diff --git a/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs b/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs index dcf788f079..23ad872908 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs @@ -15,6 +15,7 @@ namespace Exiled.Events.Patches.Events.Scp559 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp559; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs b/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs index cd52be3cc0..57fe71a059 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs @@ -15,6 +15,7 @@ namespace Exiled.Events.Patches.Events.Scp559 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp559; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs index defc59b9b6..9685166453 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs @@ -10,11 +10,14 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; + using global::Scp914; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs index 64842911da..0f63715269 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPickup.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; @@ -30,7 +31,7 @@ namespace Exiled.Events.Patches.Events.Scp914 [HarmonyPatch(typeof(Scp914Upgrader), nameof(Scp914Upgrader.ProcessPickup))] internal static class UpgradedPickup { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs index d1441c3e22..7fd1cf35c9 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradedPlayer.cs @@ -7,24 +7,21 @@ namespace Exiled.Events.Patches.Events.Scp914 { - using System.CodeDom; using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; + using global::Scp914; + using HarmonyLib; - using Mono.Cecil.Cil; - using PlayerRoles.FirstPersonControl; - using UnityEngine; using static HarmonyLib.AccessTools; - using OpCode = System.Reflection.Emit.OpCode; using Scp914 = Handlers.Scp914; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs index 9562decaed..ccd8056d61 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPickup.cs @@ -10,7 +10,8 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs index 3927ed9a55..ea14b30804 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs @@ -11,19 +11,18 @@ namespace Exiled.Events.Patches.Events.Scp914 using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; + using global::Scp914; + using HarmonyLib; - using Mono.Cecil.Cil; - using PlayerRoles.FirstPersonControl; - using UnityEngine; using static HarmonyLib.AccessTools; - using OpCode = System.Reflection.Emit.OpCode; using Scp914 = Handlers.Scp914; /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs index c1cf9dd589..5eca08deec 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/Clawed.cs @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp939; using static HarmonyLib.AccessTools; @@ -27,7 +29,7 @@ namespace Exiled.Events.Patches.Events.Scp939 [HarmonyPatch(typeof(Scp939ClawAbility), nameof(Scp939ClawAbility.ServerProcessCmd))] internal class Clawed { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs index ced8ee89ae..cbc7d3e8a0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/Focus.cs @@ -16,6 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; + using Mirror; using PlayerRoles.PlayableScps.Scp939; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs index 1b6bc31f5f..e0cd5a26eb 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/Lunge.cs @@ -14,8 +14,11 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; using Exiled.Events.Handlers; + using HarmonyLib; + using Mirror; + using PlayerRoles.PlayableScps.Scp939; using static HarmonyLib.AccessTools; @@ -28,7 +31,7 @@ namespace Exiled.Events.Patches.Events.Scp939 [HarmonyPatch(typeof(Scp939LungeAbility), nameof(Scp939LungeAbility.TriggerLunge))] internal static class Lunge { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs index 61583050bf..52edc3fbb8 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacedAmnesticCloud.cs @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; using Exiled.Events.Handlers; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp939; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs index 7a803e9805..20c2aefca3 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingAmnesticCloud.cs @@ -16,7 +16,9 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; + using Mirror; + using PlayerRoles.PlayableScps.Scp939; using PlayerRoles.Subroutines; @@ -117,4 +119,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs index 753291df01..6b4685ec12 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlacingMimicPoint.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp939.Mimicry; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs index e0d0485430..a1139a7124 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingFootstep.cs @@ -16,6 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; + using PlayerRoles.FirstPersonControl.Thirdperson; using PlayerRoles.PlayableScps.Scp939; using PlayerRoles.PlayableScps.Scp939.Ripples; @@ -76,4 +77,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs index cfd4da4ec8..9c7f67b00a 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingSound.cs @@ -15,6 +15,7 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; + using Mirror; using PlayerRoles.PlayableScps.Scp939; @@ -33,6 +34,9 @@ internal static class PlayingSound { private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) { + // TODO: This is bad practice should be reworked. + _ = instructions; + List newInstructions = new(); LocalBuilder option = generator.DeclareLocal(typeof(byte)); @@ -117,4 +121,4 @@ private static IEnumerable Transpiler(IEnumerable instance.ServerSendRpc(true); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs index b74e6c49e5..2d3cd49cfe 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/PlayingVoice.cs @@ -79,4 +79,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs index 9b8c3707b5..2c15e4543f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/SavingVoice.cs @@ -16,7 +16,9 @@ namespace Exiled.Events.Patches.Events.Scp939 using Exiled.Events.Handlers; using HarmonyLib; + using PlayerRoles.PlayableScps.Scp939.Mimicry; + using PlayerStatsSystem; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs b/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs index d12e690c62..92a5aaef65 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp939/ValidatingVisibility.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -7,20 +7,18 @@ namespace Exiled.Events.Patches.Events.Scp939 { - using System; using System.Collections.Generic; using System.Linq; using System.Reflection.Emit; using Exiled.API.Enums; - using Exiled.API.Extensions; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp939; + using HarmonyLib; - using InventorySystem.Items; + using Mirror; using PlayerRoles.PlayableScps.Scp939; @@ -91,7 +89,7 @@ private static IEnumerable Transpiler(IEnumerable StaticCallEvent(ILGenerator generator, LocalBuilder ev, Label ret, CodeInstruction insertInstuction, Scp939VisibilityState state, bool setLabel = true) { - CodeInstruction first = new CodeInstruction(OpCodes.Ldc_I4, (int)state); + CodeInstruction first = new(OpCodes.Ldc_I4, (int)state); if (setLabel) { @@ -150,4 +148,4 @@ private static void SetToLastSeen(ReferenceHub target) }; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs b/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs index 758ffea323..d9779f1817 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/AddingUnitName.cs @@ -10,12 +10,15 @@ namespace Exiled.Events.Patches.Events.Server using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; + using HarmonyLib; + using PlayerRoles; - using Respawning; + using Respawning.NamingRules; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs b/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs index d5d80d9250..81cae085e5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/ChoosingStartTeamQueue.cs @@ -10,10 +10,13 @@ namespace Exiled.Events.Patches.Events.Server using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; + using HarmonyLib; + using PlayerRoles.RoleAssign; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs b/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs index cf9f9aacbe..17d4885887 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/CompletingObjective.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; + using HarmonyLib; + using Respawning.Objectives; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs b/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs index d5150c2c81..921839a189 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/Reporting.cs @@ -10,15 +10,14 @@ namespace Exiled.Events.Patches.Events.Server using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; using Exiled.Events.Handlers; using HarmonyLib; - using UnityEngine; - using static HarmonyLib.AccessTools; using Player = API.Features.Player; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs b/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs index 501f6d90e6..e9bca60dd0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs @@ -12,13 +12,17 @@ namespace Exiled.Events.Patches.Events.Server using System.Linq; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.API.Features.Waves; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; using Exiled.Events.Handlers; + using HarmonyLib; + using PlayerRoles; + using Respawning.NamingRules; using Respawning.Waves; @@ -122,4 +126,4 @@ private static IEnumerable Transpiler(IEnumerable players) => players.Select(player => player.ReferenceHub).ToArray(); } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs b/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs index ab4ef8b267..9f3cfa9c53 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RestartingRound.cs @@ -7,24 +7,12 @@ namespace Exiled.Events.Patches.Events.Server { - using System; - using System.Collections.Generic; - using System.Reflection.Emit; - - using API.Features.Pools; - using CustomPlayerEffects.Danger; - using Exiled.API.Enums; using Exiled.Events.Attributes; - using Exiled.Events.EventArgs.Player; - using GameCore; using HarmonyLib; using RoundRestarting; - using static HarmonyLib.AccessTools; - using static PlayerList; - /// /// Patches . /// Adds the event. @@ -42,4 +30,4 @@ private static void Prefix(bool value) Handlers.Server.OnRestartingRound(); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs b/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs index e701deccb1..343c96ba2c 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RoundEnd.cs @@ -18,6 +18,7 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.Events.EventArgs.Server; using HarmonyLib; + using PlayerRoles; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs b/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs index ec5e68b953..73eefaf610 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RoundStarting.cs @@ -13,9 +13,9 @@ namespace Exiled.Events.Patches.Events.Server using System.Reflection; using System.Reflection.Emit; - using Exiled.API.Features; using Exiled.API.Features.Pools; using Exiled.Events.EventArgs.Server; + using HarmonyLib; using static HarmonyLib.AccessTools; @@ -27,7 +27,7 @@ namespace Exiled.Events.Patches.Events.Server [HarmonyPatch] internal class RoundStarting { - #pragma warning disable SA1600 // Elements should be documented +#pragma warning disable SA1600 // Elements should be documented public static Type PrivateType { get; internal set; } private static MethodInfo TargetMethod() @@ -115,4 +115,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } - } +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs b/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs index 92c126e460..a565ce1afc 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/SelectingRespawnTeam.cs @@ -14,7 +14,9 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.API.Features.Waves; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; + using HarmonyLib; + using Respawning; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs b/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs index 7792e7cdd1..fb969466d2 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/Unban.cs @@ -13,6 +13,7 @@ namespace Exiled.Events.Patches.Events.Server using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Server; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs b/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs index a75bbf7eb8..17c15e3ae7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/WaitingForPlayers.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -9,7 +9,7 @@ namespace Exiled.Events.Patches.Events.Server { #pragma warning disable SA1313 // Parameter names should begin with lower-case letter - using API.Features; + using Exiled.API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs index 498c487f0c..1f61cc6107 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/ChangingLeverStatus.cs @@ -8,11 +8,11 @@ namespace Exiled.Events.Patches.Events.Warhead { using System.Collections.Generic; - using System.Reflection; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs index e5bb5e1aae..d777eb1b38 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/DeadmanSwitchStart.cs @@ -10,10 +10,13 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; + using Handlers; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs index 58c13e5332..057c4fdfb5 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/Detonation.cs @@ -10,10 +10,13 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; + using Handlers; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs index 13d1c10933..c3360fa5ac 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/Starting.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; diff --git a/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs b/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs index cd35ac8627..9e5e8512ac 100644 --- a/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs +++ b/EXILED/Exiled.Events/Patches/Events/Warhead/Stopping.cs @@ -10,8 +10,9 @@ namespace Exiled.Events.Patches.Events.Warhead using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Warhead; diff --git a/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs b/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs index 15da68148a..070fb9426a 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Fix106RegenerationWithScp244.cs @@ -10,10 +10,14 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; using CustomPlayerEffects; + + using Exiled.API.Features.Pools; + using HarmonyLib; + using InventorySystem.Items.Usables.Scp244.Hypothermia; + using PlayerRoles; using PlayerRoles.PlayableScps.Scp106; diff --git a/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs b/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs index 1bd3f62bfb..8df7864ac0 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Fix1344Dupe.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -11,7 +11,9 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using Exiled.API.Features.Pools; + using HarmonyLib; + using InventorySystem; using InventorySystem.Items; using InventorySystem.Items.Usables.Scp1344; diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs b/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs index cadbc403f0..54c38a861f 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixCapturePosition.cs @@ -8,11 +8,13 @@ namespace Exiled.Events.Patches.Fixes { using CustomPlayerEffects; + using Exiled.API.Enums; using Exiled.API.Features; + using HarmonyLib; + using RelativePositioning; - using UnityEngine; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter /// /// Patches 's setter. @@ -32,4 +34,4 @@ private static void Postfix(ref RelativePosition __result) __result = new RelativePosition(room.Position); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs b/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs index 6ea4a5ac08..d1f72ba2fb 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixEffectOrder.cs @@ -11,11 +11,14 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection; using System.Reflection.Emit; - using API.Features.Pools; using CustomPlayerEffects; - using Exiled.API.Features; + + using Exiled.API.Features.Pools; + using HarmonyLib; + using InventorySystem.Items.Usables.Scp330; + using PlayerRoles.PlayableScps.Scp049; using static HarmonyLib.AccessTools; @@ -29,7 +32,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(StatusEffectBase), nameof(StatusEffectBase.ServerSetState))] internal class FixEffectOrder { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -71,7 +74,7 @@ private static IEnumerable TargetMethods() yield return Method(typeof(SugarCrave), nameof(SugarCrave.Disabled)); } - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs b/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs index 073931c8f6..6b82ee20f8 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixElevatorChamberAwake.cs @@ -7,8 +7,8 @@ namespace Exiled.Events.Patches.Fixes { - using Exiled.Events.Attributes; using HarmonyLib; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs b/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs index fde6bfd51a..cb8f01a998 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixNWFlashbangDuration.cs @@ -11,10 +11,8 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using CustomPlayerEffects; - using Exiled.API.Features.Items; - using Exiled.Events.EventArgs.Player; + using HarmonyLib; - using InventorySystem; /// /// Patches to fix NW overwritting value multiple time. @@ -24,7 +22,8 @@ internal class FixNWFlashbangDuration { private static IEnumerable Transpiler(IEnumerable instructions) { + _ = instructions; yield return new CodeInstruction(OpCodes.Ret); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs b/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs index 95ec63e4cc..005fae0a82 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixOnAddedBeingCallAfterOnRemoved.cs @@ -11,19 +11,16 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; + using Exiled.API.Features.Pools; using HarmonyLib; + using InventorySystem; using InventorySystem.Items; - using InventorySystem.Items.Firearms.Ammo; using InventorySystem.Items.Pickups; - using Mirror; - using static HarmonyLib.AccessTools; /// @@ -33,7 +30,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerAddItem))] internal class FixOnAddedBeingCallAfterOnRemoved { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -96,4 +93,4 @@ private static void CallBefore(ItemBase itemBase, ItemPickupBase pickupBase) item.ReadPickupInfoBefore(pickup); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs b/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs index 24d743e6e0..56e85abc21 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixPickupPreviousOwner.cs @@ -10,9 +10,12 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Footprinting; + using HarmonyLib; + using InventorySystem; using InventorySystem.Items.Firearms.Ammo; using InventorySystem.Items.Pickups; @@ -26,7 +29,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerDropAmmo))] internal class FixPickupPreviousOwner { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -50,4 +53,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs b/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs index c40037f4b9..d99a25e232 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FixScp1507DestroyingDoor.cs @@ -10,10 +10,14 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Footprinting; + using HarmonyLib; + using Interactables.Interobjects.DoorUtils; + using PlayerRoles.PlayableScps.Scp1507; using static HarmonyLib.AccessTools; @@ -25,7 +29,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(Scp1507AttackAbility), nameof(Scp1507AttackAbility.TryAttackDoor))] internal class FixScp1507DestroyingDoor { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -49,4 +53,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs b/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs index a5442d1df0..61951ad21c 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/FootprintConstructorFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,9 +13,13 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using Exiled.API.Features.Pools; + using Footprinting; + using HarmonyLib; + using LiteNetLib; + using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs b/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs index c60f80e59a..fdbfdc4e8d 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/GetAmmoLimitFix.cs @@ -9,10 +9,11 @@ namespace Exiled.Events.Patches.Fixes { using System; using System.Collections.Generic; - using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using HarmonyLib; + using InventorySystem.Configs; /// @@ -22,7 +23,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(InventoryLimits), nameof(InventoryLimits.GetAmmoLimit), new Type[] { typeof(InventorySystem.Items.Armor.BodyArmor), typeof(ItemType), })] internal class GetAmmoLimitFix { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -38,4 +39,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs b/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs index d7f5f08c53..7fb0ed5474 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/GrenadePropertiesFix.cs @@ -11,9 +11,9 @@ namespace Exiled.Events.Patches.Fixes using System.Linq; using System.Reflection.Emit; - using API.Features.Items; - using API.Features.Pickups.Projectiles; - using API.Features.Pools; + using Exiled.API.Features.Items; + using Exiled.API.Features.Pickups.Projectiles; + using Exiled.API.Features.Pools; using HarmonyLib; @@ -111,4 +111,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs b/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs index 044914dca6..e18356002a 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/HurtingFix.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs b/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs index 17bdf5e142..64f6f5548a 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Jailbird914CoarseFix.cs @@ -12,12 +12,11 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features.Pools; using HarmonyLib; + using InventorySystem.Items.Jailbird; - using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs b/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs index 0f30d7d2df..34404b36fa 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/KillPlayer.cs @@ -7,9 +7,7 @@ namespace Exiled.Events.Patches.Fixes { -#pragma warning disable SA1313 // Parameter names should begin with lower-case letter - - using API.Features.DamageHandlers; + using Exiled.API.Features.DamageHandlers; using HarmonyLib; @@ -25,7 +23,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(PlayerStats), nameof(PlayerStats.KillPlayer))] internal class KillPlayer { - private static void Prefix(PlayerStats __instance, ref DamageHandlerBase handler) + private static void Prefix(ref DamageHandlerBase handler) { if (!DamageHandlers.IdsByTypeHash.ContainsKey(handler.GetType().FullName.GetStableHashCode()) && handler is GenericDamageHandler exiledHandler) handler = exiledHandler.Base; diff --git a/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs b/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs index 2538e90ca2..84c0a2e0bc 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs @@ -26,7 +26,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(LockerChamber), nameof(LockerChamber.OnFirstTimeOpen))] internal class LockerFixes { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs b/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs index 4d19d4954d..de32425ab9 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/NWFixDetonationTimer.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Patches.Fixes using System.Linq; using GameCore; + using HarmonyLib; /// @@ -29,4 +30,4 @@ private static void Postfix() return; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs b/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs index 5a9f29b9a1..fd72503a17 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/NWFixScp096BreakingDoor.cs @@ -10,12 +10,17 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using Footprinting; + using HarmonyLib; + using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; + using PlayerRoles.PlayableScps.Scp096; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -53,4 +58,4 @@ private static IEnumerable Transpiler(IEnumerable damageableDoor is BreakableDoor breakableDoor && breakableDoor.GetExactState() is 1; } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs b/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs index 4f766c9b4f..bf16e05902 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/NameTagDetailFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -12,9 +12,12 @@ namespace Exiled.Events.Patches.Fixes using Exiled.API.Extensions; using Exiled.API.Features.Pools; + using HarmonyLib; + using InventorySystem.Items; using InventorySystem.Items.Keycards; + using Mirror; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs b/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs index ec70f756bc..183c9ebbb3 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/RemoteAdminNpcCommandAddToDictionaryFix.cs @@ -12,11 +12,14 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using CommandSystem.Commands.RemoteAdmin.Dummies; + using Exiled.API.Features; using Exiled.API.Features.Pools; - using GameCore; + using HarmonyLib; + using NetworkManagerUtils.Dummies; + using UnityEngine; using static HarmonyLib.AccessTools; @@ -68,4 +71,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs b/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs index 231395869c..ddaa0f254d 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/RoleChangedPatch.cs @@ -10,10 +10,10 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Items; - using EventArgs.Player; + using Exiled.API.Features.Items; + using HarmonyLib; using InventorySystem; @@ -26,6 +26,7 @@ internal static class RoleChangedPatch { private static IEnumerable Transpiler(IEnumerable instructions) { + _ = instructions; yield return new CodeInstruction(OpCodes.Ret); } } diff --git a/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs b/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs index a7ea375c20..a1f528cb70 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Scp3114AttackAhpFix.cs @@ -10,8 +10,10 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; + using HarmonyLib; + using PlayerRoles.PlayableScps.Scp3114; using PlayerRoles.PlayableScps.Subroutines; @@ -41,4 +43,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs b/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs index 59767063fe..1d8e22a5db 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Scp3114FriendlyFireFix.cs @@ -11,15 +11,17 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; - - using Exiled.API.Features; + using Exiled.API.Features.Pools; using Footprinting; + using HarmonyLib; + using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; + using PlayerRoles; + using PlayerStatsSystem; using static HarmonyLib.AccessTools; @@ -99,7 +101,7 @@ public Scp3114FriendlyFireFix2(Footprint attacker, float damage) public override string ServerLogsText { get; } #pragma warning restore SA1600 // Elements should be documented - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs b/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs index 8bd604cb53..97c46af95d 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/ServerHubMicroHidFix.cs @@ -8,15 +8,12 @@ namespace Exiled.Events.Patches.Fixes { #pragma warning disable SA1313 - using API.Features.Items; - using Exiled.API.Features; + using Exiled.API.Features.Items; using HarmonyLib; using InventorySystem.Items.Autosync; using InventorySystem.Items.MicroHID.Modules; - using InventorySystem.Items.Pickups; - using InventorySystem.Items.Usables.Scp330; /// /// Patches to fix phantom for . @@ -29,4 +26,4 @@ private static bool Prefix(CycleSyncModule __instance) return __instance.MicroHid.InstantiationStatus == AutosyncInstantiationStatus.InventoryInstance; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs b/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs index 24feae442f..59449ee3eb 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/ThrownCustomKeycardFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,8 +13,11 @@ namespace Exiled.Events.Patches.Fixes using Exiled.API.Extensions; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pools; + using HarmonyLib; + using Interactables.Interobjects.DoorUtils; + using InventorySystem.Items.Keycards; using InventorySystem.Items.Pickups; diff --git a/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs b/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs index 57fda78d7b..27d6df23c7 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/TryRaycastRoomFix.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -12,8 +12,11 @@ namespace Exiled.Events.Patches.Fixes using System.Reflection.Emit; using Exiled.API.Features.Pools; + using HarmonyLib; + using MapGeneration; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs b/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs index 53450c07d6..1d942f155d 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/VoiceChatMutesClear.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Fixes using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using HarmonyLib; @@ -24,7 +24,7 @@ namespace Exiled.Events.Patches.Fixes [HarmonyPatch(typeof(VoiceChatMutes), nameof(VoiceChatMutes.LoadMutes))] internal static class VoiceChatMutesClear { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); diff --git a/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs b/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs index 6da34a65eb..03ce70de3e 100644 --- a/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs +++ b/EXILED/Exiled.Events/Patches/Generic/AirlockListAdd.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1402 using HarmonyLib; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs b/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs index 0fb3c4669c..305198dfb0 100644 --- a/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs +++ b/EXILED/Exiled.Events/Patches/Generic/AmmoDrain.cs @@ -13,8 +13,6 @@ namespace Exiled.Events.Patches.Generic using System.Linq; using System.Reflection.Emit; - using Exiled.API.Extensions; - using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.API.Features.Pools; @@ -25,8 +23,6 @@ namespace Exiled.Events.Patches.Generic using InventorySystem.Items.Firearms; using InventorySystem.Items.Firearms.Modules; - using MapGeneration; - using static HarmonyLib.AccessTools; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/CameraList.cs b/EXILED/Exiled.Events/Patches/Generic/CameraList.cs index db02509a4f..0f6c5e1f48 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CameraList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CameraList.cs @@ -11,7 +11,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pools; diff --git a/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs b/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs index 01d7daaee5..21715c71d3 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CanScp049SenseTutorial.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs b/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs index d7eb560618..63c5882b76 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CoffeeListAdd.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.Patches.Generic { using Exiled.API.Features; + using HarmonyLib; #pragma warning disable SA1313 #pragma warning disable CS0618 diff --git a/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs b/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs index 276538c918..2fbb448f54 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CommandLogging.cs @@ -12,8 +12,8 @@ namespace Exiled.Events.Patches.Generic using System.IO; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs b/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs index 477893377d..ce06d4deae 100644 --- a/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs +++ b/EXILED/Exiled.Events/Patches/Generic/CurrentHint.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1313 using System.Collections.Generic; - using API.Features; + using Exiled.API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs b/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs index 89471278db..19be07dda2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs +++ b/EXILED/Exiled.Events/Patches/Generic/DestroyRecontainerInstance.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/DoorList.cs b/EXILED/Exiled.Events/Patches/Generic/DoorList.cs index 2057bbd0f5..ff9b42ef98 100644 --- a/EXILED/Exiled.Events/Patches/Generic/DoorList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/DoorList.cs @@ -13,7 +13,7 @@ namespace Exiled.Events.Patches.Generic using System.Linq; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Doors; using Exiled.API.Features.Pools; diff --git a/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs b/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs index de2f025b42..b685d3954b 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GeneratorList.cs @@ -11,8 +11,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs b/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs index 0a0117e3f2..0de5084385 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GetCustomAmmoLimit.cs @@ -11,8 +11,11 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Extensions; using Exiled.API.Features; + using HarmonyLib; + using InventorySystem.Configs; + using UnityEngine; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs b/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs index 9f33e5481f..a7ee90b90e 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GetCustomCategoryLimit.cs @@ -10,8 +10,11 @@ namespace Exiled.Events.Patches.Generic using System; using Exiled.API.Features; + using HarmonyLib; + using InventorySystem.Configs; + using UnityEngine; /// @@ -31,4 +34,4 @@ private static void Postfix(ItemCategory category, ReferenceHub player, ref sbyt __result = (sbyte)Mathf.Clamp(limit + __result - InventoryLimits.GetCategoryLimit(null, category), sbyte.MinValue, sbyte.MaxValue); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs b/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs index a01849dcd0..5548f631b9 100644 --- a/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs +++ b/EXILED/Exiled.Events/Patches/Generic/GhostModePatch.cs @@ -10,9 +10,9 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - using API.Features.Roles; + using Exiled.API.Features; + using Exiled.API.Features.Pools; + using Exiled.API.Features.Roles; using HarmonyLib; @@ -27,7 +27,7 @@ namespace Exiled.Events.Patches.Generic [HarmonyPatch(typeof(FpcServerPositionDistributor), nameof(FpcServerPositionDistributor.WriteAll))] internal class GhostModePatch { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -70,4 +70,4 @@ private static void HandleGhostMode(ReferenceHub hubReceiver, ReferenceHub hubTa isInvisible = target.Role.Is(out FpcRole role) && (role.IsInvisible || role.IsInvisibleFor.Contains(receiver)); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Generic/HazardList.cs b/EXILED/Exiled.Events/Patches/Generic/HazardList.cs index db16697730..85cf0006d2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/HazardList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/HazardList.cs @@ -10,7 +10,9 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1313 using Exiled.API.Features.Hazards; + using HarmonyLib; + using Hazards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs b/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs index 574c0d856a..ee2b734743 100644 --- a/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs +++ b/EXILED/Exiled.Events/Patches/Generic/IndividualFriendlyFire.cs @@ -7,16 +7,15 @@ namespace Exiled.Events.Patches.Generic { - using Exiled.API.Extensions; - #pragma warning disable SA1402 using System; using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Extensions; + using Exiled.API.Features; using Exiled.API.Features.Items; + using Exiled.API.Features.Pools; using Footprinting; diff --git a/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs b/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs index a64584b8dc..9614ebf0d2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs +++ b/EXILED/Exiled.Events/Patches/Generic/InitRecontainerInstance.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs index 896084a08a..a74614e4b5 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomItemNameDetailData.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs index 574ce2b78d..a1a1f4ac45 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomLabelDetailData.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs index d3a1c7cc84..899af9099a 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomPermsDetailData.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items; using InventorySystem.Items.Keycards; diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs index 6b5889f193..c7d4b7d8ec 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomRankDetailData.cs @@ -8,8 +8,11 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; + using UnityEngine; #pragma warning disable SA1313 // Parameter names should begin with lower-case letter diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs index b846455d9c..86311e4893 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomSerialNumberDetailData.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs index fb2bf92181..23eaab28c0 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomTintDetailData.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs index af25a81e9e..765ff69895 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/CustomWearDetailData.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs index 482c996c3c..090fc1c17b 100644 --- a/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs +++ b/EXILED/Exiled.Events/Patches/Generic/KeycardDetails/NameTagDetailData.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic.KeycardDetails { using Exiled.API.Features.Items.Keycards; + using HarmonyLib; + using InventorySystem.Items.Keycards; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs b/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs index c451459445..e33ecf2bb6 100644 --- a/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs +++ b/EXILED/Exiled.Events/Patches/Generic/LastTarget.cs @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Pools; + using HarmonyLib; + using PlayerRoles.PlayableScps.HumanTracker; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/LiftList.cs b/EXILED/Exiled.Events/Patches/Generic/LiftList.cs index d088dbe3ab..4979e86a83 100644 --- a/EXILED/Exiled.Events/Patches/Generic/LiftList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/LiftList.cs @@ -8,9 +8,10 @@ namespace Exiled.Events.Patches.Generic { #pragma warning disable SA1313 // Parameter names should begin with lower-case letter - using API.Features; + using Exiled.API.Features; using HarmonyLib; + using Interactables.Interobjects; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/LockerList.cs b/EXILED/Exiled.Events/Patches/Generic/LockerList.cs index b0bd8af1de..4e351f8f01 100644 --- a/EXILED/Exiled.Events/Patches/Generic/LockerList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/LockerList.cs @@ -10,9 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; - using Exiled.API.Features.Lockers; + using Exiled.API.Features.Pools; + using HarmonyLib; using MapGeneration.Distributors; @@ -50,4 +49,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs b/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs index 39d15716df..dae5033e4d 100644 --- a/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs +++ b/EXILED/Exiled.Events/Patches/Generic/MapLayoutGetter.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -13,7 +13,9 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Pools; + using HarmonyLib; + using UnityEngine; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs b/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs index 9649cf2740..4b749b0182 100644 --- a/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs +++ b/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs @@ -11,8 +11,10 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; using CentralAuth; + + using Exiled.API.Features.Pools; + using HarmonyLib; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs b/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs index 42e6c1013d..4cd3a5a2b6 100644 --- a/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs +++ b/EXILED/Exiled.Events/Patches/Generic/ParseVisionInformation.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs b/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs index a1c98e0a72..629deef198 100644 --- a/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs +++ b/EXILED/Exiled.Events/Patches/Generic/PickupControlPatch.cs @@ -12,10 +12,9 @@ namespace Exiled.Events.Patches.Generic using System.Linq; using System.Reflection.Emit; - using API.Features.Pickups; - using API.Features.Pools; - using Exiled.API.Features.Items; + using Exiled.API.Features.Pickups; + using Exiled.API.Features.Pools; using HarmonyLib; @@ -36,9 +35,7 @@ namespace Exiled.Events.Patches.Generic [HarmonyPatch(typeof(InventoryExtensions), nameof(InventoryExtensions.ServerCreatePickup), typeof(ItemBase), typeof(PickupSyncInfo), typeof(Vector3), typeof(Quaternion), typeof(bool), typeof(Action))] internal static class PickupControlPatch { - private static IEnumerable Transpiler( - IEnumerable instructions, - ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -72,7 +69,7 @@ private static IEnumerable Transpiler( [HarmonyPatch(typeof(ItemDistributor), nameof(ItemDistributor.SpawnPickup))] internal static class TriggerPickupControlPatch { - private static IEnumerable Transpiler(IEnumerable instructions, ILGenerator generator) + private static IEnumerable Transpiler(IEnumerable instructions) { List newInstructions = ListPool.Pool.Get(instructions); @@ -90,4 +87,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs b/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs index 91a54a9c4f..21df520940 100644 --- a/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/PocketDimensionTeleportList.cs @@ -8,7 +8,7 @@ namespace Exiled.Events.Patches.Generic { #pragma warning disable SA1313 - using API.Features; + using Exiled.API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/RoomList.cs b/EXILED/Exiled.Events/Patches/Generic/RoomList.cs index 88c24aa6c7..58e8656c57 100644 --- a/EXILED/Exiled.Events/Patches/Generic/RoomList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/RoomList.cs @@ -12,7 +12,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pools; diff --git a/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs b/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs index 983cb201af..503ad64709 100644 --- a/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs +++ b/EXILED/Exiled.Events/Patches/Generic/RoundTargetCount.cs @@ -15,6 +15,7 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Pools; + using HarmonyLib; using static HarmonyLib.AccessTools; @@ -70,4 +71,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs b/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs index f92a59482f..f58930fa33 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp079Recontain.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features.Pools; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs b/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs index 6b4b93e406..0ff58650e2 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp079Scan.cs @@ -10,8 +10,8 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; - using API.Features.Pools; + using Exiled.API.Features; + using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs b/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs index c98d2d57c2..b747de0d19 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp127MaxHs.cs @@ -8,7 +8,9 @@ namespace Exiled.Events.Patches.Generic { using Exiled.API.Features.Items; + using HarmonyLib; + using InventorySystem.Items.Firearms.Modules.Scp127; #pragma warning disable SA1313 diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs b/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs index aadad0c087..949dbc8df0 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp173BeingLooked.cs @@ -10,7 +10,7 @@ namespace Exiled.Events.Patches.Generic using System.Collections.Generic; using System.Reflection.Emit; - using API.Features; + using Exiled.API.Features; using Exiled.API.Features.Pools; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs b/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs index d708cbfcd8..84705bb13a 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp559List.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable CS0618 using Exiled.API.Features; + using HarmonyLib; /// @@ -25,4 +26,4 @@ private static void Prefix(Scp559Cake __instance) Scp559.Get(__instance); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs b/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs index 54d6380865..d614f2046e 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs +++ b/EXILED/Exiled.Events/Patches/Generic/Scp956Capybara.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.Patches.Generic { using Exiled.API.Features; + using HarmonyLib; #pragma warning disable SA1313 diff --git a/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs b/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs index c14b89b770..9078c32934 100644 --- a/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs +++ b/EXILED/Exiled.Events/Patches/Generic/SingleUseKeycardRemainingUses.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- // // Copyright (c) ExMod Team. All rights reserved. // Licensed under the CC BY-SA 3.0 license. @@ -12,7 +12,9 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pools; + using HarmonyLib; + using InventorySystem.Items.Keycards; using static HarmonyLib.AccessTools; diff --git a/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs b/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs index 42d974dfae..437e90f480 100644 --- a/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs +++ b/EXILED/Exiled.Events/Patches/Generic/SpeakerInRoom.cs @@ -8,7 +8,7 @@ namespace Exiled.Events.Patches.Generic { #pragma warning disable SA1313 - using API.Features; + using Exiled.API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs b/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs index 1e5deb9adf..61dfb8f950 100644 --- a/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs +++ b/EXILED/Exiled.Events/Patches/Generic/StaminaRegen.cs @@ -11,7 +11,9 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Roles; + using HarmonyLib; + using InventorySystem; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs b/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs index 38ad7536e2..ddfd23aca3 100644 --- a/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs +++ b/EXILED/Exiled.Events/Patches/Generic/StaminaRegenArmor.cs @@ -7,11 +7,11 @@ namespace Exiled.Events.Patches.Generic { - using Exiled.API.Features; using Exiled.API.Features.Items; #pragma warning disable SA1313 using HarmonyLib; + using InventorySystem.Items.Armor; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs b/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs index 9620eac9a4..eff63b7f2e 100644 --- a/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs +++ b/EXILED/Exiled.Events/Patches/Generic/StaminaUsage.cs @@ -11,7 +11,9 @@ namespace Exiled.Events.Patches.Generic using Exiled.API.Features; using Exiled.API.Features.Roles; + using HarmonyLib; + using InventorySystem; /// diff --git a/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs b/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs index fc2ec1cdbd..0d506137fb 100644 --- a/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs +++ b/EXILED/Exiled.Events/Patches/Generic/TeslaList.cs @@ -7,7 +7,7 @@ namespace Exiled.Events.Patches.Generic { - using API.Features; + using Exiled.API.Features; using HarmonyLib; diff --git a/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs b/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs index 544ef5086e..314e23b8ba 100644 --- a/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs +++ b/EXILED/Exiled.Events/Patches/Generic/WorkstationListAdd.cs @@ -11,6 +11,7 @@ namespace Exiled.Events.Patches.Generic #pragma warning disable SA1402 using HarmonyLib; + using InventorySystem.Items.Firearms.Attachments; /// diff --git a/EXILED/Exiled.Example/Commands/Test.cs b/EXILED/Exiled.Example/Commands/Test.cs index 6b5b4be49c..b15a3f0f74 100644 --- a/EXILED/Exiled.Example/Commands/Test.cs +++ b/EXILED/Exiled.Example/Commands/Test.cs @@ -10,6 +10,7 @@ namespace Exiled.Example.Commands using System; using CommandSystem; + using Exiled.API.Features; using Exiled.API.Features.Pickups; diff --git a/EXILED/Exiled.Example/Events/PlayerHandler.cs b/EXILED/Exiled.Example/Events/PlayerHandler.cs index 37701f6555..cc45bec0b3 100644 --- a/EXILED/Exiled.Example/Events/PlayerHandler.cs +++ b/EXILED/Exiled.Example/Events/PlayerHandler.cs @@ -7,18 +7,17 @@ namespace Exiled.Example.Events { - using System; - using System.Collections.Generic; - using CameraShaking; using CustomPlayerEffects; + using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Items; using Exiled.Events.EventArgs.Player; using Exiled.Events.EventArgs.Scp106; using Exiled.Events.EventArgs.Scp914; + using LabApi.Events.Arguments.PlayerEvents; using MEC; @@ -227,4 +226,4 @@ public void OnHurting(HurtingEventArgs ev) } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Example/Exiled.Example.csproj b/EXILED/Exiled.Example/Exiled.Example.csproj index ce8f908c20..36803e309e 100644 --- a/EXILED/Exiled.Example/Exiled.Example.csproj +++ b/EXILED/Exiled.Example/Exiled.Example.csproj @@ -17,7 +17,7 @@ - + diff --git a/EXILED/Exiled.Installer/CommandSettings.cs b/EXILED/Exiled.Installer/CommandSettings.cs index b0ee50d4e2..ecc97048cd 100644 --- a/EXILED/Exiled.Installer/CommandSettings.cs +++ b/EXILED/Exiled.Installer/CommandSettings.cs @@ -14,10 +14,13 @@ namespace Exiled.Installer using System.Linq; using System.Threading.Tasks; + /// + /// TODO: Add doc IDK NEED HELP FOR DOC. + /// internal sealed class CommandSettings { /// - /// The RootCommand to the Exiled Installer + /// The RootCommand to the Exiled Installer. /// public static readonly RootCommand RootCommand = new() { @@ -67,7 +70,7 @@ internal sealed class CommandSettings "Forces the folder to be the AppData folder (useful for containers when pterodactyl runs as root)") { IsRequired = true }, - new Option( + new Option( "--exiled", (parsed) => { @@ -144,7 +147,7 @@ internal sealed class CommandSettings public DirectoryInfo Exiled { get; set; } #nullable restore /// - /// Gets or sets if it is a prerelease. + /// Gets or sets a value indicating whether if it is a prerelease. /// public bool PreReleases { get; set; } @@ -164,20 +167,25 @@ internal sealed class CommandSettings public string? GitHubToken { get; set; } /// - /// Gets or sets the version of Exiled available. + /// Gets or sets a value indicating whether the version of Exiled available. /// public bool GetVersions { get; set; } /// - /// Gets or sets the boolean for exiting. + /// Gets or sets a value indicating whether the boolean for exiting. /// public bool Exit { get; set; } /// - /// Gets or sets the value indicating whether the version select should be skipped. + /// Gets or sets a value indicating whether the value indicating whether the version select should be skipped. /// public bool SkipVersionSelect { get; set; } + /// + /// TODO: Add doc IDK NEED HELP FOR DOC. + /// + /// Todo doc. + /// todo fuck doc. public static async Task Parse(string[] args) { RootCommand.Handler = CommandHandler.Create(async args => await Program.MainSafe(args).ConfigureAwait(false)); diff --git a/EXILED/Exiled.Installer/Program.cs b/EXILED/Exiled.Installer/Program.cs index ea09dada54..3e8fd8a151 100644 --- a/EXILED/Exiled.Installer/Program.cs +++ b/EXILED/Exiled.Installer/Program.cs @@ -25,8 +25,14 @@ namespace Exiled.Installer using Version = SemanticVersioning.Version; + /// + /// TODO: Add doc IDK NEED HELP FOR DOC. + /// internal enum PathResolution { + /// + /// TODO: Add doc IDK NEED HELP FOR DOC. + /// Undefined, /// @@ -40,6 +46,9 @@ internal enum PathResolution Exiled, } + /// + /// TODO: Add doc IDK NEED HELP FOR DOC. + /// internal static class Program { private const long RepoID = 833723500; @@ -56,12 +65,11 @@ internal static class Program // Force use of LF because the file uses LF private static readonly Dictionary Markup = Resources.Markup.Trim().Split('\n').ToDictionary(s => s.Split(':')[0], s => s.Split(':', 2)[1]); - private static async Task Main(string[] args) - { - Console.OutputEncoding = new UTF8Encoding(false, false); - await CommandSettings.Parse(args).ConfigureAwait(false); - } - + /// + /// TODO: Add doc IDK NEED HELP FOR DOC. + /// + /// Todo doc. + /// todo fuck doc. internal static async Task MainSafe(CommandSettings args) { bool error = false; @@ -121,9 +129,9 @@ internal static async Task MainSafe(CommandSettings args) Release targetRelease = FindRelease(args, releases); Console.WriteLine(Resources.Program_MainSafe_Release_found_); - Console.WriteLine(FormatRelease(targetRelease!)); + Console.WriteLine(FormatRelease(targetRelease)); - ReleaseAsset? exiledAsset = targetRelease!.Assets.FirstOrDefault(a => a.Name.Equals(ExiledAssetName, StringComparison.OrdinalIgnoreCase)); + ReleaseAsset? exiledAsset = targetRelease.Assets.FirstOrDefault(a => a.Name.Equals(ExiledAssetName, StringComparison.OrdinalIgnoreCase)); if (exiledAsset is null) { Console.WriteLine(Resources.Program_MainSafe_____ASSETS____); @@ -166,6 +174,12 @@ internal static async Task MainSafe(CommandSettings args) Environment.Exit(error ? 1 : 0); } + private static async Task Main(string[] args) + { + Console.OutputEncoding = new UTF8Encoding(false, false); + await CommandSettings.Parse(args).ConfigureAwait(false); + } + private static async Task> GetReleases() { IEnumerable releases = (await GitHubClient.Repository.Release.GetAll(RepoID).ConfigureAwait(false)) @@ -326,4 +340,4 @@ private static Release FindRelease(CommandSettings args, IEnumerable re return enumerable.First(); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Installer/Properties/Resources.Designer.cs b/EXILED/Exiled.Installer/Properties/Resources.Designer.cs index b95cc93c54..2636e1f9ec 100644 --- a/EXILED/Exiled.Installer/Properties/Resources.Designer.cs +++ b/EXILED/Exiled.Installer/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // @@ -107,7 +107,7 @@ internal static string Program_ExtractEntry_Extracting___0___into___1_____ { } /// - /// Looks up a localized string similar to → Prerelease selected.. + /// Looks up a localized string similar to ? Prerelease selected.. /// internal static string Program_MainSafe_ { get { @@ -324,4 +324,4 @@ internal static string Program_TryFindRelease_Trying_to_find_release__ { } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Loader/Config.cs b/EXILED/Exiled.Loader/Config.cs index 6e07979ef2..2ad58460d3 100644 --- a/EXILED/Exiled.Loader/Config.cs +++ b/EXILED/Exiled.Loader/Config.cs @@ -11,9 +11,10 @@ namespace Exiled.Loader using System.ComponentModel; using System.IO; - using API.Enums; - using API.Interfaces; + using Exiled.API.Enums; using Exiled.API.Features; + using Exiled.API.Interfaces; + using YamlDotNet.Core; /// @@ -88,5 +89,11 @@ public sealed class Config : IConfig /// [Description("Indicates whether Exiled should auto-update itself as soon as a new release is available.")] public bool EnableAutoUpdates { get; set; } = true; + + /// + /// Gets or sets a value indicating whether config validator should check all properties inside config values' types. + /// + [Description("Indicating whether config validator should check all properties inside config values' types.")] + public bool EnableDeepValidation { get; set; } = false; } } \ No newline at end of file diff --git a/EXILED/Exiled.Loader/ConfigManager.cs b/EXILED/Exiled.Loader/ConfigManager.cs index 706924ee45..ac5b8c3090 100644 --- a/EXILED/Exiled.Loader/ConfigManager.cs +++ b/EXILED/Exiled.Loader/ConfigManager.cs @@ -13,14 +13,15 @@ namespace Exiled.Loader using System.Linq; using System.Reflection; - using API.Enums; - using API.Extensions; - using API.Interfaces; - + using Exiled.API.Enums; + using Exiled.API.Extensions; using Exiled.API.Features; + using Exiled.API.Features.Attributes; using Exiled.API.Features.Pools; + using Exiled.API.Interfaces; using LabApi.Loader.Features.Plugins.Configuration; + using YamlDotNet.Core; using YamlDotNet.Serialization; @@ -72,6 +73,93 @@ public static SortedDictionary LoadSorted(string rawConfigs) } } + /// + /// Validates plugin config. + /// + /// Plugin which config is validated. + /// Validated config. + /// Config after validation is passed. + public static IConfig ValidateConfig(this IPlugin plugin, IConfig config) + { + int validated = 0; + foreach (PropertyInfo propertyInfo in config.GetType().GetProperties().Where(x => x.GetMethod != null && x.SetMethod != null)) + { + try + { + ValidateType(config, plugin.Config, propertyInfo, ref validated); + } + catch (Exception ex) + { + Log.Error($"Failed to validate config: {ex}"); + } + } + + if (validated > 0) + Log.Info($"Plugin {plugin.Name} has successfully passed {validated} config validations!"); + + return config; + } + + /// + /// Performs a validation for property and all its properties in 's type. + /// + /// Plugin which config is validated. + /// Validated config. + /// Property which will be validated. + /// Amount of successfully passed validations. + public static void ValidateType(object instance, object defaultInstance, PropertyInfo propertyInfo, ref int validated) + { + object value = propertyInfo.GetValue(instance, null); + object defaultValue = propertyInfo.GetValue(defaultInstance, null); + + bool hasValidateChildrenAttribute = false; + try + { + foreach (Attribute attribute in propertyInfo.GetCustomAttributes()) + { + hasValidateChildrenAttribute |= attribute is ValidateChildrenAttribute; + if (attribute is not IValidator validator) + continue; + + try + { + if (!validator.Check(value)) + { + Log.Error($"Value {value} in config ({propertyInfo.Name.ToSnakeCase()}) has failed validation for attribute {attribute.GetType().Name}. Default value ({defaultValue}) will be used instead."); + propertyInfo.SetValue(instance, defaultValue); + continue; + } + } + catch (Exception ex) + { + Log.Error($"Value {value} in config ({propertyInfo.Name.ToSnakeCase()}) has failed validation for attribute {attribute.GetType().Name}. Default value ({defaultValue}) will be used instead."); + Log.Error($"Validation error message: {ex.Message}"); + propertyInfo.SetValue(instance, defaultValue); + continue; + } + + validated++; + } + } + catch (Exception ex) + { + Log.Error($"Error while validating value of property '{propertyInfo.Name}': {ex.Message}. Default value ({defaultValue}) will be used instead."); + return; + } + + if (hasValidateChildrenAttribute || (!LoaderPlugin.Config.EnableDeepValidation && !(propertyInfo.PropertyType.Namespace?.Contains("System") ?? false))) + { + foreach (PropertyInfo property in propertyInfo.PropertyType.GetProperties().Where(x => x.GetMethod != null && x.SetMethod != null)) + { + ConstructorInfo ctor = property.PropertyType.GetConstructor(Type.EmptyTypes); + if (ctor is null) + continue; + + ValidateType(value, ctor.Invoke(null, null), property, ref validated); + } + } + } + /// /// Loads the config of a plugin using the distribution. /// @@ -106,7 +194,7 @@ public static IConfig LoadDefaultConfig(this IPlugin plugin, Dictionary try { string rawConfigString = Loader.Serializer.Serialize(rawDeserializedConfig); - config = (IConfig)Loader.Deserializer.Deserialize(rawConfigString, plugin.Config.GetType()); + config = ValidateConfig(plugin, (IConfig)Loader.Deserializer.Deserialize(rawConfigString, plugin.Config.GetType())); plugin.Config.CopyProperties(config); } catch (YamlException yamlException) @@ -135,7 +223,7 @@ public static IConfig LoadSeparatedConfig(this IPlugin plugin) try { - config = (IConfig)Loader.Deserializer.Deserialize(File.ReadAllText(plugin.ConfigPath), plugin.Config.GetType()); + config = ValidateConfig(plugin, (IConfig)Loader.Deserializer.Deserialize(File.ReadAllText(plugin.ConfigPath), plugin.Config.GetType())); plugin.Config.CopyProperties(config); } catch (YamlException yamlException) @@ -455,7 +543,7 @@ public static bool LoadLabAPIProperties(LabPlugin plugin) { Log.Warn($"LabAPI Plugin {plugin.Name} doesn't have default properties, generating..."); PropertiesSetter.Invoke(plugin, new object[] { Properties.CreateDefault() }); - File.WriteAllText(configPath, serializer.Serialize(plugin.Properties!)); + File.WriteAllText(configPath, serializer.Serialize(plugin.Properties)); return true; } @@ -467,7 +555,7 @@ public static bool LoadLabAPIProperties(LabPlugin plugin) { Log.Error($"{plugin.Name} properties could not be loaded, default properties will be loaded instead!\n{yamlException}"); PropertiesSetter.Invoke(plugin, new object[] { Properties.CreateDefault() }); - File.WriteAllText(configPath, serializer.Serialize(plugin.Properties!)); + File.WriteAllText(configPath, serializer.Serialize(plugin.Properties)); } return true; diff --git a/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs b/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs index bac70abfd1..c3bba54c51 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CommentGatheringTypeInspector.cs @@ -27,7 +27,7 @@ public sealed class CommentGatheringTypeInspector : TypeInspectorSkeleton /// The inner type description instance. public CommentGatheringTypeInspector(ITypeInspector innerTypeDescriptor) { - this.innerTypeDescriptor = innerTypeDescriptor ?? throw new ArgumentNullException("innerTypeDescriptor"); + this.innerTypeDescriptor = innerTypeDescriptor ?? throw new ArgumentNullException(nameof(innerTypeDescriptor)); } /// diff --git a/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs b/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs index d97c5cda3a..246554c641 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CommentsObjectGraphVisitor.cs @@ -40,4 +40,4 @@ public override bool EnterMapping(IPropertyDescriptor key, IObjectDescriptor val return base.EnterMapping(key, value, context); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs index 950078e802..8bd9de339f 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/AttachmentIdentifiersConverter.cs @@ -11,7 +11,7 @@ namespace Exiled.Loader.Features.Configs.CustomConverters using System.Collections.Generic; using System.IO; - using API.Structs; + using Exiled.API.Structs; using InventorySystem.Items.Firearms.Attachments; diff --git a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs index 04e15c00c6..f66d8039b8 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/ColorConverter.cs @@ -14,7 +14,9 @@ namespace Exiled.Loader.Features.Configs.CustomConverters using Exiled.API.Features; using Exiled.API.Features.Pools; + using UnityEngine; + using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Serialization; diff --git a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs index cdf89ab3d9..df9139d4d2 100644 --- a/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/CustomConverters/VectorsConverter.cs @@ -14,7 +14,9 @@ namespace Exiled.Loader.Features.Configs.CustomConverters using Exiled.API.Features; using Exiled.API.Features.Pools; + using UnityEngine; + using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Serialization; diff --git a/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs b/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs index e4ede00b1c..3d8ccc63da 100644 --- a/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs +++ b/EXILED/Exiled.Loader/Features/Configs/TypeAssigningEventEmitter.cs @@ -40,4 +40,4 @@ public override void Emit(ScalarEventInfo eventInfo, IEmitter emitter) base.Emit(eventInfo, emitter); } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs b/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs index 6b4a1e8358..6ba949cf96 100644 --- a/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs +++ b/EXILED/Exiled.Loader/Features/Configs/UnderscoredNamingConvention.cs @@ -10,6 +10,7 @@ namespace Exiled.Loader.Features.Configs using System.Collections.Generic; using Exiled.API.Extensions; + using YamlDotNet.Serialization; /// diff --git a/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs b/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs index 227fad327c..5c1115b62f 100644 --- a/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs +++ b/EXILED/Exiled.Loader/Features/PluginPriorityComparer.cs @@ -9,7 +9,7 @@ namespace Exiled.Loader.Features { using System.Collections.Generic; - using API.Interfaces; + using Exiled.API.Interfaces; /// /// Comparator implementation according to plugin priorities. diff --git a/EXILED/Exiled.Loader/Loader.cs b/EXILED/Exiled.Loader/Loader.cs index 00754c8c09..0d0b78d224 100644 --- a/EXILED/Exiled.Loader/Loader.cs +++ b/EXILED/Exiled.Loader/Loader.cs @@ -17,19 +17,21 @@ namespace Exiled.Loader using System.Security.Principal; using System.Threading; - using API.Enums; - using API.Interfaces; - using CommandSystem.Commands.Shared; + using Exiled.API.Enums; using Exiled.API.Features; using Exiled.API.Features.Pools; + using Exiled.API.Interfaces; + using Features; using Features.Configs; using Features.Configs.CustomConverters; + using LabApi.Loader; using LabApi.Loader.Features.Misc; using LabApi.Loader.Features.Plugins.Configuration; + using YamlDotNet.Serialization; using YamlDotNet.Serialization.NodeDeserializers; @@ -822,4 +824,4 @@ private static void LoadDependencies() } } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Loader/LoaderPlugin.cs b/EXILED/Exiled.Loader/LoaderPlugin.cs index 019a308f10..4b3696b17e 100644 --- a/EXILED/Exiled.Loader/LoaderPlugin.cs +++ b/EXILED/Exiled.Loader/LoaderPlugin.cs @@ -13,6 +13,7 @@ namespace Exiled.Loader using LabApi.Loader.Features.Plugins; using LabApi.Loader.Features.Plugins.Enums; + using MEC; using Log = API.Features.Log; diff --git a/EXILED/Exiled.Loader/PathExtensions.cs b/EXILED/Exiled.Loader/PathExtensions.cs index 7e241ae693..be13ef3c66 100644 --- a/EXILED/Exiled.Loader/PathExtensions.cs +++ b/EXILED/Exiled.Loader/PathExtensions.cs @@ -10,7 +10,7 @@ namespace Exiled.Loader using System; using System.Reflection; - using API.Interfaces; + using Exiled.API.Interfaces; /// /// Contains the extensions to get a path. diff --git a/EXILED/Exiled.Loader/TranslationManager.cs b/EXILED/Exiled.Loader/TranslationManager.cs index c7d85c3f97..4737838746 100644 --- a/EXILED/Exiled.Loader/TranslationManager.cs +++ b/EXILED/Exiled.Loader/TranslationManager.cs @@ -12,12 +12,11 @@ namespace Exiled.Loader using System.IO; using System.Linq; - using API.Enums; - using API.Extensions; - using API.Interfaces; - + using Exiled.API.Enums; + using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; + using Exiled.API.Interfaces; using YamlDotNet.Core; @@ -212,10 +211,7 @@ public static bool Clear() /// The of the desired plugin. private static ITranslation LoadDefaultTranslation(this IPlugin plugin, Dictionary rawTranslations) { - if (rawTranslations is null) - { - rawTranslations = Loader.Deserializer.Deserialize>(Read()) ?? DictionaryPool.Pool.Get(); - } + rawTranslations ??= Loader.Deserializer.Deserialize>(Read()) ?? DictionaryPool.Pool.Get(); if (!rawTranslations.TryGetValue(plugin.Prefix, out object rawDeserializedTranslation)) { diff --git a/EXILED/Exiled.Loader/Updater.cs b/EXILED/Exiled.Loader/Updater.cs index a2a3863597..e45b4b12cc 100644 --- a/EXILED/Exiled.Loader/Updater.cs +++ b/EXILED/Exiled.Loader/Updater.cs @@ -23,6 +23,7 @@ namespace Exiled.Loader using Exiled.Loader.GHApi.Models; using Exiled.Loader.GHApi.Settings; using Exiled.Loader.Models; + using ServerOutput; #pragma warning disable SA1310 // Field names should not contain underscore @@ -344,4 +345,4 @@ private bool FindAsset(string assetName, Release release, out ReleaseAsset asset return false; } } -} +} \ No newline at end of file diff --git a/EXILED/Exiled.Permissions/Config.cs b/EXILED/Exiled.Permissions/Config.cs index b0aabc52f0..abb7c038ac 100644 --- a/EXILED/Exiled.Permissions/Config.cs +++ b/EXILED/Exiled.Permissions/Config.cs @@ -10,9 +10,8 @@ namespace Exiled.Permissions using System.ComponentModel; using System.IO; - using API.Interfaces; - using Exiled.API.Features; + using Exiled.API.Interfaces; /// public sealed class Config : IConfig diff --git a/EXILED/Exiled.Permissions/Extensions/Permissions.cs b/EXILED/Exiled.Permissions/Extensions/Permissions.cs index 56823e3feb..42730728f6 100644 --- a/EXILED/Exiled.Permissions/Extensions/Permissions.cs +++ b/EXILED/Exiled.Permissions/Extensions/Permissions.cs @@ -18,10 +18,13 @@ namespace Exiled.Permissions.Extensions using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Pools; + using Features; using Properties; + using Query; + using RemoteAdmin; using YamlDotNet.Core; diff --git a/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs b/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs index 31492a1d89..519208e583 100644 --- a/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs +++ b/EXILED/Exiled.Permissions/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // @@ -52,4 +52,4 @@ internal static byte[] permissions { } } } -} +} \ No newline at end of file From 183d68d757748ce6df2bb57119a569c6d6aae3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 00:52:09 +0300 Subject: [PATCH 10/16] delete rertunr --- EXILED/Exiled.API/Features/Toys/Speaker.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index f058178111..580d15d302 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -334,7 +334,6 @@ public float Pitch field = 1f; isPitchDefault = true; Log.Warn("[Speaker] Pitch adjustment is not supported for live sources. Pitch has been reset to default value (1)."); - return; } if (isPitchDefault) From 0c00645cb297167dd2c7ce12929ea4484ad862c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 01:22:10 +0300 Subject: [PATCH 11/16] . --- EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs b/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs index 6cdcee5c0f..4856100ef9 100644 --- a/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs +++ b/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs @@ -171,10 +171,12 @@ private void CalculateBiquad(float dampValue) float alpha = Mathf.Sin(w0) / (2f * 0.7071f); float a0 = 1f + alpha; - b0 = ((1f - Mathf.Cos(w0)) / 2f) / a0; - b1 = (1f - Mathf.Cos(w0)) / a0; - b2 = ((1f - Mathf.Cos(w0)) / 2f) / a0; - a1 = (-2f * Mathf.Cos(w0)) / a0; + float w0Cos = Mathf.Cos(w0); + float oneMinusW0Cos = 1f - w0Cos; + b0 = (oneMinusW0Cos / 2f) / a0; + b1 = oneMinusW0Cos / a0; + b2 = (oneMinusW0Cos / 2f) / a0; + a1 = (-2f * w0Cos) / a0; a2 = (1f - alpha) / a0; } } From e3ab04671ecb14c70d5ad74a5b9a6e028238e406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 02:42:58 +0300 Subject: [PATCH 12/16] default prefab value --- EXILED/Exiled.API/Features/Toys/Text.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 427467ec6a..ab56f2ff0c 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -82,7 +82,7 @@ public Vector2 DisplaySize /// The display size of the text. /// Whether the should be initially spawned. /// The new . - public static Text Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, string text = null, Vector2? displaySize = null, bool spawn = true) + public static Text Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, string text = "Hello World!", Vector2? displaySize = null, bool spawn = true) { Text toy = new(Object.Instantiate(Prefab, parent)) { From e4f9a7507045a4377c81db5ebf0d99321278884f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 02:43:28 +0300 Subject: [PATCH 13/16] d --- EXILED/Exiled.API/Features/Toys/Text.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index ab56f2ff0c..1dd8ce4170 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -90,11 +90,9 @@ public static Text Create(Transform parent = null, Vector3? position = null, Qua LocalPosition = position ?? Vector3.zero, LocalRotation = rotation ?? Quaternion.identity, Scale = scale ?? Vector3.one, + TextFormat = text, }; - if (!string.IsNullOrEmpty(text)) - toy.TextFormat = text; - if (spawn) toy.Spawn(); From 8d854e7723df094c619a375c64a646a5ff289534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 20:16:37 +0300 Subject: [PATCH 14/16] why you do that yamato --- EXILED/Exiled.API/Features/Audio/WavUtility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Audio/WavUtility.cs b/EXILED/Exiled.API/Features/Audio/WavUtility.cs index 7e8df6dbea..dbbed96ffd 100644 --- a/EXILED/Exiled.API/Features/Audio/WavUtility.cs +++ b/EXILED/Exiled.API/Features/Audio/WavUtility.cs @@ -129,7 +129,7 @@ public static AudioData ParseWavSpanToPcm(Stream stream, ReadOnlySpan audi /// A struct containing the parsed file information. public static TrackData SkipHeader(Stream stream) { - TrackData trackData = default(TrackData); + TrackData trackData = default; if (stream.Length < 12) { From 50c3ba5d6d819bccbe484c8b462fc17a6ba6a7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 14 May 2026 23:28:06 +0300 Subject: [PATCH 15/16] i yield... im losed everything --- EXILED/Exiled.API/Features/Audio/WavUtility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Audio/WavUtility.cs b/EXILED/Exiled.API/Features/Audio/WavUtility.cs index dbbed96ffd..7e8df6dbea 100644 --- a/EXILED/Exiled.API/Features/Audio/WavUtility.cs +++ b/EXILED/Exiled.API/Features/Audio/WavUtility.cs @@ -129,7 +129,7 @@ public static AudioData ParseWavSpanToPcm(Stream stream, ReadOnlySpan audi /// A struct containing the parsed file information. public static TrackData SkipHeader(Stream stream) { - TrackData trackData = default; + TrackData trackData = default(TrackData); if (stream.Length < 12) { From ec056d815861b7cb52132aefd58f8f6ebe095648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Mon, 18 May 2026 15:22:54 +0300 Subject: [PATCH 16/16] revert changes --- .../Features/Audio/Filters/EchoFilter.cs | 10 ++--- EXILED/Exiled.API/Features/Toys/Speaker.cs | 38 +++++++++++-------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs b/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs index 4856100ef9..6cdcee5c0f 100644 --- a/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs +++ b/EXILED/Exiled.API/Features/Audio/Filters/EchoFilter.cs @@ -171,12 +171,10 @@ private void CalculateBiquad(float dampValue) float alpha = Mathf.Sin(w0) / (2f * 0.7071f); float a0 = 1f + alpha; - float w0Cos = Mathf.Cos(w0); - float oneMinusW0Cos = 1f - w0Cos; - b0 = (oneMinusW0Cos / 2f) / a0; - b1 = oneMinusW0Cos / a0; - b2 = (oneMinusW0Cos / 2f) / a0; - a1 = (-2f * w0Cos) / a0; + b0 = ((1f - Mathf.Cos(w0)) / 2f) / a0; + b1 = (1f - Mathf.Cos(w0)) / a0; + b2 = ((1f - Mathf.Cos(w0)) / 2f) / a0; + a1 = (-2f * Mathf.Cos(w0)) / a0; a2 = (1f - alpha) / a0; } } diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index 580d15d302..9aa6d574fe 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -73,8 +73,6 @@ public class Speaker : AdminToy, IWrapper /// public const bool DefaultSpatial = true; - private const int ResampleBufferPadding = 10; - private const float PitchTolerance = 0.0001f; private const int FrameSize = VoiceChatSettings.PacketSizePerChannel; private const float FrameTime = (float)FrameSize / VoiceChatSettings.SampleRate; @@ -326,16 +324,18 @@ public float Pitch if (field == value) return; - field = Mathf.Max(0.1f, Mathf.Abs(value)); - isPitchDefault = Mathf.Abs(field - 1f) < PitchTolerance; - - if (!isPitchDefault && CurrentSource is ILiveSource) + if (Mathf.Abs(value - 1f) > 0.0001f && CurrentSource is ILiveSource) { field = 1f; isPitchDefault = true; - Log.Warn("[Speaker] Pitch adjustment is not supported for live sources. Pitch has been reset to default value (1)."); + resampleTime = 0.0; + resampleBufferFilled = 0; + Log.Warn("[Speaker] Pitch adjustment is not supported for live sources. Pitch has been reset to default (1.0)."); + return; } + field = Mathf.Max(0.1f, Mathf.Abs(value)); + isPitchDefault = Mathf.Abs(field - 1.0f) < 0.0001f; if (isPitchDefault) { resampleTime = 0.0; @@ -358,9 +358,7 @@ public float Volume get => Base.NetworkVolume; set { - if (isPlayBackInitialized) - StopFade(); - + StopFade(); Base.NetworkVolume = value; } } @@ -1043,7 +1041,12 @@ public void ReturnToPool() Stop(); - Transform.SetParent(null); + if (Transform.parent != null || AdminToyBase._clientParentId != 0) + { + Transform.parent = null; + Base.RpcChangeParent(0); + } + LocalPosition = SpeakerParkPosition; Volume = DefaultVolume; @@ -1375,15 +1378,18 @@ private void ResampleFrame() { if (resampleBufferFilled == 0) { - int actualRead = CurrentSource.Read(resampleBuffer, 0, resampleBuffer.Length - ResampleBufferPadding); + int toRead = resampleBuffer.Length - 4; + int actualRead = CurrentSource.Read(resampleBuffer, 0, toRead); if (actualRead == 0) { - Array.Clear(frame, outputIdx, FrameSize - outputIdx); + while (outputIdx < FrameSize) + frame[outputIdx++] = 0f; return; } resampleBufferFilled = actualRead; + resampleTime = 0.0; } int currentSample = (int)resampleTime; @@ -1394,11 +1400,13 @@ private void ResampleFrame() { resampleBuffer[0] = resampleBuffer[resampleBufferFilled - 1]; - int actualRead = CurrentSource.Read(resampleBuffer, 1, resampleBuffer.Length - ResampleBufferPadding - 1); + int toRead = resampleBuffer.Length - 5; + int actualRead = CurrentSource.Read(resampleBuffer, 1, toRead); if (actualRead == 0) { - Array.Clear(frame, outputIdx, FrameSize - outputIdx); + while (outputIdx < FrameSize) + frame[outputIdx++] = 0f; return; }