This commit is contained in:
metalgearsloth
2022-02-08 14:08:11 +11:00
committed by GitHub
parent ef6aa43031
commit 70c0a502cf
24 changed files with 641 additions and 628 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Botany.Components;
using Content.Server.Chemistry.EntitySystems;
using Content.Server.Popups;
using Content.Shared.GameTicking;
using Content.Shared.Tag;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -18,6 +19,7 @@ namespace Content.Server.Botany.Systems
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly TagSystem _tags = default!;
private int _nextUid = 0;
private float _timer = 0f;

View File

@@ -136,7 +136,7 @@ public partial class BotanySystem
public bool CanHarvest(SeedPrototype proto, EntityUid? held = null)
{
return !proto.Ligneous || proto.Ligneous && held != null && held.Value.HasTag("BotanySharp");
return !proto.Ligneous || proto.Ligneous && held != null && _tags.HasTag(held.Value, "BotanySharp");
}
#endregion

View File

@@ -9,6 +9,8 @@ namespace Content.Server.Botany.Systems;
public sealed class LogSystem : EntitySystem
{
[Dependency] private readonly TagSystem _tags = default!;
public override void Initialize()
{
base.Initialize();
@@ -18,7 +20,7 @@ public sealed class LogSystem : EntitySystem
private void OnInteractUsing(EntityUid uid, LogComponent component, InteractUsingEvent args)
{
if (args.Used.HasTag("BotanySharp"))
if (_tags.HasTag(args.Used, "BotanySharp"))
{
for (var i = 0; i < component.SpawnCount; i++)
{