diff --git a/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs b/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs index 6133548fec..45105028fc 100644 --- a/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/InjectorSystem.cs @@ -66,6 +66,7 @@ public sealed partial class InjectorSystem : EntitySystem ToggleMode(injector, args.User); args.Handled = true; + args.ApplyDelay = false; } private void OnInjectorAfterInteract(Entity injector, ref AfterInteractEvent args) @@ -83,12 +84,12 @@ public sealed partial class InjectorSystem : EntitySystem return; } - args.Handled = TryMobsDoAfter(injector, args.User, target); + args.Handled |= TryMobsDoAfter(injector, args.User, target); return; } // Draw from or inject into jugs, bottles, etc. - args.Handled = ContainerDoAfter(injector, args.User, target); + args.Handled |= TryContainerDoAfter(injector, args.User, target); } private void OnInjectDoAfter(Entity injector, ref InjectorDoAfterEvent args) @@ -96,7 +97,7 @@ public sealed partial class InjectorSystem : EntitySystem if (args.Cancelled || args.Handled || args.Args.Target == null) return; - args.Handled = TryUseInjector(injector, args.Args.User, args.Args.Target.Value); + args.Handled |= TryUseInjector(injector, args.Args.User, args.Args.Target.Value); } private void OnAttack(Entity injector, ref MeleeHitEvent args) @@ -198,7 +199,7 @@ public sealed partial class InjectorSystem : EntitySystem || !GetMobsDoAfterTime(injector, user, target, out var doAfterTime, out var amount)) // Get the DoAfter time. return false; - _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, doAfterTime, new InjectorDoAfterEvent(), injector.Owner, target: target, used: injector.Owner) + if (!_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, doAfterTime, new InjectorDoAfterEvent(), injector.Owner, target: target, used: injector.Owner) { BreakOnMove = true, BreakOnWeightlessMove = false, @@ -206,7 +207,8 @@ public sealed partial class InjectorSystem : EntitySystem NeedHand = injector.Comp.NeedHand, BreakOnHandChange = injector.Comp.BreakOnHandChange, MovementThreshold = injector.Comp.MovementThreshold, - }); + })) + return false; // If the DoAfter was instant, don't send popups and logs indicating an attempt. if (doAfterTime == TimeSpan.Zero) @@ -303,12 +305,12 @@ public sealed partial class InjectorSystem : EntitySystem #endregion Mob Interaction #region Container Interaction - private bool ContainerDoAfter(Entity injector, EntityUid user, EntityUid target) + private bool TryContainerDoAfter(Entity injector, EntityUid user, EntityUid target) { if (!GetContainerDoAfterTime(injector, user, target, out var doAfterTime)) return false; - _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, doAfterTime, new InjectorDoAfterEvent(), injector.Owner, target: target, used: injector.Owner) + return _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, doAfterTime, new InjectorDoAfterEvent(), injector.Owner, target: target, used: injector.Owner) { BreakOnMove = true, BreakOnWeightlessMove = false, @@ -317,8 +319,6 @@ public sealed partial class InjectorSystem : EntitySystem BreakOnHandChange = injector.Comp.BreakOnHandChange, MovementThreshold = injector.Comp.MovementThreshold, }); - - return true; } /// diff --git a/Content.Shared/Silicons/Bots/MedibotSystem.cs b/Content.Shared/Silicons/Bots/MedibotSystem.cs index 68ee5ff405..2e832da456 100644 --- a/Content.Shared/Silicons/Bots/MedibotSystem.cs +++ b/Content.Shared/Silicons/Bots/MedibotSystem.cs @@ -135,7 +135,7 @@ public sealed class MedibotSystem : EntitySystem EnsureComp(target); _solutionContainer.TryAddReagent(injectable.Value, treatment.Reagent, treatment.Quantity, out _); - _popup.PopupEntity(Loc.GetString("hypospray-component-feel-prick-message"), target, target); + _popup.PopupEntity(Loc.GetString("injector-component-feel-prick-message"), target, target); _popup.PopupClient(Loc.GetString("medibot-target-injected"), medibot, medibot); _audio.PlayPredicted(medibot.Comp.InjectSound, medibot, medibot); diff --git a/Resources/Audio/Items/Medical/attributions.yml b/Resources/Audio/Items/Medical/attributions.yml index a6b352ef22..a52ea18817 100644 --- a/Resources/Audio/Items/Medical/attributions.yml +++ b/Resources/Audio/Items/Medical/attributions.yml @@ -1,4 +1,9 @@ - files: ["healthscanner.ogg"] license: "CC-BY-4.0" copyright: "Taken from FM Synthesis on freesound.org" - source: "https://freesound.org/people/FreqMan/sounds/32683/" \ No newline at end of file + source: "https://freesound.org/people/FreqMan/sounds/32683/" + +- files: ["jet_injector.ogg"] + license: "CC-BY-3.0" + copyright: "Orginal audio by EminYILDIRIM -- https://freesound.org/s/548009/ -- License: Attribution 4.0, 2imitk -- https://freesound.org/s/279044/ -- License: Attribution 3.0 and brunoboselli -- https://freesound.org/s/457294/ -- License: Creative Commons 0 -- https://freesound.org/s/460586/ -- License: Attribution NonCommercial 4.0, modified by Princess-Cheeseballs (GitHub)" + source: "https://github.com/space-wizards/space-station-14/pull/40076" \ No newline at end of file diff --git a/Resources/Audio/Items/Medical/jet_injector.ogg b/Resources/Audio/Items/Medical/jet_injector.ogg new file mode 100644 index 0000000000..306e11396b Binary files /dev/null and b/Resources/Audio/Items/Medical/jet_injector.ogg differ diff --git a/Resources/Audio/Items/attributions.yml b/Resources/Audio/Items/attributions.yml index bed043b3ca..c21d6f2ba3 100644 --- a/Resources/Audio/Items/attributions.yml +++ b/Resources/Audio/Items/attributions.yml @@ -173,9 +173,4 @@ - files: ["wirebrushing.ogg"] license: "CC0-1.0" copyright: "Created by romulofs, converted to OGG, and edited by TiniestShark (Github)" - source: "https://freesound.org/s/127541/" - -- files: ["jet_injector.ogg"] - license: "CC-BY-3.0" - copyright: "Orginal audio by EminYILDIRIM -- https://freesound.org/s/548009/ -- License: Attribution 4.0, 2imitk -- https://freesound.org/s/279044/ -- License: Attribution 3.0 and brunoboselli -- https://freesound.org/s/457294/ -- License: Creative Commons 0, modified by Princess-Cheeseballs (GitHub)" - source: "https://github.com/space-wizards/space-station-14/pull/40076" + source: "https://freesound.org/s/127541/" \ No newline at end of file diff --git a/Resources/Audio/Items/jet_injector.ogg b/Resources/Audio/Items/jet_injector.ogg deleted file mode 100644 index 8ccb40d8ce..0000000000 Binary files a/Resources/Audio/Items/jet_injector.ogg and /dev/null differ diff --git a/Resources/Prototypes/Chemistry/injector_modes.yml b/Resources/Prototypes/Chemistry/injector_modes.yml index 53a5ee4f73..1e2b38aa41 100644 --- a/Resources/Prototypes/Chemistry/injector_modes.yml +++ b/Resources/Prototypes/Chemistry/injector_modes.yml @@ -127,7 +127,7 @@ abstract: true parent: BaseHyposprayMode id: BaseJetInjectorMode - injectSound: /Audio/Items/jet_injector.ogg + injectSound: /Audio/Items/Medical/jet_injector.ogg popupUserAttempt: injector-component-spray-injecting-user popupTargetAttempt: injector-component-spray-injecting-target diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index f45a415a7d..73021bee67 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -10,6 +10,11 @@ allowedModes: - HyposprayDynamicMode - HyposprayInjectMode + - type: Spillable + solution: hypospray + - type: ExaminableSolution + solution: hypospray + - type: Appearance - type: entity parent: [BaseHypospray, BaseGrandTheftContraband] @@ -115,7 +120,7 @@ - type: Item sprite: Objects/Specific/Medical/jetinjector.rsi - type: UseDelay - delay: 2.0 + delay: 1.5 - type: SolutionContainerManager solutions: hypospray: