]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Code cleanup: Dirty(Comp) (#26238)
authorTayrtahn <tayrtahn@gmail.com>
Wed, 20 Mar 2024 03:27:02 +0000 (23:27 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Mar 2024 03:27:02 +0000 (23:27 -0400)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.

* Missed a few

* Revert changes to pulling

* No

74 files changed:
Content.Client/Weather/WeatherSystem.cs
Content.IntegrationTests/Tests/Tag/TagTest.cs
Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Map.cs
Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs
Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs
Content.Server/BarSign/Systems/BarSignSystem.cs
Content.Server/Clothing/Systems/ChameleonClothingSystem.cs
Content.Server/Decals/DecalSystem.cs
Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs
Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs
Content.Server/Dragon/DragonRiftSystem.cs
Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs
Content.Server/Ensnaring/EnsnareableSystem.cs
Content.Server/Gravity/GravitySystem.cs
Content.Server/HotPotato/HotPotatoSystem.cs
Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.Modifier.cs
Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs
Content.Server/Instruments/SwappableInstrumentSystem.cs
Content.Server/Light/EntitySystems/RotatingLightSystem.cs
Content.Server/Materials/MaterialReclaimerSystem.cs
Content.Server/Mech/Systems/MechSystem.cs
Content.Server/NameIdentifier/NameIdentifierSystem.cs
Content.Server/Physics/Controllers/ConveyorController.cs
Content.Server/Pinpointer/NavMapSystem.cs
Content.Server/PowerCell/PowerCellSystem.Draw.cs
Content.Server/Research/Systems/ResearchSystem.Server.cs
Content.Server/Research/Systems/ResearchSystem.Technology.cs
Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
Content.Server/Silicons/Borgs/BorgSystem.cs
Content.Server/Sprite/RandomSpriteSystem.cs
Content.Server/Traits/Assorted/ParacusiaSystem.cs
Content.Server/Weapons/Ranged/Systems/GunSystem.Battery.cs
Content.Server/Weapons/Ranged/Systems/GunSystem.Revolver.cs
Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/RandomInstrumentArtifactSystem.cs
Content.Server/Zombies/ZombieSystem.Transform.cs
Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
Content.Shared/Buckle/SharedBuckleSystem.Strap.cs
Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
Content.Shared/Damage/Systems/StaminaSystem.cs
Content.Shared/Decals/SharedDecalSystem.cs
Content.Shared/Dice/SharedDiceSystem.cs
Content.Shared/Electrocution/SharedElectrocutionSystem.cs
Content.Shared/Emoting/EmoteSystem.cs
Content.Shared/Friction/TileFrictionController.cs
Content.Shared/Gravity/SharedFloatingVisualizerSystem.cs
Content.Shared/Gravity/SharedGravitySystem.Shake.cs
Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs
Content.Shared/Implants/SharedImplanterSystem.cs
Content.Shared/Instruments/SharedInstrumentSystem.cs
Content.Shared/Light/SharedHandheldLightSystem.cs
Content.Shared/Light/SharedRgbLightControllerSystem.cs
Content.Shared/Mech/EntitySystems/SharedMechSystem.cs
Content.Shared/Movement/Systems/SpeedModifierContactsSystem.cs
Content.Shared/Nutrition/EntitySystems/HungerSystem.cs
Content.Shared/Physics/Controllers/SharedConveyorController.cs
Content.Shared/RCD/Systems/RCDAmmoSystem.cs
Content.Shared/RCD/Systems/RCDSystem.cs
Content.Shared/Singularity/EntitySystems/SharedEventHorizonSystem.cs
Content.Shared/Stacks/SharedStackSystem.cs
Content.Shared/Standing/StandingStateSystem.cs
Content.Shared/StationRecords/StationRecordKeyStorageSystem.cs
Content.Shared/StatusEffect/StatusEffectsSystem.cs
Content.Shared/Storage/EntitySystems/BinSystem.cs
Content.Shared/Stunnable/SharedStunSystem.cs
Content.Shared/SubFloor/SharedTrayScannerSystem.cs
Content.Shared/Tag/TagSystem.cs
Content.Shared/Teleportation/Systems/LinkedEntitySystem.cs
Content.Shared/Weapons/Marker/SharedDamageMarkerSystem.cs
Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs
Content.Shared/Weapons/Ranged/Systems/RechargeBasicEntityAmmoSystem.cs
Content.Shared/Weapons/Ranged/Systems/RechargeCycleAmmoSystem.cs
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Content.Shared/Weather/SharedWeatherSystem.cs

index 24de0bc8c4c405498f36b752d71cdd6ab6267b53..b35483bba487d05eee59577ab6698031d97a8ca4 100644 (file)
@@ -124,9 +124,9 @@ public sealed class WeatherSystem : SharedWeatherSystem
         comp.Occlusion = occlusion;
     }
 
-    protected override bool SetState(WeatherState state, WeatherComponent comp, WeatherData weather, WeatherPrototype weatherProto)
+    protected override bool SetState(EntityUid uid, WeatherState state, WeatherComponent comp, WeatherData weather, WeatherPrototype weatherProto)
     {
-        if (!base.SetState(state, comp, weather, weatherProto))
+        if (!base.SetState(uid, state, comp, weather, weatherProto))
             return false;
 
         if (!Timing.IsFirstTimePredicted)
@@ -164,7 +164,7 @@ public sealed class WeatherSystem : SharedWeatherSystem
                 continue;
 
             // New weather
-            StartWeather(component, ProtoMan.Index<WeatherPrototype>(proto), weather.EndTime);
+            StartWeather(uid, component, ProtoMan.Index<WeatherPrototype>(proto), weather.EndTime);
         }
     }
 }
index ed3c484b435ad76b12ab1a66e3e0535efa327f98..cbcdd1c6c6231de5b8932509a6746a2cb6e7551a 100644 (file)
@@ -130,9 +130,9 @@ namespace Content.IntegrationTests.Tests.Tag
                 Assert.Multiple(() =>
                 {
                     // Cannot add the starting tag again
-                    Assert.That(tagSystem.AddTag(sTagComponent, StartingTag), Is.False);
-                    Assert.That(tagSystem.AddTags(sTagComponent, StartingTag, StartingTag), Is.False);
-                    Assert.That(tagSystem.AddTags(sTagComponent, new List<string> { StartingTag, StartingTag }), Is.False);
+                    Assert.That(tagSystem.AddTag(sTagDummy, sTagComponent, StartingTag), Is.False);
+                    Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, StartingTag, StartingTag), Is.False);
+                    Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, new List<string> { StartingTag, StartingTag }), Is.False);
 
                     // Has the starting tag
                     Assert.That(tagSystem.HasTag(sTagComponent, StartingTag), Is.True);
@@ -157,22 +157,22 @@ namespace Content.IntegrationTests.Tests.Tag
                     Assert.That(tagSystem.HasAllTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
 
                     // Cannot remove a tag that does not exist
-                    Assert.That(tagSystem.RemoveTag(sTagComponent, AddedTag), Is.False);
-                    Assert.That(tagSystem.RemoveTags(sTagComponent, AddedTag, AddedTag), Is.False);
-                    Assert.That(tagSystem.RemoveTags(sTagComponent, new List<string> { AddedTag, AddedTag }), Is.False);
+                    Assert.That(tagSystem.RemoveTag(sTagDummy, sTagComponent, AddedTag), Is.False);
+                    Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, AddedTag, AddedTag), Is.False);
+                    Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, new List<string> { AddedTag, AddedTag }), Is.False);
                 });
 
                 // Can add the new tag
-                Assert.That(tagSystem.AddTag(sTagComponent, AddedTag), Is.True);
+                Assert.That(tagSystem.AddTag(sTagDummy, sTagComponent, AddedTag), Is.True);
 
                 Assert.Multiple(() =>
                 {
                     // Cannot add it twice
-                    Assert.That(tagSystem.AddTag(sTagComponent, AddedTag), Is.False);
+                    Assert.That(tagSystem.AddTag(sTagDummy, sTagComponent, AddedTag), Is.False);
 
                     // Cannot add existing tags
-                    Assert.That(tagSystem.AddTags(sTagComponent, StartingTag, AddedTag), Is.False);
-                    Assert.That(tagSystem.AddTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
+                    Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, StartingTag, AddedTag), Is.False);
+                    Assert.That(tagSystem.AddTags(sTagDummy, sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
 
                     // Now has two tags
                     Assert.That(sTagComponent.Tags, Has.Count.EqualTo(2));
@@ -191,16 +191,16 @@ namespace Content.IntegrationTests.Tests.Tag
                 Assert.Multiple(() =>
                 {
                     // Remove the existing starting tag
-                    Assert.That(tagSystem.RemoveTag(sTagComponent, StartingTag), Is.True);
+                    Assert.That(tagSystem.RemoveTag(sTagDummy, sTagComponent, StartingTag), Is.True);
 
                     // Remove the existing added tag
-                    Assert.That(tagSystem.RemoveTags(sTagComponent, AddedTag, AddedTag), Is.True);
+                    Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, AddedTag, AddedTag), Is.True);
                 });
 
                 Assert.Multiple(() =>
                 {
                     // No tags left to remove
-                    Assert.That(tagSystem.RemoveTags(sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
+                    Assert.That(tagSystem.RemoveTags(sTagDummy, sTagComponent, new List<string> { StartingTag, AddedTag }), Is.False);
 
                     // No tags left in the component
                     Assert.That(sTagComponent.Tags, Is.Empty);
index 8a819f59420c97e49714ce139a91c31a9c053ce5..1047b4c9debfcd4d3bcbbf239f97c36b5e75238e 100644 (file)
@@ -638,13 +638,13 @@ public sealed partial class AdminVerbSystem
         {
             Text = "Remove gravity",
             Category = VerbCategory.Smite,
-            Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Machines/gravity_generator.rsi"), "off"),
+            Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Machines/gravity_generator.rsi"), "off"),
             Act = () =>
             {
                 var grav = EnsureComp<MovementIgnoreGravityComponent>(args.Target);
                 grav.Weightless = true;
 
-                Dirty(grav);
+                Dirty(args.Target, grav);
             },
             Impact = LogImpact.Extreme,
             Message = Loc.GetString("admin-smite-remove-gravity-description"),
@@ -741,7 +741,7 @@ public sealed partial class AdminVerbSystem
                 var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
                 (movementSpeed.BaseSprintSpeed, movementSpeed.BaseWalkSpeed) = (movementSpeed.BaseWalkSpeed, movementSpeed.BaseSprintSpeed);
 
-                Dirty(movementSpeed);
+                Dirty(args.Target, movementSpeed);
 
                 _popupSystem.PopupEntity(Loc.GetString("admin-smite-run-walk-swap-prompt"), args.Target,
                     args.Target, PopupType.LargeCaution);
index 916191cb050960d9a43978c4d6c57efcb96a2d66..ab59aab7e9681827277dff3ee9f915949df98a86 100644 (file)
@@ -58,7 +58,7 @@ public partial class AtmosphereSystem
 
         component.Space = space;
         component.Mixture = mixture;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     public void SetMapGasMixture(EntityUid uid, GasMixture? mixture, MapAtmosphereComponent? component = null)
@@ -67,7 +67,7 @@ public partial class AtmosphereSystem
             return;
 
         component.Mixture = mixture;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     public void SetMapSpace(EntityUid uid, bool space, MapAtmosphereComponent? component = null)
@@ -76,6 +76,6 @@ public partial class AtmosphereSystem
             return;
 
         component.Space = space;
-        Dirty(component);
+        Dirty(uid, component);
     }
 }
index 6a2c8f0a7e519dddd907e546bfd904f352115435..d5563c170cca085a4c709a9008294d5da78a59ef 100644 (file)
@@ -93,9 +93,9 @@ namespace Content.Server.Atmos.EntitySystems
             else
                 component.LastPosition = null;
             component.Enabled = true;
-            Dirty(component);
+            Dirty(uid, component);
             UpdateAppearance(uid, component);
-            if(!HasComp<ActiveGasAnalyzerComponent>(uid))
+            if (!HasComp<ActiveGasAnalyzerComponent>(uid))
                 AddComp<ActiveGasAnalyzerComponent>(uid);
             UpdateAnalyzer(uid, component);
         }
@@ -105,7 +105,7 @@ namespace Content.Server.Atmos.EntitySystems
         /// </summary>
         private void OnDropped(EntityUid uid, GasAnalyzerComponent component, DroppedEvent args)
         {
-            if(args.User is var userId && component.Enabled)
+            if (args.User is var userId && component.Enabled)
                 _popup.PopupEntity(Loc.GetString("gas-analyzer-shutoff"), userId, userId);
             DisableAnalyzer(uid, component, args.User);
         }
@@ -122,7 +122,7 @@ namespace Content.Server.Atmos.EntitySystems
                 _userInterface.TryClose(uid, GasAnalyzerUiKey.Key, actor.PlayerSession);
 
             component.Enabled = false;
-            Dirty(component);
+            Dirty(uid, component);
             UpdateAppearance(uid, component);
             RemCompDeferred<ActiveGasAnalyzerComponent>(uid);
         }
index 8ae9517379e8d4af4e26d98af055f0e30c90a64d..94e095892a37e86f85ff173c41e75ba5c99de0c9 100644 (file)
@@ -118,10 +118,11 @@ namespace Content.Server.Atmos.EntitySystems
             }
 
             // PVS was turned off, ensure data gets sent to all clients.
-            foreach (var (grid, meta) in EntityQuery<GasTileOverlayComponent, MetaDataComponent>(true))
+            var query = EntityQueryEnumerator<GasTileOverlayComponent, MetaDataComponent>();
+            while (query.MoveNext(out var uid, out var grid, out var meta))
             {
                 grid.ForceTick = _gameTiming.CurTick;
-                Dirty(grid, meta);
+                Dirty(uid, grid, meta);
             }
         }
 
