Cleans up tag system (#28272)
* Updated tag system * Added params methods * Fixed tag integration tests * Fixed params methods recursion * Revert has All/Any tag one argument realisation * Updated tag integration tests * Shit happens * Added individual List/HashSet methods, docs, tests
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Content.Server.Mech.Systems;
|
||||
public sealed class MechAssemblySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ContainerSystem _container = default!;
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
@@ -44,7 +45,7 @@ public sealed class MechAssemblySystem : EntitySystem
|
||||
|
||||
foreach (var (tag, val) in component.RequiredParts)
|
||||
{
|
||||
if (!val && tagComp.Tags.Contains(tag))
|
||||
if (!val && _tag.HasTag(tagComp, tag))
|
||||
{
|
||||
component.RequiredParts[tag] = true;
|
||||
_container.Insert(args.Used, component.PartsContainer);
|
||||
|
||||
Reference in New Issue
Block a user