Use ActorComponent instead of IActorComponent or BasicActorComponent. (#3966)
This commit is contained in:
committed by
GitHub
parent
3319dc0599
commit
462cddf860
@@ -186,9 +186,9 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
{
|
||||
TryQueueEngage();
|
||||
|
||||
if (entity.TryGetComponent(out IActorComponent? actor))
|
||||
if (entity.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
UserInterface?.Close(actor.playerSession);
|
||||
UserInterface?.Close(actor.PlayerSession);
|
||||
}
|
||||
|
||||
UpdateVisualState();
|
||||
@@ -688,7 +688,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -699,7 +699,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
{
|
||||
UpdateTargetList();
|
||||
UpdateInterface();
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -708,14 +708,14 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsValidInteraction(eventArgs))
|
||||
{
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
/// <param name="args">Data relevant to the event such as the actor which triggered it.</param>
|
||||
void IActivate.Activate(ActivateEventArgs args)
|
||||
{
|
||||
if (!args.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!args.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -180,10 +180,10 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
base.OnRemove();
|
||||
}
|
||||
|
||||
private void OpenUserInterface(IActorComponent actor)
|
||||
private void OpenUserInterface(ActorComponent actor)
|
||||
{
|
||||
UpdateUserInterface();
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
}
|
||||
|
||||
[Verb]
|
||||
@@ -205,7 +205,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
protected override void Activate(IEntity user, DisposalRouterComponent component)
|
||||
{
|
||||
if (user.TryGetComponent(out IActorComponent? actor))
|
||||
if (user.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
component.OpenUserInterface(actor);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
/// <param name="args">Data relevant to the event such as the actor which triggered it.</param>
|
||||
void IActivate.Activate(ActivateEventArgs args)
|
||||
{
|
||||
if (!args.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!args.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
{
|
||||
|
||||
var groupController = IoCManager.Resolve<IConGroupController>();
|
||||
if (!user.TryGetComponent(out IActorComponent? actor) || !groupController.CanAdminMenu(actor.playerSession))
|
||||
if (!user.TryGetComponent(out ActorComponent? actor) || !groupController.CanAdminMenu(actor.PlayerSession))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
return;
|
||||
@@ -165,17 +165,17 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
protected override void Activate(IEntity user, DisposalTaggerComponent component)
|
||||
{
|
||||
if (user.TryGetComponent(out IActorComponent? actor))
|
||||
if (user.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
component.OpenUserInterface(actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenUserInterface(IActorComponent actor)
|
||||
private void OpenUserInterface(ActorComponent actor)
|
||||
{
|
||||
UpdateUserInterface();
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,9 +292,9 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
var groupController = IoCManager.Resolve<IConGroupController>();
|
||||
|
||||
if (user.TryGetComponent<IActorComponent>(out var player))
|
||||
if (user.TryGetComponent<ActorComponent>(out var player))
|
||||
{
|
||||
if (groupController.CanCommand(player.playerSession, "tubeconnections"))
|
||||
if (groupController.CanCommand(player.PlayerSession, "tubeconnections"))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Visible;
|
||||
}
|
||||
@@ -305,9 +305,9 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
{
|
||||
var groupController = IoCManager.Resolve<IConGroupController>();
|
||||
|
||||
if (user.TryGetComponent<IActorComponent>(out var player))
|
||||
if (user.TryGetComponent<ActorComponent>(out var player))
|
||||
{
|
||||
if (groupController.CanCommand(player.playerSession, "tubeconnections"))
|
||||
if (groupController.CanCommand(player.PlayerSession, "tubeconnections"))
|
||||
{
|
||||
component.PopupDirections(user);
|
||||
}
|
||||
|
||||
@@ -166,9 +166,9 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
{
|
||||
TryQueueEngage();
|
||||
|
||||
if (entity.TryGetComponent(out IActorComponent? actor))
|
||||
if (entity.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
UserInterface?.Close(actor.playerSession);
|
||||
UserInterface?.Close(actor.PlayerSession);
|
||||
}
|
||||
|
||||
UpdateVisualState();
|
||||
@@ -584,7 +584,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -592,7 +592,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
if (IsValidInteraction(eventArgs))
|
||||
{
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -601,14 +601,14 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsValidInteraction(eventArgs))
|
||||
{
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user