Adds Research, unlockable technologies, Protolathes... (#264)

* Work on Research so far
More work on UI...
Fix ResearchClient and Protolathe UI stuff.
Fix infinite select -> request state -> select -> ... loop
Add UI to ResearchClient, etc.
Technology Database states, and a bit of work on the research console ui
A bit of work on Research Console UI
Protolathe sync
Stuff that actually does things
Protolathe databases yay
Alright got my motivation back
Yeah, no. It's almost 3 AM already
Fix serialization bug again
More work on stuff
Stuff
Adds files for most new components/systems.

* Protolathes actually work now

* Research. Just Research.

* Adds icons from Eris.

* Address reviews

* Change LatheMenu resize behaviour

* Update Content.Client/GameObjects/Components/Research/ResearchConsoleBoundUserInterface.cs

Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Update Content.Client/Research/ResearchConsoleMenu.cs

Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Move IoC Resolve out of for loop

* Address review

* Localize stuff
This commit is contained in:
Víctor Aguilera Puerto
2019-09-03 22:51:19 +02:00
committed by Pieter-Jan Briers
parent b62fb4a318
commit ba8b495ec0
61 changed files with 1884 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using Content.Client.GameObjects.Components.Research;
using Content.Shared.GameObjects.Components.Research;
using Content.Shared.Materials;
using Content.Shared.Research;
using Robust.Client.UserInterface;
@@ -25,6 +26,8 @@ namespace Content.Client.Research
private LineEdit AmountLineEdit;
private LineEdit SearchBar;
public Button QueueButton;
public Button ServerConnectButton;
public Button ServerSyncButton;
protected override Vector2? CustomSize => (300, 450);
public LatheBoundUserInterface Owner { get; set; }
@@ -32,10 +35,12 @@ namespace Content.Client.Research
private List<LatheRecipePrototype> _recipes = new List<LatheRecipePrototype>();
private List<LatheRecipePrototype> _shownRecipes = new List<LatheRecipePrototype>();
public LatheMenu()
public LatheMenu(LatheBoundUserInterface owner = null)
{
IoCManager.InjectDependencies(this);
Owner = owner;
Title = "Lathe Menu";
var margin = new MarginContainer()
@@ -69,7 +74,23 @@ namespace Content.Client.Research
{
Text = "Queue",
TextAlign = Button.AlignMode.Center,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsHorizontal = SizeFlags.Fill,
SizeFlagsStretchRatio = 1,
};
ServerConnectButton = new Button()
{
Text = "Server list",
TextAlign = Button.AlignMode.Center,
SizeFlagsHorizontal = SizeFlags.Fill,
SizeFlagsStretchRatio = 1,
};
ServerSyncButton = new Button()
{
Text = "Sync",
TextAlign = Button.AlignMode.Center,
SizeFlagsHorizontal = SizeFlags.Fill,
SizeFlagsStretchRatio = 1,
};
@@ -101,7 +122,7 @@ namespace Content.Client.Research
{
Text = "Filter",
TextAlign = Button.AlignMode.Center,
SizeFlagsHorizontal = SizeFlags.FillExpand,
SizeFlagsHorizontal = SizeFlags.Fill,
SizeFlagsStretchRatio = 1,
Disabled = true,
};
@@ -130,6 +151,12 @@ namespace Content.Client.Research
};
hBoxButtons.AddChild(spacer);
if (Owner?.Database is ProtolatheDatabaseComponent database)
{
hBoxButtons.AddChild(ServerConnectButton);
hBoxButtons.AddChild(ServerSyncButton);
database.OnDatabaseUpdated += Populate;
}
hBoxButtons.AddChild(QueueButton);
hBoxFilter.AddChild(SearchBar);