diff --git a/Content.Server/Holosign/HolosignSystem.cs b/Content.Server/Holosign/HolosignSystem.cs index e138a04b60..9823d48ca0 100644 --- a/Content.Server/Holosign/HolosignSystem.cs +++ b/Content.Server/Holosign/HolosignSystem.cs @@ -1,3 +1,4 @@ +using Content.Server._White.Holo; using Content.Shared.Examine; using Content.Server.Popups; using Content.Shared.Coordinates.Helpers; @@ -83,7 +84,11 @@ public sealed class HolosignSystem : EntitySystem } args.Handled = true; - component.Signs.Add(holoUid); // WD EDIT + // WD EDIT + EnsureComp(holoUid, out var holo); + component.Signs.Add(holoUid); + holo.Sign = uid; + // WD EDIT } private void OnComponentRemove(EntityUid uid, HolosignProjectorComponent comp, ComponentRemove args) // wd edit diff --git a/Content.Server/_White/Holo/HoloComponent.cs b/Content.Server/_White/Holo/HoloComponent.cs new file mode 100644 index 0000000000..f9de1d23c7 --- /dev/null +++ b/Content.Server/_White/Holo/HoloComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Server._White.Holo; + +[RegisterComponent] +public sealed partial class HoloComponent : Component +{ + [ViewVariables(VVAccess.ReadWrite), DataField] + public EntityUid? Sign; +} diff --git a/Content.Server/_White/Holo/HoloSystem.cs b/Content.Server/_White/Holo/HoloSystem.cs new file mode 100644 index 0000000000..1c65eee12e --- /dev/null +++ b/Content.Server/_White/Holo/HoloSystem.cs @@ -0,0 +1,20 @@ +using Content.Server.Holosign; +using Content.Shared.Destructible; + +namespace Content.Server._White.Holo; + +public sealed class HoloSystem : EntitySystem +{ + public override void Initialize() + { + SubscribeLocalEvent(OnDestruction); + } + + private void OnDestruction(EntityUid uid, HoloComponent component, DestructionEventArgs args) + { + if (!TryComp(component.Sign, out var holo)) + return; + + holo.Signs.Remove(uid); + } +} diff --git a/Resources/Prototypes/Entities/Structures/Holographic/projections.yml b/Resources/Prototypes/Entities/Structures/Holographic/projections.yml index a837790dd7..7a48baf7e5 100644 --- a/Resources/Prototypes/Entities/Structures/Holographic/projections.yml +++ b/Resources/Prototypes/Entities/Structures/Holographic/projections.yml @@ -23,6 +23,12 @@ behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] + - type: Clickable # WD EDIT + - type: MeleeSound # WD EDIT + soundGroups: + Brute: + path: + "/Audio/Weapons/egloves.ogg" - type: entity id: HoloFan @@ -71,7 +77,6 @@ radius: 3 color: red - type: Climbable - - type: Clickable - type: entity id: HolosignForcefield