Fix a lot more errors.
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Content.Shared.Verbs
|
||||
/// Raises a number of events in order to get all verbs of the given type(s) defined in local systems. This
|
||||
/// does not request verbs from the server.
|
||||
/// </summary>
|
||||
public virtual Dictionary<VerbType, SortedSet<Verb>> GetLocalVerbs(IEntity target, IEntity user, VerbType verbTypes, bool force = false)
|
||||
public virtual Dictionary<VerbType, SortedSet<Verb>> GetLocalVerbs(EntityUid target, EntityUid user, VerbType verbTypes, bool force = false)
|
||||
{
|
||||
Dictionary<VerbType, SortedSet<Verb>> verbs = new();
|
||||
|
||||
@@ -41,17 +41,17 @@ namespace Content.Shared.Verbs
|
||||
// call ActionBlocker checks, just cache it for the verb request.
|
||||
var canInteract = force || _actionBlockerSystem.CanInteract(user);
|
||||
|
||||
IEntity? @using = null;
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(user, out SharedHandsComponent? hands) && (force || _actionBlockerSystem.CanUse(user)))
|
||||
EntityUid? @using = null;
|
||||
if (EntityManager.TryGetComponent(user, out SharedHandsComponent? hands) && (force || _actionBlockerSystem.CanUse(user)))
|
||||
{
|
||||
hands.TryGetActiveHeldEntity(out @using);
|
||||
|
||||
// Check whether the "Held" entity is a virtual pull entity. If yes, set that as the entity being "Used".
|
||||
// This allows you to do things like buckle a dragged person onto a surgery table, without click-dragging
|
||||
// their sprite.
|
||||
if (@using != null && IoCManager.Resolve<IEntityManager>().TryGetComponent<HandVirtualItemComponent?>(@using, out var pull))
|
||||
if (@using != null && EntityManager.TryGetComponent<HandVirtualItemComponent?>(@using.Value, out var pull))
|
||||
{
|
||||
@using = IoCManager.Resolve<IEntityManager>().GetEntity(pull.BlockingEntity);
|
||||
@using = EntityManager.GetEntity(pull.BlockingEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace Content.Shared.Verbs
|
||||
!EntityManager.TryGetEntity(targetUid, out var target))
|
||||
return;
|
||||
|
||||
IEntity? used = null;
|
||||
EntityUid? used = null;
|
||||
if (usedUid != null)
|
||||
EntityManager.TryGetEntity(usedUid.Value, out used);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Content.Shared.Verbs
|
||||
/// </remarks>
|
||||
public class GetInteractionVerbsEvent : GetVerbsEvent
|
||||
{
|
||||
public GetInteractionVerbsEvent(IEntity user, IEntity target, IEntity? @using, SharedHandsComponent? hands,
|
||||
public GetInteractionVerbsEvent(EntityUid user, EntityUid target, EntityUid? @using, SharedHandsComponent? hands,
|
||||
bool canInteract, bool canAccess) : base(user, target, @using, hands, canInteract, canAccess) { }
|
||||
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace Content.Shared.Verbs
|
||||
/// </remarks>
|
||||
public class GetActivationVerbsEvent : GetVerbsEvent
|
||||
{
|
||||
public GetActivationVerbsEvent(IEntity user, IEntity target, IEntity? @using, SharedHandsComponent? hands,
|
||||
public GetActivationVerbsEvent(EntityUid user, EntityUid target, EntityUid? @using, SharedHandsComponent? hands,
|
||||
bool canInteract, bool canAccess) : base(user, target, @using, hands, canInteract, canAccess) { }
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Content.Shared.Verbs
|
||||
/// </remarks>
|
||||
public class GetAlternativeVerbsEvent : GetVerbsEvent
|
||||
{
|
||||
public GetAlternativeVerbsEvent(IEntity user, IEntity target, IEntity? @using, SharedHandsComponent? hands,
|
||||
public GetAlternativeVerbsEvent(EntityUid user, EntityUid target, EntityUid? @using, SharedHandsComponent? hands,
|
||||
bool canInteract, bool canAccess) : base(user, target, @using, hands, canInteract, canAccess) { }
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace Content.Shared.Verbs
|
||||
/// </remarks>
|
||||
public class GetOtherVerbsEvent : GetVerbsEvent
|
||||
{
|
||||
public GetOtherVerbsEvent(IEntity user, IEntity target, IEntity? @using, SharedHandsComponent? hands,
|
||||
public GetOtherVerbsEvent(EntityUid user, EntityUid target, EntityUid? @using, SharedHandsComponent? hands,
|
||||
bool canInteract, bool canAccess) : base(user, target, @using, hands, canInteract, canAccess) { }
|
||||
}
|
||||
|
||||
@@ -149,12 +149,12 @@ namespace Content.Shared.Verbs
|
||||
/// <summary>
|
||||
/// The entity being targeted for the verb.
|
||||
/// </summary>
|
||||
public readonly IEntity Target;
|
||||
public readonly EntityUid Target;
|
||||
|
||||
/// <summary>
|
||||
/// The entity that will be "performing" the verb.
|
||||
/// </summary>
|
||||
public readonly IEntity User;
|
||||
public readonly EntityUid User;
|
||||
|
||||
/// <summary>
|
||||
/// Can the user physically interact?
|
||||
@@ -181,14 +181,9 @@ namespace Content.Shared.Verbs
|
||||
/// This is only ever not null when <see cref="ActionBlockerSystem.CanUse(Robust.Shared.GameObjects.EntityUid)"/> is true and the user
|
||||
/// has hands.
|
||||
/// </remarks>
|
||||
public readonly IEntity? Using;
|
||||
public readonly EntityUid? Using;
|
||||
|
||||
// for eventual removal of IEntity.
|
||||
public EntityUid UserUid => User;
|
||||
public EntityUid TargetUid => Target;
|
||||
public EntityUid? UsingUid => Using;
|
||||
|
||||
public GetVerbsEvent(IEntity user, IEntity target, IEntity? @using, SharedHandsComponent? hands, bool canInteract, bool canAccess)
|
||||
public GetVerbsEvent(EntityUid user, EntityUid target, EntityUid? @using, SharedHandsComponent? hands, bool canInteract, bool canAccess)
|
||||
{
|
||||
User = user;
|
||||
Target = target;
|
||||
|
||||
Reference in New Issue
Block a user