-
Notifications
You must be signed in to change notification settings - Fork 194
hotfix 19.08.2026 #1504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
hotfix 19.08.2026 #1504
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
Content.IntegrationTests/Tests/Backmen/Medical/MorphazinePainImmuneTest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| using Content.IntegrationTests.Fixtures; | ||
| using Content.IntegrationTests.Fixtures.Attributes; | ||
| using Content.Server.Backmen.Surgery.Pain.Systems; | ||
| using Content.Server.Body.Systems; | ||
| using Content.Shared.Backmen.CCVar; | ||
| using Content.Shared.Backmen.Surgery.Pain.Components; | ||
| using Content.Shared.Body.Components; | ||
| using Content.Shared.Chemistry.Components; | ||
| using Content.Shared.Chemistry.Reagent; | ||
| using Content.Shared.FixedPoint; | ||
| using Content.Shared.StatusEffectNew; | ||
| using Robust.Shared.GameObjects; | ||
| using Robust.Shared.Prototypes; | ||
|
|
||
| namespace Content.IntegrationTests.Tests.Backmen.Medical; | ||
|
|
||
| [TestFixture] | ||
| [EnsureCVar(Side.Server, typeof(CCVars), nameof(CCVars.PainEnabled), true)] | ||
| public sealed class MorphazinePainImmuneTest : GameTest | ||
| { | ||
| private static readonly EntProtoId MobHuman = "MobHuman"; | ||
| private static readonly EntProtoId PainImmuneEffect = "StatusEffectPainImmune"; | ||
| private static readonly ProtoId<ReagentPrototype> MorphazineReagent = "Morphazine"; | ||
|
|
||
| public override PoolSettings PoolSettings => new() | ||
| { | ||
| Connected = false, | ||
| Dirty = true, | ||
| }; | ||
|
|
||
| [Test] | ||
| public async Task StatusEffect_GrantsPainImmuneWithoutComponentOnMob() | ||
| { | ||
| var map = await Pair.CreateTestMap(); | ||
| EntityUid human = default; | ||
|
|
||
| await Server.WaitPost(() => | ||
| { | ||
| human = Server.EntMan.SpawnAtPosition(MobHuman, map.GridCoords); | ||
| var statusSys = Server.EntMan.System<StatusEffectsSystem>(); | ||
| Assert.That( | ||
| statusSys.TryUpdateStatusEffectDuration(human, PainImmuneEffect, TimeSpan.FromSeconds(30)), | ||
| Is.True, | ||
| "StatusEffectPainImmune should apply to a human."); | ||
| }); | ||
|
|
||
| await Pair.RunTicksSync(5); | ||
|
|
||
| await Server.WaitAssertion(() => | ||
| { | ||
| var painSys = Server.EntMan.System<ServerPainSystem>(); | ||
| Assert.That( | ||
| Server.EntMan.HasComponent<PainImmuneComponent>(human), | ||
| Is.False, | ||
| "PainImmune must stay on the status effect, not the mob."); | ||
| Assert.That(painSys.IsPainImmune(human), Is.True, "Helper should see PainImmune on the status effect."); | ||
| }); | ||
|
|
||
| await Server.WaitPost(() => | ||
| { | ||
| var statusSys = Server.EntMan.System<StatusEffectsSystem>(); | ||
| Assert.That(statusSys.TryRemoveStatusEffect(human, PainImmuneEffect), Is.True); | ||
| }); | ||
|
|
||
| await Pair.RunTicksSync(5); | ||
|
|
||
| await Server.WaitAssertion(() => | ||
| { | ||
| var painSys = Server.EntMan.System<ServerPainSystem>(); | ||
| Assert.That(painSys.IsPainImmune(human), Is.False, "Helper should be false after the status effect is removed."); | ||
| }); | ||
| } | ||
|
|
||
| [Test] | ||
| public async Task Morphazine_AppliesPainImmuneStatusEffect() | ||
| { | ||
| var map = await Pair.CreateTestMap(); | ||
| var bloodstreamSys = Server.EntMan.System<BloodstreamSystem>(); | ||
| EntityUid human = default; | ||
|
|
||
| await Server.WaitPost(() => | ||
| { | ||
| human = Server.EntMan.SpawnAtPosition(MobHuman, map.GridCoords); | ||
| Assert.That(Server.EntMan.TryGetComponent(human, out BloodstreamComponent? stream), Is.True); | ||
| var solution = new Solution(); | ||
| // Stay above the crash threshold (max 2u) so the test doesn't immediately sleep. | ||
| solution.AddReagent(MorphazineReagent, FixedPoint2.New(10)); | ||
| Assert.That(bloodstreamSys.TryAddToBloodstream((human, stream), solution), Is.True); | ||
| }); | ||
|
|
||
| await Pair.RunTicksSync(90); | ||
|
|
||
| await Server.WaitAssertion(() => | ||
| { | ||
| var painSys = Server.EntMan.System<ServerPainSystem>(); | ||
| var statusSys = Server.EntMan.System<StatusEffectsSystem>(); | ||
| Assert.That( | ||
| Server.EntMan.HasComponent<PainImmuneComponent>(human), | ||
| Is.False, | ||
| "Morphazine must not copy PainImmune onto the mob."); | ||
| Assert.That( | ||
| statusSys.HasStatusEffect(human, PainImmuneEffect), | ||
| Is.True, | ||
| "Morphazine should apply StatusEffectPainImmune while metabolizing."); | ||
| Assert.That(painSys.IsPainImmune(human), Is.True, "Morphazine should make IsPainImmune true via the status effect."); | ||
| }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| alerts-pain-immune-name = Pain immunity | ||
| alerts-pain-immune-desc = You don't feel pain. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,10 @@ | ||
| reagent-name-morphine = morphine | ||
| reagent-desc-morphine = A painkiller that allows the patient to move at full speed even when injured. Causes drowsiness and eventually unconsciousness in high doses. Overdose will cause a variety of effects, ranging from minor to lethal. | ||
| reagent-name-opium = opium | ||
| reagent-desc-opium = A dark oily poppy extract. Mildly dulls pain; high doses cause drowsiness. Must be refined into morphine for real pain relief. | ||
| reagent-name-nociceptine = nociceptine | ||
| reagent-desc-nociceptine = A military concentrate used to synthesize morphazine. Useless on its own and mildly poisonous. | ||
| reagent-name-morphazine = morphazine | ||
| reagent-desc-morphazine = A combat analgesic that fully blocks pain, but causes a trance of jittering, stuttering, and hallucinations. When it wears off the user blacks out. Overdose strains the heart and breathing. | ||
| reagent-name-stimulants-super = суперстимулятор | ||
| reagent-desc-stimulants-super = Сверхмощный коктейль самых сильных веществ галактики, быстро лечащий от механического урона и ожогов, значительно повыщающий скорость и выносливость, однако имеющий выраженные побочные эффекты. При передозировке вызывает сильное отравление. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Resources/Locale/en-US/ss14-ru/prototypes/_backmen/entities/statuseffects/pain.ftl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ent-StatusEffectPainImmune = pain immunity | ||
| .desc = { ent-MobStatusEffectBase.desc } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| alerts-pain-immune-name = Иммунитет к боли | ||
| alerts-pain-immune-desc = Вы не чувствуете боли. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.