Inline GetAllComponents

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:42:24 +01:00
parent e0fe09cb46
commit f10ed6c0c3
18 changed files with 48 additions and 38 deletions

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Radiation;
using Content.Shared.Sound;
@@ -41,7 +42,7 @@ namespace Content.Server.Radiation
// Note: Radiation is liable for a refactor (stinky Sloth coding a basic version when he did StationEvents)
// so this ToArray doesn't really matter.
foreach (var radiation in entity.GetAllComponents<IRadiationAct>().ToArray())
foreach (var radiation in IoCManager.Resolve<IEntityManager>().GetComponents<IRadiationAct>(entity.Uid).ToArray())
{
radiation.RadiationAct(RadiationCooldown, comp);
}