]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Artifact glue reagent (#38670)
authorkosticia <kosticia46@gmail.com>
Tue, 8 Jul 2025 01:45:46 +0000 (04:45 +0300)
committerGitHub <noreply@github.com>
Tue, 8 Jul 2025 01:45:46 +0000 (18:45 -0700)
* a

* Revert "a"

This reverts commit 2b9ba4ea67a9395d30b7ab37c8065f627f1a961a.

* f

* dev it

* a?

* ad

* forgor

* Revert "f"

This reverts commit 39228c7cbe4d28ba43b73580b55e01c3979eb869.

* derandomisation!

* reviv

* flavor

* fixe

* dwwasdwasdwa

* dwasdwasdwas

* fuck you

Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs [new file with mode: 0644]
Resources/Locale/en-US/flavors/flavor-profiles.ftl
Resources/Locale/en-US/guidebook/chemistry/effects.ftl
Resources/Locale/en-US/reagents/meta/chemicals.ftl
Resources/Locale/en-US/reagents/meta/physical-desc.ftl
Resources/Prototypes/Flavors/flavors.yml
Resources/Prototypes/Reagents/chemicals.yml
Resources/Prototypes/Recipes/Reactions/chemicals.yml

diff --git a/Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs b/Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs
new file mode 100644 (file)
index 0000000..45ca740
--- /dev/null
@@ -0,0 +1,36 @@
+using Content.Shared.Xenoarchaeology.Artifact.Components;
+using Content.Shared.Xenoarchaeology.Artifact;
+using Robust.Shared.Prototypes;
+
+namespace Content.Shared.EntityEffects.Effects;
+
+/// <summary>
+///     Restores durability in active artefact nodes.
+/// </summary>
+public sealed partial class ArtifactDurabilityRestore : EntityEffect
+{
+    /// <summary>
+    ///     Amount of durability that will be restored per effect interaction.
+    /// </summary>
+    [DataField]
+    public int RestoredDurability = 1;
+
+    public override void Effect(EntityEffectBaseArgs args)
+    {
+        var entMan = args.EntityManager;
+        var xenoArtifactSys = entMan.System<SharedXenoArtifactSystem>();
+
+        if (!entMan.TryGetComponent<XenoArtifactComponent>(args.TargetEntity, out var xenoArtifact))
+            return;
+
+        foreach (var node in xenoArtifactSys.GetActiveNodes((args.TargetEntity, xenoArtifact)))
+        {
+            xenoArtifactSys.AdjustNodeDurability(node.Owner, RestoredDurability);
+        }
+    }
+
+    protected override string ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
+    {
+        return Loc.GetString("reagent-effect-guidebook-artifact-durability-restore", ("restored", RestoredDurability));
+    }
+}
index 35dda778a27a1a2aef54d4926928f52468390dff..bdc0ea858a54a5d80a9312b4451e4ee468770234 100644 (file)
@@ -342,5 +342,6 @@ flavor-complex-bee = unbeelievable
 flavor-complex-sax = like jazz
 flavor-complex-bottledlightning = like lightning in a bottle
 flavor-complex-punishment = like punishment
+flavor-complex-artifact-glue = like crushed artifacts
 flavor-weh = like weh
 flavor-hew = like hew
index a5ddb03f0a932dff61711728db8974c0966ef656..cd7bb21af2d45cb0e3b8dc388d176f7587f62043 100644 (file)
@@ -384,6 +384,9 @@ reagent-effect-guidebook-artifact-unlock =
         *[other] help
         } unlock an alien artifact.
 
+reagent-effect-guidebook-artifact-durability-restore =
+    Restores {$restored} durability in active alien artifact nodes.
+
 reagent-effect-guidebook-plant-attribute =
     { $chance ->
         [1] Adjusts
index ad9d12e26f8d04521a1567f5b4b0aff3c50d92e6..f5dfec7d6ae893c2019dfd1a072d6206ac7cf813 100644 (file)
@@ -10,6 +10,9 @@ reagent-desc-sodium-carbonate = A white, odorless, water-soluble salt that yield
 reagent-name-artifexium = artifexium
 reagent-desc-artifexium = A lavender mixture of microscopic artifact fragments and a strong acid. It has the ability to activate artifacts.
 
+reagent-name-artifact-glue = artifact glue
+reagent-desc-artifact-glue = Mixture of glue and artifexium. It can restore durability of nodes in artifact on touch.
+
 reagent-name-benzene = benzene
 reagent-desc-benzene = An aromatic, slightly carcinogenic, ring of carbon, forming a base for many organic compounds.
 
index 55818df8b9e6501c9130fb1af6896dc322756024..6e0ebf53bf3978a54b8b3b5978e4228b4b78e715 100644 (file)
@@ -96,3 +96,4 @@ reagent-physical-desc-holy = holy
 reagent-physical-desc-slimy = slimy
 reagent-physical-desc-neural = neural
 reagent-physical-desc-unidentifiable = unidentifiable
+reagent-physical-desc-non-newtonian = non-newtonian
index 6dd81058cac1d804ed0bed85ad36931c049b9fe2..e4348b4efba12ed4aed234ddf7b67d0e3400f9f9 100644 (file)
   flavorType: Base
   description: flavor-base-trashy
 
+- type: flavor
+  id: artifactglue
+  flavorType: Complex
+  description: flavor-complex-artifact-glue
index 4542c97565918052473b74704947f7b9638381d0..45c55ce4dd3b16a157048c7685719899feb5a035 100644 (file)
         - !type:ReagentThreshold
           min: 5
 
+- type: reagent
+  parent: Artifexium
+  id: ArtifactGlue
+  name: reagent-name-artifact-glue
+  desc: reagent-desc-artifact-glue
+  flavor: artifactglue
+  physicalDesc: reagent-physical-desc-non-newtonian
+  color: "#827394"
+  reactiveEffects:
+    Acidic:
+      methods: [ Touch ]
+      effects:
+      - !type:ArtifactDurabilityRestore
+        conditions:
+        - !type:ReagentThreshold
+          min: 5
+
 - type: reagent
   id: Benzene
   name: reagent-name-benzene
index a951a94d2452500cf77a347799b188d1b907a237..cdd5659c7e6b1369e2a6cbfe2807add96813e6c7 100644 (file)
       amount: 1
   products:
     Tazinide: 1
+
+- type: reaction
+  id: ArtifactGlue
+  reactants:
+    SpaceGlue:
+      amount: 1
+    Artifexium:
+      amount: 1
+  products:
+    ArtifactGlue: 2