From d781c1d05fcfc10edfe412991659849c6f7093ff Mon Sep 17 00:00:00 2001 From: Zack Backmen Date: Sun, 14 Apr 2024 02:04:34 +0300 Subject: [PATCH] hotfix --- Content.Server/Backmen/Disease/DiseaseSystem.cs | 14 ++++++++------ .../Prototypes/Backmen/Diseases/noninfectious.yml | 8 ++++++++ Resources/Prototypes/Reagents/toxins.yml | 7 ------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Content.Server/Backmen/Disease/DiseaseSystem.cs b/Content.Server/Backmen/Disease/DiseaseSystem.cs index 728ca493f24..81554ac4d30 100644 --- a/Content.Server/Backmen/Disease/DiseaseSystem.cs +++ b/Content.Server/Backmen/Disease/DiseaseSystem.cs @@ -127,7 +127,7 @@ public override void Update(float frameTime) _parallel.ProcessNow(new DiseaseJob { System = this, - Owner = (owner, carrierComp), + Owner = (owner, carrierComp, mobState), FrameTime = frameTime }, carrierComp.Diseases.Count); } @@ -136,7 +136,7 @@ public override void Update(float frameTime) private record struct DiseaseJob : IParallelRobustJob { public DiseaseSystem System { get; init; } - public Entity Owner { get; init; } + public Entity Owner { get; init; } public float FrameTime { get; init; } public void Execute(int index) { @@ -144,9 +144,9 @@ public void Execute(int index) } } - private void Process(Entity owner, float frameTime, int i) + private void Process(Entity owner, float frameTime, int i) { - var disease = owner.Comp.Diseases[i]; + var disease = owner.Comp1.Diseases[i]; disease.Accumulator += frameTime; disease.TotalAccumulator += frameTime; @@ -154,7 +154,7 @@ private void Process(Entity owner, float frameTime, int return; // if the disease is on the silent disease list, don't do effects - var doEffects = owner.Comp.CarrierDiseases?.Contains(disease.ID) != true; + var doEffects = owner.Comp1.CarrierDiseases?.Contains(disease.ID) != true; disease.Accumulator -= disease.TickTime; var stage = 0; //defaults to stage 0 because you should always have one @@ -181,9 +181,11 @@ private void Process(Entity owner, float frameTime, int { Log.Error(err.ToString()); } - } + if (_mobStateSystem.IsIncapacitated(owner, owner)) + doEffects = false; + if (!doEffects) return; diff --git a/Resources/Prototypes/Backmen/Diseases/noninfectious.yml b/Resources/Prototypes/Backmen/Diseases/noninfectious.yml index 2115162f772..feeb57a2ca6 100644 --- a/Resources/Prototypes/Backmen/Diseases/noninfectious.yml +++ b/Resources/Prototypes/Backmen/Diseases/noninfectious.yml @@ -126,6 +126,14 @@ stages: - 2 # possible xeno polymorph + - !type:DiseasePolymorph + probability: 0.050 + polymorphId: XenoDroneMorph + polymorphMessage: disease-xeno-polymorph + polymorphSound: + path: /Audio/Animals/space_dragon_roar.ogg + stages: + - 2 - !type:DiseasePolymorph probability: 0.0015 polymorphId: XenoQueenMorph diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 5ab3af7ce07..b58978115b1 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -267,13 +267,6 @@ min: 5 causeChance: 0.3 disease: XenoVirus - - !type:ChemCauseDisease - conditions: - - !type:ReagentThreshold - reagent: FluorosulfuricAcid - min: 5 - causeChance: 0.7 - disease: XenoDroneVirus # end-backmen: Disease - type: reagent