Selecting an item with no ItemContainer component doesn't prevent equipping/unequipping items by double clicking, added missing "gamescreen" console command
This commit is contained in:
@@ -206,7 +206,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
commands.Add(new Command("gamescreen|game", "gamescreen/game: Go to the \"in-game\" view.", (string[] args) =>
|
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) =>
|
commands.Add(new Command("editsubscreen|editsub|subeditor", "editsub/subeditor: Switch to the submarine editor.", (string[] args) =>
|
||||||
|
|||||||
@@ -251,13 +251,10 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (character.SelectedConstruction != null)
|
var selectedContainer = character.SelectedConstruction?.GetComponent<ItemContainer>();
|
||||||
|
if (selectedContainer != null && selectedContainer.Inventory != null)
|
||||||
{
|
{
|
||||||
var selectedContainer = character.SelectedConstruction.GetComponent<ItemContainer>();
|
selectedContainer.Inventory.TryPutItem(doubleClickedItem, doubleClickedItem.AllowedSlots, true);
|
||||||
if (selectedContainer != null && selectedContainer.Inventory != null)
|
|
||||||
{
|
|
||||||
selectedContainer.Inventory.TryPutItem(doubleClickedItem, doubleClickedItem.AllowedSlots, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (character.SelectedCharacter != null && character.SelectedCharacter.Inventory != null)
|
else if (character.SelectedCharacter != null && character.SelectedCharacter.Inventory != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user