@@ -264,9 +265,10 @@ namespace Content.Server.Atmos.EntitySystems
         private void UpdateOverlayData(GameTick curTick)
         {
             // TODO parallelize?
-            foreach (var (overlay, gam, meta) in EntityQuery<GasTileOverlayComponent, GridAtmosphereComponent, MetaDataComponent>(true))
+            var query = EntityQueryEnumerator<GasTileOverlayComponent, GridAtmosphereComponent, MetaDataComponent>();
+            while (query.MoveNext(out var uid, out var overlay, out var gam, out var meta))
             {
-                bool changed = false;
+                var changed = false;
                 foreach (var index in overlay.InvalidTiles)
                 {
                     var chunkIndex = GetGasChunkIndices(index);
@@ -278,7 +280,7 @@ namespace Content.Server.Atmos.EntitySystems
                 }
 
                 if (changed)
-                    Dirty(overlay, meta);
+                    Dirty(uid, overlay, meta);
 
                 overlay.InvalidTiles.Clear();
             }
index 4a481408452b5ee8e75d67b17e070db4233c2f75..e42394f5a3044171ab4c04fd5254baf81c0cdcb7 100644 (file)
@@ -34,7 +34,7 @@ namespace Content.Server.BarSign.Systems
             _metaData.SetEntityDescription(uid, Loc.GetString(newPrototype.Description), meta);
 
             component.Current = newPrototype.ID;
-            Dirty(component);
+            Dirty(uid, component);
         }
     }
 }
index 6fbfd9f36737177dbbfcc24798f5177dd361742f..23b772d99c0df6dee73fb46459805275dfd42d98 100644 (file)
@@ -39,7 +39,7 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
         args.Verbs.Add(new InteractionVerb()
         {
             Text = Loc.GetString("chameleon-component-verb-text"),
-            Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
+            Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
             Act = () => TryOpenUi(uid, args.User, component)
         });
     }
@@ -91,7 +91,7 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
         UpdateIdentityBlocker(uid, component, proto);
         UpdateVisuals(uid, component);
         UpdateUi(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void UpdateIdentityBlocker(EntityUid uid, ChameleonClothingComponent component, EntityPrototype proto)
index ad225afe2247d8f303989e509ac0169d1d8dae97..0e6c1d5cebb9b4804ea6d8ad34f2192bdef3724a 100644 (file)
@@ -89,10 +89,11 @@ namespace Content.Server.Decals
                 playerData.Clear();
             }
 
-            foreach (var (grid, meta) in EntityQuery<DecalGridComponent, MetaDataComponent>(true))
+            var query = EntityQueryEnumerator<DecalGridComponent, MetaDataComponent>();
+            while (query.MoveNext(out var uid, out var grid, out var meta))
             {
                 grid.ForceTick = _timing.CurTick;
-                Dirty(grid, meta);
+                Dirty(uid, grid, meta);
             }
         }
 
index 9a038f1c78a5b39485501c398ca36b8503e22830..02c65381584649f105406449a3d01ae40949f4fc 100644 (file)
@@ -255,7 +255,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
     /// </summary>
     private void UpdateModeAppearance(EntityUid userUid, EntityUid configuratorUid, NetworkConfiguratorComponent configurator)
     {
-        Dirty(configurator);
+        Dirty(configuratorUid, configurator);
         _appearanceSystem.SetData(configuratorUid, NetworkConfiguratorVisuals.Mode, configurator.LinkModeActive);
 
         var pitch = configurator.LinkModeActive ? 1 : 0.8f;
index df375de69511c29946f0a85903923b3f75006994..a03ba5d23136808b05498810117a62a9ef1a25e3 100644 (file)
@@ -340,7 +340,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
         if (!args.Powered)
         {
             component.NextFlush = null;
-            Dirty(component);
+            Dirty(uid, component);
             return;
         }
 
@@ -396,7 +396,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
         component.State = state;
         UpdateVisualState(uid, component);
         UpdateInterface(uid, component, component.Powered);
-        Dirty(component, metadata);
+        Dirty(uid, component, metadata);
 
         if (state == DisposalsPressureState.Ready)
         {
@@ -477,7 +477,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
         }
 
         if (count != component.RecentlyEjected.Count)
-            Dirty(component, metadata);
+            Dirty(uid, component, metadata);
     }
 
     public bool TryInsert(EntityUid unitId, EntityUid toInsertId, EntityUid? userId, DisposalUnitComponent? unit = null)
@@ -783,7 +783,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
         var flushTime = TimeSpan.FromSeconds(Math.Min((component.NextFlush ?? TimeSpan.MaxValue).TotalSeconds, automaticTime.TotalSeconds));
 
         component.NextFlush = flushTime;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     public void AfterInsert(EntityUid uid, SharedDisposalUnitComponent component, EntityUid inserted, EntityUid? user = null, bool doInsert = false)
index f7d5cd783d45a616d4727675aa5ad1812716b309..7143280900cd92c8b74004d4338217ac1640dc76 100644 (file)
@@ -67,7 +67,7 @@ public sealed class DragonRiftSystem : EntitySystem
             if (comp.State < DragonRiftState.AlmostFinished && comp.Accumulator > comp.MaxAccumulator / 2f)
             {
                 comp.State = DragonRiftState.AlmostFinished;
-                Dirty(comp);
+                Dirty(uid, comp);
 
                 var location = xform.LocalPosition;
                 _chat.DispatchGlobalAnnouncement(Loc.GetString("carp-rift-warning", ("location", location)), playSound: false, colorOverride: Color.Red);
index 12c701866c6141c8c4f6ff7ef51d2bf8256530f8..0c758141a195fee93768b17d2fc7b7e86cb40cba 100644 (file)
@@ -93,7 +93,7 @@ public sealed partial class EnsnareableSystem
         component.Ensnared = target;
         _container.Insert(ensnare, ensnareable.Container);
         ensnareable.IsEnsnared = true;
-        Dirty(ensnareable);
+        Dirty(target, ensnareable);
 
         UpdateAlert(target, ensnareable);
         var ev = new EnsnareEvent(component.WalkSpeed, component.SprintSpeed);
@@ -107,7 +107,7 @@ public sealed partial class EnsnareableSystem
     /// <param name="user">The entity that is freeing the target</param>
     /// <param name="ensnare">The entity used to ensnare</param>
     /// <param name="component">The ensnaring component</param>
-    public void TryFree(EntityUid target,  EntityUid user, EntityUid ensnare, EnsnaringComponent component)
+    public void TryFree(EntityUid target, EntityUid user, EntityUid ensnare, EnsnaringComponent component)
     {
         //Don't do anything if they don't have the ensnareable component.
         if (!HasComp<EnsnareableComponent>(target))
@@ -148,7 +148,7 @@ public sealed partial class EnsnareableSystem
 
         _container.Remove(ensnare, ensnareable.Container, force: true);
         ensnareable.IsEnsnared = ensnareable.Container.ContainedEntities.Count > 0;
-        Dirty(ensnareable);
+        Dirty(component.Ensnared.Value, ensnareable);
         component.Ensnared = null;
 
         UpdateAlert(target, ensnareable);
index f939e087e029c1f7a1feca5046b589ac9d74967f..d732c5f3a39d61b7fc588c0a0e5b832f0d2bf4ee 100644 (file)
@@ -45,7 +45,7 @@ public sealed partial class EnsnareableSystem : SharedEnsnareableSystem
         }
 
         component.IsEnsnared = component.Container.ContainedEntities.Count > 0;
-        Dirty(component);
+        Dirty(uid, component);
         ensnaring.Ensnared = null;
 
         _hands.PickupOrDrop(args.Args.User, args.Args.Used.Value);
index 5e0332ae491d7a2bdae0494109715e1093548703..ea62d4a81954bca086e9f4caee416485786af18a 100644 (file)
@@ -41,7 +41,7 @@ namespace Content.Server.Gravity
                 gravity.Enabled = enabled;
                 var ev = new GravityChangedEvent(uid, enabled);
                 RaiseLocalEvent(uid, ref ev, true);
-                Dirty(gravity);
+                Dirty(uid, gravity);
 
                 if (HasComp<MapGridComponent>(uid))
                 {
@@ -71,7 +71,7 @@ namespace Content.Server.Gravity
             gravity.Enabled = true;
             var ev = new GravityChangedEvent(uid, true);
             RaiseLocalEvent(uid, ref ev, true);
-            Dirty(gravity);
+            Dirty(uid, gravity);
 
             if (HasComp<MapGridComponent>(uid))
             {
index 8091eea6fdd329d6f0f777006efa0b03f6530e43..115a7b6cb7664e0c0040af68b9fece924f3913cd 100644 (file)
@@ -29,7 +29,7 @@ public sealed class HotPotatoSystem : SharedHotPotatoSystem
         comp.CanTransfer = false;
         _ambientSound.SetAmbience(uid, true);
         _damageOnHolding.SetEnabled(uid, true);
-        Dirty(comp);
+        Dirty(uid, comp);
     }
 
     private void OnMeleeHit(EntityUid uid, HotPotatoComponent comp, MeleeHitEvent args)
@@ -56,6 +56,6 @@ public sealed class HotPotatoSystem : SharedHotPotatoSystem
             break;
         }
         comp.CanTransfer = false;
-        Dirty(comp);
+        Dirty(uid, comp);
     }
 }
