diff --git a/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs b/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs index d236ae0202..6e0b65d9a2 100644 --- a/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs +++ b/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Namotion.Reflection; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; @@ -101,7 +100,7 @@ namespace Content.Client.GameObjects.Components.Wires { _column.Children.Clear(); _inputs.Clear(); - + foreach (var field in state.Config) { var margin = new MarginContainer @@ -142,8 +141,8 @@ namespace Content.Client.GameObjects.Components.Wires private void OnConfirm(ButtonEventArgs args) { - var config = GenerateDictionary(_inputs, "Text"); - + var config = GenerateDictionary(_inputs, "Text"); + Owner.SendConfiguration(config); Close(); } @@ -153,13 +152,13 @@ namespace Content.Client.GameObjects.Components.Wires return Owner.Validation == null || Owner.Validation.IsMatch(value); } - private Dictionary GenerateDictionary(List<(string name, TInput input)> inputs, string propertyName) where TInput : Control + private Dictionary GenerateDictionary(IEnumerable<(string name, LineEdit input)> inputs, string propertyName) { - var dictionary = new Dictionary(); + var dictionary = new Dictionary(); + foreach (var input in inputs) { - var value = input.input.TryGetPropertyValue(propertyName); - dictionary.Add(input.name, value); + dictionary.Add(input.name, input.input.Text); } return dictionary;