]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Miscellaneous Injector fixes + BorgHypo fill sprites. (#41932)
authorSir Warock <67167466+SirWarock@users.noreply.github.com>
Sun, 21 Dec 2025 20:20:43 +0000 (21:20 +0100)
committerGitHub <noreply@github.com>
Sun, 21 Dec 2025 20:20:43 +0000 (20:20 +0000)
* 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>
Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs
Resources/Locale/en-US/chemistry/components/injector-component.ftl
Resources/Prototypes/Chemistry/injector_modes.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml
Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill1.png [new file with mode: 0644]
Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill2.png [new file with mode: 0644]
Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_s.png
Resources/Textures/Objects/Specific/Medical/hypospray.rsi/meta.json

index 438da65293abc796677c26f9b2fa6ebe70f2f25f..4fa44f2fa4a58ddefc9030c6e7f48f63bb3cf018 100644 (file)
@@ -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;
index 5dc12a1f7df2cbbf7a0e8c0f2b0c84b082e14319..2958dda5eda1351f3857211a1149fe41185462d4 100644 (file)
@@ -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
index 2a791eb0ac329f5fdbfdb9b11bbc449e7a2d7eb9..fd96819df312421296998273077806a020e39156 100644 (file)
@@ -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
   - 5
 
 - type: injectorMode
-  parent: [ HyposprayBaseMode, BaseInjectMode ]
+  parent: [ BaseHyposprayMode, BaseInjectMode ]
   id: HyposprayInjectMode
 
 - type: injectorMode
-  parent: [ HyposprayBaseMode, BaseDynamicMode ]
+  parent: [ BaseHyposprayMode, BaseDynamicMode ]
   id: HyposprayDynamicMode
 
 - type: injectorMode
index 9b76330d982f93eca004c22d0c4ca49eff518fec..3d0180f901271e12cbc63bf557ec7c94d8fa7177 100644 (file)
@@ -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
   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
     solution: hypospray
   - type: ExaminableSolution
     solution: hypospray
+  - type: SolutionContainerVisuals
+    maxFillLevels: 2
+    fillBaseName: borghypo_fill
+    solutionName: hypospray
   - type: UseDelay
     delay: 0.5
 
     activeModeProtoId: HyposprayInjectMode
     allowedModes:
     - HyposprayInjectMode
-  - type: Appearance
   - type: SolutionContainerVisuals
     maxFillLevels: 1
     changeColor: false
     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 (file)
index 0000000..56fed4d
Binary files /dev/null and b/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill1.png differ
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 (file)
index 0000000..9cc96a6
Binary files /dev/null and b/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_fill2.png differ
index 4adc13c448a40cf02e1cbe10c87b518aee3c501b..3d53f56f711cacc86e8178cdb4d8771a27e599bc 100644 (file)
Binary files a/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_s.png and b/Resources/Textures/Objects/Specific/Medical/hypospray.rsi/borghypo_s.png differ
index 904543f6e5972b711553027e9d00285b73a0c5f1..8ad20c2effb0172c32cb7bccb35dd9422fac067b 100644 (file)
@@ -1,53 +1,59 @@
 {
-  "version": 1,
-  "license": "CC-BY-SA-3.0",
-  "copyright": "Taken from vgstation at commit https://github.com/vgstation-coders/vgstation13/commit/1cdfb0230cc96d0ba751fa002d04f8aa2f25ad7d, modified with fill sprites by SlamBamActionman (github)",
-  "size": {
-    "x": 32,
-    "y": 32
-  },
-  "states": [
-    {
-      "name": "borghypo"
-    },
-    {
-      "name": "borghypo_s"
-    },
-    {
-      "name": "combat_hypo"
-    },
-    {
-      "name": "hypo"
-    },
-    {
-      "name": "hypo_fill1"
-    },
-    {
-      "name": "hypo_fill2"
-    },
-    {
-      "name": "hypo_fill3"
-    },
-    {
-      "name": "hypo_fill4"
-    },
-    {
-      "name": "hypo_fill5"
-    },
-    {
-      "name": "hypo_fill6"
-    },
-    {
-      "name": "inhand-left",
-      "directions": 4
-    },
-    {
-      "name": "inhand-right",
-      "directions": 4
-    },
-    {
-      "name": "equipped-BELT",
-      "directions": 4
-    }
-  ]
+    "version": 1,
+    "license": "CC-BY-SA-3.0",
+    "copyright": "Taken from vgstation at commit https://github.com/vgstation-coders/vgstation13/commit/1cdfb0230cc96d0ba751fa002d04f8aa2f25ad7d, modified with fill sprites by SlamBamActionman (github), borghypo  fill sprites by SirWarock (Github)",
+    "size": {
+        "x": 32,
+        "y": 32
+    },
+    "states": [
+        {
+            "name": "borghypo"
+        },
+        {
+            "name": "borghypo_s"
+        },
+        {
+            "name": "borghypo_fill1"
+        },
+        {
+            "name": "borghypo_fill2"
+        },
+        {
+            "name": "combat_hypo"
+        },
+        {
+            "name": "hypo"
+        },
+        {
+            "name": "hypo_fill1"
+        },
+        {
+            "name": "hypo_fill2"
+        },
+        {
+            "name": "hypo_fill3"
+        },
+        {
+            "name": "hypo_fill4"
+        },
+        {
+            "name": "hypo_fill5"
+        },
+        {
+            "name": "hypo_fill6"
+        },
+        {
+            "name": "inhand-left",
+            "directions": 4
+        },
+        {
+            "name": "inhand-right",
+            "directions": 4
+        },
+        {
+            "name": "equipped-BELT",
+            "directions": 4
+        }
+    ]
 }