index 05a8b0622216f8f6f575e83b34092048895176f3..336116e78b0ec9c47ceb131151f2bf2835c019cc 100644 (file)
@@ -29,7 +29,7 @@ public sealed partial class HumanoidAppearanceSystem
         {
             Text = "Modify markings",
             Category = VerbCategory.Tricks,
-            Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Customization/reptilian_parts.rsi"), "tail_smooth"),
+            Icon = new SpriteSpecifier.Rsi(new("/Textures/Mobs/Customization/reptilian_parts.rsi"), "tail_smooth"),
             Act = () =>
             {
                 _uiSystem.TryOpen(uid, HumanoidMarkingModifierKey.Key, actor.PlayerSession);
@@ -63,7 +63,7 @@ public sealed partial class HumanoidAppearanceSystem
             component.CustomBaseLayers[message.Layer] = message.Info.Value;
         }
 
-        Dirty(component);
+        Dirty(uid, component);
 
         if (message.ResendState)
         {
@@ -88,7 +88,7 @@ public sealed partial class HumanoidAppearanceSystem
         }
 
         component.MarkingSet = message.MarkingSet;
-        Dirty(component);
+        Dirty(uid, component);
 
         if (message.ResendState)
         {
index 039128e32f64f5203cbbed325797f30690051f25..89d28e51022dab7f3c2480431a69bebd6d21d61f 100644 (file)
@@ -64,7 +64,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
             grammar.Gender = sourceHumanoid.Gender;
         }
 
-        Dirty(targetHumanoid);
+        Dirty(target, targetHumanoid);
     }
 
     /// <summary>
@@ -85,7 +85,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
         humanoid.MarkingSet.Remove(prototype.MarkingCategory, marking);
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -106,7 +106,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
         }
 
         humanoid.MarkingSet.Remove(category, index);
-        Dirty(humanoid);
+        Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -135,7 +135,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
         }
 
         humanoid.MarkingSet.Replace(category, index, marking);
-        Dirty(humanoid);
+        Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -162,7 +162,7 @@ public sealed partial class HumanoidAppearanceSystem : SharedHumanoidAppearanceS
             markings[index].SetColor(i, colors[i]);
         }
 
-        Dirty(humanoid);
+        Dirty(uid, humanoid);
     }
 
     /// <summary>
index 3f3cfb9e6dba0dbf58e216ae2465e3d75a7c4752..9aef875cd65f2547e2e1b1c4f84e3c33c9d93872 100644 (file)
@@ -35,7 +35,7 @@ public sealed class SwappableInstrumentSystem : EntitySystem
                 Priority = priority,
                 Act = () =>
                 {
-                    _sharedInstrument.SetInstrumentProgram(instrument, entry.Value.Item1, entry.Value.Item2);
+                    _sharedInstrument.SetInstrumentProgram(uid, instrument, entry.Value.Item1, entry.Value.Item2);
                     _popup.PopupEntity(Loc.GetString("swappable-instrument-component-style-set", ("style", entry.Key)),
                         args.User, args.User);
                 }
index dd72b3a43e844b4642e656e51caccef71af4bbdd..7ef1357dc311e53e63f5023e256ace6c10e2775f 100644 (file)
@@ -19,6 +19,6 @@ public sealed class RotatingLightSystem : SharedRotatingLightSystem
             return;
 
         comp.Enabled = args.Enabled;
-        Dirty(comp);
+        Dirty(uid, comp);
     }
 }
index 8920daf60d01851bd0c667fb58f8bf8678b51ca1..ae4444e059b1640a3e1b2ae2d73769ffded60e39 100644 (file)
@@ -130,7 +130,7 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
             return false;
 
         Container.Remove(item, active.ReclaimingContainer);
-        Dirty(component);
+        Dirty(uid, component);
 
         // scales the output if the process was interrupted.
         var completion = 1f - Math.Clamp((float) Math.Round((active.EndTime - Timing.CurTime) / active.Duration),
index 206eb894d7e8ea52033f8e8774bb1439d229394c..2f5f8bf4339b27ba77d9e8c3a380b709b8e3de10 100644 (file)
@@ -110,7 +110,7 @@ public sealed partial class MechSystem : SharedMechSystem
         component.Energy = battery.CurrentCharge;
         component.MaxEnergy = battery.MaxCharge;
 
-        Dirty(component);
+        Dirty(uid, component);
         _actionBlocker.UpdateCanMove(uid);
     }
 
@@ -140,7 +140,7 @@ public sealed partial class MechSystem : SharedMechSystem
         component.Energy = component.MaxEnergy;
 
         _actionBlocker.UpdateCanMove(uid);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnRemoveEquipmentMessage(EntityUid uid, MechComponent component, MechEquipmentRemoveMessage args)
@@ -338,7 +338,7 @@ public sealed partial class MechSystem : SharedMechSystem
         {
             Log.Debug($"Battery charge was not equal to mech charge. Battery {batteryComp.CurrentCharge}. Mech {component.Energy}");
             component.Energy = batteryComp.CurrentCharge;
-            Dirty(component);
+            Dirty(uid, component);
         }
         _actionBlocker.UpdateCanMove(uid);
         return true;
@@ -358,7 +358,7 @@ public sealed partial class MechSystem : SharedMechSystem
 
         _actionBlocker.UpdateCanMove(uid);
 
-        Dirty(component);
+        Dirty(uid, component);
         UpdateUserInterface(uid, component);
     }
 
@@ -373,7 +373,7 @@ public sealed partial class MechSystem : SharedMechSystem
 
         _actionBlocker.UpdateCanMove(uid);
 
-        Dirty(component);
+        Dirty(uid, component);
         UpdateUserInterface(uid, component);
     }
 
index 87953d518b3a1f2bb31f579e4f14ec8437bbf64a..eefd4357cb3325c07b5f45daf0acd1102aa95fa2 100644 (file)
@@ -113,7 +113,7 @@ public sealed class NameIdentifierSystem : EntitySystem
         _metaData.SetEntityName(uid, group.FullName
             ? uniqueName
             : $"{meta.EntityName} ({uniqueName})", meta);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void InitialSetupPrototypes()
index 42279bb7496ee39fed3d68d9bd1a5b96a6cf0dd9..b3508025cb94f3900367c7406fcd553d44afb955 100644 (file)
@@ -67,7 +67,7 @@ public sealed class ConveyorController : SharedConveyorController
     {
         component.Powered = args.Powered;
         UpdateAppearance(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void UpdateAppearance(EntityUid uid, ConveyorComponent component)
@@ -106,7 +106,7 @@ public sealed class ConveyorController : SharedConveyorController
         _materialReclaimer.SetReclaimerEnabled(uid, component.State != ConveyorState.Off);
 
         UpdateAppearance(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     /// <summary>
index bf3a3b2998880655232a57b88ce8562b54151d8e..36fb39975e54d1760fa5c72af0561b15d2a10f95 100644 (file)
@@ -54,7 +54,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
     private void OnStationInit(StationGridAddedEvent ev)
     {
         var comp = EnsureComp<NavMapComponent>(ev.GridId);
-        RefreshGrid(comp, Comp<MapGridComponent>(ev.GridId));
+        RefreshGrid(ev.GridId, comp, Comp<MapGridComponent>(ev.GridId));
     }
 
     private void OnNavMapBeaconStartup(EntityUid uid, NavMapBeaconComponent component, ComponentStartup args)
@@ -164,7 +164,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
         if (!TryComp<MapGridComponent>(uid, out var grid))
             return;
 
-        RefreshGrid(component, grid);
+        RefreshGrid(uid, component, grid);
     }
 
     private void OnNavMapSplit(ref GridSplitEvent args)
@@ -177,13 +177,13 @@ public sealed class NavMapSystem : SharedNavMapSystem
         foreach (var grid in args.NewGrids)
         {
             var newComp = EnsureComp<NavMapComponent>(grid);
-            RefreshGrid(newComp, gridQuery.GetComponent(grid));
+            RefreshGrid(grid, newComp, gridQuery.GetComponent(grid));
         }
 
-        RefreshGrid(comp, gridQuery.GetComponent(args.Grid));
+        RefreshGrid(args.Grid, comp, gridQuery.GetComponent(args.Grid));
     }
 
-    private void RefreshGrid(NavMapComponent component, MapGridComponent grid)
+    private void RefreshGrid(EntityUid uid, NavMapComponent component, MapGridComponent grid)
     {
         component.Chunks.Clear();
 
@@ -199,7 +199,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
                 component.Chunks[chunkOrigin] = chunk;
             }
 
-            RefreshTile(grid, component, chunk, tile.Value.GridIndices);
+            RefreshTile(uid, grid, component, chunk, tile.Value.GridIndices);
         }
     }
 
@@ -291,7 +291,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
 
             if (navMap.Chunks.TryGetValue(chunkOrigin, out var chunk))
             {
-                RefreshTile(oldGrid, navMap, chunk, ev.TilePos);
+                RefreshTile(ev.OldGrid, oldGrid, navMap, chunk, ev.TilePos);
             }
         }
 
@@ -318,10 +318,10 @@ public sealed class NavMapSystem : SharedNavMapSystem
             navMap.Chunks[chunkOrigin] = chunk;
         }
 
-        RefreshTile(grid, navMap, chunk, tile);
+        RefreshTile(xform.GridUid.Value, grid, navMap, chunk, tile);
     }
 
