From f3f91e3f6b67530953a397bea0409389f9a4d673 Mon Sep 17 00:00:00 2001 From: Sir Warock <67167466+SirWarock@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:20:43 +0100 Subject: [PATCH] Miscellaneous Injector fixes + BorgHypo fill sprites. (#41932) * Various fixes * Fix Gorlex Hypo not showing visuals * Give Borg Hypo Fill sprites * Bluespace Syringe speed increase * fix * one whitespace change * Undo debug change * Replaced String Message with better --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> --- .../Chemistry/EntitySystems/InjectorSystem.cs | 11 +- .../components/injector-component.ftl | 10 +- .../Prototypes/Chemistry/injector_modes.yml | 7 +- .../Objects/Specific/Medical/hypospray.yml | 15 ++- .../Medical/hypospray.rsi/borghypo_fill1.png | Bin 0 -> 111 bytes .../Medical/hypospray.rsi/borghypo_fill2.png | Bin 0 -> 113 bytes .../Medical/hypospray.rsi/borghypo_s.png | Bin 517 -> 532 bytes .../Specific/Medical/hypospray.rsi/meta.json | 108 +++++++++--------- 8 files changed, 86 insertions(+), 65 deletions(-) create mode 100644 Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill1.png create mode 100644 Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill2.png diff --git a/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs b/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs index 438da65293..4fa44f2fa4 100644 --- a/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs @@ -281,6 +281,13 @@ public sealed partial class InjectorSystem : EntitySystem } else { + // Check if we have anything to inject. + if (injectorSolution.Volume == 0) + { + _popup.PopupClient(Loc.GetString("injector-component-empty-message", ("injector", injector)), target, user); + return false; + } + // additional delay is based on actual volume left to inject in syringe when smaller than transfer amount // If CurrentTransferAmount is null, it'll want to inject its entire contents, e.g., epipens. amount = injector.Comp.CurrentTransferAmount ?? injectorSolution.Volume; @@ -348,7 +355,7 @@ public sealed partial class InjectorSystem : EntitySystem if (!_solutionContainer.TryGetDrawableSolution(target, out _, out var drawableSol)) { - _popup.PopupClient(Loc.GetString("injector-component-cannot-transfer-message", ("target", Identity.Entity(target, EntityManager))), injector, user); + _popup.PopupClient(Loc.GetString("injector-component-cannot-draw-message", ("target", Identity.Entity(target, EntityManager))), injector, user); return false; } @@ -510,7 +517,7 @@ public sealed partial class InjectorSystem : EntitySystem else _solutionContainer.Refill(target, targetSolution, removedSolution); - LocId msgSuccess = target == user ? "injector-component-transfer-success-message-self" : "injector-component-transfer-success-message"; + LocId msgSuccess = target == user ? "injector-component-inject-success-message-self" : "injector-component-inject-success-message"; if (selfEv.OverrideMessage != null) msgSuccess = selfEv.OverrideMessage; diff --git a/Resources/Locale/en-US/chemistry/components/injector-component.ftl b/Resources/Locale/en-US/chemistry/components/injector-component.ftl index 5dc12a1f7d..2958dda5ed 100644 --- a/Resources/Locale/en-US/chemistry/components/injector-component.ftl +++ b/Resources/Locale/en-US/chemistry/components/injector-component.ftl @@ -12,12 +12,12 @@ injector-component-inject-mode-name = Inject injector-component-draw-mode-name = Draw injector-component-dynamic-mode-name = Dynamic injector-component-mode-changed-text = Now {$mode} -injector-component-inject-success-message = You inject {$amount}u into {THE($target)}! -injector-component-inject-success-message-self = You inject {$amount}u into yourself! injector-component-transfer-success-message = You transfer {$amount}u into {THE($target)}. injector-component-transfer-success-message-self = You transfer {$amount}u into yourself. +injector-component-inject-success-message = You inject {$amount}u into {THE($target)}! +injector-component-inject-success-message-self = You inject {$amount}u into yourself! injector-component-draw-success-message = You draw {$amount}u from {THE($target)}. -injector-component-draw-success-message-self = You draw {$amount}u from youself. +injector-component-draw-success-message-self = You draw {$amount}u from yourself. ## Fail Messages @@ -33,10 +33,10 @@ injector-component-blocked-user = Protective gear blocked your injection! injector-component-blocked-other = {CAPITALIZE(THE(POSS-ADJ($target)))} armor blocked {THE($user)}'s injection! injector-component-cannot-transfer-message = You aren't able to transfer into {THE($target)}! injector-component-cannot-transfer-message-self = You aren't able to transfer into yourself! -injector-component-cannot-draw-message = You aren't able to draw from {THE($target)}! -injector-component-cannot-draw-message-self = You aren't able to draw from yourself! injector-component-cannot-inject-message = You aren't able to inject into {THE($target)}! injector-component-cannot-inject-message-self = You aren't able to inject into yourself! +injector-component-cannot-draw-message = You aren't able to draw from {THE($target)}! +injector-component-cannot-draw-message-self = You aren't able to draw from yourself! injector-component-ignore-mobs = This injector can only interact with containers! ## mob-inject doafter messages diff --git a/Resources/Prototypes/Chemistry/injector_modes.yml b/Resources/Prototypes/Chemistry/injector_modes.yml index 2a791eb0ac..fd96819df3 100644 --- a/Resources/Prototypes/Chemistry/injector_modes.yml +++ b/Resources/Prototypes/Chemistry/injector_modes.yml @@ -43,6 +43,7 @@ abstract: true id: BaseBluespaceSyringeMode mobTime: 2.5 + delayPerVolume: 0.05 transferAmounts: - 5 - 10 @@ -95,7 +96,7 @@ ## Hyposprays - type: injectorMode abstract: true - id: HyposprayBaseMode + id: BaseHyposprayMode injectSound: /Audio/Items/hypospray.ogg injectPopupTarget: injector-component-feel-prick-message injectOnUse: true @@ -105,11 +106,11 @@ - 5 - type: injectorMode - parent: [ HyposprayBaseMode, BaseInjectMode ] + parent: [ BaseHyposprayMode, BaseInjectMode ] id: HyposprayInjectMode - type: injectorMode - parent: [ HyposprayBaseMode, BaseDynamicMode ] + parent: [ BaseHyposprayMode, BaseDynamicMode ] id: HyposprayDynamicMode - type: injectorMode diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index 9b76330d98..3d0180f901 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -10,6 +10,7 @@ allowedModes: - HyposprayDynamicMode - HyposprayInjectMode + - type: Appearance - type: entity parent: [BaseHypospray, BaseGrandTheftContraband] @@ -45,7 +46,6 @@ - HighRiskItem - type: StealTarget stealGroup: Hypospray - - type: Appearance - type: SolutionContainerVisuals maxFillLevels: 6 fillBaseName: hypo_fill @@ -84,7 +84,12 @@ components: - type: Sprite sprite: Objects/Specific/Medical/hypospray.rsi - state: borghypo + layers: + - state: borghypo + map: [ "enum.SolutionContainerLayers.Base" ] + - state: borghypo_fill1 + map: [ "enum.SolutionContainerLayers.Fill" ] + visible: false - type: Item sprite: Objects/Specific/Medical/hypospray.rsi - type: SolutionContainerManager @@ -95,6 +100,10 @@ solution: hypospray - type: ExaminableSolution solution: hypospray + - type: SolutionContainerVisuals + maxFillLevels: 2 + fillBaseName: borghypo_fill + solutionName: hypospray - type: UseDelay delay: 0.5 @@ -150,7 +159,6 @@ activeModeProtoId: HyposprayInjectMode allowedModes: - HyposprayInjectMode - - type: Appearance - type: SolutionContainerVisuals maxFillLevels: 1 changeColor: false @@ -471,7 +479,6 @@ layers: - state: hypovolemic map: [ "enum.SolutionContainerLayers.Fill" ] - - type: Appearance - type: SolutionContainerVisuals maxFillLevels: 1 changeColor: false diff --git a/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill1.png b/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill1.png new file mode 100644 index 0000000000000000000000000000000000000000..56fed4db91ad4e00b37ea16ea0abea6ce066942b GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}nw~C>ArY-_ z&n#qQFyJ}7;o1Mi#@pDr*whNE*%*Grnibx@7r3d4k>R{d{6!X~MSXhLfSMRQUHx3v IIVCg!01Rs&qW}N^ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill2.png b/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill2.png new file mode 100644 index 0000000000000000000000000000000000000000..9cc96a693eeb6bcda597b879a164d2ea2d3c57b8 GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}+MX_sArY-_ z&urvnFyJ}7;m7~Qce$-nv;&I7Oqdz|=*`}dyMA%XS0;veg$(m2vM?!1R+j>`F?hQA KxvXPx$&PhZ;R9J=WmCJ6MKoo{Qd{I!1WNM{x z@uITm2DcKO2be`(!OxNx?9xj%k#|wRv%&+gX}oS(c6kxNbuU4qT;gujj6h$O8wO~yq zT+Qdd83DN6ZZS?|Ti3ux*X4`vGa8Qp7>&oe4UnWM-;;!!B&m#Pmg%+SXK%M#-d$ee zI8J4DTg||1Hh-&}tINQv!E@jDEKPYcndn%BQcAb?`+ai_RIykrasYceC4PL=<3FFD z84QOyR#7KvMdMSK`Ezdaq-<>dtP1?Ve1GX!WWV7XuS2)pF~O-z6gbs?wtBdF16XyFAEr~?>-TZTW7K|c#+6dowtsD66`Reb_UwW|xl{M7 z?W-%(-sL%tqng{P*)Sy?)=sD(XbfHURK> zvCv79@ZbgWxbe32ZJt^htZ#G0xWTmdl_q#i*=>My@K?qT6;0=B6b{yEX#1y i^y6FG=0PdiPW=mZCCt%#;`1c{0000