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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user