From 94491e96263ea41707a5934bb83e1d534cbd6277 Mon Sep 17 00:00:00 2001 From: zumorica Date: Mon, 11 May 2020 15:40:33 +0200 Subject: [PATCH] Cleanup code a little. --- .../Components/Interactable/ToolComponent.cs | 12 ++---------- .../Components/Interactable/WelderComponent.cs | 7 +------ .../GameObjects/Components/Doors/AirlockComponent.cs | 5 +---- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/Content.Client/GameObjects/Components/Interactable/ToolComponent.cs b/Content.Client/GameObjects/Components/Interactable/ToolComponent.cs index 2badd0b06a..b213644d49 100644 --- a/Content.Client/GameObjects/Components/Interactable/ToolComponent.cs +++ b/Content.Client/GameObjects/Components/Interactable/ToolComponent.cs @@ -16,19 +16,11 @@ namespace Content.Client.GameObjects.Components.Interactable public class ToolComponent : SharedToolComponent, IItemStatus { private Tool _behavior; - - [ViewVariables(VVAccess.ReadWrite)] private bool _uiUpdateNeeded; - private bool _statusShowBehavior; + [ViewVariables(VVAccess.ReadWrite)] private bool _uiUpdateNeeded; [ViewVariables] public bool StatusShowBehavior => _statusShowBehavior; - - [ViewVariables] - public override Tool Behavior - { - get => _behavior; - set {} - } + [ViewVariables] public override Tool Behavior => _behavior; public override void ExposeData(ObjectSerializer serializer) { diff --git a/Content.Client/GameObjects/Components/Interactable/WelderComponent.cs b/Content.Client/GameObjects/Components/Interactable/WelderComponent.cs index 839757fb91..98dceeb6b8 100644 --- a/Content.Client/GameObjects/Components/Interactable/WelderComponent.cs +++ b/Content.Client/GameObjects/Components/Interactable/WelderComponent.cs @@ -25,12 +25,7 @@ namespace Content.Client.GameObjects.Components.Interactable [ViewVariables] public float FuelCapacity { get; private set; } [ViewVariables] public float Fuel { get; private set; } [ViewVariables] public bool Activated { get; private set; } - [ViewVariables] - public override Tool Behavior - { - get => _behavior; - set {} - } + [ViewVariables] public override Tool Behavior => _behavior; public override void ExposeData(ObjectSerializer serializer) { diff --git a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs index 91c4678005..3e650fd339 100644 --- a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs @@ -214,13 +214,10 @@ namespace Content.Server.GameObjects.Components.Doors } if (State == DoorState.Closed) - { Open(); - } else if(State == DoorState.Open) - { Close(); - } + return true; }