Bunch more error fixes.

This commit is contained in:
Vera Aguilera Puerto
2021-12-04 12:59:44 +01:00
parent 151778a1b9
commit 2ff16a580b
31 changed files with 120 additions and 151 deletions

View File

@@ -18,7 +18,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public static bool AddTag(this IEntity entity, string id)
public static bool AddTag(this EntityUid entity, string id)
{
return entity.EnsureComponent(out TagComponent tagComponent) &&
tagComponent.AddTag(id);
@@ -35,7 +35,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool AddTags(this IEntity entity, params string[] ids)
public static bool AddTags(this EntityUid entity, params string[] ids)
{
return entity.EnsureComponent(out TagComponent tagComponent) &&
tagComponent.AddTags(ids);
@@ -52,7 +52,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool AddTags(this IEntity entity, IEnumerable<string> ids)
public static bool AddTags(this EntityUid entity, IEnumerable<string> ids)
{
return entity.EnsureComponent(out TagComponent tagComponent) &&
tagComponent.AddTags(ids);
@@ -70,7 +70,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public static bool TryAddTag(this IEntity entity, string id)
public static bool TryAddTag(this EntityUid entity, string id)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.AddTag(id);
@@ -88,7 +88,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool TryAddTags(this IEntity entity, params string[] ids)
public static bool TryAddTags(this EntityUid entity, params string[] ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.AddTags(ids);
@@ -106,7 +106,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool TryAddTags(this IEntity entity, IEnumerable<string> ids)
public static bool TryAddTags(this EntityUid entity, IEnumerable<string> ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.AddTags(ids);
@@ -121,7 +121,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public static bool HasTag(this IEntity entity, string id)
public static bool HasTag(this EntityUid entity, string id)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.HasTag(id);
@@ -136,7 +136,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool HasAllTags(this IEntity entity, params string[] ids)
public static bool HasAllTags(this EntityUid entity, params string[] ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.HasAllTags(ids);
@@ -151,7 +151,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool HasAllTags(this IEntity entity, IEnumerable<string> ids)
public static bool HasAllTags(this EntityUid entity, IEnumerable<string> ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.HasAllTags(ids);
@@ -166,7 +166,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool HasAnyTag(this IEntity entity, params string[] ids)
public static bool HasAnyTag(this EntityUid entity, params string[] ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.HasAnyTag(ids);
@@ -181,7 +181,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool HasAnyTag(this IEntity entity, IEnumerable<string> ids)
public static bool HasAnyTag(this EntityUid entity, IEnumerable<string> ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.HasAnyTag(ids);
@@ -198,7 +198,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public static bool RemoveTag(this IEntity entity, string id)
public static bool RemoveTag(this EntityUid entity, string id)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.RemoveTag(id);
@@ -215,7 +215,7 @@ namespace Content.Shared.Tag
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
/// </returns>
public static bool RemoveTags(this IEntity entity, params string[] ids)
public static bool RemoveTags(this EntityUid entity, params string[] ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.RemoveTags(ids);
@@ -232,7 +232,7 @@ namespace Content.Shared.Tag
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public static bool RemoveTags(this IEntity entity, IEnumerable<string> ids)
public static bool RemoveTags(this EntityUid entity, IEnumerable<string> ids)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
tagComponent.RemoveTags(ids);