]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Nukeops hud (#21260)
authorIntegerTempest <30300017+IntegerTempest@users.noreply.github.com>
Mon, 6 Nov 2023 02:36:08 +0000 (05:36 +0300)
committerGitHub <noreply@github.com>
Mon, 6 Nov 2023 02:36:08 +0000 (19:36 -0700)
* a

* a

* a2

* syndi visor

* left icon

* a3

16 files changed:
Content.Client/Overlays/ShowSyndicateIconsSystem.cs [new file with mode: 0644]
Content.Server/GameTicking/Rules/Components/NukeOperativeComponent.cs [deleted file]
Content.Shared/Inventory/InventorySystem.Relay.cs
Content.Shared/NukeOps/NukeOperativeComponent.cs [new file with mode: 0644]
Content.Shared/Overlays/ShowSyndicateIconsComponent.cs [new file with mode: 0644]
Resources/Prototypes/Catalog/Fills/Lockers/misc.yml
Resources/Prototypes/Entities/Clothing/Eyes/hud.yml
Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml
Resources/Prototypes/StatusIcon/antag.yml
Resources/Textures/Clothing/Eyes/Hud/synd.rsi/equipped-EYES.png [new file with mode: 0644]
Resources/Textures/Clothing/Eyes/Hud/synd.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-left.png [new file with mode: 0644]
Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-right.png [new file with mode: 0644]
Resources/Textures/Clothing/Eyes/Hud/synd.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Interface/Misc/job_icons.rsi/Syndicate.png [new file with mode: 0644]
Resources/Textures/Interface/Misc/job_icons.rsi/meta.json

diff --git a/Content.Client/Overlays/ShowSyndicateIconsSystem.cs b/Content.Client/Overlays/ShowSyndicateIconsSystem.cs
new file mode 100644 (file)
index 0000000..25d4d9b
--- /dev/null
@@ -0,0 +1,43 @@
+using Content.Shared.Overlays;
+using Content.Shared.StatusIcon.Components;
+using Content.Shared.NukeOps;
+using Content.Shared.StatusIcon;
+using Robust.Shared.Prototypes;
+
+namespace Content.Client.Overlays;
+public sealed class ShowSyndicateIconsSystem : EquipmentHudSystem<ShowSyndicateIconsComponent>
+{
+    [Dependency] private readonly IPrototypeManager _prototype = default!;
+
+    public override void Initialize()
+    {
+        base.Initialize();
+
+        SubscribeLocalEvent<NukeOperativeComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent);
+    }
+
+    private void OnGetStatusIconsEvent(EntityUid uid, NukeOperativeComponent nukeOperativeComponent, ref GetStatusIconsEvent args)
+    {
+        if (!IsActive || args.InContainer)
+        {
+            return;
+        }
+
+        var healthIcons = SyndicateIcon(uid, nukeOperativeComponent);
+
+        args.StatusIcons.AddRange(healthIcons);
+    }
+
+    private IReadOnlyList<StatusIconPrototype> SyndicateIcon(EntityUid uid, NukeOperativeComponent nukeOperativeComponent)
+    {
+        var result = new List<StatusIconPrototype>();
+
+        if (_prototype.TryIndex<StatusIconPrototype>(nukeOperativeComponent.SyndStatusIcon, out var syndicateicon))
+        {
+            result.Add(syndicateicon);
+        }
+
+        return result;
+    }
+}
+
diff --git a/Content.Server/GameTicking/Rules/Components/NukeOperativeComponent.cs b/Content.Server/GameTicking/Rules/Components/NukeOperativeComponent.cs
deleted file mode 100644 (file)
index 59fc952..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-using Robust.Shared.Audio;
-
-namespace Content.Server.GameTicking.Rules.Components;
-
-/// <summary>
-/// This is used for tagging a mob as a nuke operative.
-/// </summary>
-[RegisterComponent]
-public sealed partial class NukeOperativeComponent : Component
-{
-    /// <summary>
-    ///     Path to antagonist alert sound.
-    /// </summary>
-    [DataField("greetSoundNotification")]
-    public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/nukeops_start.ogg");
-}
index fbe744911fd40ae8ac42adf730a5cb2d7fe1a5be..20a98dc12444411b195dff36eaa4793043845907 100644 (file)
@@ -42,6 +42,7 @@ public partial class InventorySystem
         SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<ShowSecurityIconsComponent>>(RelayInventoryEvent);
         SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<ShowHungerIconsComponent>>(RelayInventoryEvent);
         SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<ShowThirstIconsComponent>>(RelayInventoryEvent);
