diff --git a/Content.Server/_DV/Silicons/StationAiShopSystem.cs b/Content.Server/_DV/Silicons/StationAiShopSystem.cs index edb3ffac73..a54ce2c970 100644 --- a/Content.Server/_DV/Silicons/StationAiShopSystem.cs +++ b/Content.Server/_DV/Silicons/StationAiShopSystem.cs @@ -1,10 +1,12 @@ using Content.Server.Fluids.EntitySystems; using Content.Server.Light.EntitySystems; +using Content.Server.Light.Components; using Content.Server.Spreader; using Content.Server.Store.Systems; using Content.Shared._DV.Silicons; using Content.Shared.Chemistry.Components; using Content.Shared.Coordinates.Helpers; +using Content.Shared.Light.Components; using Content.Shared.Maps; using Robust.Shared.GameObjects; using Robust.Shared.Map; @@ -37,10 +39,20 @@ public sealed class StationAiShopSystem : SharedStationAiShopSystem private void OnLightSynthesizer(Entity ent, ref StationAiLightSynthesizerActionEvent args) { + // Grab what light exists on the fixture, delete it. Then add light with respect to fixture. + var fixture = CompOrNull(args.Target); + if (fixture is null) return; + + var lightProto = fixture.BulbType switch + { + LightBulbType.Bulb => args.BulbPrototype, + LightBulbType.Tube => args.TubePrototype, + _ => args.BulbPrototype + }; + if (_poweredLight.EjectBulb(args.Target) is { } oldBulb) Del(oldBulb); - - var bulb = Spawn(args.BulbPrototype); + var bulb = Spawn(lightProto); if (!_poweredLight.InsertBulb(args.Target, bulb)) { Del(bulb); diff --git a/Content.Shared/_DV/Silicons/StationAiShopComponent.cs b/Content.Shared/_DV/Silicons/StationAiShopComponent.cs index 3e162e34bc..5f5748e0cd 100644 --- a/Content.Shared/_DV/Silicons/StationAiShopComponent.cs +++ b/Content.Shared/_DV/Silicons/StationAiShopComponent.cs @@ -31,6 +31,8 @@ public sealed partial class StationAiLightSynthesizerActionEvent : EntityTargetA { [DataField(required: true)] public EntProtoId BulbPrototype; + [DataField(required: true)] + public EntProtoId TubePrototype; } /// diff --git a/Resources/Prototypes/_DV/Actions/station_ai.yml b/Resources/Prototypes/_DV/Actions/station_ai.yml index fd9258aba3..5c8cb95590 100644 --- a/Resources/Prototypes/_DV/Actions/station_ai.yml +++ b/Resources/Prototypes/_DV/Actions/station_ai.yml @@ -48,7 +48,8 @@ checkCanInteract: false useDelay: 300 event: !type:StationAiLightSynthesizerActionEvent - bulbPrototype: LightTube + bulbPrototype: LightBulb + tubePrototype: LightTube - type: entity id: ActionStationAiBikeHorn