Fix setting up mailing units. (#16890)

* Fix disposal unit config

* Remove redundant ui update
This commit is contained in:
Julian Giebel
2023-05-28 22:06:54 +02:00
committed by GitHub
parent 6f8a7fbe71
commit 02f015d97c
3 changed files with 6 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ namespace Content.Client.Configurable.UI
var input = new LineEdit
{
Name = field.Key + "-input",
Text = field.Value,
Text = field.Value ?? "",
IsValid = Validate,
HorizontalExpand = true,
SizeFlagsStretchRatio = .8f

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Configurable
public sealed class ConfigurationComponent : Component
{
[DataField("config")]
public readonly Dictionary<string, string> Config = new();
public readonly Dictionary<string, string?> Config = new();
[DataField("qualityNeeded", customTypeSerializer: typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
public string QualityNeeded = "Pulsing";
@@ -21,9 +21,9 @@ namespace Content.Shared.Configurable
[Serializable, NetSerializable]
public sealed class ConfigurationBoundUserInterfaceState : BoundUserInterfaceState
{
public Dictionary<string, string> Config { get; }
public Dictionary<string, string?> Config { get; }
public ConfigurationBoundUserInterfaceState(Dictionary<string, string> config)
public ConfigurationBoundUserInterfaceState(Dictionary<string, string?> config)
{
Config = config;
}

View File

@@ -135,6 +135,8 @@
transmitFrequencyId: MailingUnit
- type: WiredNetworkConnection
- type: Configuration
config:
tag:
- type: Appearance
- type: UserInterface
interfaces: