Remove some criminal if checks (#3261)
This commit is contained in:
@@ -433,7 +433,7 @@ namespace Content.Client.ParticleAccelerator
|
|||||||
_shouldContinueAnimating = false;
|
_shouldContinueAnimating = false;
|
||||||
_alarmControl.StopAnimation("warningAnim");
|
_alarmControl.StopAnimation("warningAnim");
|
||||||
_alarmControl.Visible = false;
|
_alarmControl.Visible = false;
|
||||||
if (maxState == ParticleAcceleratorPowerState.Level3 && enabled == true && assembled == true)
|
if (maxState == ParticleAcceleratorPowerState.Level3 && enabled && assembled)
|
||||||
{
|
{
|
||||||
_shouldContinueAnimating = true;
|
_shouldContinueAnimating = true;
|
||||||
_alarmControl.PlayAnimation(_alarmControlAnimation, "warningAnim");
|
_alarmControl.PlayAnimation(_alarmControlAnimation, "warningAnim");
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Network;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using Robust.Shared.Map;
|
|
||||||
using Robust.Shared.Network;
|
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.GUI
|
namespace Content.Server.GameObjects.Components.GUI
|
||||||
{
|
{
|
||||||
@@ -244,7 +244,7 @@ namespace Content.Server.GameObjects.Components.GUI
|
|||||||
|
|
||||||
return hand != null &&
|
return hand != null &&
|
||||||
hand.Enabled &&
|
hand.Enabled &&
|
||||||
hand.Container.CanInsert(item.Owner) == true;
|
hand.Container.CanInsert(item.Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -23,12 +23,9 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
public bool SignalLinkerKeybind(NetUserId id, bool? enable)
|
public bool SignalLinkerKeybind(NetUserId id, bool? enable)
|
||||||
{
|
{
|
||||||
if (enable == null)
|
enable ??= !_transmitters.ContainsKey(id);
|
||||||
{
|
|
||||||
enable = !_transmitters.ContainsKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enable == true)
|
if (enable.Value)
|
||||||
{
|
{
|
||||||
if (_transmitters.ContainsKey(id))
|
if (_transmitters.ContainsKey(id))
|
||||||
{
|
{
|
||||||
@@ -45,7 +42,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
_transmitters.Add(id, null);
|
_transmitters.Add(id, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (enable == false)
|
else
|
||||||
{
|
{
|
||||||
if (!_transmitters.ContainsKey(id))
|
if (!_transmitters.ContainsKey(id))
|
||||||
{
|
{
|
||||||
@@ -58,7 +55,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
CommandBinds.Unregister<SignalLinkerSystem>();
|
CommandBinds.Unregister<SignalLinkerSystem>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return enable == true;
|
|
||||||
|
return enable.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HandleUse(ICommonSession session, EntityCoordinates coords, EntityUid uid)
|
private bool HandleUse(ICommonSession session, EntityCoordinates coords, EntityUid uid)
|
||||||
|
|||||||
Reference in New Issue
Block a user