Seperated Reagent item list and Solid item list to allow for vaporizing particular reagents at will. (also fixes a really nasty null reference exception because they shared the same list before D: )

This commit is contained in:
FLOZ
2020-05-04 15:16:16 -05:00
parent 108bd36b8c
commit 69b34e74ce
4 changed files with 70 additions and 15 deletions

View File

@@ -27,6 +27,8 @@ namespace Content.Client.GameObjects.Components.Kitchen
private VBoxContainer CookTimeButtonVbox { get; }
public ItemList IngredientsList { get;}
public ItemList IngredientsListReagents { get; }
private Label _cookTimeInfoLabel { get; }
public MicrowaveMenu(MicrowaveBoundUserInterface owner = null)
@@ -39,16 +41,31 @@ namespace Content.Client.GameObjects.Components.Kitchen
SizeFlagsVertical = SizeFlags.Fill
};
IngredientsListReagents = new ItemList
{
SizeFlagsVertical = SizeFlags.FillExpand,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SelectMode = ItemList.ItemListSelectMode.Button,
SizeFlagsStretchRatio = 2,
CustomMinimumSize = (100,128)
};
IngredientsList = new ItemList
{
SizeFlagsVertical = SizeFlags.FillExpand,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SelectMode = ItemList.ItemListSelectMode.Button,
SizeFlagsStretchRatio = 8,
CustomMinimumSize = (200,256)
SizeFlagsStretchRatio = 2,
CustomMinimumSize = (100,128)
};
hSplit.AddChild(IngredientsListReagents);
//Padding between the lists.
hSplit.AddChild(new Control
{
CustomMinimumSize = (0,5),
});
hSplit.AddChild(IngredientsList);
var vSplit = new VBoxContainer