diff --git a/Content.Shared/_ES/Masks/Traitor/Components/ESTraitorBuggableComponent.cs b/Content.Shared/_ES/Masks/Traitor/Components/ESTraitorBuggableComponent.cs index 29aef69d1eb..283fe325096 100644 --- a/Content.Shared/_ES/Masks/Traitor/Components/ESTraitorBuggableComponent.cs +++ b/Content.Shared/_ES/Masks/Traitor/Components/ESTraitorBuggableComponent.cs @@ -48,3 +48,9 @@ public sealed partial class ESTraitorBugTimerEvent : ESEntityTimerEvent; [ByRefEvent] public readonly record struct ESTraitorBugHackedEvent(ProtoId Group); + +[Serializable, NetSerializable] +public enum ESTraitorBugVisuals : byte +{ + Bugged, +} diff --git a/Content.Shared/_ES/Masks/Traitor/ESTraitorBugSystem.cs b/Content.Shared/_ES/Masks/Traitor/ESTraitorBugSystem.cs index 2838f3a6ba2..8cf8dd9b5ad 100644 --- a/Content.Shared/_ES/Masks/Traitor/ESTraitorBugSystem.cs +++ b/Content.Shared/_ES/Masks/Traitor/ESTraitorBugSystem.cs @@ -24,6 +24,7 @@ public sealed partial class ESTraitorBugSystem : ESBaseObjectiveSystem ent, re _popup.PopupEntity(Loc.GetString("es-bug-popup-planted"), ent, args.User); _sparks.DoSparks(ent, user: args.User, cooldown: false); + _appearance.SetData(ent, ESTraitorBugVisuals.Bugged, true); ent.Comp.Timer = _entityTimer.SpawnTimer(ent, ent.Comp.BugDuration, new ESTraitorBugTimerEvent()); Dirty(ent); @@ -204,6 +206,8 @@ public void CancelBug(Entity ent) if (!Resolve(ent, ref ent.Comp, false)) return; + _appearance.SetData(ent, ESTraitorBugVisuals.Bugged, false); + PredictedDel(ent.Comp.Timer); ent.Comp.Timer = null; Dirty(ent); diff --git a/Resources/Prototypes/Entities/Structures/Power/apc.yml b/Resources/Prototypes/Entities/Structures/Power/apc.yml index f101f9bbef8..a4907ddefc6 100644 --- a/Resources/Prototypes/Entities/Structures/Power/apc.yml +++ b/Resources/Prototypes/Entities/Structures/Power/apc.yml @@ -62,6 +62,9 @@ shader: unshaded map: ["enum.ApcVisualLayers.Environment"] visible: false + - state: bug + map: [ "buglayer" ] + visible: false - type: Appearance - type: GenericVisualizer visuals: @@ -72,6 +75,10 @@ enum.ApcVisualLayers.ChargeState: True: { visible: false } False: { visible: true } + enum.ESTraitorBugVisuals.Bugged: + buglayer: + True: { visible: true } + False: { visible: false } - type: ESGenericPointLightVisualizer visuals: enum.ESBreakableVisuals.Broken: diff --git a/Resources/Textures/Structures/Power/apc.rsi/bug.png b/Resources/Textures/Structures/Power/apc.rsi/bug.png new file mode 100644 index 00000000000..a8fe0696c7b Binary files /dev/null and b/Resources/Textures/Structures/Power/apc.rsi/bug.png differ diff --git a/Resources/Textures/Structures/Power/apc.rsi/meta.json b/Resources/Textures/Structures/Power/apc.rsi/meta.json index 66df303df94..8434448e8dd 100644 --- a/Resources/Textures/Structures/Power/apc.rsi/meta.json +++ b/Resources/Textures/Structures/Power/apc.rsi/meta.json @@ -188,6 +188,32 @@ ] ] }, + { + "name": "bug", + "directions": 4, + "delays": [ + [ + 1.5, + 0.2, + 0.1 + ], + [ + 1.5, + 0.2, + 0.1 + ], + [ + 1.5, + 0.2, + 0.1 + ], + [ + 1.5, + 0.2, + 0.1 + ] + ] + }, { "name": "sparks-unlit", "delays": [