diff --git a/Content.Client/Atmos/Miasma/FliesComponent.cs b/Content.Client/Atmos/Miasma/FliesComponent.cs deleted file mode 100644 index 21a7b1bd32..0000000000 --- a/Content.Client/Atmos/Miasma/FliesComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Content.Shared.Atmos.Miasma; -using Robust.Shared.GameStates; - -namespace Content.Client.Atmos.Miasma; - -[NetworkedComponent, RegisterComponent] -public sealed class FliesComponent : SharedFliesComponent -{ } diff --git a/Content.Client/Atmos/Miasma/FliesSystem.cs b/Content.Client/Atmos/Miasma/FliesSystem.cs deleted file mode 100644 index c6f94c4a01..0000000000 --- a/Content.Client/Atmos/Miasma/FliesSystem.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Robust.Client.GameObjects; -using Robust.Shared.Utility; - -namespace Content.Client.Atmos.Miasma; - -public sealed class FliesSystem : EntitySystem -{ - public override void Initialize() - { - SubscribeLocalEvent(FliesAdded); - SubscribeLocalEvent(FliesRemoved); - } - - private void FliesRemoved(EntityUid uid, FliesComponent component, ComponentShutdown args) - { - if (!TryComp(uid, out var sprite)) - return; - - if (!sprite.LayerMapTryGet(FliesKey.Key, out var layer)) - return; - - sprite.RemoveLayer(layer); - } - - private void FliesAdded(EntityUid uid, FliesComponent component, ComponentStartup args) - { - if (!TryComp(uid, out var sprite)) - return; - - if (sprite.LayerMapTryGet(FliesKey.Key, out var _)) - return; - - var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ("Objects/Misc/flies.rsi"), "flies")); - sprite.LayerMapSet(FliesKey.Key, layer); - } - - private enum FliesKey - { - Key, - } -} diff --git a/Content.Client/Disease/DiseaseMachineSystem.cs b/Content.Client/Disease/DiseaseMachineSystem.cs deleted file mode 100644 index d831aee507..0000000000 --- a/Content.Client/Disease/DiseaseMachineSystem.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Robust.Client.GameObjects; -using Content.Shared.Disease; - -namespace Content.Client.Disease -{ - /// - /// Controls client-side visuals for the - /// disease machines. - /// - public sealed class DiseaseMachineSystem : VisualizerSystem - { - protected override void OnAppearanceChange(EntityUid uid, DiseaseMachineVisualsComponent component, ref AppearanceChangeEvent args) - { - if (args.Sprite == null) - return; - - if (AppearanceSystem.TryGetData(uid, DiseaseMachineVisuals.IsOn, out var isOn, args.Component) - && AppearanceSystem.TryGetData(uid, DiseaseMachineVisuals.IsRunning, out var isRunning, args.Component)) - { - var state = isRunning ? component.RunningState : component.IdleState; - args.Sprite.LayerSetVisible(DiseaseMachineVisualLayers.IsOn, isOn); - args.Sprite.LayerSetState(DiseaseMachineVisualLayers.IsRunning, state); - } - } - } -} -public enum DiseaseMachineVisualLayers : byte -{ - IsOn, - IsRunning -} diff --git a/Content.Client/Disease/DiseaseMachineVisualsComponent.cs b/Content.Client/Disease/DiseaseMachineVisualsComponent.cs deleted file mode 100644 index 2194cd1c78..0000000000 --- a/Content.Client/Disease/DiseaseMachineVisualsComponent.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Content.Client.Disease; - -/// -/// Holds the idle and running state for machines to control -/// playing animtions on the client. -/// -[RegisterComponent] -public sealed class DiseaseMachineVisualsComponent : Component -{ - [DataField("idleState", required: true)] - public string IdleState = default!; - - [DataField("runningState", required: true)] - public string RunningState = default!; -} diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs index 1edd61b766..dacf7ff01c 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs @@ -1,7 +1,6 @@ using System.Text; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; -using Content.Shared.Disease.Components; using Content.Shared.FixedPoint; using Content.Shared.IdentityManagement; using Content.Shared.MedicalScanner; @@ -32,20 +31,11 @@ namespace Content.Client.HealthAnalyzer.UI entities.TryGetComponent(msg.TargetEntity.Value, out var metaData)) entityName = Identity.Name(msg.TargetEntity.Value, entities); - IReadOnlyDictionary DamagePerGroup = damageable.DamagePerGroup; - IReadOnlyDictionary DamagePerType = damageable.Damage.DamageDict; + IReadOnlyDictionary damagePerGroup = damageable.DamagePerGroup; + IReadOnlyDictionary damagePerType = damageable.Damage.DamageDict; text.Append($"{Loc.GetString("health-analyzer-window-entity-health-text", ("entityName", entityName))}\n"); - // Status Effects / Components - if (entities.HasComponent(msg.TargetEntity)) - { - text.Append($"{Loc.GetString("disease-scanner-diseased")}\n"); - }else - { - text.Append($"{Loc.GetString("disease-scanner-not-diseased")}\n"); - } - // Damage text.Append($"\n{Loc.GetString("health-analyzer-window-entity-damage-total-text", ("amount", damageable.TotalDamage))}\n"); @@ -54,14 +44,14 @@ namespace Content.Client.HealthAnalyzer.UI var protos = IoCManager.Resolve(); // Show the total damage and type breakdown for each damage group. - foreach (var (damageGroupId, damageAmount) in DamagePerGroup) + foreach (var (damageGroupId, damageAmount) in damagePerGroup) { text.Append($"\n{Loc.GetString("health-analyzer-window-damage-group-text", ("damageGroup", Loc.GetString("health-analyzer-window-damage-group-" + damageGroupId)), ("amount", damageAmount))}"); // Show the damage for each type in that group. var group = protos.Index(damageGroupId); foreach (var type in group.DamageTypes) { - if (DamagePerType.TryGetValue(type, out var typeAmount)) + if (damagePerType.TryGetValue(type, out var typeAmount)) { // If damage types are allowed to belong to more than one damage group, they may appear twice here. Mark them as duplicate. if (!shownTypes.Contains(type)) diff --git a/Content.Client/Medical/DiseaseSystem.cs b/Content.Client/Medical/DiseaseSystem.cs new file mode 100644 index 0000000000..ed9e06eb48 --- /dev/null +++ b/Content.Client/Medical/DiseaseSystem.cs @@ -0,0 +1,9 @@ +namespace Content.Client.Medical; + +/* Here be dragons */ + +public enum DiseaseMachineVisualLayers : byte +{ + IsOn, + IsRunning +} diff --git a/Content.IntegrationTests/Tests/Disease/TryAddDisease.cs b/Content.IntegrationTests/Tests/Disease/TryAddDisease.cs deleted file mode 100644 index 77d66bf2d0..0000000000 --- a/Content.IntegrationTests/Tests/Disease/TryAddDisease.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; -using Content.Server.Disease; -using Content.Shared.Disease; -using NUnit.Framework; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Prototypes; - -namespace Content.IntegrationTests.Tests.Disease; - -[TestFixture] -[TestOf(typeof(DiseaseSystem))] -public sealed class DeviceNetworkTest -{ - [Test] - public async Task AddAllDiseases() - { - await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true}); - var server = pairTracker.Pair.Server; - var testMap = await PoolManager.CreateTestMap(pairTracker); - await server.WaitPost(() => - { - var protoManager = IoCManager.Resolve(); - var entManager = IoCManager.Resolve(); - var entSysManager = IoCManager.Resolve(); - var diseaseSystem = entSysManager.GetEntitySystem(); - - var sickEntity = entManager.SpawnEntity("MobHuman", testMap.GridCoords); - foreach (var diseaseProto in protoManager.EnumeratePrototypes()) - { - diseaseSystem.TryAddDisease(sickEntity, diseaseProto); - } - }); - } -} diff --git a/Content.IntegrationTests/Tests/DiseaseTest.cs b/Content.IntegrationTests/Tests/DiseaseTest.cs deleted file mode 100644 index adf0997dfb..0000000000 --- a/Content.IntegrationTests/Tests/DiseaseTest.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Threading.Tasks; -using Content.Shared.Disease; -using NUnit.Framework; -using Robust.Shared.Prototypes; - -namespace Content.IntegrationTests.Tests; - -[TestFixture] -public sealed class DiseaseTest -{ - /// - /// Asserts that a disease prototype has valid stages for its effects and cures. - /// - [Test] - public async Task Stages() - { - await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true}); - var server = pairTracker.Pair.Server; - - var protoManager = server.ResolveDependency(); - - await server.WaitAssertion(() => - { - foreach (var proto in protoManager.EnumeratePrototypes()) - { - var stagesLength = proto.Stages.Count; - - foreach (var effect in proto.Effects) - { - for (var i = 0; i < effect.Stages.Length; i++) - { - Assert.That(i >= 0 && i < stagesLength, $"Disease {proto.ID} has an effect with an incorrect stage, {i}!"); - } - } - - foreach (var cure in proto.Cures) - { - for (var i = 0; i < cure.Stages.Length; i++) - { - Assert.That(i >= 0 && i < stagesLength, $"Disease {proto.ID} has a cure with an incorrect stage, {i}!"); - } - } - } - }); - - await pairTracker.CleanReturnAsync(); - } -} diff --git a/Content.Server/Administration/Commands/RejuvenateCommand.cs b/Content.Server/Administration/Commands/RejuvenateCommand.cs index 88412df8c1..0e2e39a9ee 100644 --- a/Content.Server/Administration/Commands/RejuvenateCommand.cs +++ b/Content.Server/Administration/Commands/RejuvenateCommand.cs @@ -1,16 +1,5 @@ -using Content.Server.Atmos.Miasma; -using Content.Server.Body.Components; -using Content.Server.Body.Systems; -using Content.Server.Disease.Components; -using Content.Server.Disease; -using Content.Server.Nutrition.Components; -using Content.Server.Nutrition.EntitySystems; using Content.Shared.Administration; -using Content.Shared.Damage; -using Content.Shared.Jittering; -using Content.Shared.Nutrition.Components; using Content.Shared.Rejuvenate; -using Content.Shared.StatusEffect; using Robust.Server.Player; using Robust.Shared.Console; diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 53bb567625..2248b86005 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -6,12 +6,9 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Components; using Content.Server.Body.Systems; using Content.Server.Damage.Systems; -using Content.Server.Disease; -using Content.Server.Disease.Components; using Content.Server.Electrocution; using Content.Server.Explosion.EntitySystems; using Content.Server.GhostKick; -using Content.Server.Interaction.Components; using Content.Server.Medical; using Content.Server.Nutrition.EntitySystems; using Content.Server.Pointing.Components; @@ -30,7 +27,6 @@ using Content.Shared.Body.Part; using Content.Shared.Clothing.Components; using Content.Shared.Damage; using Content.Shared.Database; -using Content.Shared.Disease; using Content.Shared.Electrocution; using Content.Shared.Interaction.Components; using Content.Shared.Inventory; @@ -44,7 +40,6 @@ using Content.Shared.Popups; using Content.Shared.Tabletop.Components; using Content.Shared.Verbs; using Robust.Server.GameObjects; -using Robust.Server.GameStates; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Physics; @@ -53,7 +48,6 @@ using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Utility; -using Robust.Shared.Audio; using Timer = Robust.Shared.Timing.Timer; using Content.Shared.Cluwne; @@ -65,7 +59,6 @@ public sealed partial class AdminVerbSystem [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!; [Dependency] private readonly BodySystem _bodySystem = default!; [Dependency] private readonly CreamPieSystem _creamPieSystem = default!; - [Dependency] private readonly DiseaseSystem _diseaseSystem = default!; [Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!; [Dependency] private readonly EntityStorageSystem _entityStorageSystem = default!; [Dependency] private readonly ExplosionSystem _explosionSystem = default!; @@ -196,24 +189,6 @@ public sealed partial class AdminVerbSystem }; args.Verbs.Add(disposalBin); - if (TryComp(args.Target, out var carrier)) - { - Verb lungCancer = new() - { - Text = "Lung Cancer", - Category = VerbCategory.Smite, - Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-l"), - Act = () => - { - _diseaseSystem.TryInfect(carrier, _prototypeManager.Index("StageIIIALungCancer"), - 1.0f, true); - }, - Impact = LogImpact.Extreme, - Message = Loc.GetString("admin-smite-lung-cancer-description") - }; - args.Verbs.Add(lungCancer); - } - if (TryComp(args.Target, out var damageable) && HasComp(args.Target)) { diff --git a/Content.Server/Atmos/Miasma/FliesComponent.cs b/Content.Server/Atmos/Miasma/FliesComponent.cs deleted file mode 100644 index fddb88652f..0000000000 --- a/Content.Server/Atmos/Miasma/FliesComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Atmos.Miasma; -using Robust.Shared.GameStates; - -namespace Content.Server.Atmos.Miasma; - -[NetworkedComponent, RegisterComponent] -public sealed class FliesComponent : SharedFliesComponent -{ - /// Need something to hold the ambient sound, at least until that system becomes more robust - public EntityUid VirtFlies; -} diff --git a/Content.Server/Atmos/Miasma/RottingSystem.cs b/Content.Server/Atmos/Miasma/RottingSystem.cs index a22054f48e..e8c300485e 100644 --- a/Content.Server/Atmos/Miasma/RottingSystem.cs +++ b/Content.Server/Atmos/Miasma/RottingSystem.cs @@ -26,42 +26,6 @@ public sealed class RottingSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly TransformSystem _transform = default!; - /// Miasma Disease Pool - /// Miasma outbreaks are not per-entity, - /// so this ensures that each entity in the same incident - /// receives the same disease. - - public readonly IReadOnlyList MiasmaDiseasePool = new[] - { - "VentCough", - "AMIV", - "SpaceCold", - "SpaceFlu", - "BirdFlew", - "VanAusdallsRobovirus", - "BleedersBite", - "Plague", - "TongueTwister", - "MemeticAmirmir" - }; - - /// - /// The current pool disease. - /// - private string _poolDisease = ""; - - /// - /// The target time it waits until.. - /// After that, it resets current time + _poolRepickTime. - /// Any infection will also reset it to current time + _poolRepickTime. - /// - private TimeSpan _diseaseTime = TimeSpan.FromMinutes(5); - - /// - /// How long without an infection before we pick a new disease. - /// - private readonly TimeSpan _poolRepickTime = TimeSpan.FromMinutes(5); - public override void Initialize() { base.Initialize(); @@ -76,13 +40,7 @@ public sealed class RottingSystem : EntitySystem SubscribeLocalEvent(OnExamined); SubscribeLocalEvent(OnRejuvenate); - SubscribeLocalEvent(OnFliesInit); - SubscribeLocalEvent(OnFliesShutdown); - SubscribeLocalEvent(OnTempIsRotting); - - // Init disease pool - _poolDisease = _random.Pick(MiasmaDiseasePool); } private void OnPerishableUnpaused(EntityUid uid, PerishableComponent component, ref EntityUnpausedEvent args) @@ -106,7 +64,6 @@ public sealed class RottingSystem : EntitySystem private void OnShutdown(EntityUid uid, RottingComponent component, ComponentShutdown args) { - RemComp(uid); if (TryComp(uid, out var perishable)) { perishable.NextPerishUpdate = TimeSpan.Zero; @@ -182,22 +139,6 @@ public sealed class RottingSystem : EntitySystem RemCompDeferred(uid); } - /// Containers - - - #region Fly stuff - private void OnFliesInit(EntityUid uid, FliesComponent component, ComponentInit args) - { - component.VirtFlies = Spawn("AmbientSoundSourceFlies", Transform(uid).Coordinates); - } - - private void OnFliesShutdown(EntityUid uid, FliesComponent component, ComponentShutdown args) - { - if (!Terminating(uid) && !Deleted(uid)) - Del(component.VirtFlies); - } - #endregion - private void OnTempIsRotting(EntityUid uid, TemperatureComponent component, ref IsRottingEvent args) { if (args.Handled) @@ -205,23 +146,10 @@ public sealed class RottingSystem : EntitySystem args.Handled = component.CurrentTemperature > Atmospherics.T0C + 0.85f; } - public string RequestPoolDisease() - { - // We reset the current time on this outbreak so people don't get unlucky at the transition time - _diseaseTime = _timing.CurTime + _poolRepickTime; - return _poolDisease; - } - public override void Update(float frameTime) { base.Update(frameTime); - if (_timing.CurTime >= _diseaseTime) - { - _diseaseTime = _timing.CurTime + _poolRepickTime; - _poolDisease = _random.Pick(MiasmaDiseasePool); - } - var perishQuery = EntityQueryEnumerator(); while (perishQuery.MoveNext(out var uid, out var perishable)) { @@ -237,9 +165,7 @@ public sealed class RottingSystem : EntitySystem { var rot = AddComp(uid); rot.NextRotUpdate = _timing.CurTime + rot.RotUpdateRate; - EnsureComp(uid); } - } var rotQuery = EntityQueryEnumerator(); diff --git a/Content.Server/Chemistry/ReagentEffects/ChemCauseDisease.cs b/Content.Server/Chemistry/ReagentEffects/ChemCauseDisease.cs deleted file mode 100644 index c5d908a79b..0000000000 --- a/Content.Server/Chemistry/ReagentEffects/ChemCauseDisease.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Content.Shared.Chemistry.Reagent; -using Content.Server.Disease; -using Content.Shared.Disease; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using JetBrains.Annotations; - -namespace Content.Server.Chemistry.ReagentEffects -{ - /// - /// Default metabolism for medicine reagents. - /// - [UsedImplicitly] - public sealed class ChemCauseDisease : ReagentEffect - { - /// - /// Chance it has each tick to cause disease, between 0 and 1 - /// - [DataField("causeChance")] - public float CauseChance = 0.15f; - - /// - /// The disease to add. - /// - [DataField("disease", customTypeSerializer: typeof(PrototypeIdSerializer), required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public string Disease = default!; - - public override void Effect(ReagentEffectArgs args) - { - if (args.Scale != 1f) - return; - - EntitySystem.Get().TryAddDisease(args.SolutionEntity, Disease); - } - } -} diff --git a/Content.Server/Chemistry/ReagentEffects/ChemCauseRandomDisease.cs b/Content.Server/Chemistry/ReagentEffects/ChemCauseRandomDisease.cs deleted file mode 100644 index 877f8d6e94..0000000000 --- a/Content.Server/Chemistry/ReagentEffects/ChemCauseRandomDisease.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Content.Shared.Chemistry.Reagent; -using Content.Server.Disease; -using Content.Shared.Disease.Components; -using Robust.Shared.Random; -using JetBrains.Annotations; - -namespace Content.Server.Chemistry.ReagentEffects -{ - /// - /// Causes a random disease from a list, if the user is not already diseased. - /// - [UsedImplicitly] - public sealed class ChemCauseRandomDisease : ReagentEffect - { - /// - /// A disease to choose from. - /// - [DataField("diseases", required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public List Diseases = default!; - - public override void Effect(ReagentEffectArgs args) - { - if (args.EntityManager.TryGetComponent(args.SolutionEntity, out var diseased)) - return; - - if (args.Scale != 1f) - return; - - var random = IoCManager.Resolve(); - - EntitySystem.Get().TryAddDisease(args.SolutionEntity, random.Pick(Diseases)); - } - } -} diff --git a/Content.Server/Chemistry/ReagentEffects/ChemCureDisease.cs b/Content.Server/Chemistry/ReagentEffects/ChemCureDisease.cs deleted file mode 100644 index 0c2dcb4a44..0000000000 --- a/Content.Server/Chemistry/ReagentEffects/ChemCureDisease.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Content.Shared.Chemistry.Reagent; -using Content.Server.Disease; -using JetBrains.Annotations; - -namespace Content.Server.Chemistry.ReagentEffects -{ - /// - /// Default metabolism for medicine reagents. - /// - [UsedImplicitly] - public sealed class ChemCureDisease : ReagentEffect - { - /// - /// Chance it has each tick to cure a disease, between 0 and 1 - /// - [DataField("cureChance")] - public float CureChance = 0.15f; - - public override void Effect(ReagentEffectArgs args) - { - var cureChance = CureChance; - - cureChance *= args.Scale; - - var ev = new CureDiseaseAttemptEvent(cureChance); - args.EntityManager.EventBus.RaiseLocalEvent(args.SolutionEntity, ev, false); - } - } -} diff --git a/Content.Server/Chemistry/ReagentEffects/ChemMiasmaPoolSource.cs b/Content.Server/Chemistry/ReagentEffects/ChemMiasmaPoolSource.cs deleted file mode 100644 index e548e2321c..0000000000 --- a/Content.Server/Chemistry/ReagentEffects/ChemMiasmaPoolSource.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Content.Shared.Chemistry.Reagent; -using JetBrains.Annotations; -using Content.Server.Atmos.Miasma; -using Content.Server.Disease; - -namespace Content.Server.Chemistry.ReagentEffects -{ - /// - /// The miasma system rotates between 1 disease at a time. - /// This gives all entities the disease the miasme system is currently on. - /// For things ingested by one person, you probably want ChemCauseRandomDisease instead. - /// - [UsedImplicitly] - public sealed class ChemMiasmaPoolSource : ReagentEffect - { - public override void Effect(ReagentEffectArgs args) - { - if (args.Scale != 1f) - return; - - string disease = EntitySystem.Get().RequestPoolDisease(); - - EntitySystem.Get().TryAddDisease(args.SolutionEntity, disease); - } - } -} diff --git a/Content.Server/Clothing/MaskSystem.cs b/Content.Server/Clothing/MaskSystem.cs index 917418c694..acf63ad98d 100644 --- a/Content.Server/Clothing/MaskSystem.cs +++ b/Content.Server/Clothing/MaskSystem.cs @@ -4,7 +4,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Components; using Content.Server.Body.Systems; using Content.Server.Clothing.Components; -using Content.Server.Disease.Components; using Content.Server.IdentityManagement; using Content.Server.Nutrition.EntitySystems; using Content.Server.Popups; @@ -15,7 +14,6 @@ using Content.Shared.Clothing.EntitySystems; using Content.Shared.IdentityManagement.Components; using Content.Shared.Inventory; using Content.Shared.Inventory.Events; -using Robust.Shared.Player; namespace Content.Server.Clothing { @@ -80,8 +78,8 @@ namespace Content.Server.Clothing private void ToggleMaskComponents(EntityUid uid, MaskComponent mask, EntityUid wearer, bool isEquip = false) { - //toggle visuals - if (TryComp(mask.Owner, out var clothing)) + // toggle visuals + if (TryComp(uid, out var clothing)) { //TODO: sprites for 'pulled down' state. defaults to invisible due to no sprite with this prefix _clothing.SetEquippedPrefix(uid, mask.IsToggled ? "toggled" : null, clothing); @@ -93,10 +91,6 @@ namespace Content.Server.Clothing if (TryComp(uid, out var blocker)) blocker.Enabled = !mask.IsToggled; - // toggle disease protection - if (TryComp(uid, out var diseaseProtection)) - diseaseProtection.IsActive = !mask.IsToggled; - // toggle identity if (TryComp(uid, out var identity)) identity.Enabled = !mask.IsToggled; diff --git a/Content.Server/Disease/Components/DiseaseCarrierComponent.cs b/Content.Server/Disease/Components/DiseaseCarrierComponent.cs deleted file mode 100644 index 0c5432d9f2..0000000000 --- a/Content.Server/Disease/Components/DiseaseCarrierComponent.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Linq; -using Content.Shared.Disease; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; - -namespace Content.Server.Disease.Components -{ - /// - /// Allows the entity to be infected with diseases. - /// Please use only on mobs. - /// - [RegisterComponent] - public sealed class DiseaseCarrierComponent : Component - { - /// - /// Shows the CURRENT diseases on the carrier - /// - [ViewVariables(VVAccess.ReadWrite)] - public List Diseases = new(); - - /// - /// The carrier's resistance to disease - /// - [DataField("diseaseResist")] - [ViewVariables(VVAccess.ReadWrite)] - public float DiseaseResist = 0f; - - /// - /// Diseases the carrier has had, used for immunity. - /// - [ViewVariables(VVAccess.ReadWrite)] - public List PastDiseases = new(); - - /// - /// All the diseases the carrier has or has had. - /// Checked against when trying to add a disease - /// - [ViewVariables(VVAccess.ReadWrite)] - public List AllDiseases => PastDiseases.Concat(Diseases).ToList(); - - /// - /// A list of diseases which the entity does not - /// exhibit direct symptoms from. They still transmit - /// these diseases, just without symptoms. - /// - [DataField("carrierDiseases", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - public HashSet? CarrierDiseases; - - /// - /// When this component is initialized, - /// these diseases will be added to past diseases, - /// rendering them immune. - /// - [DataField("naturalImmunities")] - public List? NaturalImmunities; - } -} diff --git a/Content.Server/Disease/Components/DiseaseDiagnoserComponent.cs b/Content.Server/Disease/Components/DiseaseDiagnoserComponent.cs deleted file mode 100644 index 9b2acc8410..0000000000 --- a/Content.Server/Disease/Components/DiseaseDiagnoserComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Server.Disease.Components -{ - /// - /// To give the disease diagnosing machine specific behavior - /// - [RegisterComponent] - public sealed class DiseaseDiagnoserComponent : Component - {} -} diff --git a/Content.Server/Disease/Components/DiseaseMachineComponent.cs b/Content.Server/Disease/Components/DiseaseMachineComponent.cs deleted file mode 100644 index a36a4309b4..0000000000 --- a/Content.Server/Disease/Components/DiseaseMachineComponent.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Content.Shared.Disease; -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Disease.Components -{ - /// - /// For shared behavior between both disease machines - /// - [RegisterComponent] - public sealed class DiseaseMachineComponent : Component - { - [DataField("delay")] - public float Delay = 5f; - /// - /// How much time we've accumulated processing - /// - [DataField("accumulator")] - public float Accumulator = 0f; - /// - /// The disease prototype currently being diagnosed - /// - [ViewVariables] - public DiseasePrototype? Disease; - /// - /// What the machine will spawn - /// - [DataField("machineOutput", customTypeSerializer: typeof(PrototypeIdSerializer), required: true)] - public string MachineOutput = string.Empty; - } -} diff --git a/Content.Server/Disease/Components/DiseaseMachineRunningComponent.cs b/Content.Server/Disease/Components/DiseaseMachineRunningComponent.cs deleted file mode 100644 index 6f7d55179d..0000000000 --- a/Content.Server/Disease/Components/DiseaseMachineRunningComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Server.Disease.Components -{ - /// - /// For EntityQuery to keep track of which machines are running - /// - [RegisterComponent] - public sealed class DiseaseMachineRunningComponent : Component - {} -} diff --git a/Content.Server/Disease/Components/DiseaseProtectionComponent.cs b/Content.Server/Disease/Components/DiseaseProtectionComponent.cs deleted file mode 100644 index e99e4dacc5..0000000000 --- a/Content.Server/Disease/Components/DiseaseProtectionComponent.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Content.Server.Disease.Components -{ - /// - /// Value added to clothing to give its wearer - /// protection against infection from diseases - /// - [RegisterComponent] - public sealed class DiseaseProtectionComponent : Component - { - /// - /// Float value between 0 and 1, will be subtracted - /// from the infection chance (which is base 0.7) - /// Reference guide is a full biosuit w/gloves & mask - /// should add up to exactly 0.7 - /// - [DataField("protection")] - public float Protection = 0.1f; - /// - /// Is the component currently being worn and affecting someone's disease - /// resistance? Making the unequip check not totally CBT - /// - public bool IsActive = false; - } -} diff --git a/Content.Server/Disease/Components/DiseaseSwabComponent.cs b/Content.Server/Disease/Components/DiseaseSwabComponent.cs deleted file mode 100644 index a4e6c0aa77..0000000000 --- a/Content.Server/Disease/Components/DiseaseSwabComponent.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Content.Shared.Disease; - -namespace Content.Server.Disease.Components -{ - /// - /// For mouth swabs used to collect and process - /// disease samples. - /// - [RegisterComponent] - public sealed class DiseaseSwabComponent : Component - { - /// - /// How long it takes to swab someone. - /// - [DataField("swabDelay")] - public float SwabDelay = 2f; - /// - /// If this swab has been used - /// - public bool Used = false; - /// - /// The disease prototype currently on the swab - /// - [ViewVariables] - public DiseasePrototype? Disease; - } -} diff --git a/Content.Server/Disease/Components/DiseaseVaccineComponent.cs b/Content.Server/Disease/Components/DiseaseVaccineComponent.cs deleted file mode 100644 index b949f6b580..0000000000 --- a/Content.Server/Disease/Components/DiseaseVaccineComponent.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Threading; -using Content.Shared.Disease; - -namespace Content.Server.Disease.Components -{ - /// - /// For disease vaccines - /// - [RegisterComponent] - public sealed class DiseaseVaccineComponent : Component - { - /// - /// How long it takes to inject someone - /// - [DataField("injectDelay")] - public float InjectDelay = 2f; - /// - /// If this vaccine has been used - /// - public bool Used = false; - - /// - /// The disease prototype currently on the vaccine - /// - [ViewVariables(VVAccess.ReadWrite)] - public DiseasePrototype? Disease; - } -} diff --git a/Content.Server/Disease/Components/DiseaseVaccineCreatorComponent.cs b/Content.Server/Disease/Components/DiseaseVaccineCreatorComponent.cs deleted file mode 100644 index f8353cb965..0000000000 --- a/Content.Server/Disease/Components/DiseaseVaccineCreatorComponent.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Content.Server.Disease.Components -{ - /// - /// Controls disease machine behavior specific to the - /// vaccine creating machine - /// - [RegisterComponent] - public sealed class DiseaseVaccineCreatorComponent : Component - {} -} diff --git a/Content.Server/Disease/Cures/DiseaseBedrestCure.cs b/Content.Server/Disease/Cures/DiseaseBedrestCure.cs deleted file mode 100644 index 8e7177f81a..0000000000 --- a/Content.Server/Disease/Cures/DiseaseBedrestCure.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Content.Server.Bed.Components; -using Content.Shared.Bed.Sleep; -using Content.Shared.Buckle.Components; -using Content.Shared.Disease; - -namespace Content.Server.Disease.Cures -{ - /// - /// Cures the disease after a certain amount of time - /// strapped. - /// - public sealed class DiseaseBedrestCure : DiseaseCure - { - [ViewVariables(VVAccess.ReadWrite)] - public int Ticker = 0; - - /// How many extra ticks you get for sleeping. - [DataField("sleepMultiplier")] - public int SleepMultiplier = 3; - - [DataField("maxLength", required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public int MaxLength = 60; - - public override bool Cure(DiseaseEffectArgs args) - { - if (!args.EntityManager.TryGetComponent(args.DiseasedEntity, out var buckle) || - !args.EntityManager.HasComponent(buckle.BuckledTo)) - return false; - - var ticks = 1; - if (args.EntityManager.HasComponent(args.DiseasedEntity)) - ticks *= SleepMultiplier; - - if (buckle.Buckled) - Ticker += ticks; - return Ticker >= MaxLength; - } - - public override string CureText() - { - return (Loc.GetString("diagnoser-cure-bedrest", ("time", MaxLength), ("sleep", (MaxLength / SleepMultiplier)))); - } - } -} diff --git a/Content.Server/Disease/Cures/DiseaseBodyTemperatureCure.cs b/Content.Server/Disease/Cures/DiseaseBodyTemperatureCure.cs deleted file mode 100644 index aa27d38e98..0000000000 --- a/Content.Server/Disease/Cures/DiseaseBodyTemperatureCure.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Content.Server.Temperature.Components; -using Content.Shared.Disease; - -namespace Content.Server.Disease.Cures -{ - /// - /// Cures the disease if temperature is within certain bounds. - /// - public sealed class DiseaseBodyTemperatureCure : DiseaseCure - { - [DataField("min")] - public float Min = 0; - - [DataField("max")] - public float Max = float.MaxValue; - public override bool Cure(DiseaseEffectArgs args) - { - if (!args.EntityManager.TryGetComponent(args.DiseasedEntity, out TemperatureComponent? temp)) - return false; - - return temp.CurrentTemperature > Min && temp.CurrentTemperature < float.MaxValue; - } - - public override string CureText() - { - if (Min == 0) - return Loc.GetString("diagnoser-cure-temp-max", ("max", Math.Round(Max))); - if (Max == float.MaxValue) - return Loc.GetString("diagnoser-cure-temp-min", ("min", Math.Round(Min))); - - return Loc.GetString("diagnoser-cure-temp-both", ("max", Math.Round(Max)), ("min", Math.Round(Min))); - } - } -} diff --git a/Content.Server/Disease/Cures/DiseaseJustWaitCure.cs b/Content.Server/Disease/Cures/DiseaseJustWaitCure.cs deleted file mode 100644 index dc44de16ad..0000000000 --- a/Content.Server/Disease/Cures/DiseaseJustWaitCure.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Content.Shared.Disease; - -namespace Content.Server.Disease.Cures -{ - /// - /// Automatically removes the disease after a - /// certain amount of time. - /// - public sealed class DiseaseJustWaitCure : DiseaseCure - { - /// - /// All of these are in seconds - /// - [ViewVariables(VVAccess.ReadWrite)] - public int Ticker = 0; - [DataField("maxLength", required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public int MaxLength = 150; - - public override bool Cure(DiseaseEffectArgs args) - { - Ticker++; - return Ticker >= MaxLength; - } - - public override string CureText() - { - return Loc.GetString("diagnoser-cure-wait", ("time", MaxLength)); - } - } -} diff --git a/Content.Server/Disease/Cures/DiseaseReagentCure.cs b/Content.Server/Disease/Cures/DiseaseReagentCure.cs deleted file mode 100644 index b30d09bf7a..0000000000 --- a/Content.Server/Disease/Cures/DiseaseReagentCure.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Content.Shared.Disease; -using Content.Shared.FixedPoint; -using Content.Shared.Chemistry.Reagent; -using Content.Server.Body.Components; -using Robust.Shared.Prototypes; - -namespace Content.Server.Disease.Cures -{ - /// - /// Cures the disease if a certain amount of reagent - /// is in the host's chemstream. - /// - public sealed class DiseaseReagentCure : DiseaseCure - { - [DataField("min")] - public FixedPoint2 Min = 5; - [DataField("reagent")] - public string? Reagent; - - public override bool Cure(DiseaseEffectArgs args) - { - if (!args.EntityManager.TryGetComponent(args.DiseasedEntity, out var bloodstream)) - return false; - - var quant = FixedPoint2.Zero; - if (Reagent != null && bloodstream.ChemicalSolution.ContainsReagent(Reagent)) - { - quant = bloodstream.ChemicalSolution.GetReagentQuantity(Reagent); - } - return quant >= Min; - } - - public override string CureText() - { - var prototypeMan = IoCManager.Resolve(); - if (Reagent == null || !prototypeMan.TryIndex(Reagent, out var reagentProt)) - return string.Empty; - return (Loc.GetString("diagnoser-cure-reagent", ("units", Min), ("reagent", reagentProt.LocalizedName))); - } - } -} diff --git a/Content.Server/Disease/DiseaseDiagnosisSystem.cs b/Content.Server/Disease/DiseaseDiagnosisSystem.cs deleted file mode 100644 index b671b097b3..0000000000 --- a/Content.Server/Disease/DiseaseDiagnosisSystem.cs +++ /dev/null @@ -1,403 +0,0 @@ -using Content.Server.Disease.Components; -using Content.Server.Nutrition.EntitySystems; -using Content.Server.Paper; -using Content.Server.Popups; -using Content.Server.Power.Components; -using Content.Server.Power.EntitySystems; -using Content.Server.Station.Systems; -using Content.Shared.Disease; -using Content.Shared.DoAfter; -using Content.Shared.Examine; -using Content.Shared.Hands.Components; -using Content.Shared.IdentityManagement; -using Content.Shared.Interaction; -using Content.Shared.Inventory; -using Content.Shared.Swab; -using Content.Shared.Tools.Components; -using Robust.Shared.Audio; -using Robust.Shared.Player; -using Robust.Shared.Random; -using Robust.Shared.Utility; - -namespace Content.Server.Disease -{ - /// - /// Everything that's about disease diangosis and machines is in here - /// - public sealed class DiseaseDiagnosisSystem : EntitySystem - { - [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; - [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly InventorySystem _inventorySystem = default!; - [Dependency] private readonly PaperSystem _paperSystem = default!; - [Dependency] private readonly StationSystem _stationSystem = default!; - [Dependency] private readonly SharedAppearanceSystem _appearance = default!; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnAfterInteract); - SubscribeLocalEvent(OnExamined); - SubscribeLocalEvent(OnAfterInteractUsing); - SubscribeLocalEvent(OnAfterInteractUsingVaccine); - // Visuals - SubscribeLocalEvent(OnPowerChanged); - // Private Events - SubscribeLocalEvent(OnDiagnoserFinished); - SubscribeLocalEvent(OnVaccinatorFinished); - SubscribeLocalEvent(OnSwabDoAfter); - } - - private Queue AddQueue = new(); - private Queue RemoveQueue = new(); - - /// - /// This handles running disease machines - /// to handle their delay and visuals. - /// - public override void Update(float frameTime) - { - foreach (var uid in AddQueue) - { - EnsureComp(uid); - } - - AddQueue.Clear(); - foreach (var uid in RemoveQueue) - { - RemComp(uid); - } - - RemoveQueue.Clear(); - - foreach (var (_, diseaseMachine) in EntityQuery()) - { - diseaseMachine.Accumulator += frameTime; - - while (diseaseMachine.Accumulator >= diseaseMachine.Delay) - { - diseaseMachine.Accumulator -= diseaseMachine.Delay; - var ev = new DiseaseMachineFinishedEvent(diseaseMachine); - RaiseLocalEvent(diseaseMachine.Owner, ev); - RemoveQueue.Enqueue(diseaseMachine.Owner); - } - } - } - - /// - /// Event Handlers - /// - - /// - /// This handles using swabs on other people - /// and checks that the swab isn't already used - /// and the other person's mouth is accessible - /// and then adds a random disease from that person - /// to the swab if they have any - /// - private void OnAfterInteract(EntityUid uid, DiseaseSwabComponent swab, AfterInteractEvent args) - { - if (args.Target == null || !args.CanReach || !HasComp(args.Target)) - return; - - if (swab.Used) - { - _popupSystem.PopupEntity(Loc.GetString("swab-already-used"), args.User, args.User); - return; - } - - if (_inventorySystem.TryGetSlotEntity(args.Target.Value, "mask", out var maskUid) && - EntityManager.TryGetComponent(maskUid, out var blocker) && - blocker.Enabled) - { - _popupSystem.PopupEntity(Loc.GetString("swab-mask-blocked", ("target", Identity.Entity(args.Target.Value, EntityManager)), ("mask", maskUid)), args.User, args.User); - return; - } - - _doAfterSystem.TryStartDoAfter(new DoAfterArgs(args.User, swab.SwabDelay, new DiseaseSwabDoAfterEvent(), uid, target: args.Target, used: uid) - { - BreakOnTargetMove = true, - BreakOnUserMove = true, - NeedHand = true - }); - } - - /// - /// This handles the disease diagnoser machine up - /// until it's turned on. It has some slight - /// differences in checks from the vaccinator. - /// - private void OnAfterInteractUsing(EntityUid uid, DiseaseDiagnoserComponent component, AfterInteractUsingEvent args) - { - var machine = Comp(uid); - if (args.Handled || !args.CanReach) - return; - - if (HasComp(uid) || !this.IsPowered(uid, EntityManager)) - return; - - if (!HasComp(args.User) || HasComp(args.Used)) // Don't want to accidentally breach wrenching or whatever - return; - - if (!TryComp(args.Used, out var swab)) - { - _popupSystem.PopupEntity(Loc.GetString("diagnoser-cant-use-swab", ("machine", uid), ("swab", args.Used)), uid, args.User); - return; - } - _popupSystem.PopupEntity(Loc.GetString("machine-insert-item", ("machine", uid), ("item", args.Used), ("user", args.User)), uid, args.User); - - - machine.Disease = swab.Disease; - EntityManager.DeleteEntity(args.Used); - - AddQueue.Enqueue(uid); - UpdateAppearance(uid, true, true); - SoundSystem.Play("/Audio/Machines/diagnoser_printing.ogg", Filter.Pvs(uid), uid); - } - - /// - /// This handles the vaccinator machine up - /// until it's turned on. It has some slight - /// differences in checks from the diagnoser. - /// - private void OnAfterInteractUsingVaccine(EntityUid uid, DiseaseVaccineCreatorComponent component, AfterInteractUsingEvent args) - { - if (args.Handled || !args.CanReach) - return; - - if (HasComp(uid) || !this.IsPowered(uid, EntityManager)) - return; - - if (!HasComp(args.User) || HasComp(args.Used)) //This check ensures tools don't break without yaml ordering jank - return; - - if (!TryComp(args.Used, out var swab) || swab.Disease == null || !swab.Disease.Infectious) - { - _popupSystem.PopupEntity(Loc.GetString("diagnoser-cant-use-swab", ("machine", uid), ("swab", args.Used)), uid, args.User); - return; - } - _popupSystem.PopupEntity(Loc.GetString("machine-insert-item", ("machine", uid), ("item", args.Used), ("user", args.User)), uid, args.User); - var machine = Comp(uid); - machine.Disease = swab.Disease; - EntityManager.DeleteEntity(args.Used); - - AddQueue.Enqueue(uid); - UpdateAppearance(uid, true, true); - SoundSystem.Play("/Audio/Machines/vaccinator_running.ogg", Filter.Pvs(uid), uid); - } - - /// - /// This handles swab examination text - /// so you can tell if they are used or not. - /// - private void OnExamined(EntityUid uid, DiseaseSwabComponent swab, ExaminedEvent args) - { - if (args.IsInDetailsRange) - { - if (swab.Used) - args.PushMarkup(Loc.GetString("swab-used")); - else - args.PushMarkup(Loc.GetString("swab-unused")); - } - } - - /// - /// Helper functions - /// - - /// - /// This assembles a disease report - /// With its basic details and - /// specific cures (i.e. not spaceacillin). - /// The cure resist field tells you how - /// effective spaceacillin etc will be. - /// - private FormattedMessage AssembleDiseaseReport(DiseasePrototype disease) - { - FormattedMessage report = new(); - var diseaseName = Loc.GetString(disease.Name); - report.AddMarkup(Loc.GetString("diagnoser-disease-report-name", ("disease", diseaseName))); - report.PushNewline(); - - if (disease.Infectious) - { - report.AddMarkup(Loc.GetString("diagnoser-disease-report-infectious")); - report.PushNewline(); - } else - { - report.AddMarkup(Loc.GetString("diagnoser-disease-report-not-infectious")); - report.PushNewline(); - } - string cureResistLine = string.Empty; - cureResistLine += disease.CureResist switch - { - < 0f => Loc.GetString("diagnoser-disease-report-cureresist-none"), - <= 0.05f => Loc.GetString("diagnoser-disease-report-cureresist-low"), - <= 0.14f => Loc.GetString("diagnoser-disease-report-cureresist-medium"), - _ => Loc.GetString("diagnoser-disease-report-cureresist-high") - }; - report.AddMarkup(cureResistLine); - report.PushNewline(); - - // Add Cures - if (disease.Cures.Count == 0) - { - report.AddMarkup(Loc.GetString("diagnoser-no-cures")); - } - else - { - report.PushNewline(); - report.AddMarkup(Loc.GetString("diagnoser-cure-has")); - report.PushNewline(); - - foreach (var cure in disease.Cures) - { - report.AddMarkup(cure.CureText()); - report.PushNewline(); - } - } - - return report; - } - - public bool ServerHasDisease(DiseaseServerComponent server, DiseasePrototype disease) - { - bool has = false; - foreach (var serverDisease in server.Diseases) - { - if (serverDisease.ID == disease.ID) - has = true; - } - return has; - } - /// - /// Appearance stuff - /// - - /// - /// Appearance helper function to - /// set the component's power and running states. - /// - private void UpdateAppearance(EntityUid uid, bool isOn, bool isRunning) - { - if (!TryComp(uid, out var appearance)) - return; - - _appearance.SetData(uid, DiseaseMachineVisuals.IsOn, isOn, appearance); - _appearance.SetData(uid, DiseaseMachineVisuals.IsRunning, isRunning, appearance); - } - /// - /// Makes sure the machine is visually off/on. - /// - private void OnPowerChanged(EntityUid uid, DiseaseMachineComponent component, ref PowerChangedEvent args) - { - UpdateAppearance(uid, args.Powered, false); - } - - /// - /// Copies a disease prototype to the swab - /// after the doafter completes. - /// - private void OnSwabDoAfter(EntityUid uid, DiseaseSwabComponent component, DoAfterEvent args) - { - if (args.Handled || args.Cancelled || !TryComp(args.Args.Target, out var carrier) || !TryComp(args.Args.Used, out var swab)) - return; - - swab.Used = true; - _popupSystem.PopupEntity(Loc.GetString("swab-swabbed", ("target", Identity.Entity(args.Args.Target.Value, EntityManager))), args.Args.Target.Value, args.Args.User); - - if (swab.Disease != null || carrier.Diseases.Count == 0) - return; - - swab.Disease = _random.Pick(carrier.Diseases); - } - - - /// - /// Prints a diagnostic report with its findings. - /// Also cancels the animation. - /// - private void OnDiagnoserFinished(EntityUid uid, DiseaseDiagnoserComponent component, DiseaseMachineFinishedEvent args) - { - var isPowered = this.IsPowered(uid, EntityManager); - UpdateAppearance(uid, isPowered, false); - // spawn a piece of paper. - var printed = Spawn(args.Machine.MachineOutput, Transform(uid).Coordinates); - - if (!TryComp(printed, out var paper)) - return; - - string reportTitle; - FormattedMessage contents = new(); - if (args.Machine.Disease != null) - { - var diseaseName = Loc.GetString(args.Machine.Disease.Name); - reportTitle = Loc.GetString("diagnoser-disease-report", ("disease", diseaseName)); - contents = AssembleDiseaseReport(args.Machine.Disease); - - var known = false; - - foreach (var server in EntityQuery(true)) - { - if (_stationSystem.GetOwningStation(server.Owner) != _stationSystem.GetOwningStation(uid)) - continue; - - if (ServerHasDisease(server, args.Machine.Disease)) - { - known = true; - } - else - { - server.Diseases.Add(args.Machine.Disease); - } - } - - if (!known) - { - Spawn("ResearchDisk5000", Transform(uid).Coordinates); - } - } - else - { - reportTitle = Loc.GetString("diagnoser-disease-report-none"); - contents.AddMarkup(Loc.GetString("diagnoser-disease-report-none-contents")); - } - MetaData(printed).EntityName = reportTitle; - - _paperSystem.SetContent(printed, contents.ToMarkup(), paper); - } - - /// - /// Prints a vaccine that will vaccinate - /// against the disease on the inserted swab. - /// - private void OnVaccinatorFinished(EntityUid uid, DiseaseVaccineCreatorComponent component, DiseaseMachineFinishedEvent args) - { - UpdateAppearance(uid, this.IsPowered(uid, EntityManager), false); - - // spawn a vaccine - var vaxx = Spawn(args.Machine.MachineOutput, Transform(uid).Coordinates); - - if (!TryComp(vaxx, out var vaxxComp)) - return; - - vaxxComp.Disease = args.Machine.Disease; - } - - /// - /// Fires when a disease machine is done - /// with its production delay and ready to - /// create a report or vaccine - /// - private sealed class DiseaseMachineFinishedEvent : EntityEventArgs - { - public DiseaseMachineComponent Machine {get;} - public DiseaseMachineFinishedEvent(DiseaseMachineComponent machine) - { - Machine = machine; - } - } - } -} - diff --git a/Content.Server/Disease/DiseaseSystem.cs b/Content.Server/Disease/DiseaseSystem.cs deleted file mode 100644 index 0366ee2e8a..0000000000 --- a/Content.Server/Disease/DiseaseSystem.cs +++ /dev/null @@ -1,505 +0,0 @@ -using Content.Server.Body.Systems; -using Content.Server.Chat.Systems; -using Content.Server.Disease.Components; -using Content.Server.Nutrition.EntitySystems; -using Content.Server.Popups; -using Content.Shared.Clothing.Components; -using Content.Shared.Disease; -using Content.Shared.Disease.Components; -using Content.Shared.Disease.Events; -using Content.Shared.DoAfter; -using Content.Shared.Examine; -using Content.Shared.IdentityManagement; -using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Inventory; -using Content.Shared.Inventory.Events; -using Content.Shared.Mobs.Components; -using Content.Shared.Mobs.Systems; -using Content.Shared.Rejuvenate; -using Robust.Shared.Audio; -using Robust.Server.GameObjects; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; -using Robust.Shared.Serialization.Manager; -using Robust.Shared.Utility; - -namespace Content.Server.Disease -{ - - /// - /// Handles disease propagation & curing - /// - public sealed class DiseaseSystem : EntitySystem - { - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly ISerializationManager _serializationManager = default!; - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; - [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; - [Dependency] private readonly InventorySystem _inventorySystem = default!; - [Dependency] private readonly MobStateSystem _mobStateSystem = default!; - [Dependency] private readonly ChatSystem _chatSystem = default!; - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnInit); - SubscribeLocalEvent(OnTryCureDisease); - SubscribeLocalEvent(OnRejuvenate); - SubscribeLocalEvent(OnContactInteraction); - SubscribeLocalEvent(OnEntitySpeak); - SubscribeLocalEvent(OnEquipped); - SubscribeLocalEvent(OnUnequipped); - SubscribeLocalEvent(OnAfterInteract); - SubscribeLocalEvent(OnExamined); - // Handling stuff from other systems - SubscribeLocalEvent(OnApplyMetabolicMultiplier); - // Private events stuff - SubscribeLocalEvent(OnDoAfter); - } - - private Queue AddQueue = new(); - private Queue<(DiseaseCarrierComponent carrier, DiseasePrototype disease)> CureQueue = new(); - - /// - /// First, adds or removes diseased component from the queues and clears them. - /// Then, iterates over every diseased component to check for their effects - /// and cures - /// - public override void Update(float frameTime) - { - base.Update(frameTime); - foreach (var entity in AddQueue) - { - EnsureComp(entity); - } - - AddQueue.Clear(); - - foreach (var tuple in CureQueue) - { - if (tuple.carrier.Diseases.Count == 1) //This is reliable unlike testing Count == 0 right after removal for reasons I don't quite get - RemComp(tuple.carrier.Owner); - tuple.carrier.PastDiseases.Add(tuple.disease); - tuple.carrier.Diseases.Remove(tuple.disease); - } - CureQueue.Clear(); - - foreach (var (_, carrierComp, mobState) in EntityQuery()) - { - DebugTools.Assert(carrierComp.Diseases.Count > 0); - - if (_mobStateSystem.IsDead(mobState.Owner, mobState)) - { - if (_random.Prob(0.005f * frameTime)) //Mean time to remove is 200 seconds per disease - CureDisease(carrierComp, _random.Pick(carrierComp.Diseases)); - - continue; - } - - for (var i = 0; i < carrierComp.Diseases.Count; i++) //this is a for-loop so that it doesn't break when new diseases are added - { - var disease = carrierComp.Diseases[i]; - disease.Accumulator += frameTime; - disease.TotalAccumulator += frameTime; - - if (disease.Accumulator < disease.TickTime) continue; - - // if the disease is on the silent disease list, don't do effects - var doEffects = carrierComp.CarrierDiseases?.Contains(disease.ID) != true; - var args = new DiseaseEffectArgs(carrierComp.Owner, disease, EntityManager); - disease.Accumulator -= disease.TickTime; - - int stage = 0; //defaults to stage 0 because you should always have one - float lastThreshold = 0; - for (var j = 0; j < disease.Stages.Count; j++) - { - if (disease.TotalAccumulator >= disease.Stages[j] && - disease.Stages[j] > lastThreshold) - { - lastThreshold = disease.Stages[j]; - stage = j; - } - } - - foreach (var cure in disease.Cures) - { - if (cure.Stages.AsSpan().Contains(stage) && cure.Cure(args)) - CureDisease(carrierComp, disease); - } - - if (doEffects) - { - foreach (var effect in disease.Effects) - { - if (effect.Stages.AsSpan().Contains(stage) && _random.Prob(effect.Probability)) - effect.Effect(args); - } - } - } - } - } - - /// - /// Event Handlers - /// - - /// - /// Fill in the natural immunities of this entity. - /// - private void OnInit(EntityUid uid, DiseaseCarrierComponent component, ComponentInit args) - { - if (component.NaturalImmunities == null || component.NaturalImmunities.Count == 0) - return; - - foreach (var immunity in component.NaturalImmunities) - { - if (_prototypeManager.TryIndex(immunity, out var disease)) - component.PastDiseases.Add(disease); - else - { - Logger.Error("Failed to index disease prototype + " + immunity + " for " + uid); - } - } - } - - /// - /// Used when something is trying to cure ANY disease on the target, - /// not for special disease interactions. Randomly - /// tries to cure every disease on the target. - /// - private void OnTryCureDisease(EntityUid uid, DiseaseCarrierComponent component, CureDiseaseAttemptEvent args) - { - foreach (var disease in component.Diseases) - { - var cureProb = ((args.CureChance / component.Diseases.Count) - disease.CureResist); - if (cureProb < 0) - return; - if (cureProb > 1) - { - CureDisease(component, disease); - return; - } - if (_random.Prob(cureProb)) - { - CureDisease(component, disease); - return; - } - } - } - - private void OnRejuvenate(EntityUid uid, DiseaseCarrierComponent component, RejuvenateEvent args) - { - CureAllDiseases(uid, component); - } - - /// - /// Called when a component with disease protection - /// is equipped so it can be added to the person's - /// total disease resistance - /// - private void OnEquipped(EntityUid uid, DiseaseProtectionComponent component, GotEquippedEvent args) - { - // This only works on clothing - if (!TryComp(uid, out var clothing)) - return; - // Is the clothing in its actual slot? - if (!clothing.Slots.HasFlag(args.SlotFlags)) - return; - // Give the user the component's disease resist - if(TryComp(args.Equipee, out var carrier)) - carrier.DiseaseResist += component.Protection; - // Set the component to active to the unequip check isn't CBT - component.IsActive = true; - } - - /// - /// Called when a component with disease protection - /// is unequipped so it can be removed from the person's - /// total disease resistance - /// - private void OnUnequipped(EntityUid uid, DiseaseProtectionComponent component, GotUnequippedEvent args) - { - // Only undo the resistance if it was affecting the user - if (!component.IsActive) - return; - if(TryComp(args.Equipee, out var carrier)) - carrier.DiseaseResist -= component.Protection; - component.IsActive = false; - } - - /// - /// Called when it's already decided a disease will be cured - /// so it can be safely queued up to be removed from the target - /// and added to past disease history (for immunity) - /// - private void CureDisease(DiseaseCarrierComponent carrier, DiseasePrototype disease) - { - var CureTuple = (carrier, disease); - CureQueue.Enqueue(CureTuple); - _popupSystem.PopupEntity(Loc.GetString("disease-cured"), carrier.Owner, carrier.Owner); - } - - public void CureAllDiseases(EntityUid uid, DiseaseCarrierComponent? carrier = null) - { - if (!Resolve(uid, ref carrier)) - return; - - foreach (var disease in carrier.Diseases) - { - CureDisease(carrier, disease); - } - } - - /// - /// When a diseased person interacts with something, check infection. - /// - private void OnContactInteraction(EntityUid uid, DiseasedComponent component, ContactInteractionEvent args) - { - InteractWithDiseased(uid, args.Other); - } - - private void OnEntitySpeak(EntityUid uid, DiseasedComponent component, EntitySpokeEvent args) - { - if (TryComp(uid, out var carrier)) - { - SneezeCough(uid, _random.Pick(carrier.Diseases), string.Empty); - } - } - - /// - /// Called when a vaccine is used on someone - /// to handle the vaccination doafter - /// - private void OnAfterInteract(EntityUid uid, DiseaseVaccineComponent vaxx, AfterInteractEvent args) - { - if (args.Target == null || !args.CanReach || args.Handled) - return; - - args.Handled = true; - - if (vaxx.Used) - { - _popupSystem.PopupEntity(Loc.GetString("vaxx-already-used"), args.User, args.User); - return; - } - - _doAfterSystem.TryStartDoAfter(new DoAfterArgs(args.User, vaxx.InjectDelay, new VaccineDoAfterEvent(), uid, target: args.Target, used: uid) - { - BreakOnTargetMove = true, - BreakOnUserMove = true, - NeedHand = true - }); - } - - /// - /// Called when a vaccine is examined. - /// Currently doesn't do much because - /// vaccines don't have unique art with a seperate - /// state visualizer. - /// - private void OnExamined(EntityUid uid, DiseaseVaccineComponent vaxx, ExaminedEvent args) - { - if (args.IsInDetailsRange) - { - if (vaxx.Used) - args.PushMarkup(Loc.GetString("vaxx-used")); - else - args.PushMarkup(Loc.GetString("vaxx-unused")); - } - } - - - private void OnApplyMetabolicMultiplier(EntityUid uid, DiseaseCarrierComponent component, ApplyMetabolicMultiplierEvent args) - { - if (args.Apply) - { - foreach (var disease in component.Diseases) - { - disease.TickTime *= args.Multiplier; - return; - } - } - foreach (var disease in component.Diseases) - { - disease.TickTime /= args.Multiplier; - if (disease.Accumulator >= disease.TickTime) - disease.Accumulator = disease.TickTime; - } - } - - /// - /// Helper functions - /// - - /// - /// Tries to infect anyone that - /// interacts with a diseased person or body - /// - private void InteractWithDiseased(EntityUid diseased, EntityUid target, DiseaseCarrierComponent? diseasedCarrier = null) - { - if (!Resolve(diseased, ref diseasedCarrier, false) || - diseasedCarrier.Diseases.Count == 0 || - !TryComp(target, out var carrier)) - return; - - var disease = _random.Pick(diseasedCarrier.Diseases); - TryInfect(carrier, disease, 0.4f); - } - - /// - /// Adds a disease to a target - /// if it's not already in their current - /// or past diseases. If you want this - /// to not be guaranteed you are looking - /// for TryInfect. - /// - public void TryAddDisease(EntityUid host, DiseasePrototype addedDisease, DiseaseCarrierComponent? target = null) - { - if (!Resolve(host, ref target, false)) - return; - - foreach (var disease in target.AllDiseases) - { - if (disease.ID == addedDisease?.ID) //ID because of the way protoypes work - return; - } - - var freshDisease = _serializationManager.CreateCopy(addedDisease, notNullableOverride: true); - - if (freshDisease == null) return; - - target.Diseases.Add(freshDisease); - AddQueue.Enqueue(target.Owner); - } - - public void TryAddDisease(EntityUid host, string? addedDisease, DiseaseCarrierComponent? target = null) - { - if (addedDisease == null || !_prototypeManager.TryIndex(addedDisease, out var added)) - return; - - TryAddDisease(host, added, target); - } - - /// - /// Pits the infection chance against the - /// person's disease resistance and - /// rolls the dice to see if they get - /// the disease. - /// - /// The target of the disease - /// The disease to apply - /// % chance of the disease being applied, before considering resistance - /// Bypass the disease's infectious trait. - public void TryInfect(DiseaseCarrierComponent carrier, DiseasePrototype? disease, float chance = 0.7f, bool forced = false) - { - if(disease == null || !forced && !disease.Infectious) - return; - var infectionChance = chance - carrier.DiseaseResist; - if (infectionChance <= 0) - return; - if (_random.Prob(infectionChance)) - TryAddDisease(carrier.Owner, disease, carrier); - } - - public void TryInfect(DiseaseCarrierComponent carrier, string? disease, float chance = 0.7f, bool forced = false) - { - if (disease == null || !_prototypeManager.TryIndex(disease, out var d)) - return; - - TryInfect(carrier, d, chance, forced); - } - - /// - /// Raises an event for systems to cancel the snough if needed - /// Plays a sneeze/cough sound and popup if applicable - /// and then tries to infect anyone in range - /// if the snougher is not wearing a mask. - /// - public bool SneezeCough(EntityUid uid, DiseasePrototype? disease, string emoteId, bool airTransmit = true, TransformComponent? xform = null) - { - if (!Resolve(uid, ref xform)) return false; - - if (_mobStateSystem.IsDead(uid)) return false; - - var attemptSneezeCoughEvent = new AttemptSneezeCoughEvent(uid, emoteId); - RaiseLocalEvent(uid, ref attemptSneezeCoughEvent); - if (attemptSneezeCoughEvent.Cancelled) return false; - - _chatSystem.TryEmoteWithChat(uid, emoteId); - - if (disease is not { Infectious: true } || !airTransmit) - return true; - - if (_inventorySystem.TryGetSlotEntity(uid, "mask", out var maskUid) && - EntityManager.TryGetComponent(maskUid, out var blocker) && - blocker.Enabled) - return true; - - var carrierQuery = GetEntityQuery(); - - foreach (var entity in _lookup.GetEntitiesInRange(xform.MapPosition, 2f)) - { - if (!carrierQuery.TryGetComponent(entity, out var carrier) || - !_interactionSystem.InRangeUnobstructed(uid, entity)) continue; - - TryInfect(carrier, disease, 0.3f); - } - return true; - } - - /// - /// Adds a disease to the carrier's - /// past diseases to give them immunity - /// IF they don't already have the disease. - /// - public void Vaccinate(DiseaseCarrierComponent carrier, DiseasePrototype disease) - { - foreach (var currentDisease in carrier.Diseases) - { - if (currentDisease.ID == disease.ID) //ID because of the way protoypes work - return; - } - carrier.PastDiseases.Add(disease); - } - - private void OnDoAfter(EntityUid uid, DiseaseVaccineComponent component, DoAfterEvent args) - { - if (args.Handled || args.Cancelled || !TryComp(args.Args.Target, out var carrier) || component.Disease == null) - return; - - Vaccinate(carrier, component.Disease); - EntityManager.DeleteEntity(uid); - args.Handled = true; - } - } - - /// - /// This event is fired by chems - /// and other brute-force rather than - /// specific cures. It will roll the dice to attempt - /// to cure each disease on the target - /// - public sealed class CureDiseaseAttemptEvent : EntityEventArgs - { - public float CureChance { get; } - public CureDiseaseAttemptEvent(float cureChance) - { - CureChance = cureChance; - } - } - - /// - /// Controls whether the snough is a sneeze, cough - /// or neither. If none, will not create - /// a popup. Mostly used for talking - /// - public enum SneezeCoughType - { - Sneeze, - Cough, - None - } -} diff --git a/Content.Server/Disease/Effects/DiseaseAddComponent.cs b/Content.Server/Disease/Effects/DiseaseAddComponent.cs deleted file mode 100644 index 7e38480592..0000000000 --- a/Content.Server/Disease/Effects/DiseaseAddComponent.cs +++ /dev/null @@ -1,30 +0,0 @@ -using JetBrains.Annotations; -using Content.Shared.Disease; - -namespace Content.Server.Disease.Effects -{ - /// - /// Adds a component to the diseased entity - /// - [UsedImplicitly] - public sealed class DiseaseAddComponent : DiseaseEffect - { - /// - /// The component that is added at the end of build up - /// - [DataField("comp")] - public string? Comp = null; - - public override void Effect(DiseaseEffectArgs args) - { - if (Comp == null) - return; - - EntityUid uid = args.DiseasedEntity; - var newComponent = (Component) IoCManager.Resolve().GetComponent(Comp); - newComponent.Owner = uid; - if (!args.EntityManager.HasComponent(uid, newComponent.GetType())) - args.EntityManager.AddComponent(uid, newComponent); - } - } -} diff --git a/Content.Server/Disease/Effects/DiseaseAdjustReagent.cs b/Content.Server/Disease/Effects/DiseaseAdjustReagent.cs deleted file mode 100644 index 42e75d5b92..0000000000 --- a/Content.Server/Disease/Effects/DiseaseAdjustReagent.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Content.Server.Chemistry.EntitySystems; -using Content.Shared.Chemistry.Reagent; -using Content.Shared.FixedPoint; -using JetBrains.Annotations; -using Content.Server.Body.Components; -using Content.Shared.Disease; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Disease.Effects -{ - /// - /// Adds or removes reagents from the - /// host's chemstream. - /// - [UsedImplicitly] - public sealed class DiseaseAdjustReagent : DiseaseEffect - { - /// - /// The reagent ID to add or remove. - /// - [DataField("reagent", customTypeSerializer:typeof(PrototypeIdSerializer))] - public string? Reagent = null; - - [DataField("amount", required: true)] - public FixedPoint2 Amount = default!; - - public override void Effect(DiseaseEffectArgs args) - { - if (!args.EntityManager.TryGetComponent(args.DiseasedEntity, out var bloodstream)) - return; - - var stream = bloodstream.ChemicalSolution; - if (stream == null) - return; - - var solutionSys = args.EntityManager.EntitySysManager.GetEntitySystem(); - if (Reagent == null) - return; - - if (Amount < 0 && stream.ContainsReagent(Reagent)) - solutionSys.TryRemoveReagent(args.DiseasedEntity, stream, Reagent, -Amount); - - if (Amount > 0) - solutionSys.TryAddReagent(args.DiseasedEntity, stream, Reagent, Amount, out _); - } - } -} diff --git a/Content.Server/Disease/Effects/DiseaseGenericStatusEffect.cs b/Content.Server/Disease/Effects/DiseaseGenericStatusEffect.cs deleted file mode 100644 index af36ba9398..0000000000 --- a/Content.Server/Disease/Effects/DiseaseGenericStatusEffect.cs +++ /dev/null @@ -1,67 +0,0 @@ -using Content.Shared.Disease; -using Content.Shared.StatusEffect; -using JetBrains.Annotations; - -namespace Content.Server.Disease.Effects -{ - /// - /// Adds a generic status effect to the entity. - /// Differs from the chem version in its defaults - /// to better facilitate adding components that - /// last the length of the disease. - /// - [UsedImplicitly] - public sealed class DiseaseGenericStatusEffect : DiseaseEffect - { - /// - /// The status effect key - /// Prevents other components from being with the same key - /// - [DataField("key", required: true)] - public string Key = default!; - /// - /// The component to add - /// - [DataField("component")] - public string Component = String.Empty; - - [DataField("time")] - public float Time = 1.01f; /// I'm afraid if this was exact the key could get stolen by another thing - - /// - /// true - refresh status effect time, false - accumulate status effect time - /// - [DataField("refresh")] - public bool Refresh = false; - - /// - /// Should this effect add the status effect, remove time from it, or set its cooldown? - /// - [DataField("type")] - public StatusEffectDiseaseType Type = StatusEffectDiseaseType.Add; - - public override void Effect(DiseaseEffectArgs args) - { - var statusSys = EntitySystem.Get(); - if (Type == StatusEffectDiseaseType.Add && Component != String.Empty) - { - statusSys.TryAddStatusEffect(args.DiseasedEntity, Key, TimeSpan.FromSeconds(Time), Refresh, Component); - } - else if (Type == StatusEffectDiseaseType.Remove) - { - statusSys.TryRemoveTime(args.DiseasedEntity, Key, TimeSpan.FromSeconds(Time)); - } - else if (Type == StatusEffectDiseaseType.Set) - { - statusSys.TrySetTime(args.DiseasedEntity, Key, TimeSpan.FromSeconds(Time)); - } - } - } - /// See status effects for how these work - public enum StatusEffectDiseaseType - { - Add, - Remove, - Set - } -} diff --git a/Content.Server/Disease/Effects/DiseaseHealthChange.cs b/Content.Server/Disease/Effects/DiseaseHealthChange.cs deleted file mode 100644 index af5a81cc88..0000000000 --- a/Content.Server/Disease/Effects/DiseaseHealthChange.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Content.Shared.Disease; -using Content.Shared.Damage; -using JetBrains.Annotations; - -namespace Content.Server.Disease.Effects -{ - /// - /// Deals or heals damage to the host - /// - [UsedImplicitly] - public sealed class DiseaseHealthChange : DiseaseEffect - { - [DataField("damage", required: true)] - [ViewVariables(VVAccess.ReadWrite)] - public DamageSpecifier Damage = default!; - public override void Effect(DiseaseEffectArgs args) - { - EntitySystem.Get().TryChangeDamage(args.DiseasedEntity, Damage, true, false); - } - } -} diff --git a/Content.Server/Disease/Effects/DiseaseHonk.cs b/Content.Server/Disease/Effects/DiseaseHonk.cs deleted file mode 100644 index 9ff4bd4aa3..0000000000 --- a/Content.Server/Disease/Effects/DiseaseHonk.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Content.Shared.Chat.Prototypes; -using Content.Shared.Disease; -using JetBrains.Annotations; -using Robust.Shared.Audio; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Disease -{ - /// - /// Makes the diseased honk. - /// or neither. - /// - [UsedImplicitly] - public sealed class DiseaseHonk : DiseaseEffect - { - /// - /// Message to play when honking. - /// - [DataField("honkMessage")] - public string HonkMessage = "disease-honk"; - - /// - /// Emote to play when honking. - /// - [DataField("emote", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] - public string EmoteId = String.Empty; - - /// - /// Whether to spread the disease through the air. - /// - [DataField("airTransmit")] - public bool AirTransmit = false; - - public override void Effect(DiseaseEffectArgs args) - { - EntitySystem.Get().SneezeCough(args.DiseasedEntity, args.Disease, EmoteId, AirTransmit); - } - } -} diff --git a/Content.Server/Disease/Effects/DiseasePolymorph.cs b/Content.Server/Disease/Effects/DiseasePolymorph.cs deleted file mode 100644 index f6136cc846..0000000000 --- a/Content.Server/Disease/Effects/DiseasePolymorph.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Content.Server.Polymorph.Systems; -using Content.Shared.Audio; -using Content.Shared.Disease; -using Content.Shared.Polymorph; -using Content.Shared.Popups; -using JetBrains.Annotations; -using Robust.Shared.Audio; -using Robust.Shared.Player; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Disease.Effects -{ - [UsedImplicitly] - public sealed class DiseasePolymorph : DiseaseEffect - { - [DataField("polymorphId", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] - [ViewVariables(VVAccess.ReadWrite)] - public readonly string PolymorphId = default!; - - [DataField("polymorphSound")] - [ViewVariables(VVAccess.ReadWrite)] - public SoundSpecifier? PolymorphSound; - - [DataField("polymorphMessage")] - [ViewVariables(VVAccess.ReadWrite)] - public string? PolymorphMessage; - - public override void Effect(DiseaseEffectArgs args) - { - EntityUid? polyUid = EntitySystem.Get().PolymorphEntity(args.DiseasedEntity, PolymorphId); - - if (PolymorphSound != null && polyUid != null) - SoundSystem.Play(PolymorphSound.GetSound(), Filter.Pvs(polyUid.Value), polyUid.Value, AudioHelpers.WithVariation(0.2f)); - - if (PolymorphMessage != null && polyUid != null) - EntitySystem.Get().PopupEntity(Loc.GetString(PolymorphMessage), polyUid.Value, polyUid.Value, PopupType.Large); - } - } -} diff --git a/Content.Server/Disease/Effects/DiseasePopUp.cs b/Content.Server/Disease/Effects/DiseasePopUp.cs deleted file mode 100644 index b1d5c2b981..0000000000 --- a/Content.Server/Disease/Effects/DiseasePopUp.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Content.Shared.Disease; -using Content.Shared.Popups; -using Robust.Shared.Player; -using JetBrains.Annotations; -using Content.Shared.IdentityManagement; - -namespace Content.Server.Disease.Effects -{ - /// - /// Plays a popup on the host's transform. - /// Supports passing the host's entity metadata - /// in PVS ones with {$person} - /// - [UsedImplicitly] - public sealed class DiseasePopUp : DiseaseEffect - { - [DataField("message")] - public string Message = "disease-sick-generic"; - - [DataField("type")] - public PopupRecipients Type = PopupRecipients.Local; - - [DataField("visualType")] - public PopupType VisualType = PopupType.Small; - - public override void Effect(DiseaseEffectArgs args) - { - var popupSys = args.EntityManager.EntitySysManager.GetEntitySystem(); - - if (Type == PopupRecipients.Local) - popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, args.DiseasedEntity, VisualType); - else if (Type == PopupRecipients.Pvs) - popupSys.PopupEntity(Loc.GetString(Message, ("person", Identity.Entity(args.DiseasedEntity, args.EntityManager))), args.DiseasedEntity, VisualType); - } - - } - - public enum PopupRecipients - { - Pvs, - Local - } -} diff --git a/Content.Server/Disease/Effects/DiseaseSnough.cs b/Content.Server/Disease/Effects/DiseaseSnough.cs deleted file mode 100644 index 8ee12c18ba..0000000000 --- a/Content.Server/Disease/Effects/DiseaseSnough.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Content.Shared.Chat.Prototypes; -using Content.Shared.Disease; -using JetBrains.Annotations; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Disease -{ - /// - /// Makes the diseased sneeze or cough - /// or neither. - /// - [UsedImplicitly] - public sealed class DiseaseSnough : DiseaseEffect - { - /// - /// Emote to play when snoughing - /// - [DataField("emote", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] - public string EmoteId = String.Empty; - - /// - /// Whether to spread the disease through the air - /// - [DataField("airTransmit")] - public bool AirTransmit = true; - - public override void Effect(DiseaseEffectArgs args) - { - EntitySystem.Get().SneezeCough(args.DiseasedEntity, args.Disease, EmoteId, AirTransmit); - } - } -} diff --git a/Content.Server/Disease/Effects/DiseaseVomit.cs b/Content.Server/Disease/Effects/DiseaseVomit.cs deleted file mode 100644 index 0c5645193b..0000000000 --- a/Content.Server/Disease/Effects/DiseaseVomit.cs +++ /dev/null @@ -1,27 +0,0 @@ -using JetBrains.Annotations; -using Content.Shared.Disease; -using Content.Server.Medical; - -namespace Content.Server.Disease.Effects -{ - /// - /// Forces you to vomit. - /// - [UsedImplicitly] - public sealed class DiseaseVomit : DiseaseEffect - { - /// How many units of thirst to add each time we vomit - [DataField("thirstAmount")] - public float ThirstAmount = -40f; - /// How many units of hunger to add each time we vomit - [DataField("hungerAmount")] - public float HungerAmount = -40f; - - public override void Effect(DiseaseEffectArgs args) - { - var vomitSys = args.EntityManager.EntitySysManager.GetEntitySystem(); - - vomitSys.Vomit(args.DiseasedEntity, ThirstAmount, HungerAmount); - } - } -} diff --git a/Content.Server/Disease/Server/DiseaseServerComponent.cs b/Content.Server/Disease/Server/DiseaseServerComponent.cs deleted file mode 100644 index 7735910b5c..0000000000 --- a/Content.Server/Disease/Server/DiseaseServerComponent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Content.Shared.Disease; - - -namespace Content.Server.Disease.Components -{ - [RegisterComponent] - public sealed class DiseaseServerComponent : Component - { - /// - /// Which diseases this server has information on. - /// - [ViewVariables(VVAccess.ReadWrite)] - public List Diseases = new(); - } -} diff --git a/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs index f0b3b0ca8c..17d87a1ec5 100644 --- a/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/ZombieRuleComponent.cs @@ -7,6 +7,5 @@ public sealed class ZombieRuleComponent : Component public Dictionary InitialInfectedNames = new(); public string PatientZeroPrototypeID = "InitialInfected"; - public string InitialZombieVirusPrototype = "PassiveZombieVirus"; public const string ZombifySelfActionPrototype = "TurnUndead"; } diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 5bd77c48aa..a857c5c1c8 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -2,8 +2,6 @@ using System.Globalization; using System.Linq; using Content.Server.Actions; using Content.Server.Chat.Managers; -using Content.Server.Disease; -using Content.Server.Disease.Components; using Content.Server.GameTicking.Rules.Components; using Content.Server.Mind.Components; using Content.Server.Players; @@ -38,7 +36,6 @@ public sealed class ZombieRuleSystem : GameRuleSystem [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IServerPreferencesManager _prefs = default!; [Dependency] private readonly RoundEndSystem _roundEndSystem = default!; - [Dependency] private readonly DiseaseSystem _diseaseSystem = default!; [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly ActionsSystem _action = default!; [Dependency] private readonly MobStateSystem _mobState = default!; @@ -233,7 +230,8 @@ public sealed class ZombieRuleSystem : GameRuleSystem var prefList = new List(); foreach (var player in allPlayers) { - if (player.AttachedEntity != null && HasComp(player.AttachedEntity)) + // TODO: A + if (player.AttachedEntity != null && HasComp(player.AttachedEntity)) { playerList.Add(player); @@ -287,7 +285,8 @@ public sealed class ZombieRuleSystem : GameRuleSystem var inCharacterName = string.Empty; if (mind.OwnedEntity != null) { - _diseaseSystem.TryAddDisease(mind.OwnedEntity.Value, component.InitialZombieVirusPrototype); + EnsureComp(mind.OwnedEntity.Value); + EnsureComp(mind.OwnedEntity.Value); inCharacterName = MetaData(mind.OwnedEntity.Value).EntityName; var action = new InstantAction(_prototypeManager.Index(ZombieRuleComponent.ZombifySelfActionPrototype)); diff --git a/Content.Server/Medical/Components/HealthAnalyzerComponent.cs b/Content.Server/Medical/Components/HealthAnalyzerComponent.cs index 150d62c89f..788db33fd7 100644 --- a/Content.Server/Medical/Components/HealthAnalyzerComponent.cs +++ b/Content.Server/Medical/Components/HealthAnalyzerComponent.cs @@ -1,9 +1,7 @@ using Content.Server.UserInterface; -using Content.Shared.Disease; using Content.Shared.MedicalScanner; using Robust.Server.GameObjects; using Robust.Shared.Audio; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Medical.Components { @@ -32,12 +30,5 @@ namespace Content.Server.Medical.Components /// [DataField("scanningEndSound")] public SoundSpecifier? ScanningEndSound; - - /// - /// The disease this will give people. - /// - [DataField("disease", customTypeSerializer: typeof(PrototypeIdSerializer))] - [ViewVariables(VVAccess.ReadWrite)] - public string? Disease; } } diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 85ace0f1d6..76f3cf7329 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -1,11 +1,7 @@ -using Content.Server.Disease; using Content.Server.Medical.Components; -using Content.Server.Popups; using Content.Server.PowerCell; -using Content.Server.UserInterface; using Content.Shared.Damage; using Content.Shared.DoAfter; -using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.MedicalScanner; using Content.Shared.Mobs.Components; @@ -15,8 +11,6 @@ namespace Content.Server.Medical { public sealed class HealthAnalyzerSystem : EntitySystem { - [Dependency] private readonly DiseaseSystem _disease = default!; - [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly PowerCellSystem _cell = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; @@ -52,31 +46,6 @@ namespace Content.Server.Medical _audio.PlayPvs(component.ScanningEndSound, args.Args.User); UpdateScannedUser(uid, args.Args.User, args.Args.Target.Value, component); - // Below is for the traitor item - // Piggybacking off another component's doafter is complete CBT so I gave up - // and put it on the same component - /* - * this code is cursed wuuuuuuut - */ - if (string.IsNullOrEmpty(component.Disease)) - { - args.Handled = true; - return; - } - - _disease.TryAddDisease(args.Args.Target.Value, component.Disease); - - if (args.Args.User == args.Args.Target) - { - _popupSystem.PopupEntity(Loc.GetString("disease-scanner-gave-self", ("disease", component.Disease)), - args.Args.User, args.Args.User); - } - else - { - _popupSystem.PopupEntity(Loc.GetString("disease-scanner-gave-other", ("target", Identity.Entity(args.Args.Target.Value, EntityManager)), - ("disease", component.Disease)), args.Args.User, args.Args.User); - } - args.Handled = true; } diff --git a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs index 84bed390de..1e2dc45854 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs @@ -11,8 +11,6 @@ using Robust.Shared.Physics; using Content.Shared.Throwing; using Content.Server.Storage.EntitySystems; using Content.Shared.Interaction; -using Content.Server.Disease; -using Content.Server.Disease.Components; using Content.Shared.Item; using Content.Shared.Bed.Sleep; using System.Linq; @@ -26,7 +24,6 @@ using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Revenant.Components; -using Content.Shared.Revenant.EntitySystems; using Robust.Shared.Physics.Components; using Robust.Shared.Utility; @@ -37,7 +34,6 @@ public sealed partial class RevenantSystem [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly ThrowingSystem _throwing = default!; [Dependency] private readonly EntityStorageSystem _entityStorage = default!; - [Dependency] private readonly DiseaseSystem _disease = default!; [Dependency] private readonly EmagSystem _emag = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!; @@ -308,13 +304,7 @@ public sealed partial class RevenantSystem return; args.Handled = true; - - var emo = GetEntityQuery(); - foreach (var ent in _lookup.GetEntitiesInRange(uid, component.BlightRadius)) - { - if (emo.TryGetComponent(ent, out var comp)) - _disease.TryAddDisease(ent, component.BlightDiseasePrototypeId, comp); - } + // TODO: When disease refactor is in. } private void OnMalfunctionAction(EntityUid uid, RevenantComponent component, RevenantMalfunctionActionEvent args) diff --git a/Content.Server/StationEvents/Components/DiseaseOutbreakRuleComponent.cs b/Content.Server/StationEvents/Components/DiseaseOutbreakRuleComponent.cs deleted file mode 100644 index d82557cf13..0000000000 --- a/Content.Server/StationEvents/Components/DiseaseOutbreakRuleComponent.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Content.Server.StationEvents.Events; - -namespace Content.Server.StationEvents.Components; - -[RegisterComponent, Access(typeof(DiseaseOutbreakRule))] -public sealed class DiseaseOutbreakRuleComponent : Component -{ - /// - /// Disease prototypes I decided were not too deadly for a random event - /// - /// - /// Fire name - /// - [DataField("notTooSeriousDiseases")] - public readonly IReadOnlyList NotTooSeriousDiseases = new[] - { - "SpaceCold", - "VanAusdallsRobovirus", - "VentCough", - "AMIV", - "SpaceFlu", - "BirdFlew", - "TongueTwister" - }; -} diff --git a/Content.Server/StationEvents/Events/DiseaseOutbreakRule.cs b/Content.Server/StationEvents/Events/DiseaseOutbreakRule.cs deleted file mode 100644 index 438cc041df..0000000000 --- a/Content.Server/StationEvents/Events/DiseaseOutbreakRule.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Content.Server.Disease; -using Content.Server.Disease.Components; -using Content.Server.GameTicking.Rules.Components; -using Content.Server.StationEvents.Components; -using Content.Shared.Disease; -using Content.Shared.Mobs.Components; -using Content.Shared.Mobs.Systems; -using Robust.Shared.Random; - -namespace Content.Server.StationEvents.Events; -/// -/// Infects a couple people -/// with a random disease that isn't super deadly -/// -public sealed class DiseaseOutbreakRule : StationEventSystem -{ - [Dependency] private readonly DiseaseSystem _diseaseSystem = default!; - [Dependency] private readonly MobStateSystem _mobStateSystem = default!; - - /// - /// Finds 2-5 random, alive entities that can host diseases - /// and gives them a randomly selected disease. - /// They all get the same disease. - /// - protected override void Started(EntityUid uid, DiseaseOutbreakRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) - { - base.Started(uid, component, gameRule, args); - - HashSet stationsToNotify = new(); - List aliveList = new(); - foreach (var (carrier, mobState) in EntityQuery()) - { - if (!_mobStateSystem.IsDead(mobState.Owner, mobState)) - aliveList.Add(carrier); - } - RobustRandom.Shuffle(aliveList); - - // We're going to filter the above out to only alive mobs. Might change after future mobstate rework - var toInfect = RobustRandom.Next(2, 5); - - var diseaseName = RobustRandom.Pick(component.NotTooSeriousDiseases); - - if (!PrototypeManager.TryIndex(diseaseName, out DiseasePrototype? disease)) - return; - - // Now we give it to people in the list of living disease carriers earlier - foreach (var target in aliveList) - { - if (toInfect-- == 0) - break; - - _diseaseSystem.TryAddDisease(target.Owner, disease, target); - - var station = StationSystem.GetOwningStation(target.Owner); - if(station == null) continue; - stationsToNotify.Add((EntityUid) station); - } - } -} diff --git a/Content.Server/Traits/Assorted/UncontrollableSnoughComponent.cs b/Content.Server/Traits/Assorted/UncontrollableSnoughComponent.cs deleted file mode 100644 index 546af9bb51..0000000000 --- a/Content.Server/Traits/Assorted/UncontrollableSnoughComponent.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Content.Shared.Chat.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Traits.Assorted; - -/// -/// This is used for the occasional sneeze or cough. -/// -[RegisterComponent] -public sealed class UncontrollableSnoughComponent : Component -{ - /// - /// Emote to play when snoughing - /// - [DataField("emote", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] - public string EmoteId = String.Empty; - - /// - /// The random time between incidents, (min, max). - /// - [DataField("timeBetweenIncidents", required: true)] - public Vector2 TimeBetweenIncidents { get; } - - public float NextIncidentTime; -} diff --git a/Content.Server/Traits/Assorted/UncontrollableSnoughSystem.cs b/Content.Server/Traits/Assorted/UncontrollableSnoughSystem.cs deleted file mode 100644 index 3c69030993..0000000000 --- a/Content.Server/Traits/Assorted/UncontrollableSnoughSystem.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Content.Server.Disease; -using Robust.Shared.Random; - -namespace Content.Server.Traits.Assorted; - -/// -/// This handles making people randomly cough/sneeze without a disease. -/// -public sealed class UncontrollableSnoughSystem : EntitySystem -{ - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly DiseaseSystem _diseaseSystem = default!; - - /// - public override void Initialize() - { - SubscribeLocalEvent(SetupSnough); - } - - private void SetupSnough(EntityUid uid, UncontrollableSnoughComponent component, ComponentStartup args) - { - component.NextIncidentTime = - _random.NextFloat(component.TimeBetweenIncidents.X, component.TimeBetweenIncidents.Y); - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var ent, out var snough)) - { - snough.NextIncidentTime -= frameTime; - - if (snough.NextIncidentTime >= 0) - continue; - - // Set the new time. - snough.NextIncidentTime += - _random.NextFloat(snough.TimeBetweenIncidents.X, snough.TimeBetweenIncidents.Y); - - _diseaseSystem.SneezeCough(ent, null, snough.EmoteId, false); - } - } -} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/DiseaseArtifactComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/DiseaseArtifactComponent.cs deleted file mode 100644 index 0136b68667..0000000000 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/DiseaseArtifactComponent.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Content.Shared.Disease; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; - -namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; -/// -/// Spawn a random disease at regular intervals when artifact activated. -/// -[RegisterComponent] -public sealed class DiseaseArtifactComponent : Component -{ - /// - /// The diseases that the artifact can use. - /// - [DataField("diseasePrototype", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List DiseasePrototypes = new(); - - /// - /// Disease the artifact will spawn - /// Picks a random one from its list - /// - [ViewVariables(VVAccess.ReadWrite)] - public DiseasePrototype? SpawnDisease; - - /// - /// How far away it will check for people - /// If empty, picks a random one from its list - /// - [DataField("range"), ViewVariables(VVAccess.ReadWrite)] - public float Range = 5f; -} diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/DiseaseArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/DiseaseArtifactSystem.cs deleted file mode 100644 index 6328a8e43b..0000000000 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/DiseaseArtifactSystem.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Linq; -using Content.Server.Xenoarchaeology.XenoArtifacts.Events; -using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; -using Content.Shared.Disease; -using Content.Server.Disease; -using Content.Server.Disease.Components; -using Robust.Shared.Prototypes; -using Content.Shared.Interaction; - -namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems -{ - /// - /// Handles disease-producing artifacts - /// - public sealed class DiseaseArtifactSystem : EntitySystem - { - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly DiseaseSystem _disease = default!; - [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnNodeEntered); - SubscribeLocalEvent(OnActivate); - } - - /// - /// Makes sure this artifact is assigned a disease - /// - private void OnNodeEntered(EntityUid uid, DiseaseArtifactComponent component, ArtifactNodeEnteredEvent args) - { - if (component.SpawnDisease != null || !component.DiseasePrototypes.Any()) - return; - var diseaseName = component.DiseasePrototypes[args.RandomSeed % component.DiseasePrototypes.Count]; - - if (!_prototypeManager.TryIndex(diseaseName, out var disease)) - { - Logger.ErrorS("disease", $"Invalid disease {diseaseName} selected from random diseases."); - return; - } - - component.SpawnDisease = disease; - } - - /// - /// When activated, blasts everyone in LOS within n tiles - /// with a high-probability disease infection attempt - /// - private void OnActivate(EntityUid uid, DiseaseArtifactComponent component, ArtifactActivatedEvent args) - { - if (component.SpawnDisease == null) return; - - var xform = Transform(uid); - var carrierQuery = GetEntityQuery(); - - foreach (var entity in _lookup.GetEntitiesInRange(xform.Coordinates, component.Range)) - { - if (!carrierQuery.TryGetComponent(entity, out var carrier)) continue; - - if (!_interactionSystem.InRangeUnobstructed(uid, entity, component.Range)) - continue; - - _disease.TryInfect(carrier, component.SpawnDisease, forced: true); - } - } - } -} - diff --git a/Content.Server/Zombies/PendingZombieComponent.cs b/Content.Server/Zombies/PendingZombieComponent.cs new file mode 100644 index 0000000000..98d177c051 --- /dev/null +++ b/Content.Server/Zombies/PendingZombieComponent.cs @@ -0,0 +1,23 @@ +using Content.Shared.Damage; +using Content.Shared.FixedPoint; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; + +namespace Content.Server.Zombies; + +/// +/// Temporary because diseases suck. +/// +[RegisterComponent] +public sealed class PendingZombieComponent : Component +{ + [DataField("damage")] public DamageSpecifier Damage = new() + { + DamageDict = new Dictionary() + { + { "Blunt", FixedPoint2.New(1) } + } + }; + + [DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))] + public TimeSpan NextTick; +} diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index eafc6a54e0..6330a2f7e7 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -3,8 +3,6 @@ using Content.Server.Body.Systems; using Content.Server.Chat; using Content.Server.Chat.Systems; using Content.Server.Cloning; -using Content.Server.Disease; -using Content.Server.Disease.Components; using Content.Server.Drone.Components; using Content.Server.Humanoid; using Content.Server.Inventory; @@ -12,7 +10,7 @@ using Content.Shared.Bed.Sleep; using Content.Shared.Chemistry.Components; using Content.Server.Emoting.Systems; using Content.Server.Speech.EntitySystems; -using Content.Shared.Disease.Events; +using Content.Shared.Damage; using Content.Shared.Inventory; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; @@ -26,16 +24,16 @@ namespace Content.Server.Zombies { public sealed class ZombieSystem : SharedZombieSystem { - [Dependency] private readonly DiseaseSystem _disease = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IPrototypeManager _protoManager = default!; + [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly BloodstreamSystem _bloodstream = default!; + [Dependency] private readonly DamageableSystem _damageable = default!; [Dependency] private readonly ZombifyOnDeathSystem _zombify = default!; [Dependency] private readonly ServerInventorySystem _inv = default!; [Dependency] private readonly ChatSystem _chat = default!; [Dependency] private readonly AutoEmoteSystem _autoEmote = default!; [Dependency] private readonly EmoteOnDamageSystem _emoteOnDamage = default!; - [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly IPrototypeManager _protoManager = default!; - [Dependency] private readonly IRobustRandom _robustRandom = default!; [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!; public override void Initialize() @@ -49,8 +47,30 @@ namespace Content.Server.Zombies SubscribeLocalEvent(OnMeleeHit); SubscribeLocalEvent(OnMobState); SubscribeLocalEvent(OnZombieCloning); - SubscribeLocalEvent(OnSneeze); SubscribeLocalEvent(OnSleepAttempt); + + SubscribeLocalEvent(OnPendingMapInit); + } + + private void OnPendingMapInit(EntityUid uid, PendingZombieComponent component, MapInitEvent args) + { + component.NextTick = _timing.CurTime; + } + + public override void Update(float frameTime) + { + base.Update(frameTime); + var query = EntityQueryEnumerator(); + var curTime = _timing.CurTime; + + while (query.MoveNext(out var uid, out var comp)) + { + if (comp.NextTick < curTime) + continue; + + comp.NextTick += TimeSpan.FromSeconds(1); + _damageable.TryChangeDamage(uid, comp.Damage, true, false); + } } private void OnSleepAttempt(EntityUid uid, ZombieComponent component, ref TryingToSleepEvent args) @@ -95,11 +115,6 @@ namespace Content.Server.Zombies } } - private void OnSneeze(EntityUid uid, ZombieComponent component, ref AttemptSneezeCoughEvent args) - { - args.Cancelled = true; - } - private float GetZombieInfectionChance(EntityUid uid, ZombieComponent component) { var baseChance = component.MaxZombieInfectionChance; @@ -151,8 +166,11 @@ namespace Content.Server.Zombies if (!TryComp(entity, out var mobState) || HasComp(entity)) continue; - if (HasComp(entity) && _robustRandom.Prob(GetZombieInfectionChance(entity, component))) - _disease.TryAddDisease(entity, "ActiveZombieVirus"); + if (_random.Prob(GetZombieInfectionChance(entity, component))) + { + EnsureComp(entity); + EnsureComp(entity); + } if (HasComp(entity)) args.BonusDamage = -args.BaseDamage * zombieComp.OtherZombieDamageCoefficient; diff --git a/Content.Server/Zombies/ZombifyOnDeathSystem.cs b/Content.Server/Zombies/ZombifyOnDeathSystem.cs index e5830614a8..926f3318a2 100644 --- a/Content.Server/Zombies/ZombifyOnDeathSystem.cs +++ b/Content.Server/Zombies/ZombifyOnDeathSystem.cs @@ -4,7 +4,6 @@ using Content.Server.Body.Systems; using Content.Server.Chat; using Content.Server.Chat.Managers; using Content.Server.Chat.Systems; -using Content.Server.Disease.Components; using Content.Server.Ghost.Roles.Components; using Content.Server.Humanoid; using Content.Server.IdentityManagement; @@ -101,7 +100,6 @@ namespace Content.Server.Zombies //we need to basically remove all of these because zombies shouldn't //get diseases, breath, be thirst, be hungry, or die in space - RemComp(target); RemComp(target); RemComp(target); RemComp(target); diff --git a/Content.Shared/Atmos/Miasma/SharedFliesComponent.cs b/Content.Shared/Atmos/Miasma/SharedFliesComponent.cs deleted file mode 100644 index e0d08b4782..0000000000 --- a/Content.Shared/Atmos/Miasma/SharedFliesComponent.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Content.Shared.Atmos.Miasma; -public abstract class SharedFliesComponent : Component -{ - -} diff --git a/Content.Shared/Disease/DiseaseCure.cs b/Content.Shared/Disease/DiseaseCure.cs deleted file mode 100644 index 9534772bae..0000000000 --- a/Content.Shared/Disease/DiseaseCure.cs +++ /dev/null @@ -1,29 +0,0 @@ -using JetBrains.Annotations; - -namespace Content.Shared.Disease -{ - [ImplicitDataDefinitionForInheritors] - [MeansImplicitUse] - public abstract class DiseaseCure - { - /// - /// This returns true if the disease should be cured - /// and false otherwise - /// - public abstract bool Cure(DiseaseEffectArgs args); - /// - /// What stages the cure applies to. - /// probably should be all, but go wild - /// - [DataField("stages")] - public readonly int[] Stages = { 0 }; - /// - /// This is used by the disease diangoser machine - /// to generate reports to tell people all of a disease's - /// special cures using in-game methods. - /// So it should return a localization string describing - /// the cure - /// - public abstract string CureText(); - } -} diff --git a/Content.Shared/Disease/DiseaseEffect.cs b/Content.Shared/Disease/DiseaseEffect.cs deleted file mode 100644 index bca00c00f8..0000000000 --- a/Content.Shared/Disease/DiseaseEffect.cs +++ /dev/null @@ -1,34 +0,0 @@ -using JetBrains.Annotations; - -namespace Content.Shared.Disease -{ - [ImplicitDataDefinitionForInheritors] - [MeansImplicitUse] - public abstract class DiseaseEffect - { - /// - /// What's the chance, from 0 to 1, that this effect will occur? - /// - [DataField("probability")] - public float Probability = 1.0f; - /// - /// What stages this effect triggers on - /// - [DataField("stages")] - public readonly int[] Stages = { 0 }; - /// - /// What effect the disease will have. - /// - public abstract void Effect(DiseaseEffectArgs args); - } - /// - /// What you have to work with in any disease effect/cure. - /// Includes an entity manager because it is out of scope - /// otherwise. - /// - public readonly record struct DiseaseEffectArgs( - EntityUid DiseasedEntity, - DiseasePrototype Disease, - IEntityManager EntityManager - ); -} diff --git a/Content.Shared/Disease/DiseaseMachineVisuals.cs b/Content.Shared/Disease/DiseaseMachineVisuals.cs deleted file mode 100644 index 4521d47f6d..0000000000 --- a/Content.Shared/Disease/DiseaseMachineVisuals.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Robust.Shared.Serialization; - -namespace Content.Shared.Disease -{ - /// - /// Stores bools for if the machine is on - /// and if it's currently running. - /// Used for the visualizer - /// - [Serializable, NetSerializable] - public enum DiseaseMachineVisuals : byte - { - IsOn, - IsRunning - } -} diff --git a/Content.Shared/Disease/DiseasePrototype.cs b/Content.Shared/Disease/DiseasePrototype.cs deleted file mode 100644 index 9510c93793..0000000000 --- a/Content.Shared/Disease/DiseasePrototype.cs +++ /dev/null @@ -1,83 +0,0 @@ -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array; - -namespace Content.Shared.Disease -{ - /// - /// Diseases encompass everything from viruses to cancers to heart disease. - /// It's not just a virology thing. - /// - [Prototype("disease")] - [DataDefinition] - public sealed class DiseasePrototype : IPrototype, IInheritingPrototype - { - [ViewVariables] - [IdDataField] - public string ID { get; } = default!; - - [DataField("name")] - public string Name { get; private set; } = string.Empty; - - [ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer))] - public string[]? Parents { get; private set; } - - [NeverPushInheritance] - [AbstractDataFieldAttribute] - public bool Abstract { get; private set; } - - /// - /// Controls how often a disease ticks. - /// - [ViewVariables] - public float TickTime = 1f; - - /// - /// Since disease isn't mapped to metabolism or anything, - /// it needs something to control its tickrate - /// - public float Accumulator = 0f; - /// - /// Since accumulator is reset with TickTime, this just tracks - /// the total amount of time a disease has been present. - /// - public float TotalAccumulator = 0f; - /// - /// Stores all the separate stages of the disease plus the time - /// thresholds for their activation - /// int: the disease stage (0 for baseline, 1, 2, etc.) - /// float: the time it takes for the stage to begin. - /// - [DataField("stages", serverOnly: true)] - public readonly List Stages = new() { 0f }; - /// - /// List of effects the disease has that will - /// run every second (by default anyway) - /// - [DataField("effects", serverOnly: true)] - public readonly List Effects = new(0); - /// - /// List of SPECIFIC CURES the disease has that will - /// be checked every second. - /// Stuff like spaceacillin operates outside this. - /// - [DataField("cures", serverOnly: true)] - public readonly List Cures = new(0); - /// - /// This flatly reduces the probabilty disease medicine - /// has to cure it every tick. Although, since spaceacillin is - /// used as a reference and it has 0.15 chance, this is - /// a base 33% reduction in cure chance - /// - [DataField("cureResist", serverOnly: true)] - public float CureResist = 0.05f; - /// - /// Whether the disease can infect other people. - /// Since this isn't just a virology thing, this - /// primary determines what sort of disease it is. - /// This also affects things like the vaccine machine. - /// You can't print a cancer vaccine - /// - [DataField("infectious", serverOnly: true)] - public bool Infectious = true; - } -} diff --git a/Content.Shared/Disease/DiseasedComponent.cs b/Content.Shared/Disease/DiseasedComponent.cs deleted file mode 100644 index 952af18017..0000000000 --- a/Content.Shared/Disease/DiseasedComponent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Robust.Shared.GameStates; - -namespace Content.Shared.Disease.Components -{ - /// This is added to anyone with at least 1 disease - /// and helps cull event subscriptions and entity queries - /// when they are not relevant. - [NetworkedComponent] - [RegisterComponent] - public sealed class DiseasedComponent : Component - {} -} diff --git a/Content.Shared/Disease/Events/AttemptSneezeCoughEvent.cs b/Content.Shared/Disease/Events/AttemptSneezeCoughEvent.cs deleted file mode 100644 index cb2f99220c..0000000000 --- a/Content.Shared/Disease/Events/AttemptSneezeCoughEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Content.Shared.Disease.Events; - -/// -/// Raised by an entity about to sneeze/cough. -/// Set Cancelled to true on event handling to suppress the sneeze -/// -[ByRefEvent] -public record struct AttemptSneezeCoughEvent(EntityUid Uid, string? EmoteId, bool Cancelled = false); diff --git a/Content.Shared/Disease/Events/VaccineDoAfterEvent.cs b/Content.Shared/Disease/Events/VaccineDoAfterEvent.cs deleted file mode 100644 index a1c2772459..0000000000 --- a/Content.Shared/Disease/Events/VaccineDoAfterEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Shared.DoAfter; -using Robust.Shared.Serialization; - -namespace Content.Shared.Disease.Events; - -[Serializable, NetSerializable] -public sealed class VaccineDoAfterEvent : SimpleDoAfterEvent -{ -} \ No newline at end of file diff --git a/Content.Shared/Mobs/Systems/MobStateSystem.Subscribers.cs b/Content.Shared/Mobs/Systems/MobStateSystem.Subscribers.cs index 6515ba41a8..f4537deede 100644 --- a/Content.Shared/Mobs/Systems/MobStateSystem.Subscribers.cs +++ b/Content.Shared/Mobs/Systems/MobStateSystem.Subscribers.cs @@ -1,6 +1,4 @@ using Content.Shared.Bed.Sleep; -using Content.Shared.Disease.Events; -using Content.Shared.DragDrop; using Content.Shared.Emoting; using Content.Shared.Hands; using Content.Shared.Interaction.Events; @@ -38,7 +36,6 @@ public partial class MobStateSystem SubscribeLocalEvent(CheckAct); SubscribeLocalEvent(CheckAct); SubscribeLocalEvent(OnSleepAttempt); - SubscribeLocalEvent(OnSneezeAttempt); } private void OnStateExitSubscribers(EntityUid target, MobStateComponent component, MobState state) @@ -108,12 +105,6 @@ public partial class MobStateSystem args.Cancelled = true; } - private void OnSneezeAttempt(EntityUid target, MobStateComponent component, ref AttemptSneezeCoughEvent args) - { - if (IsDead(target, component)) - args.Cancelled = true; - } - private void OnGettingStripped(EntityUid target, MobStateComponent component, BeforeGettingStrippedEvent args) { // Incapacitated or dead targets get stripped two or three times as fast. Makes stripping corpses less tedious. diff --git a/Content.Shared/Revenant/Components/RevenantComponent.cs b/Content.Shared/Revenant/Components/RevenantComponent.cs index c9e6824ab0..c5b513ff8a 100644 --- a/Content.Shared/Revenant/Components/RevenantComponent.cs +++ b/Content.Shared/Revenant/Components/RevenantComponent.cs @@ -1,4 +1,3 @@ -using Content.Shared.Disease; using Content.Shared.FixedPoint; using Content.Shared.Store; using Robust.Shared.GameStates; @@ -153,12 +152,6 @@ public sealed class RevenantComponent : Component /// [ViewVariables(VVAccess.ReadWrite), DataField("blightRadius")] public float BlightRadius = 3.5f; - - /// - /// The disease that is given to the victims of the ability. - /// - [ViewVariables(VVAccess.ReadWrite), DataField("blightDiseasePrototypeId", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string BlightDiseasePrototypeId = "SpectralTiredness"; #endregion #region Malfunction Ability diff --git a/Content.Shared/Swab/SwabEvents.cs b/Content.Shared/Swab/SwabEvents.cs index 05b1d43da6..39567af993 100644 --- a/Content.Shared/Swab/SwabEvents.cs +++ b/Content.Shared/Swab/SwabEvents.cs @@ -3,11 +3,6 @@ using Robust.Shared.Serialization; namespace Content.Shared.Swab; -[Serializable, NetSerializable] -public sealed class DiseaseSwabDoAfterEvent : SimpleDoAfterEvent -{ -} - [Serializable, NetSerializable] public sealed class BotanySwabDoAfterEvent : SimpleDoAfterEvent { diff --git a/Resources/Locale/en-US/disease/diagnoser.ftl b/Resources/Locale/en-US/disease/diagnoser.ftl deleted file mode 100644 index c4d03f4dab..0000000000 --- a/Resources/Locale/en-US/disease/diagnoser.ftl +++ /dev/null @@ -1,20 +0,0 @@ -diagnoser-cant-use-swab = {CAPITALIZE(THE($machine))} rejects {THE($swab)}. -diagnoser-insert-swab = You insert {THE($swab)} into {THE($machine)}. -diagnoser-disease-report = Disease Report: {CAPITALIZE($disease)} -diagnoser-disease-report-none = Bill of Good Health -diagnoser-disease-report-none-contents = [color=green]No diseases were found in this sample.[/color] -diagnoser-disease-report-name = Disease Name: {CAPITALIZE($disease)} -diagnoser-disease-report-infectious = Infectious: [color=red]Yes[/color] -diagnoser-disease-report-not-infectious = Infectious: [color=green]No[/color] -diagnoser-disease-report-cureresist-none = Spaceacillin Resistance: [color=green]None[/color] -diagnoser-disease-report-cureresist-low = Spaceacillin Resistance: [color=yellow]Low[/color] -diagnoser-disease-report-cureresist-medium = Spaceacillin Resistance: [color=orange]Medium[/color] -diagnoser-disease-report-cureresist-high = Spaceacillin Resistance: [color=red]High[/color] -diagnoser-no-cures = The disease has no specific cures. -diagnoser-cure-has = The disease has the following cures: -diagnoser-cure-bedrest = Rest in bed for {$time} seconds, or {$sleep} seconds if sleeping. -diagnoser-cure-reagent = Consume at least {$units}u of {$reagent}. -diagnoser-cure-wait = It will go away on its own after {$time} seconds. -diagnoser-cure-temp = Reach a body temperature below {$max}°K or above {$min}°K. -diagnoser-cure-temp-min = Reach a body temperature above {$min}°K. -diagnoser-cure-temp-max = Reach a body temperature below {$max}°K. diff --git a/Resources/Locale/en-US/disease/disease-proto.ftl b/Resources/Locale/en-US/disease/disease-proto.ftl deleted file mode 100644 index 2845e953c9..0000000000 --- a/Resources/Locale/en-US/disease/disease-proto.ftl +++ /dev/null @@ -1,21 +0,0 @@ -# Noninfectious -disease-proto-ultragigacancer = ultragigacancer -disease-proto-spectral-tiredness = spectral tiredness -disease-proto-lung-cancer = Stage IIIA Lung Cancer - -# Infectious -disease-proto-space-cold = space cold -disease-proto-vent-cough = vent cough -disease-proto-space-flu = space flu -disease-proto-bird-flew = bird flew -disease-proto-robovirus = Van Ausdall's Robovirus -disease-proto-amiv = AMIV -disease-proto-amirmir = Memetic Amirmir -disease-proto-bleeders = Bleeder's Bite -disease-proto-plague = plague -disease-proto-owonavirus = OwOnavirus -disease-proto-tongue-twister = Tongue Twister - -# Zombie -disease-proto-zombie = Zombie Virus -disease-proto-zombie-passive = Zombie Virus diff --git a/Resources/Locale/en-US/disease/disease.ftl b/Resources/Locale/en-US/disease/disease.ftl index f738851a73..296fb4d925 100644 --- a/Resources/Locale/en-US/disease/disease.ftl +++ b/Resources/Locale/en-US/disease/disease.ftl @@ -1,8 +1 @@ -disease-cured = You feel a bit better. -disease-sick-generic = You feel sick. -disease-eaten-inside = You feel like you're being eaten from the inside. -disease-banana-compulsion = You really want to eat some bananas. -disease-beat-chest-compulsion = {CAPITALIZE(THE($person))} beats {POSS-ADJ($person)} chest. -disease-vomit = {CAPITALIZE(THE($person))} vomits. -disease-think = You feel like you can't think straight. -disease-polymorph = You feel your body twist and change form! +disease-vomit = {CAPITALIZE(THE($person))} vomits. \ No newline at end of file diff --git a/Resources/Locale/en-US/disease/miasma.ftl b/Resources/Locale/en-US/disease/miasma.ftl deleted file mode 100644 index ecb162683e..0000000000 --- a/Resources/Locale/en-US/disease/miasma.ftl +++ /dev/null @@ -1,4 +0,0 @@ -miasma-smell = Something smells foul! -miasma-rotting = [color=orange]It's rotting![/color] -miasma-bloated = [color=orangered]It's bloated![/color] -miasma-extremely-bloated = [color=red]It's extremely bloated![/color] diff --git a/Resources/Locale/en-US/disease/scanner.ftl b/Resources/Locale/en-US/disease/scanner.ftl deleted file mode 100644 index 476ac86cf8..0000000000 --- a/Resources/Locale/en-US/disease/scanner.ftl +++ /dev/null @@ -1,4 +0,0 @@ -disease-scanner-diseased = DISEASED -disease-scanner-not-diseased = No diseases -disease-scanner-gave-other = You gave {THE($target)} {CAPITALIZE($disease)}! -disease-scanner-gave-self = You gave yourself {CAPITALIZE($disease)}! Congratulations! diff --git a/Resources/Locale/en-US/disease/swab.ftl b/Resources/Locale/en-US/disease/swab.ftl deleted file mode 100644 index 92aaae89e8..0000000000 --- a/Resources/Locale/en-US/disease/swab.ftl +++ /dev/null @@ -1,8 +0,0 @@ -swab-already-used = You already used this swab. -swab-swabbed = You swab {THE($target)}'s mouth. -swab-mask-blocked = {CAPITALIZE(THE($target))} needs to take off {THE($mask)}. -swab-used = It looks like it's been used. -swab-unused = It's clean and ready to use. - -botany-swab-from = You carefully collect pollen from the plant. -botany-swab-to = You carefully dust pollen on the plant. diff --git a/Resources/Locale/en-US/disease/vaccine.ftl b/Resources/Locale/en-US/disease/vaccine.ftl deleted file mode 100644 index 867499a7ce..0000000000 --- a/Resources/Locale/en-US/disease/vaccine.ftl +++ /dev/null @@ -1,3 +0,0 @@ -vaxx-already-used = You already used this vaccine. -vaxx-used = It's spent. -vaxx-unused = It hasn't been spent. diff --git a/Resources/Locale/en-US/job/job-description.ftl b/Resources/Locale/en-US/job/job-description.ftl index d0a68b5aad..cfd3671cb3 100644 --- a/Resources/Locale/en-US/job/job-description.ftl +++ b/Resources/Locale/en-US/job/job-description.ftl @@ -13,10 +13,10 @@ job-description-chaplain = Preach the good word of your deity and religion, and job-description-chef = Keep the station fed with a variety of food items, butcher dead animals to ensure miasma doesn't leak, and help keep the bar lively. job-description-chemist = Produce medicinal drugs for the doctors to use, research ethically dubious rare chemicals, and produce weapons of war when enemies of the station arrive. job-description-clown = Entertain the crew through elaborate slapstick routines or terrible jokes. -job-description-cmo = Manage the resources and personnel of the medical department to keep the crew alive and disease-free. +job-description-cmo = Manage the resources and personnel of the medical department to keep the crew alive. job-description-paramedic = Rescue critically injured patients all over the station, sometimes outside too. Stablize them, give them a ride to medbay, and get back out there! job-description-detective = Investigate crime scenes using forensic tools, ensure that the guilty party is found, and have a couple smokes. -job-description-doctor = Diagnose and heal crewmembers through medicinal chemicals, vaccinations, and disease cures, along with cloning the dead. +job-description-doctor = Diagnose and heal crewmembers through medicinal chemicals, vaccinations, along with cloning the dead. job-description-engineer = Keep the station's main engine & solars active, optimize the power network, and make emergency repairs using your hardsuit. job-description-ertengineer = Ensure that the station has power and clean air. job-description-ertjanitor = Ensure that the station is properly cleaned--for morale. diff --git a/Resources/Locale/en-US/station-events/events/disease-outbreak.ftl b/Resources/Locale/en-US/station-events/events/disease-outbreak.ftl deleted file mode 100644 index 87abcfc546..0000000000 --- a/Resources/Locale/en-US/station-events/events/disease-outbreak.ftl +++ /dev/null @@ -1 +0,0 @@ -station-event-disease-outbreak-announcement = Confirmed outbreak of level 7 biohazard aboard the station. All personnel must contain the outbreak. diff --git a/Resources/Locale/en-US/traits/traits.ftl b/Resources/Locale/en-US/traits/traits.ftl index b9ac930021..92984c6efb 100644 --- a/Resources/Locale/en-US/traits/traits.ftl +++ b/Resources/Locale/en-US/traits/traits.ftl @@ -6,9 +6,6 @@ trait-narcolepsy-decs = You fall asleep randomly trait-pacifist-name = Pacifist -trait-sneezing-name = Runny nose -trait-sneezing-desc = You sneeze and cough uncontrollably - permanent-blindness-trait-examined = [color=lightblue]{CAPITALIZE(POSS-ADJ($target))} eyes are glassy and unfocused. It doesn't seem like {SUBJECT($target)} can see you.[/color] trait-lightweight-name = Lightweight Drunk diff --git a/Resources/Prototypes/Actions/revenant.yml b/Resources/Prototypes/Actions/revenant.yml index 54b3743e70..1fbf677d80 100644 --- a/Resources/Prototypes/Actions/revenant.yml +++ b/Resources/Prototypes/Actions/revenant.yml @@ -21,13 +21,13 @@ serverEvent: !type:RevenantOverloadLightsActionEvent useDelay: 20 -- type: instantAction - id: RevenantBlight - icon: Interface/Actions/blight.png - name: Blight - description: Costs 50 Essence. - serverEvent: !type:RevenantBlightActionEvent - useDelay: 20 +#- type: instantAction +# id: RevenantBlight +# icon: Interface/Actions/blight.png +# name: Blight +# description: Costs 50 Essence. +# serverEvent: !type:RevenantBlightActionEvent +# useDelay: 20 - type: instantAction id: RevenantMalfunction @@ -35,4 +35,4 @@ name: Malfunction description: Costs 60 Essence. serverEvent: !type:RevenantMalfunctionActionEvent - useDelay: 20 \ No newline at end of file + useDelay: 20 diff --git a/Resources/Prototypes/Catalog/revenant_catalog.yml b/Resources/Prototypes/Catalog/revenant_catalog.yml index b51a92b82c..55fe239348 100644 --- a/Resources/Prototypes/Catalog/revenant_catalog.yml +++ b/Resources/Prototypes/Catalog/revenant_catalog.yml @@ -3,7 +3,7 @@ name: Defile description: Defiles the surrounding area, ripping up floors, damaging windows, opening containers, and throwing items. Using it leaves you vulnerable to attacks for a short period of time. productAction: RevenantDefile - cost: + cost: StolenEssence: 10 categories: - RevenantAbilities @@ -16,7 +16,7 @@ name: Overload Lights description: Overloads all nearby lights, causing lights to pulse and sending out dangerous lightning. Using it leaves you vulnerable to attacks for a long period of time. productAction: RevenantOverloadLights - cost: + cost: StolenEssence: 25 categories: - RevenantAbilities @@ -24,25 +24,25 @@ - !type:ListingLimitedStockCondition stock: 1 -- type: listing - id: RevenantBlight - name: Blight - description: Infects all nearby organisms with an infectious disease that causes toxic buildup and tiredness. Using it leaves you vulnerable to attacks for a medium period of time. - productAction: RevenantBlight - cost: - StolenEssence: 75 - categories: - - RevenantAbilities - conditions: - - !type:ListingLimitedStockCondition - stock: 1 +#- type: listing +# id: RevenantBlight +# name: Blight +# description: Infects all nearby organisms with an infectious disease that causes toxic buildup and tiredness. Using it leaves you vulnerable to attacks for a medium period of time. +# productAction: RevenantBlight +# cost: +# StolenEssence: 75 +# categories: +# - RevenantAbilities +# conditions: +# - !type:ListingLimitedStockCondition +# stock: 1 - type: listing id: RevenantMalfunction name: Malfunction description: Makes nearby electronics stop working properly. Using it leaves you vulnerable to attacks for a long period of time. productAction: RevenantMalfunction - cost: + cost: StolenEssence: 125 categories: - RevenantAbilities diff --git a/Resources/Prototypes/Diseases/honk.yml b/Resources/Prototypes/Diseases/honk.yml deleted file mode 100644 index 203fadd669..0000000000 --- a/Resources/Prototypes/Diseases/honk.yml +++ /dev/null @@ -1,60 +0,0 @@ -- type: disease - id: ActiveHonkVirus - name: disease-proto-honk - infectious: false - cureResist: 0.2 - stages: - - 0 - - 120 - - 780 - effects: - # toxin - - !type:DiseaseAdjustReagent - probability: 0.07 - reagent: Toxin - amount: 1 - stages: - - 0 - - 1 - - 2 - # honks - - !type:DiseaseHonk - probability: 0.03 - emote: Honk - stages: - - 0 - - !type:DiseaseHonk - probability: 0.04 - emote: Honk - stages: - - 1 - - !type:DiseaseHonk - probability: 0.06 - emote: Honk - stages: - - 2 - # stuttering accent chance when speaking - - !type:DiseaseGenericStatusEffect - probability: 0.3 - key: Stutter - component: StutteringAccent - stages: - - 1 - - !type:DiseaseGenericStatusEffect - probability: 0.6 - key: Stutter - component: StutteringAccent - stages: - - 2 - # possible cluwnification if ignored too long - - !type:DiseaseAddComponent - comp: Cluwne - probability: 0.0007 - stages: - - 2 - cures: - - !type:DiseaseReagentCure - reagent: BananaHonk - min: 5 - - !type:DiseaseJustWaitCure - maxLength: 900 \ No newline at end of file diff --git a/Resources/Prototypes/Diseases/infectious.yml b/Resources/Prototypes/Diseases/infectious.yml deleted file mode 100644 index d6b7a9e051..0000000000 --- a/Resources/Prototypes/Diseases/infectious.yml +++ /dev/null @@ -1,301 +0,0 @@ -- type: disease - id: SpaceCold - name: disease-proto-space-cold - cureResist: 0 - effects: - - !type:DiseaseAdjustReagent - probability: 0.2 - reagent: Histamine - amount: 0.5 - - !type:DiseasePopUp - probability: 0.025 - - !type:DiseaseSnough - probability: 0.025 - emote: Sneeze - cures: - - !type:DiseaseBedrestCure - maxLength: 20 - - !type:DiseaseJustWaitCure - maxLength: 400 - - !type:DiseaseReagentCure - reagent: Ultravasculine -### - !type:DiseaseReagentCure ### In Loving Memory, Lean -### reagent: Lean ### 2022/03/12 - 2022/03/13 - -- type: disease - id: VentCough - name: disease-proto-vent-cough - effects: - - !type:DiseasePopUp - probability: 0.025 - message: generic-reagent-effect-burning-insides - visualType: Medium - - !type:DiseaseSnough - probability: 0.025 - emote: Cough - - !type:DiseaseHealthChange - probability: 0.015 - damage: - types: - Caustic: 1 - cures: - - !type:DiseaseBedrestCure - maxLength: 30 - - !type:DiseaseJustWaitCure - maxLength: 600 - - !type:DiseaseReagentCure - reagent: SpaceCleaner - -- type: disease - id: SpaceFlu - name: disease-proto-space-flu - cureResist: 0.08 - effects: - - !type:DiseaseVomit - probability: 0.01 - - !type:DiseasePopUp - probability: 0.025 - - !type:DiseaseSnough - probability: 0.025 - emote: Sneeze - - !type:DiseaseHealthChange - probability: 0.015 - damage: - types: - Heat: 1 - cures: - - !type:DiseaseBedrestCure - maxLength: 100 - -- type: disease - id: BirdFlew - name: disease-proto-bird-flew - cureResist: 0.08 - effects: - - !type:DiseaseVomit - probability: 0.015 - - !type:DiseasePopUp - probability: 0.025 - - !type:DiseaseSnough - probability: 0.025 - emote: Cough - - !type:DiseaseHealthChange - probability: 0.05 - damage: - types: - Caustic: 1 - cures: - - !type:DiseaseBedrestCure - maxLength: 120 - -- type: disease - id: VanAusdallsRobovirus - name: disease-proto-robovirus - cureResist: 0.1 - effects: - - !type:DiseaseAdjustReagent - probability: 0.025 - reagent: Licoxide - amount: 0.5 - - !type:DiseaseSnough - probability: 0.02 - emote: RobotBeep - cures: - - !type:DiseaseJustWaitCure - maxLength: 900 - - !type:DiseaseReagentCure - reagent: BeepskySmash - -- type: disease - id: AMIV - name: disease-proto-amiv - cureResist: 0.10 - stages: - - 0 - - 120 - - 780 - effects: - # compulsion pop ups - - !type:DiseasePopUp - probability: 0.015 - type: Pvs - message: disease-beat-chest-compulsion - visualType: Medium - stages: - - 0 - - 1 - - 2 - - !type:DiseasePopUp - probability: 0.03 - message: disease-banana-compulsion - visualType: Medium - stages: - - 0 - - 1 - - 2 - # Screeches - spreads disease - - !type:DiseaseSnough - probability: 0.01 - emote: MonkeyScreeches - stages: - - 0 - - !type:DiseaseSnough - probability: 0.02 - emote: MonkeyScreeches - stages: - - 1 - - !type:DiseaseSnough - probability: 0.04 - emote: MonkeyScreeches - stages: - - 2 - # monkey accent chance when speaking - - !type:DiseaseGenericStatusEffect - probability: 0.2 - key: Stutter - component: MonkeyAccent - stages: - - 1 - - !type:DiseaseGenericStatusEffect - probability: 0.5 - key: Stutter - component: MonkeyAccent - stages: - - 2 - # asphyxiation damage, probably from all the screeching - - !type:DiseaseHealthChange - probability: 0.53 - damage: - types: - Asphyxiation: 1 - stages: - - 1 - - 2 - # possible monkefication if ignored too long - - !type:DiseasePolymorph - probability: 0.000427 ## ~5% chance over 120 secs - polymorphId: AMIVMorph - polymorphMessage: disease-polymorph - polymorphSound: - path: /Audio/Animals/monkey_scream.ogg - stages: - - 2 - cures: - - !type:DiseaseJustWaitCure - maxLength: 900 - stages: - - 0 - - 1 - - 2 - - !type:DiseaseReagentCure - reagent: BananaHonk - stages: - - 0 - - 1 - - 2 - -- type: disease - id: MemeticAmirmir - name: disease-proto-amirmir - effects: - - !type:DiseaseGenericStatusEffect - probability: 0.015 - key: ForcedSleep - component: ForcedSleeping - time: 3 - type: Add - - !type:DiseaseSnough - probability: 0.025 - emote: Yawn - -- type: disease - id: BleedersBite - name: disease-proto-bleeders - effects: - - !type:DiseaseAdjustReagent - reagent: TranexamicAcid - amount: -2.5 - - !type:DiseaseHealthChange - probability: 0.015 - damage: - types: - Piercing: 20 - - !type:DiseasePopUp - probability: 0.05 - message: disease-eaten-inside - visualType: Medium - cures: - - !type:DiseaseJustWaitCure - maxLength: 900 - - !type:DiseaseBodyTemperatureCure - min: 360 - - !type:DiseaseReagentCure - reagent: DemonsBlood - -- type: disease - id: Plague - name: disease-proto-plague - cureResist: 0.1 - effects: - - !type:DiseaseVomit - probability: 0.005 - - !type:DiseasePopUp - probability: 0.025 - - !type:DiseaseSnough - probability: 0.025 - emote: Cough - - !type:DiseaseHealthChange - probability: 0.05 - damage: - types: - Poison: 2 - cures: - - !type:DiseaseBedrestCure - maxLength: 120 - - !type:DiseaseJustWaitCure - maxLength: 240 - -- type: disease - id: OwOnavirus - name: disease-proto-owonavirus - cureResist: 0.25 - effects: - - !type:DiseaseGenericStatusEffect - key: Stutter - component: OwOAccent - - !type:DiseaseAdjustReagent ## 20 / 0.013 / 60 is around 25 minutes before overdose (0.5u metabolize each tick) - probability: 0.513 - reagent: Ephedrine - amount: 1 - - !type:DiseaseSnough - probability: 0.01 - emote: CatMeow - - !type:DiseaseSnough - probability: 0.01 - emote: CatHisses - cures: - - !type:DiseaseBodyTemperatureCure - min: 420 ## Reachable with a flamer - - !type:DiseaseReagentCure - reagent: Theobromine - min: 4 - -- type: disease - id: TongueTwister - name: disease-proto-tongue-twister - cureResist: 0.1 - effects: - - !type:DiseaseGenericStatusEffect - key: Stutter - component: ScrambledAccent - - !type:DiseaseSnough - probability: 0.01 - emote: Sneeze - - !type:DiseasePopUp - probability: 0.02 - message: disease-think - cures: - - !type:DiseaseBedrestCure - maxLength: 30 - - !type:DiseaseJustWaitCure - maxLength: 400 diff --git a/Resources/Prototypes/Diseases/noninfectious.yml b/Resources/Prototypes/Diseases/noninfectious.yml deleted file mode 100644 index d66f2ae02d..0000000000 --- a/Resources/Prototypes/Diseases/noninfectious.yml +++ /dev/null @@ -1,66 +0,0 @@ -- type: disease - id: Ultragigacancer - name: disease-proto-ultragigacancer - infectious: false - cureResist: 0.15 - effects: - - !type:DiseaseHealthChange - probability: 0.3 - damage: - types: - Cellular: 1 - - !type:DiseaseVomit - probability: 0.01 - - !type:DiseasePopUp - probability: 0.03 - cures: - - !type:DiseaseReagentCure - reagent: Phalanximine - min: 15 - -- type: disease - id: SpectralTiredness - name: disease-proto-spectral-tiredness - infectious: false - effects: - - !type:DiseaseGenericStatusEffect - probability: 0.03 - key: ForcedSleep - component: ForcedSleeping - time: 3 - type: Add - - !type:DiseaseSnough - probability: 0.025 - emote: Yawn - - !type:DiseaseHealthChange - probability: 0.02 - damage: - types: - Poison: 4 - cures: - - !type:DiseaseJustWaitCure - maxLength: 240 - - !type:DiseaseBedrestCure - maxLength: 60 - -- type: disease - id: StageIIIALungCancer - name: disease-proto-lung-cancer - infectious: false - cureResist: 1.0 - effects: - - !type:DiseaseHealthChange - probability: 0.3 - damage: - types: - Cellular: 1 - - !type:DiseaseVomit - probability: 0.01 - - !type:DiseaseSnough - probability: 0.10 - emote: Cough - - !type:DiseasePopUp - probability: 0.03 - - -### Once radiation is refactored I want it to have a small chance of giving you regular cancer diff --git a/Resources/Prototypes/Diseases/zombie.yml b/Resources/Prototypes/Diseases/zombie.yml deleted file mode 100644 index 018fbc82e2..0000000000 --- a/Resources/Prototypes/Diseases/zombie.yml +++ /dev/null @@ -1,33 +0,0 @@ -- type: disease - id: ActiveZombieVirus - name: disease-proto-zombie - infectious: false - cureResist: 0.2 - effects: - - !type:DiseaseHealthChange - probability: 0.075 - damage: - types: - Blunt: 4 - - !type:DiseaseAdjustReagent - probability: 0.05 - reagent: Toxin - amount: 1 - - !type:DiseaseSnough - probability: 0.01 - emote: Cough - - !type:DiseaseAddComponent - comp: ZombifyOnDeath - cures: - - !type:DiseaseReagentCure - reagent: Romerol - min: 5 - -- type: disease - id: PassiveZombieVirus - name: disease-proto-zombie-passive - infectious: false - cureResist: 1 #no cure. Death is your cure. - effects: - - !type:DiseaseAddComponent - comp: ZombifyOnDeath diff --git a/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml b/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml index 694f2fc3fa..f3373fe572 100644 --- a/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml +++ b/Resources/Prototypes/Entities/Clothing/Hands/base_clothinghands.yml @@ -7,5 +7,3 @@ state: icon - type: Clothing slots: [gloves] - - type: DiseaseProtection - protection: 0.05 diff --git a/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml b/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml index 6c7f15577a..5dac8bddae 100644 --- a/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml +++ b/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml @@ -133,8 +133,6 @@ sprite: Clothing/Hands/Gloves/latex.rsi - type: Clothing sprite: Clothing/Hands/Gloves/latex.rsi - - type: DiseaseProtection - protection: 0.1 - type: Fiber fiberMaterial: fibers-latex - type: FingerprintMask @@ -149,8 +147,6 @@ sprite: Clothing/Hands/Gloves/Color/blue.rsi - type: Clothing sprite: Clothing/Hands/Gloves/Color/blue.rsi - - type: DiseaseProtection - protection: 0.15 - type: Fiber fiberMaterial: fibers-nitrile - type: FingerprintMask diff --git a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml index 5b1fc327c2..94ed9ad2bf 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml @@ -122,8 +122,6 @@ tags: - HidesHair - WhitelistChameleon - - type: DiseaseProtection - protection: 0.05 - type: IdentityBlocker - type: entity @@ -162,8 +160,6 @@ tags: - HidesHair - WhitelistChameleon - - type: DiseaseProtection - protection: 0.05 - type: IdentityBlocker - type: entity diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml index 7db7664650..633194188f 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml @@ -141,8 +141,6 @@ - type: PressureProtection highPressureMultiplier: 0.6 lowPressureMultiplier: 5500 - - type: DiseaseProtection - protection: 0.15 - type: entity parent: ClothingHeadHardsuitWithLightBase @@ -256,8 +254,6 @@ - type: PressureProtection highPressureMultiplier: 0.6 lowPressureMultiplier: 5500 - - type: DiseaseProtection - protection: 0.15 - type: entity parent: ClothingHeadHardsuitWithLightBase @@ -440,8 +436,6 @@ Piercing: 0.8 Heat: 0.2 Radiation: 0.5 - - type: DiseaseProtection - protection: 0.15 - type: entity parent: ClothingHeadHardsuitWithLightBase @@ -484,8 +478,6 @@ Shock: 0.1 Cold: 0.2 Radiation: 0.2 - - type: DiseaseProtection - protection: 0.25 - type: entity parent: ClothingHeadHardsuitBase @@ -559,8 +551,6 @@ sprite: Clothing/Head/Hardsuits/ERThelmets/ertmedical.rsi - type: PointLight color: "#adffec" - - type: DiseaseProtection - protection: 0.20 - type: entity parent: ClothingHeadHelmetHardsuitSyndie diff --git a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml index a86e690dac..21bb4dbdee 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml @@ -293,8 +293,6 @@ - type: Clothing sprite: Clothing/Head/Helmets/paramedhelm.rsi - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.15 - type: TemperatureProtection coefficient: 0.1 - type: Armor diff --git a/Resources/Prototypes/Entities/Clothing/Head/hoods.yml b/Resources/Prototypes/Entities/Clothing/Head/hoods.yml index 000a127843..e25d0ccba0 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hoods.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hoods.yml @@ -9,8 +9,6 @@ sprite: Clothing/Head/Hoods/Bio/general.rsi - type: Clothing sprite: Clothing/Head/Hoods/Bio/general.rsi - - type: DiseaseProtection - protection: 0.15 - type: Tag tags: - HidesHair @@ -26,8 +24,6 @@ sprite: Clothing/Head/Hoods/Bio/cmo.rsi - type: Clothing sprite: Clothing/Head/Hoods/Bio/cmo.rsi - - type: DiseaseProtection - protection: 0.25 - type: entity parent: ClothingHeadHatHoodBioGeneral @@ -76,8 +72,6 @@ sprite: Clothing/Head/Hoods/Bio/virology.rsi - type: Clothing sprite: Clothing/Head/Hoods/Bio/virology.rsi - - type: DiseaseProtection - protection: 0.25 - type: entity parent: ClothingHeadBase diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml index 04bc867249..189df1ecf2 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml @@ -10,8 +10,6 @@ sprite: Clothing/Mask/gas.rsi - type: BreathMask - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.05 - type: IdentityBlocker - type: entity @@ -66,8 +64,6 @@ sprite: Clothing/Mask/gascaptain.rsi - type: BreathMask - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.05 - type: entity parent: ClothingMaskGasAtmos @@ -81,8 +77,6 @@ sprite: Clothing/Mask/gascentcom.rsi - type: BreathMask - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.05 - type: entity parent: ClothingMaskGas @@ -114,8 +108,6 @@ sprite: Clothing/Mask/medical.rsi - type: BreathMask - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.10 - type: Tag tags: - PetWearable @@ -149,8 +141,6 @@ sprite: Clothing/Mask/breath.rsi - type: BreathMask - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.05 - type: Tag tags: - PetWearable @@ -213,8 +203,6 @@ - type: Clothing sprite: Clothing/Mask/sterile.rsi - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingMaskBase @@ -246,8 +234,6 @@ sprite: Clothing/Mask/plaguedoctormask.rsi - type: BreathMask - type: IngestionBlocker - - type: DiseaseProtection - protection: 0.1 - type: IdentityBlocker - type: entity diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml index aed8e69035..d92c3ded0f 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml @@ -67,8 +67,6 @@ Piercing: 0.95 Heat: 0.90 Radiation: 0.25 - - type: DiseaseProtection - protection: 0.05 - type: ToggleableClothing - type: ContainerContainer containers: @@ -94,5 +92,3 @@ sprintModifier: 0.8 - type: Item size: 80 - - type: DiseaseProtection - protection: 0.05 diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/bio.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/bio.yml index c5a93fe640..d49845dbab 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/bio.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/bio.yml @@ -9,8 +9,6 @@ sprite: Clothing/OuterClothing/Bio/general.rsi - type: Clothing sprite: Clothing/OuterClothing/Bio/general.rsi - - type: DiseaseProtection - protection: 0.2 - type: Armor modifiers: coefficients: @@ -27,8 +25,6 @@ sprite: Clothing/OuterClothing/Bio/cmo.rsi - type: Clothing sprite: Clothing/OuterClothing/Bio/cmo.rsi - - type: DiseaseProtection - protection: 0.5 - type: entity parent: ClothingOuterBioGeneral @@ -53,8 +49,6 @@ sprite: Clothing/OuterClothing/Bio/scientist.rsi - type: Clothing sprite: Clothing/OuterClothing/Bio/scientist.rsi - - type: DiseaseProtection - protection: 0.3 - type: entity parent: ClothingOuterBioGeneral @@ -67,8 +61,6 @@ sprite: Clothing/OuterClothing/Bio/security.rsi - type: Clothing sprite: Clothing/OuterClothing/Bio/security.rsi - - type: DiseaseProtection - protection: 0.3 - type: entity parent: ClothingOuterBioCmo @@ -81,5 +73,3 @@ sprite: Clothing/OuterClothing/Bio/virology.rsi - type: Clothing sprite: Clothing/OuterClothing/Bio/virology.rsi - - type: DiseaseProtection - protection: 0.5 diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml index bf3fb7d430..aaf32f13e7 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml @@ -227,8 +227,6 @@ - type: PressureProtection highPressureMultiplier: 0.3 lowPressureMultiplier: 5500 - - type: DiseaseProtection - protection: 0.2 - type: ClothingSpeedModifier walkModifier: 0.9 sprintModifier: 0.95 @@ -379,8 +377,6 @@ - type: PressureProtection highPressureMultiplier: 0.3 lowPressureMultiplier: 5500 - - type: DiseaseProtection - protection: 0.2 - type: ClothingSpeedModifier walkModifier: 0.8 sprintModifier: 0.85 @@ -555,8 +551,6 @@ - type: ClothingSpeedModifier walkModifier: 0.9 sprintModifier: 0.9 - - type: DiseaseProtection - protection: 0.15 - type: TemperatureProtection coefficient: 0.1 - type: Armor @@ -659,8 +653,6 @@ damageCoefficient: 0.3 - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitSyndieElite - - type: DiseaseProtection - protection: 0.2 - type: entity parent: ClothingOuterHardsuitBase @@ -695,8 +687,6 @@ damageCoefficient: 0.7 - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetCBURN - - type: DiseaseProtection - protection: 0.4 #ERT - type: entity @@ -735,8 +725,6 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertmedical.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTMedical - - type: DiseaseProtection - protection: 0.25 - type: entity diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpskirts.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpskirts.yml index 21e79f0db5..5ec3bc4464 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpskirts.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpskirts.yml @@ -111,8 +111,6 @@ sprite: Clothing/Uniforms/Jumpskirt/cmo.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpskirt/cmo.rsi - - type: DiseaseProtection - protection: 0.15 - type: entity parent: ClothingUniformSkirtBase @@ -233,8 +231,6 @@ sprite: Clothing/Uniforms/Jumpskirt/medical.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpskirt/medical.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformSkirtBase @@ -257,8 +253,6 @@ sprite: Clothing/Uniforms/Jumpskirt/paramedic.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpskirt/paramedic.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformBase @@ -270,8 +264,6 @@ sprite: Clothing/Uniforms/Jumpskirt/brigmedic.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpskirt/brigmedic.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformSkirtBase diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml index 045efeebaa..283b498770 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml @@ -203,8 +203,6 @@ sprite: Clothing/Uniforms/Jumpsuit/cmo.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/cmo.rsi - - type: DiseaseProtection - protection: 0.15 - type: entity parent: ClothingUniformBase @@ -358,8 +356,6 @@ sprite: Clothing/Uniforms/Jumpsuit/medical.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/medical.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformBase @@ -382,8 +378,6 @@ sprite: Clothing/Uniforms/Jumpsuit/paramedic.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/paramedic.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformBase @@ -395,8 +389,6 @@ sprite: Clothing/Uniforms/Jumpsuit/brigmedic.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/brigmedic.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformBase @@ -990,8 +982,6 @@ sprite: Clothing/Uniforms/Jumpsuit/ert_janitor.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/ert_janitor.rsi - - type: DiseaseProtection - protection: 0.1 - type: entity parent: ClothingUniformBase @@ -1020,8 +1010,6 @@ sprite: Clothing/Uniforms/Jumpsuit/ert_medic.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/ert_medic.rsi - - type: DiseaseProtection - protection: 0.15 - type: entity parent: ClothingUniformBase diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 2f78771b93..0ab80f2f09 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -929,10 +929,6 @@ name: action-name-combat - type: Bloodstream bloodMaxVolume: 50 - - type: DiseaseCarrier #The other class lab animal and disease vector - naturalImmunities: - - AMIV - - ActiveHonkVirus - type: CanEscapeInventory - type: MobPrice price: 50 @@ -962,8 +958,6 @@ Base: splat-1 - type: Bloodstream bloodMaxVolume: 50 - - type: DiseaseCarrier #Why doesn't this save if it's only on the parent wtf - - type: entity parent: MobMouse @@ -988,8 +982,6 @@ Base: splat-2 - type: Bloodstream bloodMaxVolume: 50 - - type: DiseaseCarrier - - type: entity name: lizard #Weh diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml index afc890a15b..d8b10b8d27 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml @@ -117,19 +117,6 @@ spawned: - id: ClothingHeadHatFancyCrown #how did that get there? amount: 1 - - type: DiseaseCarrier - naturalImmunities: - - ActiveHonkVirus - carrierDiseases: - - VentCough - - AMIV - - SpaceCold - - SpaceFlu - - BirdFlew - - VanAusdallsRobovirus - - BleedersBite - - Plague - - TongueTwister - type: MobPrice price: 2500 # rat wealth - type: RandomMetadata @@ -271,19 +258,6 @@ spawned: - id: FoodMeatRat amount: 1 - - type: DiseaseCarrier - naturalImmunities: - - ActiveHonkVirus - carrierDiseases: - - VentCough - - AMIV - - SpaceCold - - SpaceFlu - - BirdFlew - - VanAusdallsRobovirus - - BleedersBite - - Plague - - TongueTwister - type: Vocal sounds: Male: Mouse diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml index 005f2a9d0a..6f1db28d4b 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml @@ -6,8 +6,6 @@ description: They mostly come at night. Mostly. components: - type: Insulated - - type: DiseaseProtection - protection: 1 - type: CombatMode - type: InputMover - type: MobMover diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 34a7f0a382..96ba3c4261 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -83,7 +83,6 @@ - ForcedSleep - TemporaryBlindness - Pacified - - type: DiseaseCarrier - type: Blindable # Other - type: Inventory diff --git a/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml b/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml index 8812da99ef..68f9655db7 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml @@ -28,8 +28,6 @@ Male: UnisexReptilian Female: UnisexReptilian Unsexed: UnisexReptilian - - type: DiseaseCarrier - diseaseResist: 0.1 - type: Damageable damageContainer: Biological damageModifierSet: Scale diff --git a/Resources/Prototypes/Entities/Mobs/Species/slime.yml b/Resources/Prototypes/Entities/Mobs/Species/slime.yml index 55ef658df4..9472adc76c 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/slime.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/slime.yml @@ -60,10 +60,6 @@ types: Asphyxiation: -1.0 maxSaturation: 15 - - type: DiseaseCarrier - naturalImmunities: - - Ultragigacancer - - BleedersBite - type: entity save: false diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/disease.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/disease.yml index 8bc13bd268..3d62137236 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/disease.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/disease.yml @@ -13,7 +13,6 @@ - type: Tag tags: - Recyclable - - type: DiseaseSwab - type: BotanySwab - type: entity @@ -28,4 +27,3 @@ sprite: Objects/Specific/Medical/medipen.rsi netsync: false state: salpen - - type: DiseaseVaccine diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healthanalyzer.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healthanalyzer.yml index b47ea13a14..24a7108454 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healthanalyzer.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healthanalyzer.yml @@ -37,42 +37,3 @@ slots: cell_slot: name: power-cell-slot-component-slot-name-default - -- type: entity - parent: HandheldHealthAnalyzer - id: HandheldHealthAnalyzerGigacancer - suffix: gigacancer - components: - - type: HealthAnalyzer - fake: true - disease: Ultragigacancer - -## I know admins will want this -- type: entity - parent: HandheldHealthAnalyzer - id: HandheldHealthAnalyzerOwOnavirus - name: OwOnavirus analyzer - suffix: admin abuse - components: - - type: HealthAnalyzer - fake: true - disease: OwOnavirus - -- type: entity - parent: HandheldHealthAnalyzer - id: HandheldHealthAnalyzerZombie - name: Zombie Infector - suffix: Active - components: - - type: HealthAnalyzer - fake: true - disease: ActiveZombieVirus - -- type: entity - parent: HandheldHealthAnalyzer - id: HandheldHealthAnalyzerHonk - suffix: Honk Infector - components: - - type: HealthAnalyzer - fake: true - disease: ActiveHonkVirus diff --git a/Resources/Prototypes/Entities/Structures/Machines/Medical/disease_diagnoser.yml b/Resources/Prototypes/Entities/Structures/Machines/Medical/disease_diagnoser.yml index 958e3f798d..6b7dd46fac 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/Medical/disease_diagnoser.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/Medical/disease_diagnoser.yml @@ -15,13 +15,7 @@ shader: unshaded map: ["enum.DiseaseMachineVisualLayers.IsOn"] netsync: false - - type: DiseaseDiagnoser - - type: DiseaseMachine - machineOutput: DiagnosisReportPaper - type: Appearance - - type: DiseaseMachineVisuals - idleState: icon - runningState: running - type: Machine board: DiagnoserMachineCircuitboard diff --git a/Resources/Prototypes/Entities/Structures/Machines/Medical/vaccinator.yml b/Resources/Prototypes/Entities/Structures/Machines/Medical/vaccinator.yml index 0dc1f479be..7a889b71c2 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/Medical/vaccinator.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/Medical/vaccinator.yml @@ -15,9 +15,6 @@ shader: unshaded map: ["enum.DiseaseMachineVisualLayers.IsOn"] netsync: false - - type: DiseaseVaccineCreator - - type: DiseaseMachine - machineOutput: Vaccine - type: Appearance - type: DiseaseMachineVisuals idleState: icon diff --git a/Resources/Prototypes/Entities/Structures/Machines/research.yml b/Resources/Prototypes/Entities/Structures/Machines/research.yml index 767e7b8c93..885e57c4ef 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/research.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/research.yml @@ -35,7 +35,6 @@ SheetSteel1: min: 1 max: 2 - - type: DiseaseServer - type: AmbientSound volume: -9 range: 5 diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index d1b50a302b..1336d42917 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -55,22 +55,6 @@ duration: 1 - type: BureaucraticErrorRule -- type: entity - id: DiseaseOutbreak - parent: BaseGameRule - noSpawn: true - components: - - type: StationEvent - startAnnouncement: station-event-disease-outbreak-announcement - startAudio: - path: /Audio/Announcements/outbreak7.ogg - params: - volume: -4 - weight: 5 - duration: 1 - earliestStart: 15 - - type: DiseaseOutbreakRule - - type: entity id: Dragon parent: BaseGameRule diff --git a/Resources/Prototypes/Reagents/gases.yml b/Resources/Prototypes/Reagents/gases.yml index e13ef34e6a..5603e7b3b9 100644 --- a/Resources/Prototypes/Reagents/gases.yml +++ b/Resources/Prototypes/Reagents/gases.yml @@ -187,14 +187,6 @@ metabolisms: Gas: effects: - - !type:ChemMiasmaPoolSource - conditions: - - !type:OrganType - type: Rat - shouldHave: false - - !type:ReagentThreshold - reagent: Miasma - min: 1 - !type:HealthChange conditions: - !type:OrganType diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 5e9e88a88b..8dd7b4066e 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -582,7 +582,6 @@ metabolisms: Medicine: effects: - - !type:ChemCureDisease - !type:HealthChange damage: types: @@ -838,7 +837,7 @@ messages: ["ethyloxyephedrine-effect-feeling-awake", "ethyloxyephedrine-effect-clear-mind"] type: Local probability: 0.1 - + - type: reagent id: Sigynate name: reagent-name-sigynate diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 1d9b0b51d7..c42e0d4167 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -92,19 +92,6 @@ damage: types: Poison: 1 - - !type:ChemCauseRandomDisease - conditions: - - !type:ReagentThreshold - reagent: Mold - min: 1 - diseases: - - VentCough - - SpaceCold - - SpaceFlu - - BirdFlew - - Plague - - TongueTwister - - MemeticAmirmir - type: reagent id: PolytrinicAcid @@ -392,9 +379,6 @@ damage: types: Poison: 2 - - !type:ChemCauseDisease ##Since this mostly just comes from the event you won't ingest that much - causeChance: 0.6 - disease: VentCough - type: reagent id: Corpium @@ -410,9 +394,6 @@ damage: types: Cellular: 1 - - !type:ChemCauseDisease - causeChance: 1 - disease: ActiveZombieVirus - type: reagent id: UncookedAnimalProteins @@ -494,6 +475,3 @@ damage: types: Poison: 0.06 - - !type:ChemCauseDisease - causeChance: 1 - disease: ActiveHonkVirus ##makes target honk and potential chance to be cluwned. diff --git a/Resources/Prototypes/Traits/inconveniences.yml b/Resources/Prototypes/Traits/inconveniences.yml index b74dfb2fb0..ad61b14971 100644 --- a/Resources/Prototypes/Traits/inconveniences.yml +++ b/Resources/Prototypes/Traits/inconveniences.yml @@ -1,16 +1,4 @@ - type: trait - id: UncontrollableSneezing - name: trait-sneezing-name - description: trait-sneezing-desc - whitelist: - components: - - DiseaseCarrier - components: - - type: UncontrollableSnough - emote: Sneeze - timeBetweenIncidents: 0.3, 300 - -- type: trait id: LightweightDrunk name: trait-lightweight-name description: trait-lightweight-desc diff --git a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml index a1f2715732..2c016148d8 100644 --- a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml @@ -399,21 +399,6 @@ prob: 0.5 maxAmount: 3 -- type: artifactEffect - id: EffectDisease - targetDepth: 3 - effectHint: artifact-effect-hint-biochemical - components: - - type: DiseaseArtifact - diseasePrototypes: - - VanAusdallsRobovirus - - OwOnavirus - - BleedersBite - - Ultragigacancer - - MemeticAmirmir - - TongueTwister - - AMIV - - type: artifactEffect id: EffectRareMaterialSpawn targetDepth: 3