Refactor ghost boo to ECS (#4511)
* Moved ghost boo to ecs * Fixed small light exception * No need to inject EM * Moved cooldown and time to fields Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -31,12 +31,11 @@ namespace Content.Server.Actions.Actions
|
||||
var booCounter = 0;
|
||||
foreach (var ent in ents)
|
||||
{
|
||||
var boos = ent.GetAllComponents<IGhostBooAffected>().ToList();
|
||||
foreach (var boo in boos)
|
||||
{
|
||||
if (boo.AffectedByGhostBoo(args))
|
||||
booCounter++;
|
||||
}
|
||||
var ghostBoo = new GhostBooEvent();
|
||||
ent.EntityManager.EventBus.RaiseLocalEvent(ent.Uid, ghostBoo);
|
||||
|
||||
if (ghostBoo.Handled)
|
||||
booCounter++;
|
||||
|
||||
if (booCounter >= _maxTargets)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user