diff --git a/Content.Server/Botany/Systems/BotanySystem.Seed.cs b/Content.Server/Botany/Systems/BotanySystem.Seed.cs index 1487ed71d4..76421daf2e 100644 --- a/Content.Server/Botany/Systems/BotanySystem.Seed.cs +++ b/Content.Server/Botany/Systems/BotanySystem.Seed.cs @@ -84,7 +84,7 @@ public sealed partial class BotanySystem : EntitySystem if (!TryGetSeed(component, out var seed)) return; - using (args.PushGroup(nameof(SeedComponent))) + using (args.PushGroup(nameof(SeedComponent), 1)) { var name = Loc.GetString(seed.DisplayName); args.PushMarkup(Loc.GetString($"seed-component-description", ("seedName", name))); diff --git a/Content.Server/Botany/Systems/PlantHolderSystem.cs b/Content.Server/Botany/Systems/PlantHolderSystem.cs index 271acb606a..7eda4949a9 100644 --- a/Content.Server/Botany/Systems/PlantHolderSystem.cs +++ b/Content.Server/Botany/Systems/PlantHolderSystem.cs @@ -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(args.Used, out var paperLabel)) + { + _itemSlots.TryEjectToHands(args.Used, paperLabel.LabelSlot, args.User); + } QueueDel(args.Used); CheckLevelSanity(uid, component); diff --git a/Resources/Locale/en-US/label/paper-label-component.ftl b/Resources/Locale/en-US/label/paper-label-component.ftl index a62fc0244d..8b268596b0 100644 --- a/Resources/Locale/en-US/label/paper-label-component.ftl +++ b/Resources/Locale/en-US/label/paper-label-component.ftl @@ -1,3 +1,5 @@ comp-paper-label-has-label = There is a label attached, it reads: comp-paper-label-has-label-blank = There is a label attached, but it's blank. comp-paper-label-has-label-cant-read = There is a label attached, but you can't read it from this distance. +comp-paper-label-insert = Attach label +comp-paper-label-eject = Detach label diff --git a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml index 1ad3dd5bdf..bc78ab5911 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml @@ -6,11 +6,37 @@ - type: SolutionContainerManager - type: Sprite sprite: Objects/Specific/Hydroponics/seeds.rsi - state: seed + layers: + - state: seed + - state: paper + visible: false + map: ["enum.PaperLabelVisuals.Layer"] + sprite: Objects/Specific/Hydroponics/seeds.rsi + - type: Appearance + - type: GenericVisualizer + visuals: + enum.PaperLabelVisuals.HasLabel: + enum.PaperLabelVisuals.Layer: + True: { visible: true } + False: { visible: false } - type: Item size: Tiny - type: StaticPrice price: 20 + - type: ItemSlots + - type: ContainerContainer + containers: + paper_label: !type:ContainerSlot + - type: PaperLabel + labelSlot: + insertVerbText: comp-paper-label-insert + ejectVerbText: comp-paper-label-eject + whitelist: + components: + - Paper + blacklist: + tags: + - Book - type: entity parent: SeedBase diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml index d1085ff5de..6c42b8f59f 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/morgue.yml @@ -51,8 +51,8 @@ - type: EntityStorageLayingDownOverride - type: PaperLabel labelSlot: - insertVerbText: Attach Label - ejectVerbText: Remove Label + insertVerbText: comp-paper-label-insert + ejectVerbText: comp-paper-label-eject whitelist: components: - Paper diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml index a003ba9079..7053eda226 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml @@ -66,8 +66,8 @@ acts: ["Destruction"] - type: PaperLabel labelSlot: - insertVerbText: Attach Label - ejectVerbText: Remove Label + insertVerbText: comp-paper-label-insert + ejectVerbText: comp-paper-label-eject whitelist: components: - Paper diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml index 2568c45a6a..6777b0f638 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml @@ -26,8 +26,8 @@ - type: MovedByPressure - type: PaperLabel labelSlot: - insertVerbText: Attach Label - ejectVerbText: Remove Label + insertVerbText: comp-paper-label-insert + ejectVerbText: comp-paper-label-eject whitelist: components: - Paper diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml index 48804893ca..3e9a09be5a 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml @@ -72,8 +72,8 @@ Invoice: { state: invoice } - type: PaperLabel labelSlot: - insertVerbText: Attach Label - ejectVerbText: Remove Label + insertVerbText: comp-paper-label-insert + ejectVerbText: comp-paper-label-eject whitelist: components: - Paper diff --git a/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/meta.json b/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/meta.json index fc716313c8..bd5d13d6df 100644 --- a/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068", + "copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068, paper layer by Ian321", "size": { "x": 32, "y": 32 @@ -30,6 +30,9 @@ }, { "name": "seed-synthbrain" + }, + { + "name": "paper" } ] } diff --git a/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/paper.png b/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/paper.png new file mode 100644 index 0000000000..31a4559c1f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/seeds.rsi/paper.png differ