Add knife butchering and blood gibbing (#6770)
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Server.Plants;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.ActionBlocker;
|
||||
@@ -802,9 +803,10 @@ namespace Content.Server.Botany.Components
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tagSystem.HasTag(usingItem, "BotanySharp"))
|
||||
if (_entMan.HasComponent<SharpComponent>(usingItem))
|
||||
{
|
||||
return DoHarvest(user);
|
||||
|
||||
}
|
||||
|
||||
if (_entMan.TryGetComponent<ProduceComponent?>(usingItem, out var produce))
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.Botany.Components;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Content.Shared.Tag;
|
||||
@@ -136,7 +137,7 @@ public sealed partial class BotanySystem
|
||||
|
||||
public bool CanHarvest(SeedPrototype proto, EntityUid? held = null)
|
||||
{
|
||||
return !proto.Ligneous || proto.Ligneous && held != null && _tags.HasTag(held.Value, "BotanySharp");
|
||||
return !proto.Ligneous || proto.Ligneous && held != null && HasComp<SharpComponent>(held);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Botany.Components;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Random.Helpers;
|
||||
@@ -9,8 +10,6 @@ namespace Content.Server.Botany.Systems;
|
||||
|
||||
public sealed class LogSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly TagSystem _tags = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -20,7 +19,7 @@ public sealed class LogSystem : EntitySystem
|
||||
|
||||
private void OnInteractUsing(EntityUid uid, LogComponent component, InteractUsingEvent args)
|
||||
{
|
||||
if (_tags.HasTag(args.Used, "BotanySharp"))
|
||||
if (HasComp<SharpComponent>(args.Used))
|
||||
{
|
||||
for (var i = 0; i < component.SpawnCount; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user