-    private void RefreshTile(MapGridComponent grid, NavMapComponent component, NavMapChunk chunk, Vector2i tile)
+    private void RefreshTile(EntityUid uid, MapGridComponent grid, NavMapComponent component, NavMapChunk chunk, Vector2i tile)
     {
         var relative = SharedMapSystem.GetChunkRelative(tile, ChunkSize);
         var existing = chunk.TileData;
@@ -356,7 +356,7 @@ public sealed class NavMapSystem : SharedNavMapSystem
         if (existing == chunk.TileData)
             return;
 
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     /// <summary>
index 8e960357b7a0a370a51f5ef74f16f9e0cc404b31..4155a4f6becf388e41a33727a692c45e5be2e433 100644 (file)
@@ -67,7 +67,7 @@ public sealed partial class PowerCellSystem
         {
             component.CanDraw = canDraw;
             component.CanUse = canUse;
-            Dirty(component);
+            Dirty(uid, component);
         }
     }
 
@@ -80,7 +80,7 @@ public sealed partial class PowerCellSystem
         {
             component.CanDraw = canDraw;
             component.CanUse = canUse;
-            Dirty(component);
+            Dirty(uid, component);
         }
     }
 }
index 2a802a91a321ebbeb76397e16c1d97d180652c66..09ca7ed15c27a264fe4855f571ab93b87ed54d10 100644 (file)
@@ -18,7 +18,7 @@ public sealed partial class ResearchSystem
         var unusedId = EntityQuery<ResearchServerComponent>(true)
             .Max(s => s.Id) + 1;
         component.Id = unusedId;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnServerShutdown(EntityUid uid, ResearchServerComponent component, ComponentShutdown args)
@@ -74,7 +74,7 @@ public sealed partial class ResearchSystem
         SyncClientWithServer(client, clientComponent: clientComponent);
 
         if (dirtyServer)
-            Dirty(serverComponent);
+            Dirty(server, serverComponent);
 
         var ev = new ResearchRegistrationChangedEvent(server);
         RaiseLocalEvent(client, ref ev);
@@ -117,7 +117,7 @@ public sealed partial class ResearchSystem
 
         if (dirtyServer)
         {
-            Dirty(serverComponent);
+            Dirty(server, serverComponent);
         }
 
         var ev = new ResearchRegistrationChangedEvent(null);
@@ -167,6 +167,6 @@ public sealed partial class ResearchSystem
         {
             RaiseLocalEvent(client, ref ev);
         }
-        Dirty(component);
+        Dirty(uid, component);
     }
 }
index 107d51ccd8ca19be09ba86a9e3107303e71ddf09..9bd71cf7c6ec85b67a6bbeca70c81db0b7656d48 100644 (file)
@@ -21,7 +21,7 @@ public sealed partial class ResearchSystem
         primaryDb.UnlockedTechnologies = otherDb.UnlockedTechnologies;
         primaryDb.UnlockedRecipes = otherDb.UnlockedRecipes;
 
-        Dirty(primaryDb);
+        Dirty(primaryUid, primaryDb);
 
         var ev = new TechnologyDatabaseModifiedEvent();
         RaiseLocalEvent(primaryUid, ref ev);
@@ -125,7 +125,7 @@ public sealed partial class ResearchSystem
                 continue;
             component.UnlockedRecipes.Add(unlock);
         }
-        Dirty(component);
+        Dirty(uid, component);
 
         var ev = new TechnologyDatabaseModifiedEvent();
         RaiseLocalEvent(uid, ref ev);
@@ -144,7 +144,7 @@ public sealed partial class ResearchSystem
             return;
 
         component.UnlockedRecipes.Add(recipe);
-        Dirty(component);
+        Dirty(uid, component);
 
         var ev = new TechnologyDatabaseModifiedEvent();
         RaiseLocalEvent(uid, ref ev);
@@ -185,6 +185,6 @@ public sealed partial class ResearchSystem
         component.SupportedDisciplines = new List<string>();
         component.UnlockedTechnologies = new List<string>();
         component.UnlockedRecipes = new List<string>();
-        Dirty(component);
+        Dirty(uid, component);
     }
 }
index c47c519d5de2145e4163b76ce232d73401b18bc9..f0368ed3a95cb7ba1f468fcd4a9e78160cbb2e31 100644 (file)
@@ -318,7 +318,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
         pilotComponent.Console = uid;
         ActionBlockerSystem.UpdateCanMove(entity);
         pilotComponent.Position = EntityManager.GetComponent<TransformComponent>(entity).Coordinates;
-        Dirty(pilotComponent);
+        Dirty(entity, pilotComponent);
     }
 
     public void RemovePilot(EntityUid pilotUid, PilotComponent pilotComponent)
index 869c2797047ddf8c623f24d36643a219b52e9de1..0f14fef0ed6ae4f28733b7a6aa2764827e21f500 100644 (file)
@@ -281,7 +281,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
 
         component.Activated = true;
         InstallAllModules(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
         _movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
     }
 
@@ -295,7 +295,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
 
         component.Activated = false;
         DisableAllModules(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
         _movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
     }
 
index 5d04dd2f5a6ebcc8b35a9bf4618e5d93f304ad1d..7f81f4bdd45f991d5c013727633911c8c26c4f0a 100644 (file)
@@ -63,7 +63,7 @@ public sealed class RandomSpriteSystem: SharedRandomSpriteSystem
             }
         }
 
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnGetState(EntityUid uid, RandomSpriteComponent component, ref ComponentGetState args)
index 4b0205ff536a1bd847c946fc591c26411c0f2a27..fbbeb9f1a70208fa4dab1074ad585c4ebac536c8 100644 (file)
@@ -12,7 +12,7 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
             return;
         }
         component.Sounds = sounds;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     public void SetTime(EntityUid uid, float minTime, float maxTime, ParacusiaComponent? component = null)
@@ -23,7 +23,7 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
         }
         component.MinTimeBetweenIncidents = minTime;
         component.MaxTimeBetweenIncidents = maxTime;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     public void SetDistance(EntityUid uid, float maxSoundDistance, ParacusiaComponent? component = null)
@@ -33,6 +33,6 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
             return;
         }
         component.MaxSoundDistance = maxSoundDistance;
-        Dirty(component);
+        Dirty(uid, component);
     }
 }
index 25010b22333a32b8c8878ee385ac968c2384748c..0dcd92f94170f38f0358da9504686b9dc6f73133 100644 (file)
@@ -51,7 +51,7 @@ public sealed partial class GunSystem
 
         if (component.Shots != shots || component.Capacity != maxShots)
         {
-            Dirty(component);
+            Dirty(uid, component);
         }
 
         component.Shots = shots;
index 6ff47507299f0615555d2b11df1d73f7d98d59b2..59e53f1f72a0ae75af93d2f6ab54db86f6d6ce2f 100644 (file)
@@ -13,6 +13,6 @@ public sealed partial class GunSystem
             return;
 
         component.CurrentIndex = index;
-        Dirty(component);
+        Dirty(revolverUid, component);
     }
 }
index 8945b867954aed023fd3740c0ae87f60bb3e010b..118bc396a72ce113fc7895ca4ed8a809610e5beb 100644 (file)
@@ -18,6 +18,6 @@ public sealed class RandomInstrumentArtifactSystem : EntitySystem
     private void OnStartup(EntityUid uid, RandomInstrumentArtifactComponent component, ComponentStartup args)
     {
         var instrument = EnsureComp<InstrumentComponent>(uid);
-        _instrument.SetInstrumentProgram(instrument, (byte) _random.Next(0, 127), 0);
+        _instrument.SetInstrumentProgram(uid, instrument, (byte) _random.Next(0, 127), 0);
     }
 }
index 63cc87308670d0d0b5f9a544bf2ae2e32e3c88d2..23e1c2bb92092c50e24daf51ca82812a7b0e642e 100644 (file)
@@ -185,7 +185,7 @@ namespace Content.Server.Zombies
                 Dirty(target, pryComp);
             }
 
-            Dirty(melee);
+            Dirty(target, melee);
 
             //The zombie gets the assigned damage weaknesses and strengths
             _damageable.SetDamageModifierSetId(target, "Zombie");
index 2527f7455308ecadcf150cff5973674958548576..70e816b16e4429b2e56f4ca8ff2d67236adb4635 100644 (file)
@@ -54,7 +54,7 @@ public abstract partial class SharedBuckleSystem
 
     private void OnBuckleMove(EntityUid uid, BuckleComponent component, ref MoveEvent ev)
     {
-        if (component.BuckledTo is not {} strapUid)
+        if (component.BuckledTo is not { } strapUid)
             return;
 
         if (!TryComp<StrapComponent>(strapUid, out var strapComp))
@@ -85,7 +85,7 @@ public abstract partial class SharedBuckleSystem
         {
             Act = () => TryUnbuckle(uid, args.User, buckleComp: component),
             Text = Loc.GetString("verb-categories-unbuckle"),
-            Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png"))
+            Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/unbuckle.svg.192dpi.png"))
         };
 
         if (args.Target == args.User && args.Using == null)
@@ -191,7 +191,7 @@ public abstract partial class SharedBuckleSystem
 
         ActionBlocker.UpdateCanMove(buckleUid);
         UpdateBuckleStatus(buckleUid, buckleComp, strapComp);
-        Dirty(buckleComp);
+        Dirty(buckleUid, buckleComp);
     }
 
     /// <summary>
@@ -468,8 +468,7 @@ public abstract partial class SharedBuckleSystem
         if (strapComp.BuckledEntities.Remove(buckleUid))
         {
             strapComp.OccupiedSize -= buckleComp.Size;
-            //Dirty(strapUid);
-            Dirty(strapComp);
+            Dirty(strapUid, strapComp);
         }
 
         _joints.RefreshRelay(buckleUid);
index 7be54360741acb697ed07b898b0f14864d3f7359..147af42e728578bee1c07eab4e002146df300232 100644 (file)
@@ -20,22 +20,22 @@ public abstract partial class SharedBuckleSystem
     {
         SubscribeLocalEvent<StrapComponent, ComponentStartup>(OnStrapStartup);
         SubscribeLocalEvent<StrapComponent, ComponentShutdown>(OnStrapShutdown);
-        SubscribeLocalEvent<StrapComponent, ComponentRemove>((_, c, _) => StrapRemoveAll(c));
+        SubscribeLocalEvent<StrapComponent, ComponentRemove>((e, c, _) => StrapRemoveAll(e, c));
 
         SubscribeLocalEvent<StrapComponent, EntInsertedIntoContainerMessage>(OnStrapEntModifiedFromContainer);
         SubscribeLocalEvent<StrapComponent, EntRemovedFromContainerMessage>(OnStrapEntModifiedFromContainer);
         SubscribeLocalEvent<StrapComponent, GetVerbsEvent<InteractionVerb>>(AddStrapVerbs);
         SubscribeLocalEvent<StrapComponent, ContainerGettingInsertedAttemptEvent>(OnStrapContainerGettingInsertedAttempt);
         SubscribeLocalEvent<StrapComponent, InteractHandEvent>(OnStrapInteractHand);
-        SubscribeLocalEvent<StrapComponent, DestructionEventArgs>((_,c,_) => StrapRemoveAll(c));
-        SubscribeLocalEvent<StrapComponent, BreakageEventArgs>((_, c, _) => StrapRemoveAll(c));
+        SubscribeLocalEvent<StrapComponent, DestructionEventArgs>((e, c, _) => StrapRemoveAll(e, c));
+        SubscribeLocalEvent<StrapComponent, BreakageEventArgs>((e, c, _) => StrapRemoveAll(e, c));
 
         SubscribeLocalEvent<StrapComponent, DragDropTargetEvent>(OnStrapDragDropTarget);
         SubscribeLocalEvent<StrapComponent, CanDropTargetEvent>(OnCanDropTarget);
         SubscribeLocalEvent<StrapComponent, FoldAttemptEvent>(OnAttemptFold);
 
         SubscribeLocalEvent<StrapComponent, MoveEvent>(OnStrapMoveEvent);
-        SubscribeLocalEvent<StrapComponent, MachineDeconstructedEvent>((_, c, _) => StrapRemoveAll(c));
+        SubscribeLocalEvent<StrapComponent, MachineDeconstructedEvent>((e, c, _) => StrapRemoveAll(e, c));
     }
 
     private void OnStrapStartup(EntityUid uid, StrapComponent component, ComponentStartup args)
