Code cleanup: Dirty(Comp) (#26238)

* 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
This commit is contained in:
Tayrtahn
2024-03-19 23:27:02 -04:00
committed by GitHub
parent c28cbe40c3
commit 4a83c36585
74 changed files with 245 additions and 249 deletions

View 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);
}