]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Added Popup for the Ligneous plant mutation when using hands. (#33136)
authorTr1bute <tomsredhammer@gmail.com>
Mon, 4 Nov 2024 00:56:41 +0000 (01:56 +0100)
committerGitHub <noreply@github.com>
Mon, 4 Nov 2024 00:56:41 +0000 (01:56 +0100)
* Added Popup for the Ligneous plant mutation when using hands.

There was some confusion for players with the Ligneous mutation which makes the plant harvestable only with sharp tools. Adding a popup with the message "The plant is too tough." to give them a hint to use something other than just their hands.

I decided to only put the message when attempting to harvest using hands, as the intent is clear that the player just wanted to harvest, but wasn't able to. Using any other tools like a crowbar or a screwdriver will not trigger the popup.

* Update Resources/Locale/en-US/botany/components/plant-holder-component.ftl

Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
---------

Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Content.Server/Botany/Systems/PlantHolderSystem.cs
Resources/Locale/en-US/botany/components/plant-holder-component.ftl

index 34d6a75bf252b9854aba5ed11603003367b71355..271acb606a40a6101a35925404d436aa98c92cbe 100644 (file)
@@ -680,7 +680,10 @@ public sealed class PlantHolderSystem : EntitySystem
             if (TryComp<HandsComponent>(user, out var hands))
             {
                 if (!_botany.CanHarvest(component.Seed, hands.ActiveHandEntity))
+                {
+                    _popup.PopupCursor(Loc.GetString("plant-holder-component-ligneous-cant-harvest-message"), user);
                     return false;
+                }
             }
             else if (!_botany.CanHarvest(component.Seed))
             {
index ca20c277f5314b610501bfede96738de5bb3b6a2..0f416455c7eb5ea5a114482e90194a5b6eba332b 100644 (file)
@@ -31,3 +31,4 @@ plant-holder-component-heat-improper-warning = The [color=orange]improper temper
 plant-holder-component-pressure-improper-warning = The [color=lightblue]improper environment pressure alert[/color] is blinking.
 plant-holder-component-gas-missing-warning = The [color=cyan]improper gas environment alert[/color] is blinking.
 plant-holder-component-early-sample-message = The plant hasn't grown enough to take a sample yet.
+plant-holder-component-ligneous-cant-harvest-message = The plant is too tough to harvest with your bare hands.