Communications Console & Medical Scanner now close when too far away (#2175)
-Wire & GasAnalyzer dispose instead of closing only
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Threading;
|
||||
using System.Threading;
|
||||
using Content.Client.GameObjects.Components.Command;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -68,6 +68,8 @@ namespace Content.Client.Command
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (disposing)
|
||||
_timerCancelTokenSource.Cancel();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,9 @@ namespace Content.Client.GameObjects.Components.Arcade
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if(!disposing) { return; }
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,9 @@ namespace Content.Client.GameObjects.Components.Arcade
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if(!disposing) { return; }
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,10 @@ namespace Content.Client.GameObjects.Components.Atmos
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu.Close();
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Content.Client.GameObjects.Components.Body.Scanner
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
_display.Dispose();
|
||||
_display?.Dispose();
|
||||
_template = null;
|
||||
_parts.Clear();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Content.Client.GameObjects.Components.Chemistry.ReagentDispenser
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
_window.Dispose();
|
||||
_window?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Content.Client.Command;
|
||||
using Content.Shared.GameObjects.Components.Command;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
@@ -69,6 +69,7 @@ namespace Content.Client.GameObjects.Components.Command
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing) return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ namespace Content.Client.GameObjects.Components.HUD.Inventory
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing) return;
|
||||
_strippingMenu.Dispose();
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_strippingMenu.Close();
|
||||
_strippingMenu.Dispose();
|
||||
}
|
||||
|
||||
private void UpdateMenu()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using JetBrains.Annotations;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using static Content.Shared.GameObjects.Components.Medical.SharedMedicalScannerComponent;
|
||||
@@ -31,5 +31,13 @@ namespace Content.Client.GameObjects.Components.MedicalScanner
|
||||
base.UpdateState(state);
|
||||
_window.Populate((MedicalScannerBoundUserInterfaceState) state);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
_window.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Content.Client.GameObjects.EntitySystems;
|
||||
using Content.Client.Utility;
|
||||
using Content.Shared.GameObjects.Components.PDA;
|
||||
@@ -133,6 +133,9 @@ namespace Content.Client.GameObjects.Components.PDA
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@ namespace Content.Client.GameObjects.Components.VendingMachines
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if(!disposing) { return; }
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
|
||||
|
||||
@@ -35,8 +35,10 @@ namespace Content.Client.GameObjects.Components.Wires
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu.Close();
|
||||
_menu.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user