+        SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<ShowSyndicateIconsComponent>>(RelayInventoryEvent);
 
         SubscribeLocalEvent<InventoryComponent, GetVerbsEvent<EquipmentVerb>>(OnGetEquipmentVerbs);
     }
diff --git a/Content.Shared/NukeOps/NukeOperativeComponent.cs b/Content.Shared/NukeOps/NukeOperativeComponent.cs
new file mode 100644 (file)
index 0000000..cdbefec
--- /dev/null
@@ -0,0 +1,27 @@
+using Robust.Shared.Audio;
+using Content.Shared.StatusIcon;
+using Robust.Shared.Prototypes;
+using Robust.Shared.GameStates;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
+
+namespace Content.Shared.NukeOps;
+
+/// <summary>
+/// This is used for tagging a mob as a nuke operative.
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+public sealed partial class NukeOperativeComponent : Component
+{
+    /// <summary>
+    ///     Path to antagonist alert sound.
+    /// </summary>
+    [DataField("greetSoundNotification")]
+    public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/nukeops_start.ogg");
+
+    /// <summary>
+    ///     
+    /// </summary>
+    [DataField("syndStatusIcon", customTypeSerializer: typeof(PrototypeIdSerializer<StatusIconPrototype>))]
+    public string SyndStatusIcon = "SyndicateFaction";
+}
diff --git a/Content.Shared/Overlays/ShowSyndicateIconsComponent.cs b/Content.Shared/Overlays/ShowSyndicateIconsComponent.cs
new file mode 100644 (file)
index 0000000..74a67db
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Overlays;
+
+/// <summary>
+/// 
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+public sealed partial class ShowSyndicateIconsComponent : Component {}
index 9ed3acc04933ab550e456e2c76c3e2ce72a88266..64b173355d9bb3c8370be857966c798d295b3101 100644 (file)
@@ -11,6 +11,7 @@
       - id: ClothingUniformJumpsuitOperative
       - id: ClothingUniformJumpskirtOperative
       - id: ClothingHeadsetAltSyndicate
+      - id: ClothingEyesHudSyndicate
 
 - type: entity
   id: ClosetEmergencyFilledRandom
index 80317fbaec031a60483a3e491ad5d4855f4a5c69..dfd1e50a4b76f4f5df5886ed641888bbc1a6df49 100644 (file)
   - type: Clothing
     sprite: Clothing/Eyes/Hud/medsecengi.rsi
   - type: ShowSecurityIcons
+  - type: ShowSyndicateIcons
 
 - type: entity
   parent: ClothingEyesBase
   - type: ShowSecurityIcons
   - type: ShowHungerIcons
   - type: ShowThirstIcons
+  - type: ShowSyndicateIcons
+
+- type: entity
+  parent: ClothingEyesBase
+  id: ClothingEyesHudSyndicate
+  name: syndicate visor
+  description: The syndicate's professional head-up display, designed for better detection of humanoids and their subsequent elimination.
+  components:
+  - type: Sprite
+    sprite: Clothing/Eyes/Hud/synd.rsi
+  - type: Clothing
+    sprite: Clothing/Eyes/Hud/synd.rsi
+  - type: ShowSyndicateIcons
+  - type: ShowSecurityIcons
+  
index ad99ef7def4f74cad6683297315566832dcada99..8d53e0540f1db41d9cce1151fb6b0adf4e082196 100644 (file)
     jumpsuit: ClothingUniformJumpsuitOperative
     back: ClothingBackpackDuffelSyndicateOperative
     mask: ClothingMaskGasSyndicate
