Nukeops hud (#21260)

* a

* a

* a2

* syndi visor

* left icon

* a3
This commit is contained in:
IntegerTempest
2023-11-06 05:36:08 +03:00
committed by GitHub
parent 284547e59f
commit 615f15e8a9
16 changed files with 137 additions and 21 deletions

View File

@@ -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;
}
}

View File

@@ -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");
}

View 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);
}

View File

@@ -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";
}

View File

@@ -0,0 +1,9 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Overlays;
/// <summary>
///
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class ShowSyndicateIconsComponent : Component {}

View File

@@ -11,6 +11,7 @@
- id: ClothingUniformJumpsuitOperative
- id: ClothingUniformJumpskirtOperative
- id: ClothingHeadsetAltSyndicate
- id: ClothingEyesHudSyndicate
- type: entity
id: ClosetEmergencyFilledRandom

View File

@@ -129,6 +129,7 @@
- type: Clothing
sprite: Clothing/Eyes/Hud/medsecengi.rsi
- type: ShowSecurityIcons
- type: ShowSyndicateIcons
- type: entity
parent: ClothingEyesBase
@@ -143,3 +144,18 @@
- 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

View File

@@ -103,8 +103,7 @@
jumpsuit: ClothingUniformJumpsuitOperative
back: ClothingBackpackDuffelSyndicateOperative
mask: ClothingMaskGasSyndicate
# eyes: Night Vision Goggles whenever they're made
eyes: ClothingEyesGlassesMeson
eyes: ClothingEyesHudSyndicate
ears: ClothingHeadsetAltSyndicate
gloves: ClothingHandsGlovesCombat
outerClothing: ClothingOuterHardsuitSyndie
@@ -124,8 +123,7 @@
jumpsuit: ClothingUniformJumpsuitOperative
back: ClothingBackpackDuffelSyndicateOperative
mask: ClothingMaskGasSyndicate
# eyes: Night Vision Goggles whenever they're made
eyes: ClothingEyesGlassesMeson
eyes: ClothingEyesHudSyndicate
ears: ClothingHeadsetAltSyndicate
gloves: ClothingHandsGlovesCombat
outerClothing: ClothingOuterHardsuitSyndieCommander
@@ -147,7 +145,7 @@
jumpsuit: ClothingUniformJumpsuitOperative
back: ClothingBackpackDuffelSyndicateOperativeMedic
mask: ClothingMaskGasSyndicate
eyes: ClothingEyesHudMedical
eyes: ClothingEyesHudSyndicate
ears: ClothingHeadsetAltSyndicate
gloves: ClothingHandsGlovesCombat
outerClothing: ClothingOuterHardsuitMedic

View File

@@ -18,3 +18,11 @@
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View File

@@ -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
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -169,6 +169,9 @@
},
{
"name": "HeadRevolutionary"
},
{
"name": "Syndicate"
}
]
}