@@ -48,7 +48,7 @@ public abstract partial class SharedBuckleSystem
         if (LifeStage(uid) > EntityLifeStage.MapInitialized)
             return;
 
-        StrapRemoveAll(component);
+        StrapRemoveAll(uid, component);
     }
 
     private void OnStrapEntModifiedFromContainer(EntityUid uid, StrapComponent component, ContainerModifiedMessage message)
@@ -153,7 +153,7 @@ public abstract partial class SharedBuckleSystem
         }
 
         // If the user is currently holding/pulling an entity that can be buckled, add a verb for that.
-        if (args.Using is {Valid: true} @using &&
+        if (args.Using is { Valid: true } @using &&
             TryComp<BuckleComponent>(@using, out var usingBuckle) &&
             StrapHasSpace(uid, usingBuckle, component) &&
             _interaction.InRangeUnobstructed(@using, args.Target, range: usingBuckle.Range))
@@ -232,7 +232,7 @@ public abstract partial class SharedBuckleSystem
             }
 
             ReAttach(buckledEntity, uid, buckled, component);
-            Dirty(buckled);
+            Dirty(buckledEntity, buckled);
         }
     }
 
@@ -258,7 +258,7 @@ public abstract partial class SharedBuckleSystem
     /// <summary>
     /// Remove everything attached to the strap
     /// </summary>
-    private void StrapRemoveAll(StrapComponent strapComp)
+    private void StrapRemoveAll(EntityUid uid, StrapComponent strapComp)
     {
         foreach (var entity in strapComp.BuckledEntities.ToArray())
         {
@@ -267,7 +267,7 @@ public abstract partial class SharedBuckleSystem
 
         strapComp.BuckledEntities.Clear();
         strapComp.OccupiedSize = 0;
-        Dirty(strapComp);
+        Dirty(uid, strapComp);
     }
 
     private bool StrapHasSpace(EntityUid strapUid, BuckleComponent buckleComp, StrapComponent? strapComp = null)
@@ -313,6 +313,6 @@ public abstract partial class SharedBuckleSystem
         strapComp.Enabled = enabled;
 
         if (!enabled)
-            StrapRemoveAll(strapComp);
+            StrapRemoveAll(strapUid, strapComp);
     }
 }
index fb50803596edbbb1a924157da4c4f1e53bf8a564..3463be2e71779098f2bf48142512fb4fe60b3926 100644 (file)
@@ -89,7 +89,7 @@ namespace Content.Shared.Containers.ItemSlots
         /// </summary>
         public void AddItemSlot(EntityUid uid, string id, ItemSlot slot, ItemSlotsComponent? itemSlots = null)
         {
-            itemSlots ??= EntityManager.EnsureComponent<ItemSlotsComponent>(uid);
+            itemSlots ??= EnsureComp<ItemSlotsComponent>(uid);
             DebugTools.AssertOwner(uid, itemSlots);
 
             if (itemSlots.Slots.TryGetValue(id, out var existing))
@@ -103,7 +103,7 @@ namespace Content.Shared.Containers.ItemSlots
 
             slot.ContainerSlot = _containers.EnsureContainer<ContainerSlot>(uid, id);
             itemSlots.Slots[id] = slot;
-            Dirty(itemSlots);
+            Dirty(uid, itemSlots);
         }
 
         /// <summary>
@@ -127,7 +127,7 @@ namespace Content.Shared.Containers.ItemSlots
             if (itemSlots.Slots.Count == 0)
                 EntityManager.RemoveComponent(uid, itemSlots);
             else
-                Dirty(itemSlots);
+                Dirty(uid, itemSlots);
         }
 
         public bool TryGetSlot(EntityUid uid, string slotId, [NotNullWhen(true)] out ItemSlot? itemSlot, ItemSlotsComponent? component = null)
index b8ea953f25243e878abcfcf796f2b7626d840ff2..840b2e0431183e9e76997aec1472f57461835d6b 100644 (file)
@@ -285,7 +285,7 @@ public sealed partial class StaminaSystem : EntitySystem
         }
 
         EnsureComp<ActiveStaminaComponent>(uid);
-        Dirty(component);
+        Dirty(uid, component);
 
         if (value <= 0)
             return;
@@ -345,7 +345,7 @@ public sealed partial class StaminaSystem : EntitySystem
 
             comp.NextUpdate += TimeSpan.FromSeconds(1f);
             TakeStaminaDamage(uid, -comp.Decay, comp);
-            Dirty(comp);
+            Dirty(uid, comp);
         }
     }
 
@@ -368,7 +368,7 @@ public sealed partial class StaminaSystem : EntitySystem
         // Give them buffer before being able to be re-stunned
         component.NextUpdate = _timing.CurTime + component.StunTime + StamCritBufferTime;
         EnsureComp<ActiveStaminaComponent>(uid);
-        Dirty(component);
+        Dirty(uid, component);
         _adminLogger.Add(LogType.Stamina, LogImpact.Medium, $"{ToPrettyString(uid):user} entered stamina crit");
     }
 
@@ -385,7 +385,7 @@ public sealed partial class StaminaSystem : EntitySystem
         component.NextUpdate = _timing.CurTime;
         SetStaminaAlert(uid, component);
         RemComp<ActiveStaminaComponent>(uid);
-        Dirty(component);
+        Dirty(uid, component);
         _adminLogger.Add(LogType.Stamina, LogImpact.Low, $"{ToPrettyString(uid):user} recovered from stamina crit");
     }
 }
index 76fa9d64dba6daec17f798f46019a0b4ad5c7cc4..0665ccbf84b3c9115a486ca5593b0a28f8671a60 100644 (file)
@@ -69,7 +69,7 @@ namespace Content.Shared.Decals
 
             // This **shouldn't** be required, but just in case we ever get entity prototypes that have decal grids, we
             // need to ensure that we send an initial full state to players.
-            Dirty(component);
+            Dirty(uid, component);
         }
 
         protected Dictionary<Vector2i, DecalChunk>? ChunkCollection(EntityUid gridEuid, DecalGridComponent? comp = null)
index defb3d5f0e3ec18abbe0d18ab5ab93cef0a1c30b..8e2868e791ddfc7b5e9802da301e577bf3992395 100644 (file)
@@ -59,7 +59,7 @@ public abstract class SharedDiceSystem : EntitySystem
         }
 
         die.CurrentValue = (side - die.Offset) * die.Multiplier;
-        Dirty(die);
+        Dirty(uid, die);
         UpdateVisuals(uid, die);
     }
 
index 5031d8a911551d1f61cd498c2298d58d712c9beb..b228a987af4af67953d9b2fbd63b7998e6a69d95 100644 (file)
@@ -20,7 +20,7 @@ namespace Content.Shared.Electrocution
                 return;
 
             insulated.Coefficient = siemensCoefficient;
-            Dirty(insulated);
+            Dirty(uid, insulated);
         }
 
         /// <param name="uid">Entity being electrocuted.</param>
index fd6361245b19ab58766325b70e73337194925705..1e06d7e982b03420d0a1d7df3601ff9e9d178a12 100644 (file)
@@ -19,7 +19,7 @@ public sealed class EmoteSystem : EntitySystem
         if (component.Enabled == value)
             return;
 
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnEmoteAttempt(EmoteAttemptEvent args)
index 3583947ee360274cf9b3ea7fb228d45b16c40e5a..930de07dab9713606ab96f1a1c904b8bb796c8f8 100644 (file)
@@ -214,7 +214,7 @@ namespace Content.Shared.Friction
                 return;
 
             friction.Modifier = value;
-            Dirty(friction);
+            Dirty(entityUid, friction);
         }
     }
 }
index 57136116caae78e130395840af82bd6684c9f2c9..6ca974f2ed34c718e95909f02ca3fa7a530ceaeb 100644 (file)
@@ -33,7 +33,7 @@ public abstract class SharedFloatingVisualizerSystem : EntitySystem
             return false;
 
         component.CanFloat = GravitySystem.IsWeightless(uid, xform: transform);
-        Dirty(component);
+        Dirty(uid, component);
         return component.CanFloat;
     }
 
index ad2e0e3ad576138c0385ed1d3f1586f2086ace1d..41cf616cc4b511d81526b58b6266658a47218178 100644 (file)
@@ -24,7 +24,7 @@ public abstract partial class SharedGravitySystem
                 ShakeGrid(uid, gravity);
                 comp.ShakeTimes--;
                 comp.NextShake += TimeSpan.FromSeconds(ShakeCooldown);
-                Dirty(comp);
+                Dirty(uid, comp);
             }
         }
     }
@@ -44,7 +44,7 @@ public abstract partial class SharedGravitySystem
         }
 
         shake.ShakeTimes = 10;
-        Dirty(shake);
+        Dirty(uid, shake);
     }
 
     protected virtual void ShakeGrid(EntityUid uid, GravityComponent? comp = null) {}
index 597afcbda2ae1987357d9fe6d6fe4a09b7104772..b7ef784d00219d04799e0787d29dab4a113f0e4c 100644 (file)
@@ -99,7 +99,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
         }
 
         if (dirty)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     protected virtual void SetLayerVisibility(
@@ -147,7 +147,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
         humanoid.MarkingSet = new(oldMarkings, prototype.MarkingPoints, _markingManager, _prototypeManager);
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -177,7 +177,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
         humanoid.SkinColor = skinColor;
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -201,7 +201,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
             humanoid.CustomBaseLayers[layer] = new(id);
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -222,7 +222,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
             humanoid.CustomBaseLayers[layer] = new(null, color);
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -244,7 +244,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
 
         if (sync)
         {
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
         }
     }
 
@@ -329,7 +329,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
 
         humanoid.Age = profile.Age;
 
-        Dirty(humanoid);
+        Dirty(uid, humanoid);
     }
 
     /// <summary>
