diff --git a/Barotrauma/BarotraumaClient/Source/DebugConsole.cs b/Barotrauma/BarotraumaClient/Source/DebugConsole.cs index 636a5c6f1..407a3f2f5 100644 --- a/Barotrauma/BarotraumaClient/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaClient/Source/DebugConsole.cs @@ -206,7 +206,7 @@ namespace Barotrauma commands.Add(new Command("gamescreen|game", "gamescreen/game: Go to the \"in-game\" view.", (string[] args) => { - + GameMain.GameScreen.Select(); })); commands.Add(new Command("editsubscreen|editsub|subeditor", "editsub/subeditor: Switch to the submarine editor.", (string[] args) => diff --git a/Barotrauma/BarotraumaShared/Source/Items/CharacterInventory.cs b/Barotrauma/BarotraumaShared/Source/Items/CharacterInventory.cs index 672b78140..561c6799a 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/CharacterInventory.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/CharacterInventory.cs @@ -251,13 +251,10 @@ namespace Barotrauma } else { - if (character.SelectedConstruction != null) + var selectedContainer = character.SelectedConstruction?.GetComponent(); + if (selectedContainer != null && selectedContainer.Inventory != null) { - var selectedContainer = character.SelectedConstruction.GetComponent(); - if (selectedContainer != null && selectedContainer.Inventory != null) - { - selectedContainer.Inventory.TryPutItem(doubleClickedItem, doubleClickedItem.AllowedSlots, true); - } + selectedContainer.Inventory.TryPutItem(doubleClickedItem, doubleClickedItem.AllowedSlots, true); } else if (character.SelectedCharacter != null && character.SelectedCharacter.Inventory != null) {