From: Julian Giebel Date: Sun, 7 May 2023 10:58:12 +0000 (+0200) Subject: Fix network configurator verbs and misc fixes (#16210) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5c86778fffc35df3546e2c80b8003576ef2e3f20;p=space-station-14.git Fix network configurator verbs and misc fixes (#16210) --- diff --git a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs index c6ef1bcbc7..dd29e8e2e3 100644 --- a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs @@ -293,22 +293,22 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem Impact = LogImpact.Low }; - if (configurator.LinkModeActive) + if (configurator.LinkModeActive && (HasComp(args.Target) || HasComp(args.Target))) { var linkStarted = configurator.ActiveDeviceLink.HasValue; verb.Text = Loc.GetString(linkStarted ? "network-configurator-link" : "network-configurator-start-link"); verb.Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")); + args.Verbs.Add(verb); } - else if (!HasComp(args.Target)) + else if (HasComp(args.Target)) { var isDeviceList = HasComp(args.Target); verb.Text = Loc.GetString(isDeviceList ? "network-configurator-configure" : "network-configurator-save-device"); verb.Icon = isDeviceList ? new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")) : new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/in.svg.192dpi.png")); + args.Verbs.Add(verb); } - - args.Verbs.Add(verb); } /// @@ -356,9 +356,9 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem AlternativeVerb verb = new() { - Text = Loc.GetString("network-configurator-save-device"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/in.svg.192dpi.png")), - Act = () => TryAddNetworkDevice(args.Target, args.Using.Value, args.User), + Text = Loc.GetString("network-configurator-switch-mode"), + Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")), + Act = () => SwitchMode(args.User, args.Target, configurator), Impact = LogImpact.Low }; args.Verbs.Add(verb); diff --git a/Content.Shared/DeviceNetwork/Components/NetworkConfiguratorComponent.cs b/Content.Shared/DeviceNetwork/Components/NetworkConfiguratorComponent.cs index 761cde436c..128c328f28 100644 --- a/Content.Shared/DeviceNetwork/Components/NetworkConfiguratorComponent.cs +++ b/Content.Shared/DeviceNetwork/Components/NetworkConfiguratorComponent.cs @@ -17,7 +17,7 @@ public sealed class NetworkConfiguratorComponent : Component /// [DataField("linkModeActive")] [ViewVariables(VVAccess.ReadWrite)] - public bool LinkModeActive = false; + public bool LinkModeActive = true; /// /// The entity containing a this configurator is currently interacting with diff --git a/Resources/Prototypes/DeviceLinking/sink_ports.yml b/Resources/Prototypes/DeviceLinking/sink_ports.yml index 37817eddaa..fbe809c6c3 100644 --- a/Resources/Prototypes/DeviceLinking/sink_ports.yml +++ b/Resources/Prototypes/DeviceLinking/sink_ports.yml @@ -1,7 +1,7 @@ - type: sinkPort id: AutoClose - name: signal-port-name-autoclose - description: signal-port-description-autoclose + name: signal-port-name-hold-open + description: signal-port-description-hold-open - type: sinkPort id: Toggle