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