From 615f15e8a99902e26dbeb39b16e985ed87cab9f4 Mon Sep 17 00:00:00 2001 From: IntegerTempest <30300017+IntegerTempest@users.noreply.github.com> Date: Mon, 6 Nov 2023 05:36:08 +0300 Subject: [PATCH] Nukeops hud (#21260) * a * a * a2 * syndi visor * left icon * a3 --- .../Overlays/ShowSyndicateIconsSystem.cs | 43 ++++++++++++++++++ .../Components/NukeOperativeComponent.cs | 16 ------- .../Inventory/InventorySystem.Relay.cs | 1 + .../NukeOps/NukeOperativeComponent.cs | 27 +++++++++++ .../Overlays/ShowSyndicateIconsComponent.cs | 9 ++++ .../Prototypes/Catalog/Fills/Lockers/misc.yml | 1 + .../Prototypes/Entities/Clothing/Eyes/hud.yml | 16 +++++++ .../Roles/Jobs/Fun/misc_startinggear.yml | 8 ++-- Resources/Prototypes/StatusIcon/antag.yml | 8 ++++ .../Eyes/Hud/synd.rsi/equipped-EYES.png | Bin 0 -> 2363 bytes .../Clothing/Eyes/Hud/synd.rsi/icon.png | Bin 0 -> 2376 bytes .../Eyes/Hud/synd.rsi/inhand-left.png | Bin 0 -> 343 bytes .../Eyes/Hud/synd.rsi/inhand-right.png | Bin 0 -> 352 bytes .../Clothing/Eyes/Hud/synd.rsi/meta.json | 26 +++++++++++ .../Misc/job_icons.rsi/Syndicate.png | Bin 0 -> 1788 bytes .../Interface/Misc/job_icons.rsi/meta.json | 3 ++ 16 files changed, 137 insertions(+), 21 deletions(-) create mode 100644 Content.Client/Overlays/ShowSyndicateIconsSystem.cs delete mode 100644 Content.Server/GameTicking/Rules/Components/NukeOperativeComponent.cs create mode 100644 Content.Shared/NukeOps/NukeOperativeComponent.cs create mode 100644 Content.Shared/Overlays/ShowSyndicateIconsComponent.cs create mode 100644 Resources/Textures/Clothing/Eyes/Hud/synd.rsi/equipped-EYES.png create mode 100644 Resources/Textures/Clothing/Eyes/Hud/synd.rsi/icon.png create mode 100644 Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-left.png create mode 100644 Resources/Textures/Clothing/Eyes/Hud/synd.rsi/inhand-right.png create mode 100644 Resources/Textures/Clothing/Eyes/Hud/synd.rsi/meta.json create mode 100644 Resources/Textures/Interface/Misc/job_icons.rsi/Syndicate.png diff --git a/Content.Client/Overlays/ShowSyndicateIconsSystem.cs b/Content.Client/Overlays/ShowSyndicateIconsSystem.cs new file mode 100644 index 0000000000..25d4d9b895 --- /dev/null +++ b/Content.Client/Overlays/ShowSyndicateIconsSystem.cs @@ -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 +{ + [Dependency] private readonly IPrototypeManager _prototype = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(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 SyndicateIcon(EntityUid uid, NukeOperativeComponent nukeOperativeComponent) + { + var result = new List(); + + if (_prototype.TryIndex(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 index 59fc9526dc..0000000000 --- a/Content.Server/GameTicking/Rules/Components/NukeOperativeComponent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Robust.Shared.Audio; - -namespace Content.Server.GameTicking.Rules.Components; - -/// -/// This is used for tagging a mob as a nuke operative. -/// -[RegisterComponent] -public sealed partial class NukeOperativeComponent : Component -{ - /// - /// Path to antagonist alert sound. - /// - [DataField("greetSoundNotification")] - public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/nukeops_start.ogg"); -} diff --git a/Content.Shared/Inventory/InventorySystem.Relay.cs b/Content.Shared/Inventory/InventorySystem.Relay.cs index fbe744911f..20a98dc124 100644 --- a/Content.Shared/Inventory/InventorySystem.Relay.cs +++ b/Content.Shared/Inventory/InventorySystem.Relay.cs @@ -42,6 +42,7 @@ public partial class InventorySystem SubscribeLocalEvent>(RelayInventoryEvent); SubscribeLocalEvent>(RelayInventoryEvent); SubscribeLocalEvent>(RelayInventoryEvent); + SubscribeLocalEvent>(RelayInventoryEvent); SubscribeLocalEvent>(OnGetEquipmentVerbs); } diff --git a/Content.Shared/NukeOps/NukeOperativeComponent.cs b/Content.Shared/NukeOps/NukeOperativeComponent.cs new file mode 100644 index 0000000000..cdbefece9d --- /dev/null +++ b/Content.Shared/NukeOps/NukeOperativeComponent.cs @@ -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; + +/// +/// This is used for tagging a mob as a nuke operative. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class NukeOperativeComponent : Component +{ + /// + /// Path to antagonist alert sound. + /// + [DataField("greetSoundNotification")] + public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/nukeops_start.ogg"); + + /// + /// + /// + [DataField("syndStatusIcon", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string SyndStatusIcon = "SyndicateFaction"; +} diff --git a/Content.Shared/Overlays/ShowSyndicateIconsComponent.cs b/Content.Shared/Overlays/ShowSyndicateIconsComponent.cs new file mode 100644 index 0000000000..74a67db694 --- /dev/null +++ b/Content.Shared/Overlays/ShowSyndicateIconsComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Overlays; + +/// +/// +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class ShowSyndicateIconsComponent : Component {} diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml b/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml index 9ed3acc049..64b173355d 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml @@ -11,6 +11,7 @@ - id: ClothingUniformJumpsuitOperative - id: ClothingUniformJumpskirtOperative - id: ClothingHeadsetAltSyndicate + - id: ClothingEyesHudSyndicate - type: entity id: ClosetEmergencyFilledRandom diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml b/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml index 80317fbaec..dfd1e50a4b 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/hud.yml @@ -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 + diff --git a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml index ad99ef7def..8d53e0540f 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml @@ -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 diff --git a/Resources/Prototypes/StatusIcon/antag.yml b/Resources/Prototypes/StatusIcon/antag.yml index 564d29a35b..6016d0c94e 100644 --- a/Resources/Prototypes/StatusIcon/antag.yml +++ b/Resources/Prototypes/StatusIcon/antag.yml @@ -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 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 index 0000000000000000000000000000000000000000..9128dd01f6e26606c77942afadd09ede179d651c GIT binary patch literal 2363 zcmbVN3se+k6rKeU1SL|BSY%9V$45CkkA2SQ%B~9{>f(xPAw6_<=3f}u-C1V_Sde7X zlCr{H9??YTAxBg^Jv22fG)w8Bz4VybQF_-bM9G&=5KU7-JIiC;Tas*T=iQ@O<=^m zUp^2sI(v`(rva6*?=~%QJTx%wu@jwjC+J%aYF_jlsara8X-EFX($AjSeDZ^%sovU{ zaBl6o(v2lZ%IF2}3_sDH5I*AEdCst}tBOi*oEkfF-p({|+ark|w|v^vpX~QxL;d`e z8^TSwUl>zn*qT;$rMVKN%gEIC&sV0*4Ih=Q>5tR92TF4_(?{G_94>e|`Outp_Xium zoKMeXP-wBOM@6pPgVE zXHA`B4?VA|nmv5{GiN;egEu9&vlVWBr#ZMyle8`C^@4|g9yTGl3faAH#vdKCGFo9J z2Lz|gkr5mLuVdBv>O%e?L?g(Aj8Kr}ih+W9K%o$@ zYTI|VXi*gwoIhxmIOhhMy7)am;3X6vPzJSbxtlDl~ z2Cmi1xEAe(D8*K7kD>Wa7wQltfEslsj3W(3)J*G0lionn<4}qqEjVGpNj*lI7z4pj z6dL(xVKj;NGI^PkBeCF_Ra>MeK?cXm%F1+QdYvd0;;>n0oS<-u!XN^Z%L57gesO0>IKbozWP5YVrG{A!H@16s8d=NS|ogT^S3@b2n>0Yg-=VN;cvfNm6U=jrSCsrL%vtcW zg#Zr*3bkmol8i(2i4qJ9)#-u;;(SE8D$?(gYyUgRLhUr|Yp(DQ)sU?!T=VSkkAD20>LbPBir7FQfD;tgs`=pR ztm&}^|GR75_pX>ry>K|})Ma$a!jtHn1_4Md!6|HO9sdh_X&%VQw7WxV&aNh>#ViDac#%(*IM~QG4scT3v378j&EIB`8mCx-TJ*|?c^7~{bR+X z2lI9eY&%%cT;G{As5mmzp!Lceb+O(h2y(6z17@NTi*74VY}7hjvJLDK3{ zk)>PLg<>wxfr!wZ9SKrM!S-F{; IC(T>@C!GyI?*IS* literal 0 HcmV?d00001 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 index 0000000000000000000000000000000000000000..02dc6cc0679b6680544cc9d96648cf8e8aa568e9 GIT binary patch literal 2376 zcmcgtYitx%7@ehpJ9F=n;-Z4Sy@vL}FsyH(H?IW!Mi(5&z1FiK>CmRvJ#X~s{#N^q)$PLbCvEEkXIC$pw&;54mg=uoZohQ= zTv~8dw`kF-4b@w!u+-5DJ|EoPksLkiYq`Q5zSGENel#U%#Qc_YIQ-3Cr&>>M>cKp7 zV(prjQ~O0X6`gmcPMx^vy*uf}z4Uw7lw-d)q|S?;Gu)ZWgtk8VJll&Ib1S2>no_+m1n49iYm8I?P7#k23febTWvbMcZX1I~OoE$wJW(tIW}?8?|XW7pPCe{a0&?tk_= zRMr$EPaNk?E6c52XK#FI@C)z!5;&p_N$CLfe!0b^?XmUVlfQe`!rumsPie&34p062 z`t+QmsFFQ3Z<&E%y$4vA4g283!5G$~Ipi-jOMNejk{YoCtG@Qyh=$M@Ha@3T15zb4 z@c=9jDQ=>prIo-#vYVLc^wB=e11mz_dL2%$FY-(Em69M6ITP^lwIU*jKoj7#k+5Qj zwQeHDE26PAO%ZquVph6|&W4uyigAysL)>ZSNr~Z{xJ$4zyn_>jaX3pe*%X~kF%FX9 zMUEC(7LR`j6it_dVoBcQcr0}1CMrx*6Dg{urp8|5u&a7Gh0G#QG)u88i4dewr%#y52a*;B} z$)phE02u^~iwW|4fCo(1`aD&tvf65`?{v7VN{Hj%sEiXhK(;K9GQ&zF;5ip5NSs8< zK^SlXMv|nUvx{x29zrh}2;a|Ysge;R$J300Dun5 z$}x9{-jIR%Ru_Lcro#pCQ8<_W7$3?1IXHm5zS z?Je<$cQ|`)AN;m31?p zeWj``x#Q#C4v$ar)_d0!1$Rwdd(qpv{|7!JVo4v-}yK0^b+`NVz%N`LlIU7v>k` KZJ#v%wSNHK$1LLj literal 0 HcmV?d00001 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 index 0000000000000000000000000000000000000000..ebd7858dabbd7755e1bb3924007751d8d24192f4 GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEV3hN8aSW-L^Y)fv-eCigV;|Qm zGhgLmI(@3FdCtKUuFaXdsKCfI1b@;Em^xMYo6BO7NImyJPc#)7ChnSuZ9bN1ix zzoz_C1!y7=JXog_BwkZl-RJ+>z4iLmRjZ_8?@I`8c3!;h<=1_`J?ieYPdWO@rvLh5 zx7f?t)+SnAN_{KCMUH-dy8d|YCmZ?D_v)U~0oT7OwJf;&O~*6po&Kh4|6X0Vc5BC- zcoom(ZzC01u9p7YAK&ohD$DaZDl4$@VEAnpW_<+<1DV}qBtPkPS$&ui6}6FSlpjBJfo lv-wPvn|YTXaSW-L^Y)fvQL}@@(T~$- zb@>RM*sh@j-$)8^wM9lzA_G6`H-i&=}M|-5vzt;((0hgOuT1(%rE~xzv)cP zed(}|DnJu~;6eP%UfC0$ZI;ZA%DwyY?a$gTf8wjFYI*p(tA9>!UA0PT?)SVGiGd>X zPtPy&PK^{>Xa4Fdkn-ET^wzH6T`NOHj=tElmr)}5P)+R=mAB#SmG4v6_Wt7DaP8cl z@3+?TOb~?Sf}XY@8)> vV2YaC8Z}mh*n3AhuC9Nt=gY%z;O#Gl+43Fj^Zy8M18MVg^>bP0l+XkKM#`Jl literal 0 HcmV?d00001 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 index 0000000000..e3bc1a2940 --- /dev/null +++ b/Resources/Textures/Clothing/Eyes/Hud/synd.rsi/meta.json @@ -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 index 0000000000000000000000000000000000000000..a6719770853dcdba5f0452d3354ca3ecb8cd67f1 GIT binary patch literal 1788 zcmbVMeM}Q)7(c`zc38TPs2d~Pj%8q^y}N$U-bp95Wl(0JKvi&Va=m*CH`=@N?x2N8 zU=wvtA`wFde-H=TOc;|aOQti-p%Fhe7q>YK(Jf={pZ&2!GSMuXaqhiR8eQC%m-~3{ z?)Uzl=lMM!d;Arp%XClb5CmD~E%Q{vXS#N!r@{MV=BIlRB*o6V-F_D*1_4@Kx(>}J zDax@5LGt(a^-PqX@;|If!2HOst zq5egk75(qFj5Z^Nyls;!XJ*qor+wqstY>a@m~#%5r{>m=XMv|**L^i{aU_jg{KZ=b zUom8Mj#ON+87hlM-n^CN*U5K~^3QK>H*D>^tT=PJsS_FU)|B;?$uA#%?8fD z2kI_fd)D<#&ysF?9$g&E6&ZP){{A5d-k!7AH9G4X2&1SN2ce1aIiGJ zxWKuh&J`Onb!=F<=D^Rvv(gj#S*9((joYQ8DGwhlIkI`@_2otS4&=m{%G+}_YtKO? zmr7-I3WDe-wJW7>wLS|$7SHj4TD8`5}C6jgwl3DSWR4xF?Y$wJyn&}K85 zI522U=0bF}=lO&!_~yhKRaK&KJQ|Ifq85`VH{h^XD4a0kX0s6@j7qDZGBKl|{Y7|vbX%zp4I{Et^15jF@FKOexzCelMa$mF(Xq5n74HU6i zWqYMBKbmiWv+umbb6(MAAC{~_J;FhvZhQAP%?2B_A5sVE%!k89mH z9}520DC7U`>f8l590%GmIfvj&a*_c7jxQO`shJJ8c{t<3UXLrVvM&BlXJ< zzkeBZeKNG>h0+W|rr~(%2R*~4EB$!2LC^J0<~ER*!@tgUhti0_-?mKOSadbJU~0+r{sY=@ N^_En4#@5xp_9sV6Un2kj literal 0 HcmV?d00001 diff --git a/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json b/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json index 2d71fcd056..8a710b63ec 100644 --- a/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json +++ b/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json @@ -169,6 +169,9 @@ }, { "name": "HeadRevolutionary" + }, + { + "name": "Syndicate" } ] } -- 2.51.2