Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -57,14 +57,16 @@ namespace Content.Server.Bed
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var (_, bedComponent, strapComponent) in EntityQuery<HealOnBuckleHealingComponent, HealOnBuckleComponent, StrapComponent>())
|
||||
var query = EntityQueryEnumerator<HealOnBuckleHealingComponent, HealOnBuckleComponent, StrapComponent>();
|
||||
while (query.MoveNext(out var uid, out _, out var bedComponent, out var strapComponent))
|
||||
{
|
||||
if (_timing.CurTime < bedComponent.NextHealTime)
|
||||
continue;
|
||||
|
||||
bedComponent.NextHealTime += TimeSpan.FromSeconds(bedComponent.HealTime);
|
||||
|
||||
if (strapComponent.BuckledEntities.Count == 0) continue;
|
||||
if (strapComponent.BuckledEntities.Count == 0)
|
||||
continue;
|
||||
|
||||
foreach (var healedEntity in strapComponent.BuckledEntities)
|
||||
{
|
||||
@@ -76,7 +78,7 @@ namespace Content.Server.Bed
|
||||
if (HasComp<SleepingComponent>(healedEntity))
|
||||
damage *= bedComponent.SleepMultiplier;
|
||||
|
||||
_damageableSystem.TryChangeDamage(healedEntity, damage, true, origin: bedComponent.Owner);
|
||||
_damageableSystem.TryChangeDamage(healedEntity, damage, true, origin: uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user