Fix more prototypes for save/spawn test (#11087)

This commit is contained in:
Leon Friedrich
2022-09-07 20:35:34 +12:00
committed by GitHub
parent 7c8351eee7
commit 6f33d3a7f8
10 changed files with 81 additions and 51 deletions

View File

@@ -69,9 +69,8 @@ public sealed class TagSystem : EntitySystem
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool AddTag(EntityUid entity, string id)
{
return EntityManager.EnsureComponent<TagComponent>(entity, out var component) &&
AddTag(component, id);
{
return AddTag(EnsureComp<TagComponent>(entity), id);
}
/// <summary>
@@ -87,8 +86,7 @@ public sealed class TagSystem : EntitySystem
/// </exception>
public bool AddTags(EntityUid entity, params string[] ids)
{
return EntityManager.EnsureComponent<TagComponent>(entity, out var component) &&
AddTags(component, ids);
return AddTags(EnsureComp<TagComponent>(entity), ids);
}
/// <summary>
@@ -104,8 +102,7 @@ public sealed class TagSystem : EntitySystem
/// </exception>
public bool AddTags(EntityUid entity, IEnumerable<string> ids)
{
return EntityManager.EnsureComponent<TagComponent>(entity, out var component) &&
AddTags(component, ids);
return AddTags(EnsureComp<TagComponent>(entity), ids);
}
/// <summary>