From e8cfd54e2769cd39e93f8510bbd3148aa2a1b644 Mon Sep 17 00:00:00 2001 From: MS-crew <100300664+MS-crew@users.noreply.github.com> Date: Fri, 23 Jan 2026 15:12:33 +0300 Subject: [PATCH 1/4] Fix item owner being done in the wrong order --- EXILED/Exiled.API/Features/Player.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index d8399527b..0ffef8a37 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -2942,13 +2942,11 @@ public Item AddItem(ItemBase itemBase, Item item = null, ItemAddReason addReason { item ??= Item.Get(itemBase); item.AddReason = addReason; - + item.ChangeOwner(item.Owner, this); Inventory.UserInventory.Items[item.Serial] = itemBase; typeof(InventoryExtensions).InvokeStaticEvent(nameof(InventoryExtensions.OnItemAdded), new object[] { ReferenceHub, itemBase, null }); - item.ChangeOwner(item.Owner, this); - if (itemBase is IAcquisitionConfirmationTrigger acquisitionConfirmationTrigger) { acquisitionConfirmationTrigger.AcquisitionAlreadyReceived = false; From 9fc98d76cd58070ac7ea06faab7753fbdd40925f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sat, 24 Jan 2026 12:10:07 +0300 Subject: [PATCH 2/4] Revert "Fix item owner being done in the wrong order" This reverts commit e8cfd54e2769cd39e93f8510bbd3148aa2a1b644. --- EXILED/Exiled.API/Features/Player.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 0ffef8a37..d8399527b 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -2942,11 +2942,13 @@ public Item AddItem(ItemBase itemBase, Item item = null, ItemAddReason addReason { item ??= Item.Get(itemBase); item.AddReason = addReason; - item.ChangeOwner(item.Owner, this); + Inventory.UserInventory.Items[item.Serial] = itemBase; typeof(InventoryExtensions).InvokeStaticEvent(nameof(InventoryExtensions.OnItemAdded), new object[] { ReferenceHub, itemBase, null }); + item.ChangeOwner(item.Owner, this); + if (itemBase is IAcquisitionConfirmationTrigger acquisitionConfirmationTrigger) { acquisitionConfirmationTrigger.AcquisitionAlreadyReceived = false; From 219c605684496bd345129c49d7e04c5385e797f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20SAVA=C5=9E?= Date: Sun, 25 Jan 2026 20:11:26 +0300 Subject: [PATCH 3/4] rpc things --- EXILED/Exiled.API/Features/Map.cs | 94 +++++++++++++++++++++++++++- EXILED/Exiled.API/Features/Player.cs | 90 ++++++++++++++++++++++++++ 2 files changed, 182 insertions(+), 2 deletions(-) diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index b9788edb6..b6d09c18c 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -18,10 +18,10 @@ namespace Exiled.API.Features using Decals; using Enums; using Exiled.API.Extensions; - using Exiled.API.Features.Hazards; using Exiled.API.Features.Items.Keycards; using Exiled.API.Features.Pickups; - using Exiled.API.Features.Toys; + + using Interactables.Interobjects; using InventorySystem; using InventorySystem.Items.Pickups; using InventorySystem.Items.ThrowableProjectiles; @@ -195,6 +195,96 @@ public static void ShowHint(string message, float duration = 3f) player.ShowHint(message, duration); } + /// + /// Show the Round Summary screen globally for all players. + /// + /// The statistics at the beginning of the round. + /// The statistics to be displayed as the final result. + /// The team to be declared as the winner . + /// The number of Class-D personnel shown as escaped. + /// The number of Scientists shown as escaped. + /// The total number of kills by SCPs to be displayed. + /// The time in seconds displayed as the next round time. + /// The total elapsed duration of the round in seconds. + /// true if the RoundSummary singleton was found and the RPC was sent; otherwise, false. + public static bool ShowRoundSummary(RoundSummary.SumInfo_ClassList initialStats, RoundSummary.SumInfo_ClassList finalStats, RoundSummary.LeadingTeam leadingTeam, int escapedClassDCount, int escapedScientistCount, int totalScpKills, int nextRoundTime, int totalRoundDuration) + { + if (RoundSummary.singleton == null) + return false; + + RoundSummary.singleton.RpcShowRoundSummary(initialStats, finalStats, leadingTeam, escapedClassDCount, escapedScientistCount, totalScpKills, nextRoundTime, totalRoundDuration); + return true; + } + + /// + /// Hides the Round Summary screen for all players. + /// + /// true if the RoundSummary singleton was found and the RPC was sent; otherwise, false. + public static bool HideRoundSummary() + { + if (!RoundSummary._singletonSet) + return false; + + RoundSummary.singleton.RpcHideRoundSummary(); + return true; + } + + /// + /// Triggers the end-of-round screen dimming effect (fade to black) globally for all players. + /// + /// true if the RoundSummary singleton is active; otherwise, false. + public static bool DimScreens() + { + if (RoundSummary.singleton == null) + return false; + + RoundSummary.singleton.RpcDimScreen(); + return true; + } + + /// + /// Reverses the screen dimming effect, restoring normal visibility globally for all players. + /// + /// true if the RoundSummary singleton is active; otherwise, false. + public static bool UndimScreens() + { + if (RoundSummary.singleton == null) + return false; + + RoundSummary.singleton.RpcUndimScreen(); + return true; + } + + /// + /// Triggers the Alpha Warhead atmospheric effect (orange fog/tint) globally for all players. + /// + /// If set to true, idk what is this maybe achivement. + /// true if the AlphaWarheadController is set; otherwise, false. + public static bool WarheadExplosionEffect(bool achieve = false) + { + if (!AlphaWarheadController.SingletonSet) + return false; + + AlphaWarheadController.Singleton.RpcShake(achieve); + return true; + } + + /// + /// Plays the elevator squish sound effect at the specified position for all players. + /// + /// The world position where the sound will be played. + /// true if an ElevatorSquish instance was found; otherwise, false. + public static bool PlaySquishSound(Vector3 position) + { + ElevatorSquish squishInstance = Object.FindFirstObjectByType(); + + if (squishInstance == null) + return false; + + squishInstance.PlaySquishSound(position); + return true; + } + /// /// Clears all players' broadcasts. /// diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index d8399527b..d91e703c0 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -3181,6 +3181,96 @@ public void ShowHint(Hint hint) ShowHint(hint.Content, hint.Duration); } + /// + /// Displays a simulated Round Summary screen to this specific player. + /// + /// The statistics at the beginning of the round. + /// The statistics to be displayed as the final result. + /// The team to be declared as the winner . + /// The number of Class-D personnel shown as escaped. + /// The number of Scientists shown as escaped. + /// The total number of kills by SCPs to be displayed. + /// The time in seconds displayed as the next round time. + /// The total elapsed duration of the round in seconds. + /// true if the RoundSummary singleton was found and the RPC was sent; otherwise, false. + public bool ShowRoundSummary(RoundSummary.SumInfo_ClassList initialStats, RoundSummary.SumInfo_ClassList finalStats, RoundSummary.LeadingTeam leadingTeam, int escapedClassDCount, int escapedScientistCount, int totalScpKills, int nextRoundTime, int totalRoundDuration) + { + if (!RoundSummary._singletonSet) + return false; + + MirrorExtensions.SendFakeTargetRpc(this, RoundSummary.singleton.netIdentity, typeof(RoundSummary), nameof(RoundSummary.RpcShowRoundSummary), initialStats, finalStats, leadingTeam, escapedClassDCount, escapedScientistCount, totalScpKills, nextRoundTime, totalRoundDuration); + return true; + } + + /// + /// Hides the Round Summary screen for this specific player. + /// + /// true if the RoundSummary singleton was found and the RPC was sent; otherwise, false. + public bool HideRoundSummary() + { + if (!RoundSummary._singletonSet) + return false; + + MirrorExtensions.SendFakeTargetRpc(this, RoundSummary.singleton.netIdentity, typeof(RoundSummary), nameof(RoundSummary.RpcHideRoundSummary)); + return true; + } + + /// + /// Simulates the end-of-round screen dimming effect (fade to black) for this player only. + /// + /// true if the RoundSummary singleton is active and the RPC was sent; otherwise, false. + public bool DimScreen() + { + if (!RoundSummary._singletonSet) + return false; + + MirrorExtensions.SendFakeTargetRpc(this, RoundSummary.singleton.netIdentity, typeof(RoundSummary), nameof(RoundSummary.RpcDimScreen)); + return true; + } + + /// + /// Reverses the screen dimming effect, restoring normal visibility for this player. + /// + /// true if the RoundSummary singleton is active and the RPC was sent; otherwise, false. + public bool UndimScreen() + { + if (!RoundSummary._singletonSet) + return false; + + MirrorExtensions.SendFakeTargetRpc(this, RoundSummary.singleton.netIdentity, typeof(RoundSummary), nameof(RoundSummary.RpcUndimScreen)); + return true; + } + + /// + /// Simulates the Alpha Warhead atmospheric effect (orange fog/tint) for this player. + /// + /// If set to true, idk what is this maybe achivement. + /// true if the AlphaWarheadController is set; otherwise, false. + public bool SendWarheadExplosionEffect(bool achieve = false) + { + if (!AlphaWarheadController.SingletonSet) + return false; + + MirrorExtensions.SendFakeTargetRpc(this, AlphaWarheadController.Singleton.netIdentity, typeof(AlphaWarheadController), nameof(AlphaWarheadController.RpcShake), achieve); + return true; + } + + /// + /// Plays the elevator squish sound effect for this player at the specified position. + /// + /// The world position where the sound will be played. + /// true if an ElevatorSquish instance was found; otherwise, false. + public bool PlaySquishSound(Vector3 position) + { + ElevatorSquish squishInstance = UnityEngine.Object.FindFirstObjectByType(); + + if (squishInstance == null) + return false; + + MirrorExtensions.SendFakeTargetRpc(this, squishInstance.netIdentity, typeof(ElevatorSquish), nameof(ElevatorSquish.PlaySquishSound), position); + return true; + } + /// /// Messages the given to the player. /// From e957881cc2d16d88ba3accc3e0008e576df5acf3 Mon Sep 17 00:00:00 2001 From: MS-crew <100300664+MS-crew@users.noreply.github.com> Date: Wed, 28 Jan 2026 01:32:18 +0300 Subject: [PATCH 4/4] Update Map.cs --- EXILED/Exiled.API/Features/Map.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index b6d09c18c..c4feacd0c 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -209,7 +209,7 @@ public static void ShowHint(string message, float duration = 3f) /// true if the RoundSummary singleton was found and the RPC was sent; otherwise, false. public static bool ShowRoundSummary(RoundSummary.SumInfo_ClassList initialStats, RoundSummary.SumInfo_ClassList finalStats, RoundSummary.LeadingTeam leadingTeam, int escapedClassDCount, int escapedScientistCount, int totalScpKills, int nextRoundTime, int totalRoundDuration) { - if (RoundSummary.singleton == null) + if (!RoundSummary._singletonSet) return false; RoundSummary.singleton.RpcShowRoundSummary(initialStats, finalStats, leadingTeam, escapedClassDCount, escapedScientistCount, totalScpKills, nextRoundTime, totalRoundDuration); @@ -235,7 +235,7 @@ public static bool HideRoundSummary() /// true if the RoundSummary singleton is active; otherwise, false. public static bool DimScreens() { - if (RoundSummary.singleton == null) + if (!RoundSummary._singletonSet) return false; RoundSummary.singleton.RpcDimScreen(); @@ -248,7 +248,7 @@ public static bool DimScreens() /// true if the RoundSummary singleton is active; otherwise, false. public static bool UndimScreens() { - if (RoundSummary.singleton == null) + if (!RoundSummary._singletonSet) return false; RoundSummary.singleton.RpcUndimScreen();