-    # eyes: Night Vision Goggles whenever they're made
-    eyes: ClothingEyesGlassesMeson
+    eyes: ClothingEyesHudSyndicate
     ears: ClothingHeadsetAltSyndicate
     gloves: ClothingHandsGlovesCombat
     outerClothing: ClothingOuterHardsuitSyndie
     jumpsuit: ClothingUniformJumpsuitOperative
     back: ClothingBackpackDuffelSyndicateOperative
     mask: ClothingMaskGasSyndicate
-    # eyes: Night Vision Goggles whenever they're made
-    eyes: ClothingEyesGlassesMeson
+    eyes: ClothingEyesHudSyndicate
     ears: ClothingHeadsetAltSyndicate
     gloves: ClothingHandsGlovesCombat
     outerClothing: ClothingOuterHardsuitSyndieCommander
     jumpsuit: ClothingUniformJumpsuitOperative
     back: ClothingBackpackDuffelSyndicateOperativeMedic
     mask: ClothingMaskGasSyndicate
-    eyes: ClothingEyesHudMedical
+    eyes: ClothingEyesHudSyndicate
     ears: ClothingHeadsetAltSyndicate
     gloves: ClothingHandsGlovesCombat
     outerClothing: ClothingOuterHardsuitMedic
index 564d29a35b21ae851ed7531bc890ceb20e2f7985..6016d0c94eb94e47ebaf68e936db61e5d08cc1df 100644 (file)
   icon:
     sprite: Interface/Misc/job_icons.rsi
     state: HeadRevolutionary
+
+- type: statusIcon
+  id: SyndicateFaction
+  priority: 0
+  locationPreference: Left 
+  icon:
+    sprite: Interface/Misc/job_icons.rsi
+    state: Syndicate
diff --git a/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/equipped-EYES.png b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/equipped-EYES.png
new file mode 100644 (file)
index 0000000..9128dd0
Binary files /dev/null and b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/equipped-EYES.png differ
diff --git a/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/icon.png b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/icon.png
new file mode 100644 (file)
index 0000000..02dc6cc
Binary files /dev/null and b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/icon.png differ
diff --git a/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-left.png b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-left.png
new file mode 100644 (file)
index 0000000..ebd7858
Binary files /dev/null and b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-left.png differ
diff --git a/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-right.png b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-right.png
new file mode 100644 (file)
index 0000000..53535a1
Binary files /dev/null and b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-right.png differ
diff --git a/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/meta.json b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/meta.json
new file mode 100644 (file)
index 0000000..e3bc1a2
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Made by IntegerTempest",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "icon"
+    },
+    {
+      "name": "equipped-EYES",
+      "directions": 4
+    },
+    {
+      "name": "inhand-left",
+      "directions": 4
+    },
+    {
+      "name": "inhand-right",
+      "directions": 4
+    }
+  ]
+}
diff --git a/Resources/Textures/Interface/Misc/job_icons.rsi/Syndicate.png b/Resources/Textures/Interface/Misc/job_icons.rsi/Syndicate.png
new file mode 100644 (file)
index 0000000..a671977
Binary files /dev/null and b/Resources/Textures/Interface/Misc/job_icons.rsi/Syndicate.png differ
index 2d71fcd05606e1906d5a5df2c301f02036a8e9b3..8a710b63ecdac5a6eb0e8b864517918660a960bb 100644 (file)
         },
         {
             "name": "HeadRevolutionary"
+        },
+        {
+            "name": "Syndicate"
         }
     ]
 }