From f8afaa0dc94d95cc8e1f0ed149f924175d3acad1 Mon Sep 17 00:00:00 2001 From: kosticia Date: Tue, 8 Jul 2025 04:45:46 +0300 Subject: [PATCH] Artifact glue reagent (#38670) * 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 --- .../Effects/ArtifactDurabilityRestore.cs | 36 +++++++++++++++++++ .../Locale/en-US/flavors/flavor-profiles.ftl | 1 + .../en-US/guidebook/chemistry/effects.ftl | 3 ++ .../Locale/en-US/reagents/meta/chemicals.ftl | 3 ++ .../en-US/reagents/meta/physical-desc.ftl | 1 + Resources/Prototypes/Flavors/flavors.yml | 4 +++ Resources/Prototypes/Reagents/chemicals.yml | 17 +++++++++ .../Recipes/Reactions/chemicals.yml | 10 ++++++ 8 files changed, 75 insertions(+) create mode 100644 Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs diff --git a/Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs b/Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs new file mode 100644 index 0000000000..45ca740363 --- /dev/null +++ b/Content.Shared/EntityEffects/Effects/ArtifactDurabilityRestore.cs @@ -0,0 +1,36 @@ +using Content.Shared.Xenoarchaeology.Artifact.Components; +using Content.Shared.Xenoarchaeology.Artifact; +using Robust.Shared.Prototypes; + +namespace Content.Shared.EntityEffects.Effects; + +/// +/// Restores durability in active artefact nodes. +/// +public sealed partial class ArtifactDurabilityRestore : EntityEffect +{ + /// + /// Amount of durability that will be restored per effect interaction. + /// + [DataField] + public int RestoredDurability = 1; + + public override void Effect(EntityEffectBaseArgs args) + { + var entMan = args.EntityManager; + var xenoArtifactSys = entMan.System(); + + if (!entMan.TryGetComponent(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)); + } +} diff --git a/Resources/Locale/en-US/flavors/flavor-profiles.ftl b/Resources/Locale/en-US/flavors/flavor-profiles.ftl index 35dda778a2..bdc0ea858a 100644 --- a/Resources/Locale/en-US/flavors/flavor-profiles.ftl +++ b/Resources/Locale/en-US/flavors/flavor-profiles.ftl @@ -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 diff --git a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl index a5ddb03f0a..cd7bb21af2 100644 --- a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl @@ -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 diff --git a/Resources/Locale/en-US/reagents/meta/chemicals.ftl b/Resources/Locale/en-US/reagents/meta/chemicals.ftl index ad9d12e26f..f5dfec7d6a 100644 --- a/Resources/Locale/en-US/reagents/meta/chemicals.ftl +++ b/Resources/Locale/en-US/reagents/meta/chemicals.ftl @@ -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. diff --git a/Resources/Locale/en-US/reagents/meta/physical-desc.ftl b/Resources/Locale/en-US/reagents/meta/physical-desc.ftl index 55818df8b9..6e0ebf53bf 100644 --- a/Resources/Locale/en-US/reagents/meta/physical-desc.ftl +++ b/Resources/Locale/en-US/reagents/meta/physical-desc.ftl @@ -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 diff --git a/Resources/Prototypes/Flavors/flavors.yml b/Resources/Prototypes/Flavors/flavors.yml index 6dd81058ca..e4348b4efb 100644 --- a/Resources/Prototypes/Flavors/flavors.yml +++ b/Resources/Prototypes/Flavors/flavors.yml @@ -1479,3 +1479,7 @@ flavorType: Base description: flavor-base-trashy +- type: flavor + id: artifactglue + flavorType: Complex + description: flavor-complex-artifact-glue diff --git a/Resources/Prototypes/Reagents/chemicals.yml b/Resources/Prototypes/Reagents/chemicals.yml index 4542c97565..45c55ce4dd 100644 --- a/Resources/Prototypes/Reagents/chemicals.yml +++ b/Resources/Prototypes/Reagents/chemicals.yml @@ -81,6 +81,23 @@ - !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 diff --git a/Resources/Prototypes/Recipes/Reactions/chemicals.yml b/Resources/Prototypes/Recipes/Reactions/chemicals.yml index a951a94d24..cdd5659c7e 100644 --- a/Resources/Prototypes/Recipes/Reactions/chemicals.yml +++ b/Resources/Prototypes/Recipes/Reactions/chemicals.yml @@ -515,3 +515,13 @@ amount: 1 products: Tazinide: 1 + +- type: reaction + id: ArtifactGlue + reactants: + SpaceGlue: + amount: 1 + Artifexium: + amount: 1 + products: + ArtifactGlue: 2