@@ -362,7 +362,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
         humanoid.MarkingSet.AddBack(prototype.MarkingCategory, markingObject);
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 
     private void EnsureDefaultMarkings(EntityUid uid, HumanoidAppearanceComponent? humanoid)
@@ -396,6 +396,6 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
         humanoid.MarkingSet.AddBack(prototype.MarkingCategory, markingObject);
 
         if (sync)
-            Dirty(humanoid);
+            Dirty(uid, humanoid);
     }
 }
index 36a31bac1d28a40406527c18e3537914de3c5bdc..d78522b56ccf8dd75532246467ad7e77f373d2a1 100644 (file)
@@ -77,7 +77,7 @@ public abstract class SharedImplanterSystem : EntitySystem
         var ev = new TransferDnaEvent { Donor = target, Recipient = implanter };
         RaiseLocalEvent(target, ref ev);
 
-        Dirty(component);
+        Dirty(implanter, component);
     }
 
     public bool CanImplant(
@@ -156,7 +156,7 @@ public abstract class SharedImplanterSystem : EntitySystem
             if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound)
                 ImplantMode(implanter, component);
 
-            Dirty(component);
+            Dirty(implanter, component);
         }
     }
 
index 87e3a69489c468cf18a02c10d78ded7713ade9ff..23bcf67de0e39a3e49d1fa31d3024524097f8cfc 100644 (file)
@@ -12,10 +12,10 @@ public abstract class SharedInstrumentSystem : EntitySystem
     {
     }
 
-    public void SetInstrumentProgram(SharedInstrumentComponent component, byte program, byte bank)
+    public void SetInstrumentProgram(EntityUid uid, SharedInstrumentComponent component, byte program, byte bank)
     {
         component.InstrumentBank = bank;
         component.InstrumentProgram = program;
-        Dirty(component);
+        Dirty(uid, component);
     }
 }
index 2fa15800a312ee4a510aed8e8f4f7514bc81d68c..9bec37a3140e91591a2810f99df5649e266f0d63 100644 (file)
@@ -29,7 +29,7 @@ public abstract class SharedHandheldLightSystem : EntitySystem
         UpdateVisuals(uid, component);
 
         // Want to make sure client has latest data on level so battery displays properly.
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnHandleState(EntityUid uid, HandheldLightComponent component, ref ComponentHandleState args)
index 1bba91c5e7b88c886683c008740bf973d73f40d6..7d4928f5bc11d504c0d4cfafc7c2f51a20c25982 100644 (file)
@@ -17,13 +17,13 @@ public abstract class SharedRgbLightControllerSystem : EntitySystem
         args.State = new RgbLightControllerState(component.CycleRate, component.Layers);
     }
 
-    public void SetLayers(EntityUid uid, List<int>? layers,  RgbLightControllerComponent? rgb = null)
+    public void SetLayers(EntityUid uid, List<int>? layers, RgbLightControllerComponent? rgb = null)
     {
         if (!Resolve(uid, ref rgb))
             return;
 
         rgb.Layers = layers;
-        Dirty(rgb);
+        Dirty(uid, rgb);
     }
 
     public void SetCycleRate(EntityUid uid, float rate, RgbLightControllerComponent? rgb = null)
@@ -32,6 +32,6 @@ public abstract class SharedRgbLightControllerSystem : EntitySystem
             return;
 
         rgb.CycleRate = Math.Clamp(0.01f, rate, 1); // lets not give people seizures
-        Dirty(rgb);
+        Dirty(uid, rgb);
     }
 }
index df0d7b78f0bb5639255d1a3c55e362d816a496f9..97b5bfeba6f5367f612c80f489707821d315db1d 100644 (file)
@@ -194,7 +194,7 @@ public abstract class SharedMechSystem : EntitySystem
         if (_net.IsServer)
             _popup.PopupEntity(popupString, uid);
 
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     /// <summary>
@@ -278,7 +278,7 @@ public abstract class SharedMechSystem : EntitySystem
             return false;
 
         component.Energy = FixedPoint2.Clamp(component.Energy + delta, 0, component.MaxEnergy);
-        Dirty(component);
+        Dirty(uid, component);
         UpdateUserInterface(uid, component);
         return true;
     }
@@ -306,7 +306,7 @@ public abstract class SharedMechSystem : EntitySystem
             UpdateAppearance(uid, component);
         }
 
-        Dirty(component);
+        Dirty(uid, component);
         UpdateUserInterface(uid, component);
     }
 
index f9f6b82bb182b948f4398ba9f741b0caad2c3e96..400a675cd253c909d73e64739785f2033a2e0046 100644 (file)
@@ -58,7 +58,7 @@ public sealed class SpeedModifierContactsSystem : EntitySystem
         }
         component.WalkSpeedModifier = walkSpeed;
         component.SprintSpeedModifier = sprintSpeed;
-        Dirty(component);
+        Dirty(uid, component);
         _toUpdate.UnionWith(_physics.GetContactingEntities(uid));
     }
 
index d8808b6e4ab87c2f482adc98a8f605920841a618..89aae57074e8918677bac3d826d85cf3f06ed85c 100644 (file)
@@ -85,7 +85,7 @@ public sealed class HungerSystem : EntitySystem
             component.Thresholds[HungerThreshold.Dead],
             component.Thresholds[HungerThreshold.Overfed]);
         UpdateCurrentThreshold(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void UpdateCurrentThreshold(EntityUid uid, HungerComponent? component = null)
@@ -98,7 +98,7 @@ public sealed class HungerSystem : EntitySystem
             return;
         component.CurrentThreshold = calculatedHungerThreshold;
         DoHungerThresholdEffects(uid, component);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void DoHungerThresholdEffects(EntityUid uid, HungerComponent? component = null, bool force = false)
index ec17df7a24f8c5d8cfee2cf94ba641c4cc3497db..bbbfb47cd16c10d8de21d01b2492326d45163852 100644 (file)
@@ -100,10 +100,10 @@ public abstract class SharedConveyorController : VirtualController
             transform.LocalPosition = localPos;
 
             // Force it awake for collisionwake reasons.
-            Physics.SetAwake(entity, body, true);
+            Physics.SetAwake((entity, body), true);
             Physics.SetSleepTime(body, 0f);
         }
-        Dirty(comp);
+        Dirty(uid, comp);
     }
 
     private static Vector2 Convey(Vector2 direction, float speed, float frameTime, Vector2 itemRelative)
index 9481d299aaa06c751ceea48207057b7de561411b..9cb3c26485114e8d2441e90af31d1af9a517d508 100644 (file)
@@ -36,7 +36,7 @@ public sealed class RCDAmmoSystem : EntitySystem
         if (args.Handled || !args.CanReach || !_timing.IsFirstTimePredicted)
             return;
 
-        if (args.Target is not {Valid: true} target ||
+        if (args.Target is not { Valid: true } target ||
             !HasComp<RCDComponent>(target) ||
             !TryComp<LimitedChargesComponent>(target, out var charges))
             return;
@@ -53,7 +53,7 @@ public sealed class RCDAmmoSystem : EntitySystem
         _popup.PopupClient(Loc.GetString("rcd-ammo-component-after-interact-refilled"), target, user);
         _charges.AddCharges(target, count, charges);
         comp.Charges -= count;
-        Dirty(comp);
+        Dirty(uid, comp);
 
         // prevent having useless ammo with 0 charges
         if (comp.Charges <= 0)
index f767d0b99c03bd68a636148d7f97495a25059cf1..d8f01bd41078f9948ed83b2c3338624f90f91c38 100644 (file)
@@ -312,7 +312,7 @@ public sealed class RCDSystem : EntitySystem
         var mode = (int) comp.Mode;
         mode = ++mode % RcdModeCount;
         comp.Mode = (RcdMode) mode;
-        Dirty(comp);
+        Dirty(uid, comp);
 
         var msg = Loc.GetString("rcd-component-change-mode", ("mode", comp.Mode.ToString()));
         _popup.PopupClient(msg, uid, user);
index f31dd8776a434708a2a4f469573653dbbf91544c..c2b52c5af356e61454e1a53f6ee381dc86efabe3 100644 (file)
@@ -66,7 +66,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
             return;
 
         eventHorizon.Radius = value;
-        Dirty(eventHorizon);
+        Dirty(uid, eventHorizon);
         if (updateFixture)
             UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
     }
@@ -89,7 +89,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
             return;
 
         eventHorizon.CanBreachContainment = value;
-        Dirty(eventHorizon);
+        Dirty(uid, eventHorizon);
         if (updateFixture)
             UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
     }
@@ -112,7 +112,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
             return;
 
         eventHorizon.ColliderFixtureId = value;
-        Dirty(eventHorizon);
+        Dirty(uid, eventHorizon);
         if (updateFixture)
             UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
     }
@@ -135,7 +135,7 @@ public abstract class SharedEventHorizonSystem : EntitySystem
             return;
 
         eventHorizon.ConsumerFixtureId = value;
-        Dirty(eventHorizon);
+        Dirty(uid, eventHorizon);
         if (updateFixture)
             UpdateEventHorizonFixture(uid, eventHorizon: eventHorizon);
     }
index 756c84cac55eeda926cd6c0634c32a74b7595ad2..e12edd323c72afaa4a0c25d5d3b5c0088355438d 100644 (file)
@@ -23,8 +23,8 @@ namespace Content.Shared.Stacks
         [Dependency] protected readonly SharedAppearanceSystem Appearance = default!;
         [Dependency] protected readonly SharedHandsSystem Hands = default!;
         [Dependency] protected readonly SharedTransformSystem Xform = default!;
-        [Dependency] private   readonly EntityLookupSystem _entityLookup = default!;
-        [Dependency] private   readonly SharedPhysicsSystem _physics = default!;
+        [Dependency] private readonly EntityLookupSystem _entityLookup = default!;
+        [Dependency] private readonly SharedPhysicsSystem _physics = default!;
         [Dependency] protected readonly SharedPopupSystem Popup = default!;
         [Dependency] private readonly SharedStorageSystem _storage = default!;
 
@@ -175,7 +175,7 @@ namespace Content.Shared.Stacks
 
             // Server-side override deletes the entity if count == 0
             component.Count = amount;
-            Dirty(component);
+            Dirty(uid, component);
 
             Appearance.SetData(uid, StackVisuals.Actual, component.Count);
             RaiseLocalEvent(uid, new StackCountChangedEvent(old, component.Count));
index 517831b8a1b3a5d425cb597028b321d6218d8d01..ed586e970dcd78530f88a1acf975943cbe3cedbf 100644 (file)
@@ -56,7 +56,7 @@ namespace Content.Shared.Standing
                 return false;
 
             standingState.Standing = false;
-            Dirty(standingState);
+            Dirty(uid, standingState);
             RaiseLocalEvent(uid, new DownedEvent(), false);
 
             // Seemed like the best place to put it
index 05af0807f21ec31ba67c14f9e7255c3655bc6f18..e9d68721b63d25dce9cc5f611e43b12396faa879 100644 (file)
@@ -58,7 +58,7 @@ public sealed class StationRecordKeyStorageSystem : EntitySystem
 
         var key = keyStorage.Key;
         keyStorage.Key = null;
