Inline GetComponent
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Content.Server.StationEvents.Events
|
||||
physics.Mass * ((MaxAngularVelocity - MinAngularVelocity) * _robustRandom.NextFloat() +
|
||||
MinAngularVelocity));
|
||||
// TODO: God this disgusts me but projectile needs a refactor.
|
||||
meteor.GetComponent<ProjectileComponent>().TimeLeft = 120f;
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<ProjectileComponent>(meteor.Uid).TimeLeft = 120f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Content.Server.StationEvents.Events
|
||||
return;
|
||||
|
||||
var pulse = _entityManager.SpawnEntity("RadiationPulse", coordinates);
|
||||
pulse.GetComponent<RadiationPulseComponent>().DoPulse();
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<RadiationPulseComponent>(pulse.Uid).DoPulse();
|
||||
ResetTimeUntilPulse();
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Content.Server.StationEvents.Events
|
||||
{
|
||||
var pulse = IoCManager.Resolve<IEntityManager>()
|
||||
.SpawnEntity("RadiationPulse", at);
|
||||
pulse.GetComponent<RadiationPulseComponent>().DoPulse();
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<RadiationPulseComponent>(pulse.Uid).DoPulse();
|
||||
}
|
||||
|
||||
private bool TryFindRandomGrid(IMapGrid mapGrid, out EntityCoordinates coordinates)
|
||||
|
||||
Reference in New Issue
Block a user