allow paper labels on seeds (#34450)
* allow paper labels on seeds * added the components required by PaperLabel to the SeedBase * localize insert/eject for PaperLabel * visualize the paper label on seeds * new paper layer for seeds * eject the seed label on use * different looking paper label * forgot to turn on a layer
This commit is contained in:
committed by
GitHub
parent
5e3d744233
commit
36b59c69f4
@@ -22,6 +22,8 @@ using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using Content.Server.Labels.Components;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
|
||||
namespace Content.Server.Botany.Systems;
|
||||
|
||||
@@ -39,6 +41,7 @@ public sealed class PlantHolderSystem : EntitySystem
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
[Dependency] private readonly RandomHelperSystem _randomHelper = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
|
||||
|
||||
|
||||
public const float HydroponicsSpeedMultiplier = 1f;
|
||||
@@ -176,6 +179,10 @@ public sealed class PlantHolderSystem : EntitySystem
|
||||
}
|
||||
component.LastCycle = _gameTiming.CurTime;
|
||||
|
||||
if (TryComp<PaperLabelComponent>(args.Used, out var paperLabel))
|
||||
{
|
||||
_itemSlots.TryEjectToHands(args.Used, paperLabel.LabelSlot, args.User);
|
||||
}
|
||||
QueueDel(args.Used);
|
||||
|
||||
CheckLevelSanity(uid, component);
|
||||
|
||||
Reference in New Issue
Block a user