Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Implants.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
@@ -36,9 +35,9 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem
|
||||
if (component.ImplantedEntity == null)
|
||||
return;
|
||||
|
||||
if (component.ImplantAction != null)
|
||||
if (!string.IsNullOrWhiteSpace(component.ImplantAction))
|
||||
{
|
||||
var action = new InstantAction(_prototypeManager.Index<InstantActionPrototype>(component.ImplantAction));
|
||||
var action = Spawn(component.ImplantAction);
|
||||
_actionsSystem.AddAction(component.ImplantedEntity.Value, action, uid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user