Use ActorComponent instead of IActorComponent or BasicActorComponent. (#3966)
This commit is contained in:
committed by
GitHub
parent
3319dc0599
commit
462cddf860
@@ -257,9 +257,9 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
return true;
|
||||
}
|
||||
|
||||
if (eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
OpenInterface(actor.playerSession, eventArgs.ClickLocation);
|
||||
OpenInterface(actor.PlayerSession, eventArgs.ClickLocation);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -269,17 +269,17 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
CloseInterface(actor.playerSession);
|
||||
CloseInterface(actor.PlayerSession);
|
||||
}
|
||||
}
|
||||
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
{
|
||||
ToggleInterface(actor.playerSession);
|
||||
ToggleInterface(actor.PlayerSession);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -156,10 +156,10 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor))
|
||||
return;
|
||||
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
UserInterface?.Open(actor.PlayerSession);
|
||||
}
|
||||
|
||||
private void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj)
|
||||
|
||||
@@ -159,15 +159,15 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false;
|
||||
OpenInterface(actor.playerSession);
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return false;
|
||||
OpenInterface(actor.PlayerSession);
|
||||
return true;
|
||||
}
|
||||
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return;
|
||||
OpenInterface(actor.playerSession);
|
||||
if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return;
|
||||
OpenInterface(actor.PlayerSession);
|
||||
}
|
||||
|
||||
public void ConnectToInternals()
|
||||
@@ -330,7 +330,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
protected override void GetData(IEntity user, GasTankComponent component, VerbData data)
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
if (!user.HasComponent<IActorComponent>())
|
||||
if (!user.HasComponent<ActorComponent>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -341,12 +341,12 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
protected override void Activate(IEntity user, GasTankComponent component)
|
||||
{
|
||||
if (!user.TryGetComponent<IActorComponent>(out var actor))
|
||||
if (!user.TryGetComponent<ActorComponent>(out var actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
component.OpenInterface(actor.playerSession);
|
||||
component.OpenInterface(actor.PlayerSession);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user