From 1dc29c9e32072cb6b2240eb52ef41da96e8e18b8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 25 Dec 2025 10:51:42 -0600 Subject: [PATCH] Literally all of the damageable system refactor shitmed fixes. --- Content.Server/Dragon/DragonSystem.cs | 4 +--- .../Electrocution/ElectrocutionSystem.cs | 1 + .../Psionics/Abilities/DispelPowerSystem.cs | 1 + .../Psionics/Abilities/MindSwapPowerSystem.cs | 1 + .../Abilities/PsionicInvisibilityPowerSystem.cs | 2 +- .../Kitchen/EntitySystems/DeepFryerSystem.cs | 4 +++- .../Psionics/Glimmer/GlimmerReactiveSystem.cs | 2 +- .../StationEvents/Events/NoosphericFryRule.cs | 1 + .../_DV/Abilities/Chitinid/ChitinidSystem.cs | 7 ++++--- .../_DV/Clothing/DamageOnUnequipSystem.cs | 5 +++-- .../Abilities/CosmicConversionSystem.cs | 4 ++-- .../Abilities/CosmicImpositionSystem.cs | 2 +- .../CosmicCult/Abilities/CosmicNovaSystem.cs | 2 +- .../CosmicCult/Abilities/CosmicReturnSystem.cs | 2 +- .../CosmicCult/Abilities/CosmicSiphonSystem.cs | 2 +- .../_DV/CosmicCult/CosmicCultRuleSystem.cs | 3 ++- .../_DV/CosmicCult/CosmicGlyphSystem.cs | 5 ++--- .../_DV/CosmicCult/DeconversionSystem.cs | 7 +++++-- .../EntitySystems/CosmicColossusSystem.cs | 2 ++ .../EntitySystems/CosmicEntropyDegenSystem.cs | 2 +- Content.Server/_DV/CosmicCult/MonumentSystem.cs | 2 +- Content.Server/_DV/Execution/ExecutionSystem.cs | 2 ++ .../_DV/GlimmerWisp/LifeDrainerSystem.cs | 2 +- Content.Server/_DV/Harpy/HarpySingerSystem.cs | 5 +---- .../_DV/Mail/EntitySystems/DelayedItemSystem.cs | 2 +- .../_DV/Mail/EntitySystems/MailSystem.cs | 3 ++- .../_DV/Weather/WeatherEffectsSystem.cs | 2 +- .../Silicon/BlindHealing/BlindHealingSystem.cs | 1 + .../DeadStartupButtonSystem.cs | 1 + .../EmitBuzzWhileDamagedSystem.cs | 1 + .../WeldingHealable/WeldingHealableSystem.cs | 3 ++- .../_Goobstation/Bible/GoobBibleSystem.cs | 2 +- .../Devil/CheatDeath/CheatDeathSystem.cs | 1 + .../Devil/Contract/DevilContractSystem.cs | 2 +- .../_Goobstation/Devil/DevilSystem.cs | 10 +++++----- .../_Goobstation/Religion/WeakToHolySystem.cs | 3 ++- .../Containers/AntiTamper/AntiTamperSystem.cs | 2 +- .../EntitySystems/RevenantAnimatedSystem.cs | 1 + .../_Shitmed/Medical/Surgery/SurgerySystem.cs | 1 + .../Body/Systems/SharedBodySystem.Organs.cs | 4 ++-- .../Body/Systems/SharedBodySystem.Parts.cs | 2 ++ .../Damage/Systems/DamageableSystem.API.cs | 17 ++++++----------- .../Damage/Systems/DamageableSystem.Events.cs | 3 ++- .../Damage/Systems/DamageableSystem.cs | 5 +++-- .../EntitySystems/SharedHandsSystem.Relay.cs | 1 + Content.Shared/KillTome/KillTomeSystem.cs | 3 ++- .../Abilities/MassSleep/MassSleepPowerSystem.cs | 2 +- .../Trigger/Systems/DamageOnTriggerSystem.cs | 2 +- .../_DV/Armor/Systems/HandHeldArmorSystem.cs | 1 + .../_DV/Body/SharedLightLevelHealthSystem.cs | 4 +++- .../Systems/SharedRessurectWhenAbleSystem.cs | 1 + .../_DV/Silicons/SharedSiliconEmpSystem.cs | 4 +++- .../_DV/Silicons/SharedStationAiShopSystem.cs | 2 ++ .../EntitySystems/SharedMouthStorageSystem.cs | 3 ++- .../_DV/Surgery/SurgeryCleanSystem.cs | 2 +- .../Systems/SharedTapeRecorderSystem.cs | 2 ++ .../Weapons/Ranged/DamageOnShootSystem.cs | 4 ++-- .../CorticalBorer/SharedCorticalBorerSystem.cs | 8 +++++--- .../Body/Systems/SharedBodySystem.Targeting.cs | 6 ++---- .../Surgery/SharedSurgerySystem.Steps.cs | 4 +++- .../_Shitmed/Surgery/SharedSurgerySystem.cs | 3 ++- .../Objects/Specific/chemical-containers.yml | 1 + 62 files changed, 112 insertions(+), 77 deletions(-) diff --git a/Content.Server/Dragon/DragonSystem.cs b/Content.Server/Dragon/DragonSystem.cs index 427c5dbb334..4bd665a385c 100644 --- a/Content.Server/Dragon/DragonSystem.cs +++ b/Content.Server/Dragon/DragonSystem.cs @@ -1,9 +1,8 @@ using Content.Server.Objectives.Components; using Content.Server.Objectives.Systems; using Content.Server.Popups; -using Content.Server.Roles; using Content.Shared.Actions; -using Content.Shared.Damage; // DeltaV +using Content.Shared.Damage.Systems; // DeltaV using Content.Shared.Dragon; using Content.Shared.Maps; using Content.Shared.Mind; @@ -14,7 +13,6 @@ using Content.Shared.Movement.Systems; using Content.Shared.NPC.Systems; using Content.Shared.Zombies; using Robust.Shared.Audio.Systems; -using Robust.Shared.Map; using Robust.Shared.Map.Components; namespace Content.Server.Dragon; diff --git a/Content.Server/Electrocution/ElectrocutionSystem.cs b/Content.Server/Electrocution/ElectrocutionSystem.cs index e745bcac003..6e49f249960 100644 --- a/Content.Server/Electrocution/ElectrocutionSystem.cs +++ b/Content.Server/Electrocution/ElectrocutionSystem.cs @@ -25,6 +25,7 @@ using Content.Shared.Tag; using Content.Shared.Weapons.Melee.Events; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; +using Robust.Shared.Map; using Robust.Shared.Physics.Events; using Robust.Shared.Player; using Robust.Shared.Prototypes; diff --git a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/DispelPowerSystem.cs b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/DispelPowerSystem.cs index 83e9ec8aa46..7599cd8b012 100644 --- a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/DispelPowerSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/DispelPowerSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Actions; using Content.Shared.StatusEffect; using Content.Shared.Abilities.Psionics; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Revenant.Components; using Content.Server.Guardian; using Content.Server.Bible.Components; diff --git a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs index 6f2e43d27b6..3c911de3954 100644 --- a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs @@ -12,6 +12,7 @@ using Content.Shared.Mind; using Content.Shared.Mobs.Components; using Content.Shared.Mobs; using Content.Shared.Damage; +using Content.Shared.Damage.Components; using Content.Shared.Mobs.Systems; using Robust.Shared.Prototypes; using Robust.Shared.Timing; diff --git a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/PsionicInvisibilityPowerSystem.cs b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/PsionicInvisibilityPowerSystem.cs index f647a10ec1d..dff2d63225c 100644 --- a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/PsionicInvisibilityPowerSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/PsionicInvisibilityPowerSystem.cs @@ -1,7 +1,7 @@ using Content.Shared.Actions; using Content.Shared.CombatMode.Pacification; using Content.Shared.Abilities.Psionics; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Stunnable; using Content.Shared.Stealth; using Content.Shared.Stealth.Components; diff --git a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs index 29fa2380aa2..ac2fe33d865 100644 --- a/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs +++ b/Content.Server/Nyanotrasen/Kitchen/EntitySystems/DeepFryerSystem.cs @@ -26,6 +26,8 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Construction; using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Damage.Prototypes; using Content.Shared.Database; using Content.Shared.Destructible; @@ -230,7 +232,7 @@ public sealed partial class DeepFryerSystem : SharedDeepfryerSystem CookingDamageAmount); var result = _damageableSystem.TryChangeDamage(item, damage, origin: uid); - if (result?.GetTotal() > FixedPoint2.Zero) + if (result) { // TODO: Smoke, waste, sound, or some indication. } diff --git a/Content.Server/Nyanotrasen/Psionics/Glimmer/GlimmerReactiveSystem.cs b/Content.Server/Nyanotrasen/Psionics/Glimmer/GlimmerReactiveSystem.cs index 7ad19edb176..219a8f2a902 100644 --- a/Content.Server/Nyanotrasen/Psionics/Glimmer/GlimmerReactiveSystem.cs +++ b/Content.Server/Nyanotrasen/Psionics/Glimmer/GlimmerReactiveSystem.cs @@ -13,7 +13,7 @@ using Content.Shared.GameTicking; using Content.Shared.Psionics.Glimmer; using Content.Shared.Verbs; using Content.Shared.StatusEffect; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Destructible; using Content.Shared.Construction.Components; using Content.Shared.Mind; diff --git a/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs b/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs index 70303c8851c..bc51758c63c 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs @@ -9,6 +9,7 @@ using Content.Server.StationEvents.Events; using Content.Shared.Abilities.Psionics; using Content.Shared.Construction.EntitySystems; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.GameTicking.Components; using Content.Shared.Inventory; using Content.Shared.Mobs.Components; diff --git a/Content.Server/_DV/Abilities/Chitinid/ChitinidSystem.cs b/Content.Server/_DV/Abilities/Chitinid/ChitinidSystem.cs index f96fb8db8ac..ddeacd99b0b 100644 --- a/Content.Server/_DV/Abilities/Chitinid/ChitinidSystem.cs +++ b/Content.Server/_DV/Abilities/Chitinid/ChitinidSystem.cs @@ -1,6 +1,7 @@ using Content.Shared._DV.Abilities; -using Content.Shared.Damage; using Content.Shared.Mobs.Components; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Mobs.Systems; using Robust.Shared.Prototypes; using Robust.Shared.Timing; @@ -35,11 +36,11 @@ public sealed partial class ChitinidSystem : EntitySystem if (comp.AmountAbsorbed >= comp.MaximumAbsorbed || _mobState.IsDead(uid, mobState)) continue; - if (_damageable.TryChangeDamage(uid, comp.Healing, damageable: damageable) is not {} delta) + if (!_damageable.TryChangeDamage(uid, comp.Healing)) continue; // damage healed is subtracted, so the delta is negative. - comp.AmountAbsorbed -= delta.GetTotal(); + comp.AmountAbsorbed -= comp.Healing["Radiation"]; if (comp.AmountAbsorbed >= comp.MaximumAbsorbed) _cougher.EnableAction((uid, itemCougher)); } diff --git a/Content.Server/_DV/Clothing/DamageOnUnequipSystem.cs b/Content.Server/_DV/Clothing/DamageOnUnequipSystem.cs index 3138ef8be64..f63c1841584 100644 --- a/Content.Server/_DV/Clothing/DamageOnUnequipSystem.cs +++ b/Content.Server/_DV/Clothing/DamageOnUnequipSystem.cs @@ -2,7 +2,8 @@ using Content.Server.Chat.Systems; using Content.Shared._DV.Clothing; using Content.Shared._DV.Clothing.Components; using Content.Shared.Clothing; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Jittering; using Content.Shared.Popups; using Robust.Shared.Audio.Systems; @@ -41,6 +42,6 @@ public sealed class DamageOnUnequipSystem : SharedDamageOnUnequipSystem _jittering.DoJitter(args.Wearer, TimeSpan.FromSeconds(15), false); } - _damageable.TryChangeDamage(args.Wearer, ent.Comp.UnequipDamage, true, true, damageable); + _damageable.TryChangeDamage(args.Wearer, ent.Comp.UnequipDamage, true, true, canSever: false); // Shitmed } } diff --git a/Content.Server/_DV/CosmicCult/Abilities/CosmicConversionSystem.cs b/Content.Server/_DV/CosmicCult/Abilities/CosmicConversionSystem.cs index 845580ef3e7..2dc772eb401 100644 --- a/Content.Server/_DV/CosmicCult/Abilities/CosmicConversionSystem.cs +++ b/Content.Server/_DV/CosmicCult/Abilities/CosmicConversionSystem.cs @@ -3,7 +3,7 @@ using Content.Server.Bible.Components; using Content.Server.Popups; using Content.Shared._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Mind; using Content.Shared.Mindshield.Components; using Content.Shared.Mobs.Systems; @@ -91,7 +91,7 @@ public sealed class CosmicConversionSystem : EntitySystem else { _stun.TryUpdateStunDuration(target, TimeSpan.FromSeconds(4f)); - _damageable.TryChangeDamage(target, uid.Comp.ConversionHeal * -1); + _damageable.TryChangeDamage(target.Owner, uid.Comp.ConversionHeal * -1); _cultRule.CosmicConversion(uid, target); } } diff --git a/Content.Server/_DV/CosmicCult/Abilities/CosmicImpositionSystem.cs b/Content.Server/_DV/CosmicCult/Abilities/CosmicImpositionSystem.cs index 60170337946..4d1a0a0b540 100644 --- a/Content.Server/_DV/CosmicCult/Abilities/CosmicImpositionSystem.cs +++ b/Content.Server/_DV/CosmicCult/Abilities/CosmicImpositionSystem.cs @@ -1,6 +1,6 @@ using Content.Shared._DV.CosmicCult; using Content.Shared._DV.CosmicCult.Components; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.Timing; diff --git a/Content.Server/_DV/CosmicCult/Abilities/CosmicNovaSystem.cs b/Content.Server/_DV/CosmicCult/Abilities/CosmicNovaSystem.cs index 3fa2aec16a7..f8902d08762 100644 --- a/Content.Server/_DV/CosmicCult/Abilities/CosmicNovaSystem.cs +++ b/Content.Server/_DV/CosmicCult/Abilities/CosmicNovaSystem.cs @@ -2,7 +2,7 @@ using System.Numerics; using Content.Server.Bible.Components; using Content.Shared._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Effects; using Content.Shared.Mobs.Components; using Content.Shared.Stunnable; diff --git a/Content.Server/_DV/CosmicCult/Abilities/CosmicReturnSystem.cs b/Content.Server/_DV/CosmicCult/Abilities/CosmicReturnSystem.cs index 540ef539654..7a7556dae4b 100644 --- a/Content.Server/_DV/CosmicCult/Abilities/CosmicReturnSystem.cs +++ b/Content.Server/_DV/CosmicCult/Abilities/CosmicReturnSystem.cs @@ -2,7 +2,7 @@ using Content.Server._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult; using Content.Shared._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult.Components.Examine; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Mind; using Content.Shared.Stunnable; diff --git a/Content.Server/_DV/CosmicCult/Abilities/CosmicSiphonSystem.cs b/Content.Server/_DV/CosmicCult/Abilities/CosmicSiphonSystem.cs index 7d4275c7b5b..9e3fd99ab9e 100644 --- a/Content.Server/_DV/CosmicCult/Abilities/CosmicSiphonSystem.cs +++ b/Content.Server/_DV/CosmicCult/Abilities/CosmicSiphonSystem.cs @@ -2,7 +2,7 @@ using Content.Server.Ghost; using Content.Shared._DV.CosmicCult; using Content.Shared._DV.CosmicCult.Components; using Content.Shared.Alert; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; using Content.Shared.Light.Components; diff --git a/Content.Server/_DV/CosmicCult/CosmicCultRuleSystem.cs b/Content.Server/_DV/CosmicCult/CosmicCultRuleSystem.cs index cccd2e3ca07..22ca1f69a56 100644 --- a/Content.Server/_DV/CosmicCult/CosmicCultRuleSystem.cs +++ b/Content.Server/_DV/CosmicCult/CosmicCultRuleSystem.cs @@ -29,7 +29,8 @@ using Content.Shared.Alert; using Content.Shared.Audio; using Content.Shared.Body.Systems; using Content.Shared.Coordinates; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Database; using Content.Shared.GameTicking.Components; using Content.Shared.Humanoid; diff --git a/Content.Server/_DV/CosmicCult/CosmicGlyphSystem.cs b/Content.Server/_DV/CosmicCult/CosmicGlyphSystem.cs index 8a0dcfc14c2..3160c5f0f54 100644 --- a/Content.Server/_DV/CosmicCult/CosmicGlyphSystem.cs +++ b/Content.Server/_DV/CosmicCult/CosmicGlyphSystem.cs @@ -2,8 +2,7 @@ using Content.Server.Popups; using Content.Shared._DV.CosmicCult.Components.Examine; using Content.Shared._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult; -using Content.Shared.Damage; -using Content.Shared.Examine; +using Content.Shared.Damage.Systems; using Content.Shared.Humanoid; using Content.Shared.Interaction; using Content.Shared.Mobs.Systems; @@ -129,7 +128,7 @@ public sealed class CosmicGlyphSystem : SharedCosmicGlyphSystem var damage = ent.Comp.ActivationDamage / cultists.Count; foreach (var cultist in cultists) { - _damageable.TryChangeDamage(cultist, damage, true); + _damageable.TryChangeDamage(cultist.Owner, damage, true); } _audio.PlayPvs(ent.Comp.TriggerSFX, tgtpos, AudioParams.Default.WithVolume(+1f)); diff --git a/Content.Server/_DV/CosmicCult/DeconversionSystem.cs b/Content.Server/_DV/CosmicCult/DeconversionSystem.cs index fd3ac634352..58be725814a 100644 --- a/Content.Server/_DV/CosmicCult/DeconversionSystem.cs +++ b/Content.Server/_DV/CosmicCult/DeconversionSystem.cs @@ -6,7 +6,7 @@ using Content.Server.Polymorph.Systems; using Content.Shared._DV.CosmicCult.Components.Examine; using Content.Shared._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; using Content.Shared.Interaction; @@ -124,7 +124,10 @@ public sealed class DeconversionSystem : EntitySystem _popup.PopupEntity(Loc.GetString("cleanse-deconvert-attempt-notcorrupted", ("target", Identity.Entity(target.Value, EntityManager))), args.User, args.User); _popup.PopupCoordinates(Loc.GetString("cleanse-deconvert-attempt-rebound"), targetPosition, PopupType.MediumCaution); _damageable.TryChangeDamage(args.User, censer.FailedDeconversionDamage, true); - _damageable.TryChangeDamage(args.Target, censer.FailedDeconversionDamage, true); + + if (args.Target.HasValue) + _damageable.TryChangeDamage(args.Target.Value, censer.FailedDeconversionDamage, true); + _stun.TryKnockdown(target.Value, TimeSpan.FromSeconds(2), true); if (_mind.TryGetMind(target.Value, out _, out var mind) && _playerMan.TryGetSessionById(mind.UserId, out var session)) { diff --git a/Content.Server/_DV/CosmicCult/EntitySystems/CosmicColossusSystem.cs b/Content.Server/_DV/CosmicCult/EntitySystems/CosmicColossusSystem.cs index 6f0b735d57c..d1cceeb15ea 100644 --- a/Content.Server/_DV/CosmicCult/EntitySystems/CosmicColossusSystem.cs +++ b/Content.Server/_DV/CosmicCult/EntitySystems/CosmicColossusSystem.cs @@ -5,6 +5,8 @@ using Content.Server.Station.Systems; using Content.Shared._DV.CosmicCult.Components; using Content.Shared.Audio; using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Mobs; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; diff --git a/Content.Server/_DV/CosmicCult/EntitySystems/CosmicEntropyDegenSystem.cs b/Content.Server/_DV/CosmicCult/EntitySystems/CosmicEntropyDegenSystem.cs index 0d8456e034b..412083f6424 100644 --- a/Content.Server/_DV/CosmicCult/EntitySystems/CosmicEntropyDegenSystem.cs +++ b/Content.Server/_DV/CosmicCult/EntitySystems/CosmicEntropyDegenSystem.cs @@ -1,6 +1,6 @@ using Content.Shared._DV.CosmicCult.Components; using Robust.Shared.Timing; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Robust.Shared.Random; namespace Content.Server._DV.CosmicCult.EntitySystems; diff --git a/Content.Server/_DV/CosmicCult/MonumentSystem.cs b/Content.Server/_DV/CosmicCult/MonumentSystem.cs index fa58f5d26bd..f2b7245335d 100644 --- a/Content.Server/_DV/CosmicCult/MonumentSystem.cs +++ b/Content.Server/_DV/CosmicCult/MonumentSystem.cs @@ -13,7 +13,7 @@ using Content.Shared._DV.CosmicCult.Components; using Content.Shared._DV.CosmicCult.Prototypes; using Content.Server._DV.Shuttles.Events; using Content.Shared.Audio; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Stacks; diff --git a/Content.Server/_DV/Execution/ExecutionSystem.cs b/Content.Server/_DV/Execution/ExecutionSystem.cs index 0ff02cc2cd8..902b6a5f9cd 100644 --- a/Content.Server/_DV/Execution/ExecutionSystem.cs +++ b/Content.Server/_DV/Execution/ExecutionSystem.cs @@ -5,6 +5,8 @@ using Content.Shared._Shitmed.Targeting; using Content.Shared.ActionBlocker; using Content.Shared.Clumsy; using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared.Execution; diff --git a/Content.Server/_DV/GlimmerWisp/LifeDrainerSystem.cs b/Content.Server/_DV/GlimmerWisp/LifeDrainerSystem.cs index 31bd753bf17..45fc82aa49e 100644 --- a/Content.Server/_DV/GlimmerWisp/LifeDrainerSystem.cs +++ b/Content.Server/_DV/GlimmerWisp/LifeDrainerSystem.cs @@ -1,5 +1,5 @@ using Content.Shared.ActionBlocker; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared._DV.Carrying; using Content.Shared.DoAfter; using Content.Shared.Interaction; diff --git a/Content.Server/_DV/Harpy/HarpySingerSystem.cs b/Content.Server/_DV/Harpy/HarpySingerSystem.cs index 22e120ee7d1..39a35a21af5 100644 --- a/Content.Server/_DV/Harpy/HarpySingerSystem.cs +++ b/Content.Server/_DV/Harpy/HarpySingerSystem.cs @@ -1,11 +1,9 @@ using Content.Server.Instruments; using Content.Server.Speech.Components; -using Content.Server.UserInterface; using Content.Shared.Instruments; -using Content.Shared.Instruments.UI; using Content.Shared.ActionBlocker; using Content.Shared.Bed.Sleep; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Damage.ForceSay; using Content.Shared._DV.Harpy; using Content.Shared.FixedPoint; @@ -17,7 +15,6 @@ using Content.Shared.StatusEffect; using Content.Shared.Stunnable; using Content.Shared.UserInterface; using Content.Shared.Zombies; -using Robust.Server.GameObjects; using Robust.Shared.Player; using Robust.Shared.Prototypes; diff --git a/Content.Server/_DV/Mail/EntitySystems/DelayedItemSystem.cs b/Content.Server/_DV/Mail/EntitySystems/DelayedItemSystem.cs index 2d94b5c2548..59472a19b06 100644 --- a/Content.Server/_DV/Mail/EntitySystems/DelayedItemSystem.cs +++ b/Content.Server/_DV/Mail/EntitySystems/DelayedItemSystem.cs @@ -1,5 +1,5 @@ using Content.Server._DV.Mail.Components; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Hands; using Robust.Shared.Containers; diff --git a/Content.Server/_DV/Mail/EntitySystems/MailSystem.cs b/Content.Server/_DV/Mail/EntitySystems/MailSystem.cs index cb0545d7c8f..fbe7d7c2af7 100644 --- a/Content.Server/_DV/Mail/EntitySystems/MailSystem.cs +++ b/Content.Server/_DV/Mail/EntitySystems/MailSystem.cs @@ -16,7 +16,8 @@ using Content.Shared.Access.Components; using Content.Shared.Access; using Content.Shared.Cargo.Components; using Content.Shared.Chemistry.EntitySystems; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared._DV.Mail; using Content.Shared.Fluids.Components; using Content.Shared.Nutrition.Components; diff --git a/Content.Server/_DV/Weather/WeatherEffectsSystem.cs b/Content.Server/_DV/Weather/WeatherEffectsSystem.cs index 35ea78e737b..657e50178c9 100644 --- a/Content.Server/_DV/Weather/WeatherEffectsSystem.cs +++ b/Content.Server/_DV/Weather/WeatherEffectsSystem.cs @@ -1,4 +1,4 @@ -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Weather; diff --git a/Content.Server/_EE/Silicon/BlindHealing/BlindHealingSystem.cs b/Content.Server/_EE/Silicon/BlindHealing/BlindHealingSystem.cs index 1110555a02a..f84a2e19eab 100644 --- a/Content.Server/_EE/Silicon/BlindHealing/BlindHealingSystem.cs +++ b/Content.Server/_EE/Silicon/BlindHealing/BlindHealingSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Cargo.Components; using Content.Server.Stack; using Content.Shared._EE.Silicon.BlindHealing; using Content.Shared.Damage; +using Content.Shared.Damage.Components; using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared.Eye.Blinding.Components; diff --git a/Content.Server/_EE/Silicon/DeadStartupButton/DeadStartupButtonSystem.cs b/Content.Server/_EE/Silicon/DeadStartupButton/DeadStartupButtonSystem.cs index 1f3cff0f056..4e537f89db6 100644 --- a/Content.Server/_EE/Silicon/DeadStartupButton/DeadStartupButtonSystem.cs +++ b/Content.Server/_EE/Silicon/DeadStartupButton/DeadStartupButtonSystem.cs @@ -13,6 +13,7 @@ using Content.Shared.Mobs.Systems; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.Random; +using Content.Shared.Damage.Components; namespace Content.Server._EE.Silicon.DeadStartupButton; diff --git a/Content.Server/_EE/Silicon/EmitBuzzOnCrit/EmitBuzzWhileDamagedSystem.cs b/Content.Server/_EE/Silicon/EmitBuzzOnCrit/EmitBuzzWhileDamagedSystem.cs index a066e7afa99..f5274ef343e 100644 --- a/Content.Server/_EE/Silicon/EmitBuzzOnCrit/EmitBuzzWhileDamagedSystem.cs +++ b/Content.Server/_EE/Silicon/EmitBuzzOnCrit/EmitBuzzWhileDamagedSystem.cs @@ -8,6 +8,7 @@ using Robust.Shared.Audio.Systems; using Robust.Shared.Random; using Robust.Shared.Timing; using Content.Shared.Mobs.Components; +using Content.Shared.Damage.Components; namespace Content.Server._EE.Silicon.EmitBuzzOnCrit; diff --git a/Content.Server/_EE/Silicon/WeldingHealable/WeldingHealableSystem.cs b/Content.Server/_EE/Silicon/WeldingHealable/WeldingHealableSystem.cs index 99298dd6176..41e73f1dd38 100644 --- a/Content.Server/_EE/Silicon/WeldingHealable/WeldingHealableSystem.cs +++ b/Content.Server/_EE/Silicon/WeldingHealable/WeldingHealableSystem.cs @@ -4,7 +4,8 @@ using Content.Shared.Tools.Components; using Content.Shared._EE.Silicon.WeldingHealing; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Tools; diff --git a/Content.Server/_Goobstation/Bible/GoobBibleSystem.cs b/Content.Server/_Goobstation/Bible/GoobBibleSystem.cs index 6b1dcb4161c..af82e259a5e 100644 --- a/Content.Server/_Goobstation/Bible/GoobBibleSystem.cs +++ b/Content.Server/_Goobstation/Bible/GoobBibleSystem.cs @@ -11,7 +11,7 @@ using Content.Shared._Goobstation.Devil; using Content.Shared._Goobstation.Exorcism; using Content.Shared._Goobstation.Religion; using Content.Shared._Shitmed.Targeting; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.DoAfter; using Content.Shared.Interaction; using Content.Shared.Mobs.Systems; diff --git a/Content.Server/_Goobstation/Devil/CheatDeath/CheatDeathSystem.cs b/Content.Server/_Goobstation/Devil/CheatDeath/CheatDeathSystem.cs index 2e6e9ffea06..f384d86932c 100644 --- a/Content.Server/_Goobstation/Devil/CheatDeath/CheatDeathSystem.cs +++ b/Content.Server/_Goobstation/Devil/CheatDeath/CheatDeathSystem.cs @@ -19,6 +19,7 @@ using Content.Shared.Mobs.Systems; using Content.Shared.Popups; using Content.Shared.Traits.Assorted; using Robust.Shared.Network; +using Content.Shared.Damage.Components; namespace Content.Server._Goobstation.Devil.CheatDeath; diff --git a/Content.Server/_Goobstation/Devil/Contract/DevilContractSystem.cs b/Content.Server/_Goobstation/Devil/Contract/DevilContractSystem.cs index cbc3e0fffe4..702a93205a0 100644 --- a/Content.Server/_Goobstation/Devil/Contract/DevilContractSystem.cs +++ b/Content.Server/_Goobstation/Devil/Contract/DevilContractSystem.cs @@ -21,7 +21,7 @@ using Content.Server.Hands.Systems; using Content.Server.Implants; using Content.Server.Mind; using Content.Server.Polymorph.Systems; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Examine; using Content.Shared.Mindshield.Components; using Content.Shared.Nutrition; diff --git a/Content.Server/_Goobstation/Devil/DevilSystem.cs b/Content.Server/_Goobstation/Devil/DevilSystem.cs index 120d31d5437..7b2ba9ec93c 100644 --- a/Content.Server/_Goobstation/Devil/DevilSystem.cs +++ b/Content.Server/_Goobstation/Devil/DevilSystem.cs @@ -35,7 +35,8 @@ using Content.Shared._Lavaland.Chasm; using Content.Shared._Shitmed.Body.Components; using Content.Shared.Actions; using Content.Shared.CombatMode; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Examine; using Content.Shared.IdentityManagement; using Content.Shared.IdentityManagement.Components; @@ -127,8 +128,7 @@ public sealed partial class DevilSystem : EntitySystem revival.CanCheatStanding = true; // Change damage modifier - if (TryComp(devil, out var damageableComp)) - _damageable.SetDamageModifierSetId(devil, devil.Comp.DevilDamageModifierSet, damageableComp); + _damageable.SetDamageModifierSetId(devil.Owner, devil.Comp.DevilDamageModifierSet); // No decapitating the devil foreach (var part in _body.GetBodyChildren(devil)) @@ -235,7 +235,7 @@ public sealed partial class DevilSystem : EntitySystem if (HasComp(args.Source)) { - _damageable.TryChangeDamage(devil, devil.Comp.DamageOnTrueName * devil.Comp.BibleUserDamageMultiplier, true); + _damageable.TryChangeDamage(devil.Owner, devil.Comp.DamageOnTrueName * devil.Comp.BibleUserDamageMultiplier, true); _stun.TryAddParalyzeDuration(devil, devil.Comp.ParalyzeDurationOnTrueName * devil.Comp.BibleUserDamageMultiplier); var popup = Loc.GetString("devil-true-name-heard-chaplain", ("speaker", args.Source), ("target", devil)); @@ -244,7 +244,7 @@ public sealed partial class DevilSystem : EntitySystem else { _stun.TryAddParalyzeDuration(devil, devil.Comp.ParalyzeDurationOnTrueName); - _damageable.TryChangeDamage(devil, devil.Comp.DamageOnTrueName, true); + _damageable.TryChangeDamage(devil.Owner, devil.Comp.DamageOnTrueName, true); var popup = Loc.GetString("devil-true-name-heard", ("speaker", args.Source), ("target", devil)); _popup.PopupEntity(popup, devil, PopupType.LargeCaution); diff --git a/Content.Server/_Goobstation/Religion/WeakToHolySystem.cs b/Content.Server/_Goobstation/Religion/WeakToHolySystem.cs index 73e8c78bbe5..7bdddd357ed 100644 --- a/Content.Server/_Goobstation/Religion/WeakToHolySystem.cs +++ b/Content.Server/_Goobstation/Religion/WeakToHolySystem.cs @@ -11,7 +11,8 @@ using System.Linq; using Content.Shared._Goobstation.Religion; using Content.Server._Goobstation.Bible; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.Interaction; using Content.Shared.Inventory; using Robust.Shared.Physics.Events; diff --git a/Content.Server/_Impstation/Containers/AntiTamper/AntiTamperSystem.cs b/Content.Server/_Impstation/Containers/AntiTamper/AntiTamperSystem.cs index 9d84f2d23f9..0370db39d8a 100644 --- a/Content.Server/_Impstation/Containers/AntiTamper/AntiTamperSystem.cs +++ b/Content.Server/_Impstation/Containers/AntiTamper/AntiTamperSystem.cs @@ -1,6 +1,6 @@ using Content.Server.Storage.EntitySystems; using Content.Shared.Containers.AntiTamper; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Destructible; using Content.Shared.DoAfter; using Content.Shared.Lock; diff --git a/Content.Server/_Impstation/Revenant/EntitySystems/RevenantAnimatedSystem.cs b/Content.Server/_Impstation/Revenant/EntitySystems/RevenantAnimatedSystem.cs index d3d2ef820c6..3434e11cd9e 100644 --- a/Content.Server/_Impstation/Revenant/EntitySystems/RevenantAnimatedSystem.cs +++ b/Content.Server/_Impstation/Revenant/EntitySystems/RevenantAnimatedSystem.cs @@ -1,5 +1,6 @@ using Content.Shared.Popups; using Content.Shared.Damage; +using Content.Shared.Damage.Components; using Content.Server.Revenant.Components; using Content.Shared.DoAfter; using Content.Shared.Revenant.Components; diff --git a/Content.Server/_Shitmed/Medical/Surgery/SurgerySystem.cs b/Content.Server/_Shitmed/Medical/Surgery/SurgerySystem.cs index bb524745040..e44aedb99c7 100644 --- a/Content.Server/_Shitmed/Medical/Surgery/SurgerySystem.cs +++ b/Content.Server/_Shitmed/Medical/Surgery/SurgerySystem.cs @@ -3,6 +3,7 @@ using Content.Server.Chat.Systems; using Content.Shared.Body.Part; using Content.Server.Popups; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; using Content.Shared.Inventory; // Begin DeltaV Additions using Content.Shared._DV.Surgery; diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Organs.cs b/Content.Shared/Body/Systems/SharedBodySystem.Organs.cs index cf526d248dd..ee31c4b10ad 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Organs.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Organs.cs @@ -7,7 +7,7 @@ using Robust.Shared.Containers; // Shitmed Change -using Content.Shared.Damage; +using Content.Shared.Damage.Components; using Content.Shared._Shitmed.BodyEffects; using Content.Shared._Shitmed.Body.Events; using Content.Shared._Shitmed.Body.Organ; @@ -70,7 +70,7 @@ public partial class SharedBodySystem RaiseLocalEvent(organEnt, ref removedInBodyEv); } - if (parentPartUid is { Valid: true } + if (parentPartUid is { Valid: true } // Shitmed Fixes && TryComp(parentPartUid, out DamageableComponent? damageable) && damageable.TotalDamage > 200) TrySetOrganUsed(organEnt, true, organEnt.Comp); diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs index 59f826fbed5..161b62e2c6a 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs @@ -27,6 +27,8 @@ public partial class SharedBodySystem [Dependency] private readonly RandomHelperSystem _randomHelper = default!; // Shitmed Change // [Dependency] private readonly InventorySystem _inventorySystem = default!; // Shitmed Change - Declared in SharedBodySystem.cs + private static readonly ProtoId BloodlossDamageType = "Bloodloss"; + private void InitializeParts() { // TODO: This doesn't handle comp removal on child ents. diff --git a/Content.Shared/Damage/Systems/DamageableSystem.API.cs b/Content.Shared/Damage/Systems/DamageableSystem.API.cs index cca52ca67eb..9bff1e19d81 100644 --- a/Content.Shared/Damage/Systems/DamageableSystem.API.cs +++ b/Content.Shared/Damage/Systems/DamageableSystem.API.cs @@ -146,7 +146,7 @@ public sealed partial class DamageableSystem if (doPartDamage) // DeltaV - Fix EvenHealing with Limbs. { var partDamage = new BeforePartDamageChangedEvent(damage, origin, targetPart, ignoreResistances, canSever, canEvade, partMultiplier); // DeltaV - Standardize PartDamage. - RaiseLocalEvent(uid.Value, ref partDamage); + RaiseLocalEvent(ent.Owner, ref partDamage); if (partDamage.Evaded || partDamage.Cancelled) return damageDone; // TODO: October - Was null @@ -158,13 +158,13 @@ public sealed partial class DamageableSystem { if ( ent.Comp.DamageModifierSetId != null && - _prototypeManager.Resolve(ent.Comp.DamageModifierSetId, out var modifierSet, targetPart) // Shitmed Change - add targetPart + _prototypeManager.Resolve(ent.Comp.DamageModifierSetId, out var modifierSet) ) damage = DamageSpecifier.ApplyModifierSet(damage, modifierSet); // TODO DAMAGE // byref struct event. - var ev = new DamageModifyEvent(damage, origin); + var ev = new DamageModifyEvent(damage, origin, targetPart: targetPart); // Shitmed - Add TargetPart RaiseLocalEvent(ent, ev); damage = ev.Damage; @@ -264,15 +264,10 @@ public sealed partial class DamageableSystem OnEntityDamageChanged((ent, ent.Comp), new DamageSpecifier()); // Shitmed Change Start - if (HasComp(uid)) + if (HasComp(ent.Owner)) { - foreach (var (part, _) in _body.GetBodyChildren(uid)) - { - if (!TryComp(part, out DamageableComponent? damageComp)) - continue; - - SetAllDamage(part, damageComp, newValue); - } + foreach (var (part, _) in _body.GetBodyChildren(ent.Owner)) + SetAllDamage(part, newValue); } // Shitmed Change End } diff --git a/Content.Shared/Damage/Systems/DamageableSystem.Events.cs b/Content.Shared/Damage/Systems/DamageableSystem.Events.cs index 4ac647cd2a1..44546785c51 100644 --- a/Content.Shared/Damage/Systems/DamageableSystem.Events.cs +++ b/Content.Shared/Damage/Systems/DamageableSystem.Events.cs @@ -245,7 +245,8 @@ public sealed class DamageModifyEvent(DamageSpecifier damage, EntityUid? origin public readonly DamageSpecifier OriginalDamage = damage; public DamageSpecifier Damage = damage; - public readonly TargetBodyPart? TargetPart; // Shitmed Change + public EntityUid? Origin = origin; // DeltaV - Did upstream forget this? + public readonly TargetBodyPart? TargetPart = targetPart; // Shitmed Change } public sealed class DamageChangedEvent : EntityEventArgs diff --git a/Content.Shared/Damage/Systems/DamageableSystem.cs b/Content.Shared/Damage/Systems/DamageableSystem.cs index 64f166f9517..bd5ebe2c1e0 100644 --- a/Content.Shared/Damage/Systems/DamageableSystem.cs +++ b/Content.Shared/Damage/Systems/DamageableSystem.cs @@ -52,7 +52,8 @@ public sealed partial class DamageableSystem : EntitySystem Entity ent, DamageSpecifier? damageDelta = null, bool interruptsDoAfters = true, - EntityUid? origin = null + EntityUid? origin = null, + bool canSever = true // Shitmed ) { ent.Comp.Damage.GetDamagePerGroup(_prototypeManager, ent.Comp.DamagePerGroup); @@ -71,7 +72,7 @@ public sealed partial class DamageableSystem : EntitySystem // TODO DAMAGE // byref struct event. - RaiseLocalEvent(ent, new DamageChangedEvent(ent.Comp, damageDelta, interruptsDoAfters, origin)); + RaiseLocalEvent(ent, new DamageChangedEvent(ent.Comp, damageDelta, interruptsDoAfters, origin, canSever: canSever)); // Shitmed } private void DamageableGetState(Entity ent, ref ComponentGetState args) diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Relay.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Relay.cs index e0294ae902a..abc3d9b1e44 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Relay.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Relay.cs @@ -3,6 +3,7 @@ using Content.Shared.Atmos; using Content.Shared.Camera; using Content.Shared.Cuffs; using Content.Shared.Damage; // DeltaV End - Addition of HandHeldArmor +using Content.Shared.Damage.Systems; // DeltaV End - Addition of HandHeldArmor using Content.Shared.Hands.Components; using Content.Shared.Movement.Systems; using Content.Shared.Projectiles; diff --git a/Content.Shared/KillTome/KillTomeSystem.cs b/Content.Shared/KillTome/KillTomeSystem.cs index bd49c483d94..73701691eec 100644 --- a/Content.Shared/KillTome/KillTomeSystem.cs +++ b/Content.Shared/KillTome/KillTomeSystem.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared.Administration.Logs; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared.Database; using Content.Shared.Humanoid; using Content.Shared.Mobs; diff --git a/Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/MassSleep/MassSleepPowerSystem.cs b/Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/MassSleep/MassSleepPowerSystem.cs index e6eff2a4c0c..670eb1c1ad7 100644 --- a/Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/MassSleep/MassSleepPowerSystem.cs +++ b/Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/MassSleep/MassSleepPowerSystem.cs @@ -1,7 +1,7 @@ using Content.Shared.Actions; using Content.Shared.DoAfter; using Content.Shared.Bed.Sleep; -using Content.Shared.Damage; +using Content.Shared.Damage.Components; using Content.Shared.Mobs.Components; using Robust.Shared.Prototypes; using Content.Shared.Actions.Events; diff --git a/Content.Shared/Trigger/Systems/DamageOnTriggerSystem.cs b/Content.Shared/Trigger/Systems/DamageOnTriggerSystem.cs index 3bd29b7eaf5..e265ddd56b8 100644 --- a/Content.Shared/Trigger/Systems/DamageOnTriggerSystem.cs +++ b/Content.Shared/Trigger/Systems/DamageOnTriggerSystem.cs @@ -13,7 +13,7 @@ public sealed class DamageOnTriggerSystem : XOnTriggerSystem ent, ref RefreshMovementSpeedModifiersEvent args) diff --git a/Content.Shared/_DV/Body/Systems/SharedRessurectWhenAbleSystem.cs b/Content.Shared/_DV/Body/Systems/SharedRessurectWhenAbleSystem.cs index d2f8760ee7e..9d6cdbd1332 100644 --- a/Content.Shared/_DV/Body/Systems/SharedRessurectWhenAbleSystem.cs +++ b/Content.Shared/_DV/Body/Systems/SharedRessurectWhenAbleSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Damage; +using Content.Shared.Damage.Components; using Content.Shared.Examine; using Content.Shared.Mobs.Systems; using Robust.Shared.Timing; diff --git a/Content.Shared/_DV/Silicons/SharedSiliconEmpSystem.cs b/Content.Shared/_DV/Silicons/SharedSiliconEmpSystem.cs index 100ce8769e4..51587906955 100644 --- a/Content.Shared/_DV/Silicons/SharedSiliconEmpSystem.cs +++ b/Content.Shared/_DV/Silicons/SharedSiliconEmpSystem.cs @@ -1,5 +1,7 @@ using Content.Shared.Emp; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared._DV.Silicons.Components; namespace Content.Shared._DV.Silicons; @@ -33,6 +35,6 @@ public abstract class SharedSiliconEmpSystem : EntitySystem if (args.Damage is not { } damage) return; - _damageable.TryChangeDamage(ent, damage, false); + _damageable.TryChangeDamage(ent.Owner, damage, false); } } diff --git a/Content.Shared/_DV/Silicons/SharedStationAiShopSystem.cs b/Content.Shared/_DV/Silicons/SharedStationAiShopSystem.cs index aa0287b702d..cd9b13fb732 100644 --- a/Content.Shared/_DV/Silicons/SharedStationAiShopSystem.cs +++ b/Content.Shared/_DV/Silicons/SharedStationAiShopSystem.cs @@ -1,5 +1,7 @@ using Content.Shared.Actions; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared.Light.Components; using Robust.Shared.Audio.Systems; using Robust.Shared.Timing; diff --git a/Content.Shared/_DV/Storage/EntitySystems/SharedMouthStorageSystem.cs b/Content.Shared/_DV/Storage/EntitySystems/SharedMouthStorageSystem.cs index 2aaf015b437..a35c7b08544 100644 --- a/Content.Shared/_DV/Storage/EntitySystems/SharedMouthStorageSystem.cs +++ b/Content.Shared/_DV/Storage/EntitySystems/SharedMouthStorageSystem.cs @@ -1,6 +1,7 @@ using Content.Shared.Actions; using Content.Shared.CombatMode; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared._DV.Storage.Components; using Content.Shared.Examine; using Content.Shared.IdentityManagement; diff --git a/Content.Shared/_DV/Surgery/SurgeryCleanSystem.cs b/Content.Shared/_DV/Surgery/SurgeryCleanSystem.cs index fa998a55797..7fe0bcd3cb6 100644 --- a/Content.Shared/_DV/Surgery/SurgeryCleanSystem.cs +++ b/Content.Shared/_DV/Surgery/SurgeryCleanSystem.cs @@ -155,7 +155,7 @@ public sealed class SurgeryCleanSystem : EntitySystem public void AddDirt(EntityUid uid, FixedPoint2 amount) { var comp = EnsureComp(uid); - comp.Dirtiness += amount; + comp.Dirtiness += amount * 0.1f; Dirty(uid, comp); } diff --git a/Content.Shared/_DV/TapeRecorder/Systems/SharedTapeRecorderSystem.cs b/Content.Shared/_DV/TapeRecorder/Systems/SharedTapeRecorderSystem.cs index df729213d85..0685998795f 100644 --- a/Content.Shared/_DV/TapeRecorder/Systems/SharedTapeRecorderSystem.cs +++ b/Content.Shared/_DV/TapeRecorder/Systems/SharedTapeRecorderSystem.cs @@ -1,5 +1,7 @@ using Content.Shared.Containers.ItemSlots; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared._DV.TapeRecorder.Components; using Content.Shared.Destructible; using Content.Shared.DoAfter; diff --git a/Content.Shared/_Impstation/Weapons/Ranged/DamageOnShootSystem.cs b/Content.Shared/_Impstation/Weapons/Ranged/DamageOnShootSystem.cs index 3df153f6705..5886aa39d1d 100644 --- a/Content.Shared/_Impstation/Weapons/Ranged/DamageOnShootSystem.cs +++ b/Content.Shared/_Impstation/Weapons/Ranged/DamageOnShootSystem.cs @@ -62,9 +62,9 @@ public sealed class DamageOnShootSystem : EntitySystem } } - totalDamage = _damageableSystem.TryChangeDamage(args.User, totalDamage); + var didSelfDamage = _damageableSystem.TryChangeDamage(args.User, totalDamage); - if (totalDamage != null && totalDamage.AnyPositive()) + if (didSelfDamage) { // Record this interaction and determine when a user is allowed to interact with this entity again entity.Comp.LastInteraction = _gameTiming.CurTime; diff --git a/Content.Shared/_Mono/CorticalBorer/SharedCorticalBorerSystem.cs b/Content.Shared/_Mono/CorticalBorer/SharedCorticalBorerSystem.cs index 641feab0e14..eaadf21af09 100644 --- a/Content.Shared/_Mono/CorticalBorer/SharedCorticalBorerSystem.cs +++ b/Content.Shared/_Mono/CorticalBorer/SharedCorticalBorerSystem.cs @@ -14,12 +14,15 @@ using Content.Shared.MedicalScanner; using Content.Shared.Popups; using Content.Shared.StatusEffect; using Content.Shared.Coordinates; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared.IdentityManagement; using Robust.Shared.Containers; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager; + + namespace Content.Shared._Mono.CorticalBorer; public partial class SharedCorticalBorerSystem : EntitySystem @@ -82,8 +85,7 @@ public partial class SharedCorticalBorerSystem : EntitySystem RemCompDeferred(ent, compReg.Component.GetType()); } - if (TryComp(ent, out var damComp)) - _damage.SetAllDamage(ent, damComp, 0); + _damage.SetAllDamage(ent.Owner, 0); } public bool TryEjectBorer(Entity ent) diff --git a/Content.Shared/_Shitmed/Body/Systems/SharedBodySystem.Targeting.cs b/Content.Shared/_Shitmed/Body/Systems/SharedBodySystem.Targeting.cs index 0a4e2929a53..ceafc8b0be9 100644 --- a/Content.Shared/_Shitmed/Body/Systems/SharedBodySystem.Targeting.cs +++ b/Content.Shared/_Shitmed/Body/Systems/SharedBodySystem.Targeting.cs @@ -83,7 +83,7 @@ public partial class SharedBodySystem && damage <= entity.Comp.IntegrityThresholds[TargetIntegrity.HeavilyWounded] && _queryTargeting.HasComp(body) && !_mobState.IsDead(body)) - Damageable.TryChangeDamage(entity, GetHealingSpecifier(entity), canSever: false, targetPart: GetTargetBodyPart(entity)); + Damageable.TryChangeDamage(entity.Owner, GetHealingSpecifier(entity), canSever: false, targetPart: GetTargetBodyPart(entity)); } public override void Update(float frameTime) @@ -203,9 +203,7 @@ public partial class SharedBodySystem if (canEvade && TryEvadeDamage(entity, GetEvadeChance(targetType))) continue; - var damageResult = Damageable.TryChangeDamage(part.FirstOrDefault().Id, damage * partMultiplier, ignoreResistances, canSever: canSever); - if (damageResult != null && damageResult.GetTotal() != 0) - landed = true; + landed = Damageable.TryChangeDamage(part.FirstOrDefault().Id, damage * partMultiplier, ignoreResistances, canSever: canSever); } } diff --git a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs index 103b68ccecc..cc4f3d67f67 100644 --- a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs +++ b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.Steps.cs @@ -9,6 +9,8 @@ using Content.Shared._Shitmed.Body.Events; using Content.Shared.Buckle.Components; using Content.Shared.Containers.ItemSlots; using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared.Damage.Prototypes; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; @@ -176,7 +178,7 @@ public abstract partial class SharedSurgerySystem { if (!HasComp(args.User)) { - var sepsis = new DamageSpecifier(_prototypes.Index("Poison"), 5); + var sepsis = new DamageSpecifier(_prototypes.Index(new ProtoId("Poison")), 5); var ev = new SurgeryStepDamageEvent(args.User, args.Body, args.Part, args.Surgery, sepsis, 0.5f); RaiseLocalEvent(args.Body, ref ev); } diff --git a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs index 27cfb3a2922..bd35d2657a1 100644 --- a/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs +++ b/Content.Shared/_Shitmed/Surgery/SharedSurgerySystem.cs @@ -7,7 +7,8 @@ using Content.Shared._Shitmed.Medical.Surgery.Steps; using Content.Shared._Shitmed.Medical.Surgery.Steps.Parts; //using Content.Shared._RMC14.Xenonids.Parasite; using Content.Shared.Body.Part; -using Content.Shared.Damage; +using Content.Shared.Damage.Systems; +using Content.Shared.Damage.Components; using Content.Shared.Containers.ItemSlots; using Content.Shared.Body.Components; using Content.Shared.Buckle.Components; diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemical-containers.yml b/Resources/Prototypes/Entities/Objects/Specific/chemical-containers.yml index edb36cf7e07..75e6eb73a71 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemical-containers.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemical-containers.yml @@ -10,6 +10,7 @@ maxVol: 200 - type: Sprite sprite: _DV/Objects/Specific/Chemistry/jug.rsi # DeltaV - Resprited some medical items + scale: 0.6, 0.6 # DeltaV - Fuck yea, mixels! layers: - state: jug - state: jug1