-        Dirty(keyStorage);
+        Dirty(uid, keyStorage);
 
         return key;
     }
index 6aec3a8b3b4a0f7ee723b3ff7466c1451c355ec0..f3e3e12bd8cc77c16a9d3690671d9f970ab3f5b4 100644 (file)
@@ -207,7 +207,7 @@ namespace Content.Shared.StatusEffect
                 _alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown1);
             }
 
-            Dirty(status);
+            Dirty(uid, status);
             RaiseLocalEvent(uid, new StatusEffectAddedEvent(uid, key));
             return true;
         }
@@ -283,7 +283,7 @@ namespace Content.Shared.StatusEffect
                 RemComp<ActiveStatusEffectsComponent>(uid);
             }
 
-            Dirty(status);
+            Dirty(uid, status);
             RaiseLocalEvent(uid, new StatusEffectEndedEvent(uid, key));
             return true;
         }
@@ -307,7 +307,7 @@ namespace Content.Shared.StatusEffect
                     failed = true;
             }
 
-            Dirty(status);
+            Dirty(uid, status);
             return failed;
         }
 
@@ -381,7 +381,7 @@ namespace Content.Shared.StatusEffect
                 _alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown);
             }
 
-            Dirty(status);
+            Dirty(uid, status);
             return true;
         }
 
@@ -417,7 +417,7 @@ namespace Content.Shared.StatusEffect
                 _alertsSystem.ShowAlert(uid, proto.Alert.Value, null, cooldown);
             }
 
-            Dirty(status);
+            Dirty(uid, status);
             return true;
         }
 
@@ -438,7 +438,7 @@ namespace Content.Shared.StatusEffect
 
             status.ActiveEffects[key].Cooldown = (_gameTiming.CurTime, _gameTiming.CurTime + time);
 
-            Dirty(status);
+            Dirty(uid, status);
             return true;
         }
 
index 17c3eb4288c0007dd003e2f32ea1727db91b3bc3..1cc95337ea4a9249dcfe60dec948ce1dd48485af 100644 (file)
@@ -135,7 +135,7 @@ public sealed class BinSystem : EntitySystem
 
         _container.Insert(toInsert, component.ItemContainer);
         component.Items.Add(toInsert);
-        Dirty(component);
+        Dirty(uid, component);
         return true;
     }
 
@@ -151,7 +151,7 @@ public sealed class BinSystem : EntitySystem
         if (!Resolve(uid, ref component))
             return false;
 
-        if (!component.Items.Any())
+        if (component.Items.Count == 0)
             return false;
 
         if (toRemove == null || toRemove != component.Items.LastOrDefault())
@@ -161,7 +161,7 @@ public sealed class BinSystem : EntitySystem
             return false;
 
         component.Items.Remove(toRemove.Value);
-        Dirty(component);
+        Dirty(uid, component);
         return true;
     }
 }
index c447f8c8bc79e33b4c483d91e1906f098e18f5df..9190427d3214860e0712032f0c2588f719cbee77 100644 (file)
@@ -1,7 +1,5 @@
 using Content.Shared.ActionBlocker;
 using Content.Shared.Administration.Logs;
-using Content.Shared.Audio;
-using Content.Shared.DragDrop;
 using Content.Shared.Interaction;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Inventory.Events;
@@ -11,16 +9,12 @@ using Content.Shared.Database;
 using Content.Shared.Hands;
 using Content.Shared.Mobs;
 using Content.Shared.Mobs.Components;
-using Content.Shared.Mobs.Systems;
 using Content.Shared.Movement.Events;
 using Content.Shared.Movement.Systems;
 using Content.Shared.Standing;
 using Content.Shared.StatusEffect;
 using Content.Shared.Throwing;
-using Robust.Shared.Audio;
 using Robust.Shared.Audio.Systems;
-using Robust.Shared.GameStates;
-using Robust.Shared.Player;
 
 namespace Content.Shared.Stunnable;
 
@@ -82,19 +76,19 @@ public abstract class SharedStunSystem : EntitySystem
         switch (args.NewMobState)
         {
             case MobState.Alive:
-            {
-                break;
-            }
+                {
+                    break;
+                }
             case MobState.Critical:
-            {
-                _statusEffect.TryRemoveStatusEffect(uid, "Stun");
-                break;
-            }
+                {
+                    _statusEffect.TryRemoveStatusEffect(uid, "Stun");
+                    break;
+                }
             case MobState.Dead:
-            {
-                _statusEffect.TryRemoveStatusEffect(uid, "Stun");
-                break;
-            }
+                {
+                    _statusEffect.TryRemoveStatusEffect(uid, "Stun");
+                    break;
+                }
             case MobState.Invalid:
             default:
                 return;
@@ -238,11 +232,11 @@ public abstract class SharedStunSystem : EntitySystem
             return;
 
         // Set it to half the help interval so helping is actually useful...
-        knocked.HelpTimer = knocked.HelpInterval/2f;
+        knocked.HelpTimer = knocked.HelpInterval / 2f;
 
         _statusEffect.TryRemoveTime(uid, "KnockedDown", TimeSpan.FromSeconds(knocked.HelpInterval));
         _audio.PlayPredicted(knocked.StunAttemptSound, uid, args.User);
-        Dirty(knocked);
+        Dirty(uid, knocked);
 
         args.Handled = true;
     }
index 1ba88c571c7ceea79dc2c2bea86984f0f8c99a84..da56c8d1c76253ff60361e4b52237da76e3d9c7a 100644 (file)
@@ -35,7 +35,7 @@ public abstract class SharedTrayScannerSystem : EntitySystem
             return;
 
         scanner.Enabled = enabled;
-        Dirty(scanner);
+        Dirty(uid, scanner);
 
         // We don't remove from _activeScanners on disabled, because the update function will handle that, as well as
         // managing the revealed subfloor entities
index 0628b892edd1e20e391a8fa0f4b23dacbc6cc289..62197dc319ace6abe64fa5868aca7dca099fa91d 100644 (file)
@@ -75,7 +75,7 @@ public sealed class TagSystem : EntitySystem
     /// </exception>
     public bool AddTag(EntityUid entity, string id)
     {
-        return AddTag(EnsureComp<TagComponent>(entity), id);
+        return AddTag(entity, EnsureComp<TagComponent>(entity), id);
     }
 
     /// <summary>
@@ -91,7 +91,7 @@ public sealed class TagSystem : EntitySystem
     /// </exception>
     public bool AddTags(EntityUid entity, params string[] ids)
     {
-        return AddTags(EnsureComp<TagComponent>(entity), ids);
+        return AddTags(entity, EnsureComp<TagComponent>(entity), ids);
     }
 
     /// <summary>
@@ -107,7 +107,7 @@ public sealed class TagSystem : EntitySystem
     /// </exception>
     public bool AddTags(EntityUid entity, IEnumerable<string> ids)
     {
-        return AddTags(EnsureComp<TagComponent>(entity), ids);
+        return AddTags(entity, EnsureComp<TagComponent>(entity), ids);
     }
 
     /// <summary>
@@ -125,7 +125,7 @@ public sealed class TagSystem : EntitySystem
     public bool TryAddTag(EntityUid entity, string id)
     {
         return TryComp<TagComponent>(entity, out var component) &&
-               AddTag(component, id);
+               AddTag(entity, component, id);
     }
 
     /// <summary>
@@ -143,7 +143,7 @@ public sealed class TagSystem : EntitySystem
     public bool TryAddTags(EntityUid entity, params string[] ids)
     {
         return TryComp<TagComponent>(entity, out var component) &&
-               AddTags(component, ids);
+               AddTags(entity, component, ids);
     }
 
     /// <summary>
@@ -161,7 +161,7 @@ public sealed class TagSystem : EntitySystem
     public bool TryAddTags(EntityUid entity, IEnumerable<string> ids)
     {
         return TryComp<TagComponent>(entity, out var component) &&
-               AddTags(component, ids);
+               AddTags(entity, component, ids);
     }
 
     /// <summary>
@@ -299,7 +299,7 @@ public sealed class TagSystem : EntitySystem
     public bool RemoveTag(EntityUid entity, string id)
     {
         return TryComp<TagComponent>(entity, out var component) &&
-               RemoveTag(component, id);
+               RemoveTag(entity, component, id);
     }
 
     /// <summary>
@@ -316,7 +316,7 @@ public sealed class TagSystem : EntitySystem
     public bool RemoveTags(EntityUid entity, params string[] ids)
     {
         return TryComp<TagComponent>(entity, out var component) &&
-               RemoveTags(component, ids);
+               RemoveTags(entity, component, ids);
     }
 
     /// <summary>
@@ -333,7 +333,7 @@ public sealed class TagSystem : EntitySystem
     public bool RemoveTags(EntityUid entity, IEnumerable<string> ids)
     {
         return TryComp<TagComponent>(entity, out var component) &&
-               RemoveTags(component, ids);
+               RemoveTags(entity, component, ids);
     }
 
     /// <summary>
@@ -344,14 +344,14 @@ public sealed class TagSystem : EntitySystem
     /// <exception cref="UnknownPrototypeException">
     ///     Thrown if no <see cref="TagPrototype"/> exists with the given id.
     /// </exception>
