Research Servers now have proper IDs, and can be selected in lathe menu (#9949)
* rd servers now increment properly when added * remove debug message
This commit is contained in:
@@ -2,8 +2,6 @@ using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Client.Research.UI
|
||||
{
|
||||
@@ -11,8 +9,8 @@ namespace Content.Client.Research.UI
|
||||
public sealed partial class ResearchClientServerSelectionMenu : DefaultWindow
|
||||
{
|
||||
private int _serverCount;
|
||||
private string[] _serverNames = System.Array.Empty<string>();
|
||||
private int[] _serverIds = System.Array.Empty<int>();
|
||||
private string[] _serverNames = Array.Empty<string>();
|
||||
private int[] _serverIds = Array.Empty<int>();
|
||||
private int _selectedServerId = -1;
|
||||
|
||||
private ResearchClientBoundUserInterface Owner { get; }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.Research.Components
|
||||
[ViewVariables(VVAccess.ReadWrite)] [DataField("points")]
|
||||
public int Points = 0;
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)] public int Id { get; private set; }
|
||||
[ViewVariables(VVAccess.ReadOnly)] public int Id { get; set; }
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public List<ResearchPointSourceComponent> PointSources { get; } = new();
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace Content.Server.Research
|
||||
{
|
||||
if (_servers.Contains(server)) return false;
|
||||
_servers.Add(server);
|
||||
_servers[^1].Id = _servers.Count - 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user