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>
This commit is contained in:
Sir Warock 2025-12-21 21:20:43 +01:00 committed by BarryNorfolk
parent f5801718a3
commit b4d182348c
7 changed files with 81 additions and 61 deletions

View File

@ -284,6 +284,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;
@ -349,7 +356,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;
}
@ -511,7 +518,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;

View 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

View File

@ -14,6 +14,7 @@
solution: hypospray
- type: ExaminableSolution
solution: hypospray
exactVolume: true
- type: Appearance
- type: entity
@ -50,7 +51,6 @@
- HighRiskItem
- type: StealTarget
stealGroup: Hypospray
- type: Appearance
- type: SolutionContainerVisuals
maxFillLevels: 6
fillBaseName: hypo_fill
@ -89,7 +89,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
@ -100,6 +105,10 @@
solution: hypospray
- type: ExaminableSolution
solution: hypospray
- type: SolutionContainerVisuals
maxFillLevels: 2
fillBaseName: borghypo_fill
solutionName: hypospray
- type: UseDelay
delay: 0.5
@ -220,7 +229,6 @@
activeModeProtoId: HyposprayInjectMode
allowedModes:
- HyposprayInjectMode
- type: Appearance
- type: SolutionContainerVisuals
maxFillLevels: 1
changeColor: false
@ -548,7 +556,6 @@
layers:
- state: hypovolemic
map: [ "enum.SolutionContainerLayers.Fill" ]
- type: Appearance
- type: SolutionContainerVisuals
maxFillLevels: 1
changeColor: false

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 532 B

View 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"
"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
},
{
"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
}
]
"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
}
]
}