More error fixes.

This commit is contained in:
Vera Aguilera Puerto
2021-12-04 12:47:09 +01:00
parent 424c83e39c
commit 151778a1b9
30 changed files with 97 additions and 123 deletions

View File

@@ -34,7 +34,7 @@ namespace Content.Shared.Buckle.Components
bool IDragDropOn.CanDragDropOn(DragDropEvent eventArgs)
{
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(eventArgs.Dragged, out SharedBuckleComponent? buckleComponent)) return false;
bool Ignored(IEntity entity) => entity == eventArgs.User || entity == eventArgs.Dragged || entity == eventArgs.Target;
bool Ignored(EntityUid entity) => entity == eventArgs.User || entity == eventArgs.Dragged || entity == eventArgs.Target;
return eventArgs.Target.InRangeUnobstructed(eventArgs.Dragged, buckleComponent.Range, predicate: Ignored);
}
@@ -73,7 +73,7 @@ namespace Content.Shared.Buckle.Components
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
/// <param name="buckled">True if the entity was buckled, false otherwise</param>
protected StrapChangeMessage(IEntity entity, IEntity strap, bool buckled)
protected StrapChangeMessage(EntityUid entity, EntityUid strap, bool buckled)
{
Entity = entity;
Strap = strap;
@@ -83,12 +83,12 @@ namespace Content.Shared.Buckle.Components
/// <summary>
/// The entity that had its buckling status changed
/// </summary>
public IEntity Entity { get; }
public EntityUid Entity { get; }
/// <summary>
/// The strap that the entity was buckled to or unbuckled from
/// </summary>
public IEntity Strap { get; }
public EntityUid Strap { get; }
/// <summary>
/// True if the entity was buckled, false otherwise.
@@ -104,7 +104,7 @@ namespace Content.Shared.Buckle.Components
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
public StrapMessage(IEntity entity, IEntity strap) : base(entity, strap, true)
public StrapMessage(EntityUid entity, EntityUid strap) : base(entity, strap, true)
{
}
}
@@ -117,7 +117,7 @@ namespace Content.Shared.Buckle.Components
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
public UnStrapMessage(IEntity entity, IEntity strap) : base(entity, strap, false)
public UnStrapMessage(EntityUid entity, EntityUid strap) : base(entity, strap, false)
{
}
}