-    public bool AddTag(TagComponent component, string id)
+    public bool AddTag(EntityUid uid, TagComponent component, string id)
     {
         AssertValidTag(id);
         var added = component.Tags.Add(id);
 
         if (added)
         {
-            Dirty(component);
+            Dirty(uid, component);
             return true;
         }
 
@@ -366,9 +366,9 @@ public sealed class TagSystem : EntitySystem
     /// <exception cref="UnknownPrototypeException">
     ///     Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
     /// </exception>
-    public bool AddTags(TagComponent component, params string[] ids)
+    public bool AddTags(EntityUid uid, TagComponent component, params string[] ids)
     {
-        return AddTags(component, ids.AsEnumerable());
+        return AddTags(uid, component, ids.AsEnumerable());
     }
 
     /// <summary>
@@ -379,7 +379,7 @@ public sealed class TagSystem : EntitySystem
     /// <exception cref="UnknownPrototypeException">
     ///     Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
     /// </exception>
-    public bool AddTags(TagComponent component, IEnumerable<string> ids)
+    public bool AddTags(EntityUid uid, TagComponent component, IEnumerable<string> ids)
     {
         var count = component.Tags.Count;
 
@@ -391,7 +391,7 @@ public sealed class TagSystem : EntitySystem
 
         if (component.Tags.Count > count)
         {
-            Dirty(component);
+            Dirty(uid, component);
             return true;
         }
 
@@ -557,13 +557,13 @@ public sealed class TagSystem : EntitySystem
     /// <exception cref="UnknownPrototypeException">
     ///     Thrown if no <see cref="TagPrototype"/> exists with the given id.
     /// </exception>
-    public bool RemoveTag(TagComponent component, string id)
+    public bool RemoveTag(EntityUid uid, TagComponent component, string id)
     {
         AssertValidTag(id);
 
         if (component.Tags.Remove(id))
         {
-            Dirty(component);
+            Dirty(uid, component);
             return true;
         }
 
@@ -580,9 +580,9 @@ public sealed class TagSystem : EntitySystem
     /// <exception cref="UnknownPrototypeException">
     ///     Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
     /// </exception>
-    public bool RemoveTags(TagComponent component, params string[] ids)
+    public bool RemoveTags(EntityUid uid, TagComponent component, params string[] ids)
     {
-        return RemoveTags(component, ids.AsEnumerable());
+        return RemoveTags(uid, component, ids.AsEnumerable());
     }
 
     /// <summary>
@@ -593,7 +593,7 @@ public sealed class TagSystem : EntitySystem
     /// <exception cref="UnknownPrototypeException">
     ///     Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
     /// </exception>
-    public bool RemoveTags(TagComponent component, IEnumerable<string> ids)
+    public bool RemoveTags(EntityUid uid, TagComponent component, IEnumerable<string> ids)
     {
         var count = component.Tags.Count;
 
@@ -605,7 +605,7 @@ public sealed class TagSystem : EntitySystem
 
         if (component.Tags.Count < count)
         {
-            Dirty(component);
+            Dirty(uid, component);
             return true;
         }
 
index bf2d087c7619600187099f052d1eab6827775c56..35ce5665ddf8fa998bf0dd207f8fc96d9a1a9eef 100644 (file)
@@ -87,7 +87,7 @@ public sealed class LinkedEntitySystem : EntitySystem
     /// <param name="secondLink">Resolve comp</param>
     /// <returns>Whether unlinking was successful (e.g. they both were actually linked to one another)</returns>
     public bool TryUnlink(EntityUid first, EntityUid second,
-        LinkedEntityComponent? firstLink=null, LinkedEntityComponent? secondLink=null)
+        LinkedEntityComponent? firstLink = null, LinkedEntityComponent? secondLink = null)
     {
         if (!Resolve(first, ref firstLink))
             return false;
@@ -101,8 +101,8 @@ public sealed class LinkedEntitySystem : EntitySystem
         _appearance.SetData(first, LinkedEntityVisuals.HasAnyLinks, firstLink.LinkedEntities.Any());
         _appearance.SetData(second, LinkedEntityVisuals.HasAnyLinks, secondLink.LinkedEntities.Any());
 
-        Dirty(firstLink);
-        Dirty(secondLink);
+        Dirty(first, firstLink);
+        Dirty(second, secondLink);
 
         if (firstLink.LinkedEntities.Count == 0 && firstLink.DeleteOnEmptyLinks)
             QueueDel(first);
index 63b2d5f211512e16255ebf8d15b46072d206d5f8..d1814020e6e32e1ac7cbf30c6e170a10c82f022b 100644 (file)
@@ -71,7 +71,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
         marker.Marker = projectile.Weapon.Value;
         marker.EndTime = _timing.CurTime + component.Duration;
         component.Amount--;
-        Dirty(marker);
+        Dirty(args.OtherEntity, marker);
 
         if (_netManager.IsServer)
         {
@@ -81,7 +81,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
             }
             else
             {
-                Dirty(component);
+                Dirty(uid, component);
             }
         }
     }
index 177cb310d18a5bfd896ac8f68fac9105973b38ac..99cd3fa030aa9eeb149b089df1c39daf231ef5d3 100644 (file)
@@ -21,17 +21,17 @@ namespace Content.Shared.Weapons.Misc;
 
 public abstract partial class SharedTetherGunSystem : EntitySystem
 {
-    [Dependency] private   readonly INetManager _netManager = default!;
-    [Dependency] private   readonly ActionBlockerSystem _blocker = default!;
-    [Dependency] private   readonly MobStateSystem _mob = default!;
-    [Dependency] private   readonly SharedAppearanceSystem _appearance = default!;
-    [Dependency] private   readonly SharedAudioSystem _audio = default!;
-    [Dependency] private   readonly SharedContainerSystem _container = default!;
-    [Dependency] private   readonly SharedJointSystem _joints = default!;
-    [Dependency] private   readonly SharedPhysicsSystem _physics = default!;
+    [Dependency] private readonly INetManager _netManager = default!;
+    [Dependency] private readonly ActionBlockerSystem _blocker = default!;
+    [Dependency] private readonly MobStateSystem _mob = default!;
+    [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
+    [Dependency] private readonly SharedAudioSystem _audio = default!;
+    [Dependency] private readonly SharedContainerSystem _container = default!;
+    [Dependency] private readonly SharedJointSystem _joints = default!;
+    [Dependency] private readonly SharedPhysicsSystem _physics = default!;
     [Dependency] protected readonly SharedTransformSystem TransformSystem = default!;
-    [Dependency] private   readonly ThrowingSystem _throwing = default!;
-    [Dependency] private   readonly ThrownItemSystem _thrown = default!;
+    [Dependency] private readonly ThrowingSystem _throwing = default!;
+    [Dependency] private readonly ThrownItemSystem _thrown = default!;
 
     private const string TetherJoint = "tether";
 
@@ -282,7 +282,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
         RemComp<TetheredComponent>(component.Tethered.Value);
         _blocker.UpdateCanMove(component.Tethered.Value);
         component.Tethered = null;
-        Dirty(component);
+        Dirty(gunUid, component);
     }
 
     [Serializable, NetSerializable]
index b774c8ab450dab8022fafcbbdce7a51fadf5c59d..9d6d55240015f1d6dd555ab84759cf5e855aeac3 100644 (file)
@@ -49,19 +49,19 @@ public sealed class RechargeBasicEntityAmmoSystem : EntitySystem
             if (ammo.Count == ammo.Capacity)
             {
                 recharge.NextCharge = null;
-                Dirty(recharge);
+                Dirty(uid, recharge);
                 continue;
             }
 
             recharge.NextCharge = recharge.NextCharge.Value + TimeSpan.FromSeconds(recharge.RechargeCooldown);
-            Dirty(recharge);
+            Dirty(uid, recharge);
         }
     }
 
     private void OnInit(EntityUid uid, RechargeBasicEntityAmmoComponent component, MapInitEvent args)
     {
         component.NextCharge = _timing.CurTime;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnExamined(EntityUid uid, RechargeBasicEntityAmmoComponent component, ExaminedEvent args)
@@ -86,7 +86,7 @@ public sealed class RechargeBasicEntityAmmoSystem : EntitySystem
         if (recharge.NextCharge == null || recharge.NextCharge < _timing.CurTime)
         {
             recharge.NextCharge = _timing.CurTime + TimeSpan.FromSeconds(recharge.RechargeCooldown);
-            Dirty(recharge);
+            Dirty(uid, recharge);
         }
     }
 }
index 136e9b59b2fa3af7e41d8d922b117aeaf3c1643c..a014f8e5c744a80b066d6788a34e61cde00b9d47 100644 (file)
@@ -25,7 +25,7 @@ public sealed class RechargeCycleAmmoSystem : EntitySystem
             return;
 
         _gun.UpdateBasicEntityAmmoCount(uid, basic.Count.Value + 1, basic);
-        Dirty(basic);
+        Dirty(uid, basic);
         args.Handled = true;
     }
 }
index 71e3e80764f002485e68bcc8c727faeba54f16bb..c97e2b4555e260d71deef31a90fbd0062f9b0d14 100644 (file)
@@ -117,7 +117,7 @@ public abstract partial class SharedGunSystem : EntitySystem
         if (melee.NextAttack > component.NextFire)
         {
             component.NextFire = melee.NextAttack;
-            Dirty(component);
+            Dirty(uid, component);
         }
     }
 
index 45a2afe7cd980fd9979720fa63e01ab46f2dc45d..19671bd77b0f2a7974f1f55f191988b11310492f 100644 (file)
@@ -15,8 +15,8 @@ public abstract class SharedWeatherSystem : EntitySystem
     [Dependency] protected readonly IGameTiming Timing = default!;
     [Dependency] protected readonly IMapManager MapManager = default!;
     [Dependency] protected readonly IPrototypeManager ProtoMan = default!;
-    [Dependency] private   readonly ITileDefinitionManager _tileDefManager = default!;
-    [Dependency] private   readonly MetaDataSystem _metadata = default!;
+    [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!;
+    [Dependency] private readonly MetaDataSystem _metadata = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
 
     private EntityQuery<BlockWeatherComponent> _blockQuery;
@@ -129,7 +129,7 @@ public abstract class SharedWeatherSystem : EntitySystem
                 // Shutting down
                 if (endTime != null && remainingTime < WeatherComponent.ShutdownTime)
                 {
-                    SetState(WeatherState.Ending, comp, weather, weatherProto);
+                    SetState(uid, WeatherState.Ending, comp, weather, weatherProto);
                 }
                 // Starting up
                 else
@@ -139,7 +139,7 @@ public abstract class SharedWeatherSystem : EntitySystem
 
                     if (elapsed < WeatherComponent.StartupTime)
                     {
-                        SetState(WeatherState.Starting, comp, weather, weatherProto);
+                        SetState(uid, WeatherState.Starting, comp, weather, weatherProto);
                     }
                 }
 
@@ -182,15 +182,15 @@ public abstract class SharedWeatherSystem : EntitySystem
         }
 
         if (proto != null)
-            StartWeather(weatherComp, proto, endTime);
+            StartWeather(mapUid, weatherComp, proto, endTime);
     }
 
     /// <summary>
     /// Run every tick when the weather is running.
     /// </summary>
-    protected virtual void Run(EntityUid uid, WeatherData weather, WeatherPrototype weatherProto, float frameTime) {}
+    protected virtual void Run(EntityUid uid, WeatherData weather, WeatherPrototype weatherProto, float frameTime) { }
 
-    protected void StartWeather(WeatherComponent component, WeatherPrototype weather, TimeSpan? endTime)
+    protected void StartWeather(EntityUid uid, WeatherComponent component, WeatherPrototype weather, TimeSpan? endTime)
     {
         if (component.Weather.ContainsKey(weather.ID))
             return;
@@ -202,7 +202,7 @@ public abstract class SharedWeatherSystem : EntitySystem
         };
 
         component.Weather.Add(weather.ID, data);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     protected virtual void EndWeather(EntityUid uid, WeatherComponent component, string proto)
@@ -216,13 +216,13 @@ public abstract class SharedWeatherSystem : EntitySystem
         Dirty(uid, component);
     }
 
-    protected virtual bool SetState(WeatherState state, WeatherComponent component, WeatherData weather, WeatherPrototype weatherProto)
+    protected virtual bool SetState(EntityUid uid, WeatherState state, WeatherComponent component, WeatherData weather, WeatherPrototype weatherProto)
     {
         if (weather.State.Equals(state))
             return false;
 
         weather.State = state;
-        Dirty(component);
+        Dirty(uid, component);
         return true;
     }