From c4b1d454d0a789c93485611029aa82b07200d558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 7 Feb 2026 00:57:35 +0300 Subject: [PATCH 01/14] fixes and hub --- EXILED/Exiled.API/Features/Player.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index d91e703c01..0f07bd638d 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -1229,17 +1229,24 @@ public bool IsSpawnProtected protected HealthStat CustomHealthStat { get; set; } /// - /// Converts LabApi player to EXILED player. + /// Converts ReferenceHub to Player. /// - /// The LabApi player. + /// The ReferenceHub. /// EXILED player. - public static implicit operator Player(LabApi.Features.Wrappers.Player player) => Get(player); + public static implicit operator Player(ReferenceHub hub) => Get(hub); /// /// Converts LabApi player to EXILED player. /// /// The LabApi player. /// EXILED player. + public static implicit operator Player(LabApi.Features.Wrappers.Player player) => Get(player); + + /// + /// Converts EXILED player to LabApi player. + /// + /// The EXILED player. + /// LabApi player. public static implicit operator LabApi.Features.Wrappers.Player(Player player) => LabApi.Features.Wrappers.Player.Get(player?.ReferenceHub); /// @@ -1435,7 +1442,7 @@ public static Player Get(string args) /// /// The class. /// A or if not found. - public static Player Get(LabApi.Features.Wrappers.Player apiPlayer) => Get(apiPlayer.ReferenceHub); + public static Player Get(LabApi.Features.Wrappers.Player apiPlayer) => Get(apiPlayer?.ReferenceHub); /// /// Try-get a player given a . From e5d99f4ad3081de192582e7a585eda02709cd15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 7 Feb 2026 14:34:56 +0300 Subject: [PATCH 02/14] more more --- EXILED/Exiled.API/Features/Camera.cs | 14 +++++++++++++- EXILED/Exiled.API/Features/Doors/Door.cs | 13 +++++++++++++ EXILED/Exiled.API/Features/Generator.cs | 11 +++++++++++ EXILED/Exiled.API/Features/Hazards/Hazard.cs | 14 +++++++++++++- EXILED/Exiled.API/Features/Items/Firearm.cs | 4 ++++ EXILED/Exiled.API/Features/Items/Item.cs | 7 +++++++ EXILED/Exiled.API/Features/Lift.cs | 9 ++++++++- EXILED/Exiled.API/Features/Lockers/Chamber.cs | 12 ++++++++++++ EXILED/Exiled.API/Features/Lockers/Locker.cs | 7 +++++++ EXILED/Exiled.API/Features/Pickups/Pickup.cs | 7 +++++++ EXILED/Exiled.API/Features/Ragdoll.cs | 7 +++++++ EXILED/Exiled.API/Features/Room.cs | 16 ++++++++++++++++ EXILED/Exiled.API/Features/Scp559.cs | 2 +- EXILED/Exiled.API/Features/TeslaGate.cs | 15 ++++++++++++++- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 12 ++++++++++++ EXILED/Exiled.API/Features/Window.cs | 14 +++++++++++++- EXILED/Exiled.API/Features/Workstation.cs | 9 ++++++++- 17 files changed, 166 insertions(+), 7 deletions(-) diff --git a/EXILED/Exiled.API/Features/Camera.cs b/EXILED/Exiled.API/Features/Camera.cs index fa17a77540..3f67057e7b 100644 --- a/EXILED/Exiled.API/Features/Camera.cs +++ b/EXILED/Exiled.API/Features/Camera.cs @@ -12,10 +12,15 @@ namespace Exiled.API.Features using System.Linq; using Enums; + using Exiled.API.Extensions; using Exiled.API.Interfaces; + using MapGeneration; + using MapGeneration.Distributors; + using PlayerRoles.PlayableScps.Scp079.Cameras; + using UnityEngine; using CameraType = Enums.CameraType; @@ -260,6 +265,13 @@ public bool IsBeingUsed set => Base.IsActive = value; } + /// + /// Converts Scp079Camera to Camera. + /// + /// The Scp079Camera. + /// EXILED Camera. + public static implicit operator Camera(Scp079Camera camera079) => Get(camera079); + /// /// Gets a of which contains all the instances given a of . /// @@ -272,7 +284,7 @@ public bool IsBeingUsed /// /// The base . /// A or if not found. - public static Camera Get(Scp079Camera camera079) => camera079 != null ? Camera079ToCamera.TryGetValue(camera079, out Camera camera) ? camera : new(camera079) : null; + public static Camera Get(Scp079Camera camera079) => camera079 == null ? null : Camera079ToCamera.TryGetValue(camera079, out Camera camera) ? camera : new(camera079); /// /// Gets a given the specified . diff --git a/EXILED/Exiled.API/Features/Doors/Door.cs b/EXILED/Exiled.API/Features/Doors/Door.cs index a8163f207c..ecfe2c2ce7 100644 --- a/EXILED/Exiled.API/Features/Doors/Door.cs +++ b/EXILED/Exiled.API/Features/Doors/Door.cs @@ -15,10 +15,16 @@ namespace Exiled.API.Features.Doors using Exiled.API.Extensions; using Exiled.API.Features.Core; using Exiled.API.Interfaces; + using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; + using MEC; + using Mirror; + + using PlayerRoles.PlayableScps.Scp079.Cameras; + using UnityEngine; using BaseBreakableDoor = Interactables.Interobjects.BreakableDoor; @@ -303,6 +309,13 @@ public Vector3 Scale /// internal List RoomsValue { get; } = new List(); + /// + /// Converts DoorVariant to Door. + /// + /// The DoorVariant. + /// EXILED Door. + public static implicit operator Door(DoorVariant doorVariant) => Get(doorVariant); + /// /// Gets the door object associated with a specific , or creates a new one if there isn't one. /// diff --git a/EXILED/Exiled.API/Features/Generator.cs b/EXILED/Exiled.API/Features/Generator.cs index b19369208d..e7893b8f7f 100644 --- a/EXILED/Exiled.API/Features/Generator.cs +++ b/EXILED/Exiled.API/Features/Generator.cs @@ -12,8 +12,12 @@ namespace Exiled.API.Features using System.Linq; using Enums; + using Exiled.API.Interfaces; + + using Interactables.Interobjects; using Interactables.Interobjects.DoorUtils; + using MapGeneration.Distributors; using UnityEngine; @@ -219,6 +223,13 @@ public KeycardPermissions KeycardPermissions set => Base._requiredPermission = (DoorPermissionFlags)value; } + /// + /// Converts Scp079Generator to Generator. + /// + /// The Scp079Generator. + /// EXILED Generator. + public static implicit operator Generator(Scp079Generator scp079Generator) => Get(scp079Generator); + /// /// Gets the belonging to the , if any. /// diff --git a/EXILED/Exiled.API/Features/Hazards/Hazard.cs b/EXILED/Exiled.API/Features/Hazards/Hazard.cs index 22d620092a..dd9205e31a 100644 --- a/EXILED/Exiled.API/Features/Hazards/Hazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/Hazard.cs @@ -14,8 +14,13 @@ namespace Exiled.API.Features.Hazards using Exiled.API.Enums; using Exiled.API.Features.Core; using Exiled.API.Interfaces; + using global::Hazards; + + using Interactables.Interobjects.DoorUtils; + using PlayerRoles.PlayableScps.Scp939; + using UnityEngine; /// @@ -113,12 +118,19 @@ public Vector3 Position set => Base.SourcePosition = value; } + /// + /// Converts EnvironmentalHazard to Hazard. + /// + /// The EnvironmentalHazard. + /// EXILED Hazard. + public static implicit operator Hazard(EnvironmentalHazard environmentalHazard) => Get(environmentalHazard); + /// /// Gets the by . /// /// The instance. /// for . - public static Hazard Get(EnvironmentalHazard environmentalHazard) => + public static Hazard Get(EnvironmentalHazard environmentalHazard) => environmentalHazard == null ? null : EnvironmentalHazardToHazard.TryGetValue(environmentalHazard, out Hazard hazard) ? hazard : environmentalHazard switch { diff --git a/EXILED/Exiled.API/Features/Items/Firearm.cs b/EXILED/Exiled.API/Features/Items/Firearm.cs index 56215591af..5996da1508 100644 --- a/EXILED/Exiled.API/Features/Items/Firearm.cs +++ b/EXILED/Exiled.API/Features/Items/Firearm.cs @@ -12,6 +12,7 @@ namespace Exiled.API.Features.Items using System.Linq; using CameraShaking; + using Enums; using Exiled.API.Features.Items.FirearmModules; @@ -20,7 +21,10 @@ namespace Exiled.API.Features.Items using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; using Exiled.API.Structs; + using Extensions; + + using InventorySystem.Items; using InventorySystem.Items.Autosync; using InventorySystem.Items.Firearms.Attachments; using InventorySystem.Items.Firearms.Attachments.Components; diff --git a/EXILED/Exiled.API/Features/Items/Item.cs b/EXILED/Exiled.API/Features/Items/Item.cs index 89bb189c42..a7b2372a68 100644 --- a/EXILED/Exiled.API/Features/Items/Item.cs +++ b/EXILED/Exiled.API/Features/Items/Item.cs @@ -204,6 +204,13 @@ public ItemAddReason AddReason /// public ItemIdentifier Identifier => Base.ItemId; + /// + /// Converts ItemBase to Item. + /// + /// The ItemBase. + /// EXILED Item. + public static implicit operator Item(ItemBase itemBase) => Get(itemBase); + /// /// Gets an existing or creates a new instance of one. /// diff --git a/EXILED/Exiled.API/Features/Lift.cs b/EXILED/Exiled.API/Features/Lift.cs index d191cd6764..40ab56306b 100644 --- a/EXILED/Exiled.API/Features/Lift.cs +++ b/EXILED/Exiled.API/Features/Lift.cs @@ -217,6 +217,13 @@ public float AnimationTime /// public Doors.ElevatorDoor CurrentDestination => Door.Get(Base.DestinationDoor); + /// + /// Converts ElevatorChamber to Lift. + /// + /// The ElevatorChamber. + /// EXILED Lift. + public static implicit operator Lift(ElevatorChamber elevator) => Get(elevator); + /// /// Gets a of which contains all the instances from the specified . /// @@ -229,7 +236,7 @@ public float AnimationTime /// /// The instance. /// A or if not found. - public static Lift Get(ElevatorChamber elevator) => ElevatorChamberToLift.TryGetValue(elevator, out Lift lift) ? lift : new(elevator); + public static Lift Get(ElevatorChamber elevator) => elevator == null ? null : ElevatorChamberToLift.TryGetValue(elevator, out Lift lift) ? lift : new(elevator); /// /// Gets the corresponding to the specified , if any. diff --git a/EXILED/Exiled.API/Features/Lockers/Chamber.cs b/EXILED/Exiled.API/Features/Lockers/Chamber.cs index 610fcaa90f..5b7c0f878a 100644 --- a/EXILED/Exiled.API/Features/Lockers/Chamber.cs +++ b/EXILED/Exiled.API/Features/Lockers/Chamber.cs @@ -16,8 +16,13 @@ namespace Exiled.API.Features.Lockers using Exiled.API.Extensions; using Exiled.API.Features.Pickups; using Exiled.API.Interfaces; + + using Interactables.Interobjects; + using InventorySystem.Items.Pickups; + using MapGeneration.Distributors; + using UnityEngine; /// @@ -189,6 +194,13 @@ public bool IsOpen /// public bool CanInteract => Base.CanInteract; + /// + /// Converts LockerChamber to Chamber. + /// + /// The LockerChamber. + /// EXILED Chamber. + public static implicit operator Chamber(LockerChamber chamber) => Get(chamber); + /// /// Adds an item to the current chamber. /// diff --git a/EXILED/Exiled.API/Features/Lockers/Locker.cs b/EXILED/Exiled.API/Features/Lockers/Locker.cs index 734f849fb2..c547396200 100644 --- a/EXILED/Exiled.API/Features/Lockers/Locker.cs +++ b/EXILED/Exiled.API/Features/Lockers/Locker.cs @@ -123,6 +123,13 @@ public Vector3 RandomChamberPosition } } + /// + /// Converts BaseLocker to Locker. + /// + /// The BaseLocker. + /// EXILED Locker. + public static implicit operator Locker?(BaseLocker locker) => Get(locker); + /// /// Gets the belonging to the , if any. /// diff --git a/EXILED/Exiled.API/Features/Pickups/Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Pickup.cs index 5dcceb6135..38bd965a9a 100644 --- a/EXILED/Exiled.API/Features/Pickups/Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Pickup.cs @@ -293,6 +293,13 @@ public Quaternion Rotation /// public bool IsSpawned => NetworkServer.spawned.ContainsValue(Base.netIdentity); + /// + /// Converts ItemPickupBase to Pickup. + /// + /// The ItemPickupBase. + /// EXILED Pickup. + public static implicit operator Pickup(ItemPickupBase pickupBase) => Get(pickupBase); + /// /// Gets an existing or creates a new instance of one. /// diff --git a/EXILED/Exiled.API/Features/Ragdoll.cs b/EXILED/Exiled.API/Features/Ragdoll.cs index 19321ee35d..fc3abe7fd1 100644 --- a/EXILED/Exiled.API/Features/Ragdoll.cs +++ b/EXILED/Exiled.API/Features/Ragdoll.cs @@ -299,6 +299,13 @@ public Vector3 RagdollScale /// internal static HashSet IgnoredRagdolls { get; set; } = new(); + /// + /// Converts BasicRagdoll to Ragdoll. + /// + /// The BasicRagdoll. + /// EXILED Ragdoll. + public static implicit operator Ragdoll(BasicRagdoll basicRagdoll) => Get(basicRagdoll); + /// /// Gets the last ragdoll of the player. /// diff --git a/EXILED/Exiled.API/Features/Room.cs b/EXILED/Exiled.API/Features/Room.cs index 846a76509c..1eb1b7f518 100644 --- a/EXILED/Exiled.API/Features/Room.cs +++ b/EXILED/Exiled.API/Features/Room.cs @@ -12,18 +12,27 @@ 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 PlayerRoles.Ragdolls; + using RelativePositioning; + using UnityEngine; + using Utils.NonAllocLINQ; /// @@ -227,6 +236,13 @@ public bool AreLightsOff /// internal List NearestRoomsValue { get; } = new(); + /// + /// Converts RoomIdentifier to Room. + /// + /// The RoomIdentifier. + /// EXILED Room. + public static implicit operator Room(RoomIdentifier roomIdentifier) => Get(roomIdentifier); + /// /// Gets a given the specified . /// diff --git a/EXILED/Exiled.API/Features/Scp559.cs b/EXILED/Exiled.API/Features/Scp559.cs index 246a030d7f..87b4b4b943 100644 --- a/EXILED/Exiled.API/Features/Scp559.cs +++ b/EXILED/Exiled.API/Features/Scp559.cs @@ -131,7 +131,7 @@ public Vector3 Position /// /// Game instance. /// . - public static Scp559 Get(Scp559Cake cake) => CakeToWrapper.TryGetValue(cake, out Scp559 scp559) ? scp559 : new Scp559(cake); + public static Scp559 Get(Scp559Cake cake) => cake == null ? null : CakeToWrapper.TryGetValue(cake, out Scp559 scp559) ? scp559 : new Scp559(cake); /// /// Gets the of SCP-559 which matches the predicate. diff --git a/EXILED/Exiled.API/Features/TeslaGate.cs b/EXILED/Exiled.API/Features/TeslaGate.cs index ddc04ac791..fe3341d5b2 100644 --- a/EXILED/Exiled.API/Features/TeslaGate.cs +++ b/EXILED/Exiled.API/Features/TeslaGate.cs @@ -12,9 +12,15 @@ namespace Exiled.API.Features using System.Linq; using Exiled.API.Interfaces; + using Hazards; + + using InventorySystem.Items.Firearms.Attachments; + using MEC; + using PlayerRoles; + using UnityEngine; using BaseTeslaGate = global::TeslaGate; @@ -195,12 +201,19 @@ public bool UseInstantBurst /// public IEnumerable PlayersInTriggerRange => Player.List.Where(IsPlayerInTriggerRange); + /// + /// Converts BaseTeslaGate to TeslaGate. + /// + /// The BaseTeslaGate. + /// EXILED TeslaGate. + public static implicit operator TeslaGate(BaseTeslaGate baseTeslaGate) => Get(baseTeslaGate); + /// /// Gets the belonging to the . /// /// The instance. /// The corresponding instance. - public static TeslaGate Get(BaseTeslaGate baseTeslaGate) => BaseTeslaGateToTeslaGate.TryGetValue(baseTeslaGate, out TeslaGate teslagate) ? + public static TeslaGate Get(BaseTeslaGate baseTeslaGate) => baseTeslaGate == null ? null : BaseTeslaGateToTeslaGate.TryGetValue(baseTeslaGate, out TeslaGate teslagate) ? teslagate : new(baseTeslaGate, Room.FindParentRoom(baseTeslaGate.gameObject)); diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index c93cee110e..b47561c1fb 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -12,8 +12,13 @@ namespace Exiled.API.Features.Toys using AdminToys; using Enums; + using Exiled.API.Interfaces; + using Footprinting; + + using InventorySystem.Items.Pickups; + using Mirror; using UnityEngine; @@ -145,6 +150,13 @@ public bool IsStatic set => AdminToyBase.NetworkIsStatic = value; } + /// + /// Converts AdminToyBase to AdminToy. + /// + /// The AdminToyBase. + /// EXILED AdminToy. + public static implicit operator AdminToy(AdminToyBase adminToyBase) => Get(adminToyBase); + /// /// Gets the belonging to the . /// diff --git a/EXILED/Exiled.API/Features/Window.cs b/EXILED/Exiled.API/Features/Window.cs index 2d327ff0c4..09bf0b1c86 100644 --- a/EXILED/Exiled.API/Features/Window.cs +++ b/EXILED/Exiled.API/Features/Window.cs @@ -12,10 +12,15 @@ 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 MapGeneration; + using UnityEngine; /// @@ -148,12 +153,19 @@ public Player LastAttacker set => Base.LastAttacker = value.Footprint; } + /// + /// Converts BreakableWindow to Window. + /// + /// The BreakableWindow. + /// EXILED Window. + public static implicit operator Window(BreakableWindow breakableWindow) => Get(breakableWindow); + /// /// Gets the window object associated with a specific , or creates a new one if there isn't one. /// /// The base-game . /// A wrapper object. - public static Window Get(BreakableWindow breakableWindow) => BreakableWindowToWindow.TryGetValue(breakableWindow, out Window window) + public static Window Get(BreakableWindow breakableWindow) => breakableWindow == null ? null : BreakableWindowToWindow.TryGetValue(breakableWindow, out Window window) ? window : new(breakableWindow, breakableWindow.GetComponentInParent()); diff --git a/EXILED/Exiled.API/Features/Workstation.cs b/EXILED/Exiled.API/Features/Workstation.cs index 7e7978a7ff..809564d11d 100644 --- a/EXILED/Exiled.API/Features/Workstation.cs +++ b/EXILED/Exiled.API/Features/Workstation.cs @@ -119,12 +119,19 @@ public Player KnownUser set => Base.KnownUser = value.ReferenceHub; } + /// + /// Converts WorkstationController to Workstation. + /// + /// The WorkstationController. + /// EXILED Workstation. + public static implicit operator Workstation(WorkstationController workstationController) => Get(workstationController); + /// /// Gets a given a instance. /// /// The instance. /// The instance. - public static Workstation Get(WorkstationController workstationController) => WorkstationControllerToWorkstation.TryGetValue(workstationController, out Workstation workstation) ? workstation : new(workstationController); + public static Workstation Get(WorkstationController workstationController) => workstationController == null ? null : WorkstationControllerToWorkstation.TryGetValue(workstationController, out Workstation workstation) ? workstation : new(workstationController); /// /// Gets all instances that match the specified predicate. From cd8a42d3e7ac5602aa10e571bcafe3c54d6f94b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Fri, 20 Feb 2026 15:16:51 +0300 Subject: [PATCH 03/14] fix magic value --- EXILED/Exiled.API/Features/Toys/Waypoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 0de33936a7..88c3ab0936 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -109,7 +109,7 @@ 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, + BoundsSize = scale ?? Vector3.one * WaypointToy.MaxBounds, VisualizeBounds = visualizeBounds, }; From e3608d662a00887eeca101f71ad24566d54222c4 Mon Sep 17 00:00:00 2001 From: Yamato <66829532+louis1706@users.noreply.github.com> Date: Sat, 16 May 2026 10:57:30 +0200 Subject: [PATCH 04/14] suggestion to do for all file (can be revert if not wanted) --- EXILED/Exiled.API/Features/Generator.cs | 16 +++++++++++- EXILED/Exiled.API/Features/Hazards/Hazard.cs | 16 +++++++++++- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 16 +++++++++++- EXILED/Exiled.API/Features/Window.cs | 26 +++++++++++++++----- 4 files changed, 65 insertions(+), 9 deletions(-) diff --git a/EXILED/Exiled.API/Features/Generator.cs b/EXILED/Exiled.API/Features/Generator.cs index 2ec5d20e22..8191cfb3c4 100644 --- a/EXILED/Exiled.API/Features/Generator.cs +++ b/EXILED/Exiled.API/Features/Generator.cs @@ -245,12 +245,19 @@ public KeycardPermissions KeycardPermissions } /// - /// Converts Scp079Generator to Generator. + /// Converts to . /// /// The Scp079Generator. /// EXILED Generator. public static implicit operator Generator(Scp079Generator scp079Generator) => Get(scp079Generator); + /// + /// Converts to . + /// + /// The Scp079Generator. + /// EXILED Generator. + public static implicit operator Generator(LabApi.Features.Wrappers.Generator scp079Generator) => Get(scp079Generator); + /// /// Gets the belonging to the , if any. /// @@ -259,6 +266,13 @@ public KeycardPermissions KeycardPermissions public static Generator Get(Scp079Generator scp079Generator) => scp079Generator == null ? null : Scp079GeneratorToGenerator.TryGetValue(scp079Generator, out Generator generator) ? generator : new(scp079Generator); + /// + /// Gets the belonging to the , if any. + /// + /// The instance. + /// A or if not found. + public static Generator Get(LabApi.Features.Wrappers.Generator scp079Generator) => Get(scp079Generator?.Base); + /// /// Gets a of given the specified . /// diff --git a/EXILED/Exiled.API/Features/Hazards/Hazard.cs b/EXILED/Exiled.API/Features/Hazards/Hazard.cs index 7e42860f4a..f0849e2099 100644 --- a/EXILED/Exiled.API/Features/Hazards/Hazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/Hazard.cs @@ -117,12 +117,19 @@ public Vector3 Position } /// - /// Converts EnvironmentalHazard to Hazard. + /// Converts to . /// /// The EnvironmentalHazard. /// EXILED Hazard. public static implicit operator Hazard(EnvironmentalHazard environmentalHazard) => Get(environmentalHazard); + /// + /// Converts to . + /// + /// The EnvironmentalHazard. + /// EXILED Hazard. + public static implicit operator Hazard(LabApi.Features.Wrappers.Hazard environmentalHazard) => Get(environmentalHazard); + /// /// Gets the by . /// @@ -139,6 +146,13 @@ public static Hazard Get(EnvironmentalHazard environmentalHazard) => environment _ => new Hazard(environmentalHazard), }; + /// + /// Gets the by . + /// + /// The instance. + /// for . + public static Hazard Get(LabApi.Features.Wrappers.Hazard environmentalHazard) => Get(environmentalHazard?.Base); + /// /// Gets the by . /// diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index 6577cec477..fb6308e129 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -175,12 +175,19 @@ public bool IsStatic } /// - /// Converts AdminToyBase to AdminToy. + /// Converts to . /// /// The AdminToyBase. /// EXILED AdminToy. public static implicit operator AdminToy(AdminToyBase adminToyBase) => Get(adminToyBase); + /// + /// Converts to . + /// + /// The AdminToyBase. + /// EXILED AdminToy. + public static implicit operator AdminToy(LabApi.Features.Wrappers.AdminToy adminToyBase) => Get(adminToyBase); + /// /// Gets the belonging to the . /// @@ -209,6 +216,13 @@ public static AdminToy Get(AdminToyBase adminToyBase) }; } + /// + /// Gets the belonging to the . + /// + /// The instance. + /// The corresponding instance. + public static AdminToy Get(LabApi.Features.Wrappers.AdminToy adminToyBase) => Get(adminToyBase?.Base); + /// /// Gets the by . /// diff --git a/EXILED/Exiled.API/Features/Window.cs b/EXILED/Exiled.API/Features/Window.cs index 2ba7bd3e0d..8b06520acf 100644 --- a/EXILED/Exiled.API/Features/Window.cs +++ b/EXILED/Exiled.API/Features/Window.cs @@ -152,20 +152,34 @@ public Player LastAttacker } /// - /// Converts BreakableWindow to Window. + /// Converts the to . /// /// The BreakableWindow. /// EXILED Window. public static implicit operator Window(BreakableWindow breakableWindow) => Get(breakableWindow); /// - /// Gets the window object associated with a specific , or creates a new one if there isn't one. + /// Converts the to . /// - /// The base-game . + /// The BreakableWindow. + /// EXILED Window. + public static implicit operator Window(LabApi.Features.Wrappers.Window breakableWindow) => Get(breakableWindow); + + /// + /// Gets the object associated with a specific , or creates a new one if there isn't one. + /// + /// The base-game . + /// A wrapper object. + public static Window Get(BreakableWindow breakableWindow) => breakableWindow == null ? null : + BreakableWindowToWindow.TryGetValue(breakableWindow, out Window window) ? window : + new(breakableWindow, breakableWindow.GetComponentInParent()); + + /// + /// Gets the object associated with a specific , or creates a new one if there isn't one. + /// + /// The base-game . /// A wrapper object. - public static Window Get(BreakableWindow breakableWindow) => breakableWindow == null ? null : BreakableWindowToWindow.TryGetValue(breakableWindow, out Window window) - ? window - : new(breakableWindow, breakableWindow.GetComponentInParent()); + public static Window Get(LabApi.Features.Wrappers.Window breakableWindow) => Get(breakableWindow?.Base); /// /// Gets a of filtered based on a predicate. From c640f5e09d43cee7a588eca0862301e65a0f345c Mon Sep 17 00:00:00 2001 From: Yamato <66829532+louis1706@users.noreply.github.com> Date: Sat, 16 May 2026 12:27:27 +0200 Subject: [PATCH 05/14] Revert "suggestion to do for all file (can be revert if not wanted)" This reverts commit e3608d662a00887eeca101f71ad24566d54222c4. --- EXILED/Exiled.API/Features/Generator.cs | 16 +----------- EXILED/Exiled.API/Features/Hazards/Hazard.cs | 16 +----------- EXILED/Exiled.API/Features/Toys/AdminToy.cs | 16 +----------- EXILED/Exiled.API/Features/Window.cs | 26 +++++--------------- 4 files changed, 9 insertions(+), 65 deletions(-) diff --git a/EXILED/Exiled.API/Features/Generator.cs b/EXILED/Exiled.API/Features/Generator.cs index 8191cfb3c4..2ec5d20e22 100644 --- a/EXILED/Exiled.API/Features/Generator.cs +++ b/EXILED/Exiled.API/Features/Generator.cs @@ -245,19 +245,12 @@ public KeycardPermissions KeycardPermissions } /// - /// Converts to . + /// Converts Scp079Generator to Generator. /// /// The Scp079Generator. /// EXILED Generator. public static implicit operator Generator(Scp079Generator scp079Generator) => Get(scp079Generator); - /// - /// Converts to . - /// - /// The Scp079Generator. - /// EXILED Generator. - public static implicit operator Generator(LabApi.Features.Wrappers.Generator scp079Generator) => Get(scp079Generator); - /// /// Gets the belonging to the , if any. /// @@ -266,13 +259,6 @@ public KeycardPermissions KeycardPermissions public static Generator Get(Scp079Generator scp079Generator) => scp079Generator == null ? null : Scp079GeneratorToGenerator.TryGetValue(scp079Generator, out Generator generator) ? generator : new(scp079Generator); - /// - /// Gets the belonging to the , if any. - /// - /// The instance. - /// A or if not found. - public static Generator Get(LabApi.Features.Wrappers.Generator scp079Generator) => Get(scp079Generator?.Base); - /// /// Gets a of given the specified . /// diff --git a/EXILED/Exiled.API/Features/Hazards/Hazard.cs b/EXILED/Exiled.API/Features/Hazards/Hazard.cs index f0849e2099..7e42860f4a 100644 --- a/EXILED/Exiled.API/Features/Hazards/Hazard.cs +++ b/EXILED/Exiled.API/Features/Hazards/Hazard.cs @@ -117,19 +117,12 @@ public Vector3 Position } /// - /// Converts to . + /// Converts EnvironmentalHazard to Hazard. /// /// The EnvironmentalHazard. /// EXILED Hazard. public static implicit operator Hazard(EnvironmentalHazard environmentalHazard) => Get(environmentalHazard); - /// - /// Converts to . - /// - /// The EnvironmentalHazard. - /// EXILED Hazard. - public static implicit operator Hazard(LabApi.Features.Wrappers.Hazard environmentalHazard) => Get(environmentalHazard); - /// /// Gets the by . /// @@ -146,13 +139,6 @@ public static Hazard Get(EnvironmentalHazard environmentalHazard) => environment _ => new Hazard(environmentalHazard), }; - /// - /// Gets the by . - /// - /// The instance. - /// for . - public static Hazard Get(LabApi.Features.Wrappers.Hazard environmentalHazard) => Get(environmentalHazard?.Base); - /// /// Gets the by . /// diff --git a/EXILED/Exiled.API/Features/Toys/AdminToy.cs b/EXILED/Exiled.API/Features/Toys/AdminToy.cs index fb6308e129..6577cec477 100644 --- a/EXILED/Exiled.API/Features/Toys/AdminToy.cs +++ b/EXILED/Exiled.API/Features/Toys/AdminToy.cs @@ -175,19 +175,12 @@ public bool IsStatic } /// - /// Converts to . + /// Converts AdminToyBase to AdminToy. /// /// The AdminToyBase. /// EXILED AdminToy. public static implicit operator AdminToy(AdminToyBase adminToyBase) => Get(adminToyBase); - /// - /// Converts to . - /// - /// The AdminToyBase. - /// EXILED AdminToy. - public static implicit operator AdminToy(LabApi.Features.Wrappers.AdminToy adminToyBase) => Get(adminToyBase); - /// /// Gets the belonging to the . /// @@ -216,13 +209,6 @@ public static AdminToy Get(AdminToyBase adminToyBase) }; } - /// - /// Gets the belonging to the . - /// - /// The instance. - /// The corresponding instance. - public static AdminToy Get(LabApi.Features.Wrappers.AdminToy adminToyBase) => Get(adminToyBase?.Base); - /// /// Gets the by . /// diff --git a/EXILED/Exiled.API/Features/Window.cs b/EXILED/Exiled.API/Features/Window.cs index 8b06520acf..2ba7bd3e0d 100644 --- a/EXILED/Exiled.API/Features/Window.cs +++ b/EXILED/Exiled.API/Features/Window.cs @@ -152,34 +152,20 @@ public Player LastAttacker } /// - /// Converts the to . + /// Converts BreakableWindow to Window. /// /// The BreakableWindow. /// EXILED Window. public static implicit operator Window(BreakableWindow breakableWindow) => Get(breakableWindow); /// - /// Converts the to . + /// Gets the window object associated with a specific , or creates a new one if there isn't one. /// - /// The BreakableWindow. - /// EXILED Window. - public static implicit operator Window(LabApi.Features.Wrappers.Window breakableWindow) => Get(breakableWindow); - - /// - /// Gets the object associated with a specific , or creates a new one if there isn't one. - /// - /// The base-game . - /// A wrapper object. - public static Window Get(BreakableWindow breakableWindow) => breakableWindow == null ? null : - BreakableWindowToWindow.TryGetValue(breakableWindow, out Window window) ? window : - new(breakableWindow, breakableWindow.GetComponentInParent()); - - /// - /// Gets the object associated with a specific , or creates a new one if there isn't one. - /// - /// The base-game . + /// The base-game . /// A wrapper object. - public static Window Get(LabApi.Features.Wrappers.Window breakableWindow) => Get(breakableWindow?.Base); + public static Window Get(BreakableWindow breakableWindow) => breakableWindow == null ? null : BreakableWindowToWindow.TryGetValue(breakableWindow, out Window window) + ? window + : new(breakableWindow, breakableWindow.GetComponentInParent()); /// /// Gets a of filtered based on a predicate. From da1bc5d59e20973b10a9d46fcf5d576dc524a819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 16 May 2026 14:58:45 +0300 Subject: [PATCH 06/14] mssing toys automatic implicits for base game toys --- EXILED/Exiled.API/Features/Toys/CameraToy.cs | 7 +++++++ EXILED/Exiled.API/Features/Toys/Capybara.cs | 7 +++++++ .../Features/Toys/InteractableToy.cs | 7 +++++++ EXILED/Exiled.API/Features/Toys/Light.cs | 18 +++++++--------- EXILED/Exiled.API/Features/Toys/Primitive.cs | 18 +++++++--------- .../Features/Toys/ShootingTargetToy.cs | 21 +++++++------------ EXILED/Exiled.API/Features/Toys/Speaker.cs | 7 +++++++ EXILED/Exiled.API/Features/Toys/Text.cs | 7 +++++++ EXILED/Exiled.API/Features/Toys/Waypoint.cs | 9 ++++++++ 9 files changed, 65 insertions(+), 36 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/CameraToy.cs b/EXILED/Exiled.API/Features/Toys/CameraToy.cs index 85727a176f..1ee7d35c9d 100644 --- a/EXILED/Exiled.API/Features/Toys/CameraToy.cs +++ b/EXILED/Exiled.API/Features/Toys/CameraToy.cs @@ -103,6 +103,13 @@ public string Name set => Base.NetworkLabel = value; } + /// + /// Converts Scp079CameraToy to CameraToy. + /// + /// The Scp079CameraToy. + /// EXILED CameraToy. + public static implicit operator CameraToy(Scp079CameraToy scp079CameraToy) => (CameraToy)Get(scp079CameraToy); + /// /// Creates a new with a specified type. /// diff --git a/EXILED/Exiled.API/Features/Toys/Capybara.cs b/EXILED/Exiled.API/Features/Toys/Capybara.cs index d615b25a1b..ae0cc83d57 100644 --- a/EXILED/Exiled.API/Features/Toys/Capybara.cs +++ b/EXILED/Exiled.API/Features/Toys/Capybara.cs @@ -46,6 +46,13 @@ public bool Collidable set => Base.NetworkCollisionsEnabled = value; } + /// + /// Converts CapybaraToy to Capybara. + /// + /// The CapybaraToy. + /// EXILED Capybara. + public static implicit operator Capybara(CapybaraToy capybaraToy) => (Capybara)Get(capybaraToy); + /// /// Creates a new at the specified position. /// diff --git a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs index 1653e69b78..9fb2d46778 100644 --- a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs +++ b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs @@ -65,6 +65,13 @@ public bool IsLocked set => Base.NetworkIsLocked = value; } + /// + /// Converts InvisibleInteractableToy to InteractableToy. + /// + /// The InvisibleInteractableToy. + /// EXILED InteractableToy. + public static implicit operator InteractableToy(InvisibleInteractableToy invisibleInteractableToy) => (InteractableToy)Get(invisibleInteractableToy); + /// /// Creates a new at the specified position. /// diff --git a/EXILED/Exiled.API/Features/Toys/Light.cs b/EXILED/Exiled.API/Features/Toys/Light.cs index 4dad774de2..fcd9d47a1c 100644 --- a/EXILED/Exiled.API/Features/Toys/Light.cs +++ b/EXILED/Exiled.API/Features/Toys/Light.cs @@ -124,6 +124,13 @@ public LightShadows ShadowType set => Base.NetworkShadowType = value; } + /// + /// Converts LightSourceToy to Light. + /// + /// The LightSourceToy. + /// EXILED Light. + public static implicit operator Light(LightSourceToy lightSourceToy) => (Light)Get(lightSourceToy); + /// /// Creates a new . /// @@ -159,16 +166,5 @@ public static Light Create(Vector3? position /*= null*/, Vector3? rotation /*= n return light; } - - /// - /// Gets the belonging to the . - /// - /// The instance. - /// The corresponding instance. - public static Light Get(LightSourceToy lightSourceToy) - { - AdminToy adminToy = List.FirstOrDefault(x => x.AdminToyBase == lightSourceToy); - return adminToy is not null ? adminToy as Light : new(lightSourceToy); - } } } \ No newline at end of file diff --git a/EXILED/Exiled.API/Features/Toys/Primitive.cs b/EXILED/Exiled.API/Features/Toys/Primitive.cs index 9ca95036da..2b028750e0 100644 --- a/EXILED/Exiled.API/Features/Toys/Primitive.cs +++ b/EXILED/Exiled.API/Features/Toys/Primitive.cs @@ -86,6 +86,13 @@ public PrimitiveFlags Flags set => Base.NetworkPrimitiveFlags = value; } + /// + /// Converts PrimitiveObjectToy to Primitive. + /// + /// The PrimitiveObjectToy. + /// EXILED Primitive. + public static implicit operator Primitive(PrimitiveObjectToy primitiveObjectToy) => (Primitive)Get(primitiveObjectToy); + /// /// Creates a new . /// @@ -212,16 +219,5 @@ public static Primitive Create(PrimitiveSettings primitiveSettings) return primitive; } - - /// - /// Gets the belonging to the . - /// - /// The instance. - /// The corresponding instance. - public static Primitive Get(PrimitiveObjectToy primitiveObjectToy) - { - AdminToy adminToy = List.FirstOrDefault(x => x.AdminToyBase == primitiveObjectToy); - return adminToy is not null ? adminToy as Primitive : new(primitiveObjectToy); - } } } diff --git a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs index 86246ffd28..7237f8cfdf 100644 --- a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs +++ b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs @@ -161,6 +161,13 @@ public bool IsSynced /// public ShootingTargetType Type { get; } + /// + /// Converts ShootingTarget to ShootingTargetToy. + /// + /// The ShootingTarget. + /// EXILED ShootingTargetToy. + public static implicit operator ShootingTargetToy(ShootingTarget shootingTarget) => (ShootingTargetToy)Get(shootingTarget); + /// /// Creates a new . /// @@ -205,20 +212,6 @@ public static ShootingTargetToy Create(ShootingTargetType type, Vector3? positio return shootingTargetToy; } - /// - /// Gets the belonging to the . - /// - /// The instance. - /// The corresponding instance. - public static ShootingTargetToy Get(ShootingTarget shootingTarget) - { - if (shootingTarget == null) - return null; - - AdminToy adminToy = List.FirstOrDefault(x => x.AdminToyBase == shootingTarget); - return adminToy is not null ? adminToy as ShootingTargetToy : new(shootingTarget); - } - /// /// Clears the target and resets its health. /// diff --git a/EXILED/Exiled.API/Features/Toys/Speaker.cs b/EXILED/Exiled.API/Features/Toys/Speaker.cs index a1e320c002..d030de91b6 100644 --- a/EXILED/Exiled.API/Features/Toys/Speaker.cs +++ b/EXILED/Exiled.API/Features/Toys/Speaker.cs @@ -419,6 +419,13 @@ public byte ControllerId } } + /// + /// Converts SpeakerToy to Speaker. + /// + /// The SpeakerToy. + /// EXILED Speaker. + public static implicit operator Speaker(SpeakerToy speakerToy) => (Speaker)Get(speakerToy); + /// /// Creates a new . /// diff --git a/EXILED/Exiled.API/Features/Toys/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 055993e4a7..9132fc1d31 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -54,6 +54,13 @@ public Vector2 DisplaySize set => Base.Network_displaySize = value; } + /// + /// Converts TextToy to Text. + /// + /// The TextToy. + /// EXILED Text. + public static implicit operator Text(TextToy textToy) => (Text)Get(textToy); + /// /// Creates a new at the specified position. /// diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 88c3ab0936..03408d47bd 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -12,6 +12,8 @@ namespace Exiled.API.Features.Toys using Exiled.API.Enums; using Exiled.API.Interfaces; + using PlayerRoles.PlayableScps.Scp079.Cameras; + using UnityEngine; /// @@ -77,6 +79,13 @@ public Vector3 BoundsSize /// public byte WaypointId => Base._waypointId; + /// + /// Converts WaypointToy to Waypoint. + /// + /// The WaypointToy. + /// EXILED Waypoint. + public static implicit operator Waypoint(WaypointToy waypointToy) => (Waypoint)Get(waypointToy); + /// /// Creates a new with a specific position and size (bounds). /// From b770ebdd2a3eb420a4de1dedc717add00052dcce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 16 May 2026 15:08:16 +0300 Subject: [PATCH 07/14] Using directive is unnecessary. --- EXILED/Exiled.API/Features/Toys/Light.cs | 1 - EXILED/Exiled.API/Features/Toys/Primitive.cs | 2 -- EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs | 1 - EXILED/Exiled.API/Features/Toys/Waypoint.cs | 2 -- 4 files changed, 6 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/Light.cs b/EXILED/Exiled.API/Features/Toys/Light.cs index fd945eaea1..a9a225abcf 100644 --- a/EXILED/Exiled.API/Features/Toys/Light.cs +++ b/EXILED/Exiled.API/Features/Toys/Light.cs @@ -8,7 +8,6 @@ namespace Exiled.API.Features.Toys { using System; - using System.Linq; using AdminToys; diff --git a/EXILED/Exiled.API/Features/Toys/Primitive.cs b/EXILED/Exiled.API/Features/Toys/Primitive.cs index 01c908e18e..581d612901 100644 --- a/EXILED/Exiled.API/Features/Toys/Primitive.cs +++ b/EXILED/Exiled.API/Features/Toys/Primitive.cs @@ -7,8 +7,6 @@ namespace Exiled.API.Features.Toys { - using System.Linq; - using AdminToys; using Enums; diff --git a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs index a1a3a022a6..c4a81aa068 100644 --- a/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs +++ b/EXILED/Exiled.API/Features/Toys/ShootingTargetToy.cs @@ -9,7 +9,6 @@ namespace Exiled.API.Features.Toys { using System; using System.Collections.Generic; - using System.Linq; using Enums; diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 8f06a27a0c..9dee4eef0a 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -12,8 +12,6 @@ namespace Exiled.API.Features.Toys using Exiled.API.Enums; using Exiled.API.Interfaces; - using PlayerRoles.PlayableScps.Scp079.Cameras; - using UnityEngine; /// From 42530d2d5d916d93436bb3a05283eff5aaaef1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 16 May 2026 17:20:04 +0300 Subject: [PATCH 08/14] s --- EXILED/Exiled.API/Features/Camera.cs | 4 ++-- EXILED/Exiled.API/Features/Lift.cs | 12 ++++++++---- EXILED/Exiled.API/Features/Lockers/Chamber.cs | 4 ++-- EXILED/Exiled.API/Features/Lockers/Locker.cs | 6 +++--- EXILED/Exiled.API/Features/Pickups/Pickup.cs | 4 ++-- EXILED/Exiled.API/Features/Scp559.cs | 15 ++++++++++++--- 6 files changed, 29 insertions(+), 16 deletions(-) diff --git a/EXILED/Exiled.API/Features/Camera.cs b/EXILED/Exiled.API/Features/Camera.cs index 3e9db25c18..4379ae1e2e 100644 --- a/EXILED/Exiled.API/Features/Camera.cs +++ b/EXILED/Exiled.API/Features/Camera.cs @@ -265,9 +265,9 @@ public bool IsBeingUsed /// /// Converts Scp079Camera to Camera. /// - /// The Scp079Camera. + /// The Scp079Camera. /// EXILED Camera. - public static implicit operator Camera(Scp079Camera camera079) => Get(camera079); + public static implicit operator Camera(Scp079Camera scp079Camera) => Get(scp079Camera); /// /// Gets a of which contains all the instances given a of . diff --git a/EXILED/Exiled.API/Features/Lift.cs b/EXILED/Exiled.API/Features/Lift.cs index a68d185e96..6d63dd690a 100644 --- a/EXILED/Exiled.API/Features/Lift.cs +++ b/EXILED/Exiled.API/Features/Lift.cs @@ -162,9 +162,13 @@ public ElevatorSequence Status }; /// - /// Gets the . + /// Gets or sets the . /// - public ElevatorGroup Group => Base.AssignedGroup; + public ElevatorGroup Group + { + get => Base.NetworkAssignedGroup; + set => Base.NetworkAssignedGroup = value; + } /// /// Gets a value indicating whether the lift is operative. @@ -223,9 +227,9 @@ public float AnimationTime /// /// Converts ElevatorChamber to Lift. /// - /// The ElevatorChamber. + /// The ElevatorChamber. /// EXILED Lift. - public static implicit operator Lift(ElevatorChamber elevator) => Get(elevator); + public static implicit operator Lift(ElevatorChamber elevatorChamber) => Get(elevatorChamber); /// /// Gets a of which contains all the instances from the specified . diff --git a/EXILED/Exiled.API/Features/Lockers/Chamber.cs b/EXILED/Exiled.API/Features/Lockers/Chamber.cs index bfff15ff1a..a2462e4732 100644 --- a/EXILED/Exiled.API/Features/Lockers/Chamber.cs +++ b/EXILED/Exiled.API/Features/Lockers/Chamber.cs @@ -195,9 +195,9 @@ public bool IsOpen /// /// Converts LockerChamber to Chamber. /// - /// The LockerChamber. + /// The LockerChamber. /// EXILED Chamber. - public static implicit operator Chamber(LockerChamber chamber) => Get(chamber); + public static implicit operator Chamber(LockerChamber lockerChamber) => Get(lockerChamber); /// /// Adds an item to the current chamber. diff --git a/EXILED/Exiled.API/Features/Lockers/Locker.cs b/EXILED/Exiled.API/Features/Lockers/Locker.cs index af0e808c5a..9ca197fc6d 100644 --- a/EXILED/Exiled.API/Features/Lockers/Locker.cs +++ b/EXILED/Exiled.API/Features/Lockers/Locker.cs @@ -123,7 +123,7 @@ public Quaternion Rotation /// public ushort OpenedChambers { - get => Base.OpenedChambers; + get => Base.NetworkOpenedChambers; set => Base.NetworkOpenedChambers = value; } @@ -151,9 +151,9 @@ public Vector3 RandomChamberPosition /// /// Converts BaseLocker to Locker. /// - /// The BaseLocker. + /// The BaseLocker. /// EXILED Locker. - public static implicit operator Locker?(BaseLocker locker) => Get(locker); + public static implicit operator Locker?(BaseLocker baseLocker) => Get(baseLocker); /// /// Gets the belonging to the , if any. diff --git a/EXILED/Exiled.API/Features/Pickups/Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Pickup.cs index 62356187e3..29c6519636 100644 --- a/EXILED/Exiled.API/Features/Pickups/Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Pickup.cs @@ -297,9 +297,9 @@ public Quaternion Rotation /// /// Converts ItemPickupBase to Pickup. /// - /// The ItemPickupBase. + /// The ItemPickupBase. /// EXILED Pickup. - public static implicit operator Pickup(ItemPickupBase pickupBase) => Get(pickupBase); + public static implicit operator Pickup(ItemPickupBase itemPickupBase) => Get(itemPickupBase); /// /// Gets an existing or creates a new instance of one. diff --git a/EXILED/Exiled.API/Features/Scp559.cs b/EXILED/Exiled.API/Features/Scp559.cs index ef72177d17..a2b9fa9d75 100644 --- a/EXILED/Exiled.API/Features/Scp559.cs +++ b/EXILED/Exiled.API/Features/Scp559.cs @@ -15,6 +15,8 @@ namespace Exiled.API.Features using MapGeneration; + using PlayerRoles.Ragdolls; + using UnityEngine; /// @@ -90,7 +92,7 @@ public static Vector3 PedestalOffset /// public byte RemainingSlices { - get => Base._remainingSlices; + get => Base.Network_remainingSlices; set => Base.Network_remainingSlices = value; } @@ -99,7 +101,7 @@ public byte RemainingSlices /// public bool IsSpawned { - get => Base._isSpawned; + get => Base.Network_isSpawned; set => Base.Network_isSpawned = value; } @@ -124,10 +126,17 @@ public float RespawnTime /// public Vector3 Position { - get => Base._position; + get => Base.Network_position; set => Base.Network_position = value; } + /// + /// Converts Scp559Cake to Scp559. + /// + /// The Scp559Cake. + /// EXILED Scp559. + public static implicit operator Scp559(Scp559Cake scp559Cake) => Get(scp559Cake); + /// /// Gets the by it's game instance. /// From 039d9c43b4d5bb55621fbe0e4b342df0a3902889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 16 May 2026 17:20:12 +0300 Subject: [PATCH 09/14] s --- EXILED/Exiled.API/Features/Scp559.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/EXILED/Exiled.API/Features/Scp559.cs b/EXILED/Exiled.API/Features/Scp559.cs index a2b9fa9d75..46743629e6 100644 --- a/EXILED/Exiled.API/Features/Scp559.cs +++ b/EXILED/Exiled.API/Features/Scp559.cs @@ -15,8 +15,6 @@ namespace Exiled.API.Features using MapGeneration; - using PlayerRoles.Ragdolls; - using UnityEngine; /// From 28268fa9400f7e8f894f5a3a811b086a6999ab83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 16 May 2026 17:33:31 +0300 Subject: [PATCH 10/14] fix --- .../EventArgs/Player/DamagingShootingTargetEventArgs.cs | 2 +- .../EventArgs/Player/InteractingShootingTargetEventArgs.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs index 891e669d57..f625e99dd9 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/DamagingShootingTargetEventArgs.cs @@ -53,7 +53,7 @@ public DamagingShootingTargetEventArgs(Player player, float damage, float distan Player = player; Amount = damage; Distance = distance; - ShootingTarget = ShootingTargetToy.Get(shootingTarget); + ShootingTarget = shootingTarget; Item = player?.CurrentItem; DamageHandler = damageHandler as AttackerDamageHandler; HitLocation = hitLocation; diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs index 89ea9e7037..4bdbe46108 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs @@ -48,7 +48,7 @@ public class InteractingShootingTargetEventArgs : IPlayerEvent, IDeniableEvent public InteractingShootingTargetEventArgs(Player player, ShootingTarget shootingTarget, ShootingTargetButton targetButton, int maxHp, int autoResetTime, bool isAllowed = true) { Player = player; - ShootingTarget = ShootingTargetToy.Get(shootingTarget); + ShootingTarget = shootingTarget; TargetButton = targetButton; IsAllowed = isAllowed; NewMaxHp = maxHp; From 05914e9e17c7278faf7cd61f72cc65e93f36410e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 4 Jun 2026 21:58:07 +0300 Subject: [PATCH 11/14] try fix conflicts --- .../Features/Toys/InteractableToy.cs | 34 +++++-------------- EXILED/Exiled.API/Features/Toys/Text.cs | 2 +- EXILED/Exiled.API/Features/Toys/Waypoint.cs | 2 +- 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs index 9fb2d46778..c12f282fc7 100644 --- a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs +++ b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs @@ -31,7 +31,7 @@ internal InteractableToy(InvisibleInteractableToy invisibleInteractableToy) /// /// Gets the prefab. /// - public static InvisibleInteractableToy Prefab { get; } = PrefabHelper.GetPrefab(PrefabType.InvisibleInteractableToy); + public static InvisibleInteractableToy Prefab { get; internal set; } /// /// Gets the base . @@ -73,22 +73,7 @@ public bool IsLocked public static implicit operator InteractableToy(InvisibleInteractableToy invisibleInteractableToy) => (InteractableToy)Get(invisibleInteractableToy); /// - /// 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. @@ -97,16 +82,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 . @@ -127,12 +112,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/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 1a602b8146..2009b59d54 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -62,7 +62,7 @@ public Vector2 DisplaySize public static implicit operator Text(TextToy textToy) => (Text)Get(textToy); /// - /// Creates a new at the specified position. + /// Creates a new . /// /// The local position of the . /// The text content to display. diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 9dee4eef0a..4024948b32 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -85,7 +85,7 @@ public Vector3 BoundsSize public static implicit operator Waypoint(WaypointToy waypointToy) => (Waypoint)Get(waypointToy); /// - /// 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). From 535dc9407a82f04467dc54ded16c039c6f0c18d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 4 Jun 2026 22:00:40 +0300 Subject: [PATCH 12/14] try fix conflict --- .../Exiled.API/Features/Toys/InteractableToy.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs index c12f282fc7..476436f7be 100644 --- a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs +++ b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs @@ -31,7 +31,7 @@ internal InteractableToy(InvisibleInteractableToy invisibleInteractableToy) /// /// Gets the prefab. /// - public static InvisibleInteractableToy Prefab { get; internal set; } + public static InvisibleInteractableToy Prefab { get; } = PrefabHelper.GetPrefab(PrefabType.InvisibleInteractableToy); /// /// Gets the base . @@ -72,6 +72,21 @@ public bool IsLocked /// EXILED InteractableToy. public static implicit operator InteractableToy(InvisibleInteractableToy invisibleInteractableToy) => (InteractableToy)Get(invisibleInteractableToy); + /// + /// 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 . /// From 80aaf2d6ade2f2a8a15820dd673f5c56a870a14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 4 Jun 2026 22:03:47 +0300 Subject: [PATCH 13/14] Revert "try fix conflict" This reverts commit 535dc9407a82f04467dc54ded16c039c6f0c18d3. --- .../Exiled.API/Features/Toys/InteractableToy.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs index 476436f7be..c12f282fc7 100644 --- a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs +++ b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs @@ -31,7 +31,7 @@ internal InteractableToy(InvisibleInteractableToy invisibleInteractableToy) /// /// Gets the prefab. /// - public static InvisibleInteractableToy Prefab { get; } = PrefabHelper.GetPrefab(PrefabType.InvisibleInteractableToy); + public static InvisibleInteractableToy Prefab { get; internal set; } /// /// Gets the base . @@ -72,21 +72,6 @@ public bool IsLocked /// EXILED InteractableToy. public static implicit operator InteractableToy(InvisibleInteractableToy invisibleInteractableToy) => (InteractableToy)Get(invisibleInteractableToy); - /// - /// 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 . /// From ac5c6af52eb12a0bdb5d74b8a577aaf60337248c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Thu, 4 Jun 2026 22:03:51 +0300 Subject: [PATCH 14/14] Revert "try fix conflicts" This reverts commit 05914e9e17c7278faf7cd61f72cc65e93f36410e. --- .../Features/Toys/InteractableToy.cs | 34 ++++++++++++++----- EXILED/Exiled.API/Features/Toys/Text.cs | 2 +- EXILED/Exiled.API/Features/Toys/Waypoint.cs | 2 +- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs index c12f282fc7..9fb2d46778 100644 --- a/EXILED/Exiled.API/Features/Toys/InteractableToy.cs +++ b/EXILED/Exiled.API/Features/Toys/InteractableToy.cs @@ -31,7 +31,7 @@ internal InteractableToy(InvisibleInteractableToy invisibleInteractableToy) /// /// Gets the prefab. /// - public static InvisibleInteractableToy Prefab { get; internal set; } + public static InvisibleInteractableToy Prefab { get; } = PrefabHelper.GetPrefab(PrefabType.InvisibleInteractableToy); /// /// Gets the base . @@ -73,7 +73,22 @@ public bool IsLocked public static implicit operator InteractableToy(InvisibleInteractableToy invisibleInteractableToy) => (InteractableToy)Get(invisibleInteractableToy); /// - /// Creates a new . + /// 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. /// /// The local position of the . /// The shape of the collider. @@ -82,16 +97,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 . + /// Creates a new from a Transform. /// - /// The local position of the . + /// The transform to create this on. /// 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(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); + 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); /// /// Creates a new . @@ -112,11 +127,12 @@ 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/Text.cs b/EXILED/Exiled.API/Features/Toys/Text.cs index 2009b59d54..1a602b8146 100644 --- a/EXILED/Exiled.API/Features/Toys/Text.cs +++ b/EXILED/Exiled.API/Features/Toys/Text.cs @@ -62,7 +62,7 @@ public Vector2 DisplaySize public static implicit operator Text(TextToy textToy) => (Text)Get(textToy); /// - /// Creates a new . + /// Creates a new at the specified position. /// /// The local position of the . /// The text content to display. diff --git a/EXILED/Exiled.API/Features/Toys/Waypoint.cs b/EXILED/Exiled.API/Features/Toys/Waypoint.cs index 4024948b32..9dee4eef0a 100644 --- a/EXILED/Exiled.API/Features/Toys/Waypoint.cs +++ b/EXILED/Exiled.API/Features/Toys/Waypoint.cs @@ -85,7 +85,7 @@ public Vector3 BoundsSize public static implicit operator Waypoint(WaypointToy waypointToy) => (Waypoint)Get(waypointToy); /// - /// Creates a new . + /// Creates a new with a specific position and size (bounds). /// /// The position of the . /// The size of the bounds (Applied to NetworkBoundsSize).