Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -3,11 +3,9 @@ using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Destructible;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
@@ -176,14 +174,12 @@ public abstract class SharedMechSystem : EntitySystem
|
||||
_mover.SetRelay(pilot, mech);
|
||||
_interaction.SetRelay(pilot, mech, irelay);
|
||||
rider.Mech = mech;
|
||||
Dirty(rider);
|
||||
Dirty(pilot, rider);
|
||||
|
||||
_actions.AddAction(pilot,
|
||||
new InstantAction(_prototype.Index<InstantActionPrototype>(component.MechCycleAction)), mech);
|
||||
_actions.AddAction(pilot, new InstantAction(_prototype.Index<InstantActionPrototype>(component.MechUiAction)),
|
||||
_actions.AddAction(pilot, Spawn(component.MechCycleAction), mech);
|
||||
_actions.AddAction(pilot, Spawn(component.MechUiAction),
|
||||
mech);
|
||||
_actions.AddAction(pilot,
|
||||
new InstantAction(_prototype.Index<InstantActionPrototype>(component.MechEjectAction)), mech);
|
||||
_actions.AddAction(pilot, Spawn(component.MechEjectAction), mech);
|
||||
}
|
||||
|
||||
private void RemoveUser(EntityUid mech, EntityUid pilot)
|
||||
|
||||
Reference in New Issue
Block a user