From c6f2e00d3e1e10b87b89331b3fd4dfd4f2fdb47c Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sat, 5 Oct 2024 16:41:24 +0700 Subject: [PATCH 01/14] Added accumulation ReagentEffect for theobromine --- .../ReagentEffects/AccumulateReagent.cs | 127 ++++++++++++++++++ Resources/Prototypes/Reagents/toxins.yml | 7 + 2 files changed, 134 insertions(+) create mode 100644 Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs diff --git a/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs b/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs new file mode 100644 index 00000000000..daa553f2b49 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs @@ -0,0 +1,127 @@ +using Content.Server.Atmos.Components; +using Content.Server.Body.Components; +using Content.Shared.Body.Organ; +using Content.Shared.Body.Prototypes; +using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.Components.SolutionManager; +using Content.Shared.Chemistry.Reagent; +using Content.Shared.FixedPoint; +using JetBrains.Annotations; +using JetBrains.FormatRipper.Elf; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; +using Robust.Shared.Utility; +using SixLabors.ImageSharp.Formats; +using System.Linq; + +namespace Content.Server.Chemistry.ReagentEffects +{ + // This class is basically copied from the sealed class AdjustReagent, but compensates a reagent's metabolism rates when adjusting its levels. + // Was introduced in order to make theobromine accumulate faster than is metabolises. + // While quite kludgy, it is still much safer and cleaner alternative to actively preventing the metabolism system from processing theobromine while it's still in the system. + + // TL;DR Это костыль, который тупо добавляет столько же реагента, сколько должно впитаться за данный тик. + // Решение сомнительное, но оно гораздо чище, чем лезть в код метаболирования и добавлять туда группу-исключение с проверкой на наличие реагента в кровеносной системе. + + [UsedImplicitly] + public sealed partial class AccumulateReagent : ReagentEffect + { + /// + /// The reagent ID to accumulate. Only one of this and should be active. + /// + [DataField(customTypeSerializer: typeof(PrototypeIdSerializer), required: true)] + public string? Reagent; + + /// + /// Checks if the target has something that already adds the target reagent + /// + public bool ContainsPositiveAdjustEffect(IPrototypeManager prototypeMan, Solution solution, List groups) + { + foreach (var quantity in solution.Contents) + { + var reagent = quantity.Reagent.Prototype; + if (reagent == Reagent) + continue; + + if (!prototypeMan.TryIndex(reagent, out ReagentPrototype? reagentProto)) + continue; + + if (reagentProto?.Metabolisms == null) + continue; + + // Ideally we should iterate over the body's MetabolismGroupEntry list. + // But I have no idea why there's no Drink in its .MetabolismGroups property and how to fetch that. + // So it will stay like this for now, but might cause unintended theobromine accumulation in some *very* unlikely and specific scenarios. + // TL;DR everything's good as long as you don't inject an IPC with theobromine or something like that. + foreach (var reagentEffectsEntry in reagentProto.Metabolisms.Values) + { + foreach (var effect in reagentEffectsEntry.Effects) + { + if (effect is not AdjustReagent adjustReagent) + continue; + + if (adjustReagent.Reagent == Reagent) + return true; + } + } + } + + return false; + } + + public override void Effect(ReagentEffectArgs args) + { + // Source is where Theobromine is currently coming from + if (args.Source == null) + return; + + if (Reagent == null) + return; + + var prototypeMan = IoCManager.Resolve(); + prototypeMan.TryIndex(Reagent, out ReagentPrototype? reagentProto); + + args.EntityManager.TryGetComponent(args.OrganEntity, out MetabolizerComponent? metabolizer); + + if (metabolizer?.MetabolismGroups is not List groups) + return; + + if (!ContainsPositiveAdjustEffect(prototypeMan, args.Source, groups)) + return; + + if (reagentProto?.Metabolisms == null) + return; + + FixedPoint2 totalCompensationRate = 0; + foreach (var group in groups) + { + // Normally, the rate should only be processed once since a reagent usually only has one group. + if (!reagentProto.Metabolisms.TryGetValue(group.Id, out var reagentEffectsEntry)) + continue; + + var groupRate = reagentEffectsEntry.MetabolismRate * group.MetabolismRateModifier; + totalCompensationRate += groupRate; + } + + // amount *= args.Scale; + args.Source.AddReagent(Reagent, totalCompensationRate); + } + + protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) + { + return ""; + + // Could use a different translation string as well, but this one is close enough to ignore it for now + if (Reagent != null && prototype.TryIndex(Reagent, out ReagentPrototype? reagentProto)) + { + return Loc.GetString("reagent-effect-guidebook-accumulate-reagent-reagent", + ("chance", Probability), + ("deltasign", 1), + ("reagent", reagentProto.LocalizedName), + ("amount", MathF.Abs(0.05f))); + } + + throw new NotImplementedException(); + } + } +} diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 661e1b7dd16..416cefd9ca6 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -420,6 +420,13 @@ min: 3 - !type:OrganType type: Animal + - !type:AccumulateReagent + conditions: + - !type:ReagentThreshold + max: 5 + - !type:OrganType + type: Animal + reagent: Theobromine - type: reagent id: Amatoxin From b365e3ed7e76c3423abbb1aa218f8202944639bc Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sat, 5 Oct 2024 16:42:05 +0700 Subject: [PATCH 02/14] Removed starvation damage from the tajaran race --- .../Mobs/Species/Tajaran/Entities/Mobs/Species/Tajaran.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Entities/Mobs/Species/Tajaran.yml b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Entities/Mobs/Species/Tajaran.yml index b4ce2793a03..9fd8ac9c94f 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Entities/Mobs/Species/Tajaran.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Entities/Mobs/Species/Tajaran.yml @@ -16,11 +16,7 @@ Female: FemaleFelinid Unsexed: FemaleFelinid #- type: Carriable - - type: Hunger - starvationDamage: - types: - Cold: 0.5 - Bloodloss: 0.5 + - type: Hunger # tajaran are already at a disadvantage against the vulpkanin, so the baseDecayRate is unchanged - type: Thirst - type: Icon sprite: _LostParadise/Mobs/Species/Tajaran/parts.rsi From bf217f7de2b8d608bf752f5192269f1e8bdb0e71 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sat, 5 Oct 2024 16:43:15 +0700 Subject: [PATCH 03/14] Added diet-specific metabolizer types for the tajaran and vulpkanin races --- .../Prototypes/Chemistry/metabolizer_types.yml | 8 ++++++++ .../Prototypes/DeltaV/Body/Organs/vulpkanin.yml | 14 ++++++++++++++ .../Mobs/Species/Tajaran/Body/Organs/Tajaran.yml | 15 ++++++++++++--- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Chemistry/metabolizer_types.yml b/Resources/Prototypes/Chemistry/metabolizer_types.yml index 316b8f02b53..e8f5bcc7567 100644 --- a/Resources/Prototypes/Chemistry/metabolizer_types.yml +++ b/Resources/Prototypes/Chemistry/metabolizer_types.yml @@ -41,6 +41,14 @@ id: Moth name: moth +- type: metabolizerType + id: Vulpkanin + name: vulpkanin + +- type: metabolizerType + id: Tajaran + name: tajaran + - type: metabolizerType id: Arachnid name: arachnid diff --git a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml index cd4eeae1900..9455c594cc7 100644 --- a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml +++ b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml @@ -4,6 +4,14 @@ noSpawn: true components: - type: Stomach + poorlyDigestible: + tags: + - Fruit # LostParadise's lore states the vulpkanin race isn't really adapted to plant food + - Vegetable + - Bread + factor: 0.25 + vomitChance: 0.02 + replacement: reagent-indigestible-fiber - type: SolutionContainerManager solutions: stomach: @@ -13,3 +21,9 @@ reagents: - ReagentId: UncookedAnimalProteins Quantity: 5 + - type: Metabolizer + maxReagents: 3 + metabolizerTypes: [ Animal, Vulpkanin ] + groups: + - id: Food + - id: Drink diff --git a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml index ad4c30fc725..001f14ab4a5 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml @@ -4,10 +4,13 @@ noSpawn: true components: - type: Stomach - specialDigestible: + poorlyDigestible: tags: - - Meat - - Pill + - Fruit # The bread isn't included according to the LostParadise's lore + - Vegetable + factor: 0.25 + vomitChance: 0.02 + replacement: reagent-indigestible-fiber - type: SolutionContainerManager solutions: stomach: @@ -17,3 +20,9 @@ reagents: - ReagentId: UncookedAnimalProteins Quantity: 5 + - type: Metabolizer + maxReagents: 3 + metabolizerTypes: [ Animal, Tajaran ] + groups: + - id: Food + - id: Drink From 5abe4edef9d39a2a3f73d8cd401b064440d7b9ce Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sat, 5 Oct 2024 16:43:43 +0700 Subject: [PATCH 04/14] Added theobromine into some beverages containing coffee --- .../Entities/Objects/Consumable/Drinks/drinks.yml | 3 +++ .../Prototypes/Reagents/Consumable/Drink/alcohol.yml | 6 ++++++ Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml index 743d9a17925..e622314740d 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml @@ -2383,3 +2383,6 @@ effects: - !type:SatiateThirst factor: 4 + - !type:AdjustReagent + reagent: Theobromine + amount: 0.04 diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml index d9e57d5b803..571a9dad351 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml @@ -300,6 +300,9 @@ - !type:AdjustReagent reagent: Ethanol amount: 0.20 + - !type:AdjustReagent + reagent: Theobromine + amount: 0.04 - type: reagent @@ -1328,6 +1331,9 @@ - !type:AdjustReagent reagent: Ethanol amount: 0.133 + - !type:AdjustReagent + reagent: Theobromine + amount: 0.04 - type: reagent id: LongIslandIcedTea diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml index 5c09b3c909b..7ca93d51c62 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/drinks.yml @@ -139,6 +139,14 @@ metamorphicMaxFillLevels: 5 metamorphicFillBaseName: fill- metamorphicChangeColor: false + metabolisms: + Drink: + effects: + - !type:SatiateThirst + factor: 2 + - !type:AdjustReagent + reagent: Theobromine + amount: 0.05 - type: reagent id: IcedGreenTea From 46d241e1de5d0a284f24557e9fac3416b4ec0085 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 14:11:32 +0700 Subject: [PATCH 05/14] Added translation to the guidebook --- .../Chemistry/ReagentEffects/AccumulateReagent.cs | 10 ++-------- Resources/Locale/en-US/guidebook/chemistry/effects.ftl | 3 +++ Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl | 2 ++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs b/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs index daa553f2b49..bb61133e233 100644 --- a/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs +++ b/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs @@ -17,7 +17,7 @@ namespace Content.Server.Chemistry.ReagentEffects { // This class is basically copied from the sealed class AdjustReagent, but compensates a reagent's metabolism rates when adjusting its levels. - // Was introduced in order to make theobromine accumulate faster than is metabolises. + // Was introduced in order to make theobromine accumulate faster than it metabolises. // While quite kludgy, it is still much safer and cleaner alternative to actively preventing the metabolism system from processing theobromine while it's still in the system. // TL;DR Это костыль, который тупо добавляет столько же реагента, сколько должно впитаться за данный тик. @@ -52,7 +52,6 @@ public bool ContainsPositiveAdjustEffect(IPrototypeManager prototypeMan, Solutio // Ideally we should iterate over the body's MetabolismGroupEntry list. // But I have no idea why there's no Drink in its .MetabolismGroups property and how to fetch that. // So it will stay like this for now, but might cause unintended theobromine accumulation in some *very* unlikely and specific scenarios. - // TL;DR everything's good as long as you don't inject an IPC with theobromine or something like that. foreach (var reagentEffectsEntry in reagentProto.Metabolisms.Values) { foreach (var effect in reagentEffectsEntry.Effects) @@ -109,16 +108,11 @@ public override void Effect(ReagentEffectArgs args) protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) { - return ""; - // Could use a different translation string as well, but this one is close enough to ignore it for now if (Reagent != null && prototype.TryIndex(Reagent, out ReagentPrototype? reagentProto)) { return Loc.GetString("reagent-effect-guidebook-accumulate-reagent-reagent", - ("chance", Probability), - ("deltasign", 1), - ("reagent", reagentProto.LocalizedName), - ("amount", MathF.Abs(0.05f))); + ("reagent", reagentProto.LocalizedName)); } throw new NotImplementedException(); diff --git a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl index dbb24a3cafd..9006d290a31 100644 --- a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl @@ -157,6 +157,9 @@ reagent-effect-guidebook-adjust-reagent-group = *[-1] from } the solution +reagent-effect-guidebook-accumulate-reagent-reagent = + Accumulates as long as there's a {$reagent} source present in the bloodstream + reagent-effect-guidebook-adjust-temperature = { $chance -> [1] { $deltasign -> diff --git a/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl b/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl index 1539f5d7b0a..deb923fc2da 100644 --- a/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl @@ -143,6 +143,8 @@ reagent-effect-guidebook-adjust-reagent-group = [1] к *[-1] из } раствора +reagent-effect-guidebook-accumulate-reagent-reagent = + Накапливается в кровеносной системе, пока в ней имеется вещество, добавляющее {$reagent} reagent-effect-guidebook-adjust-temperature = { $chance -> [1] From 0749d0e0073c480369ab33cfe1e7e04ea20fd099 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 18:00:33 +0700 Subject: [PATCH 06/14] Added PoorlyDigestibleFood system --- .../Body/Components/PoorlyDigestible.cs | 92 +++++++++++++++++++ .../Body/Components/StomachComponent.cs | 6 ++ .../Nutrition/EntitySystems/FoodSystem.cs | 4 + .../DeltaV/Body/Organs/vulpkanin.yml | 12 ++- .../Species/Tajaran/Body/Organs/Tajaran.yml | 12 ++- 5 files changed, 118 insertions(+), 8 deletions(-) create mode 100644 Content.Server/Body/Components/PoorlyDigestible.cs diff --git a/Content.Server/Body/Components/PoorlyDigestible.cs b/Content.Server/Body/Components/PoorlyDigestible.cs new file mode 100644 index 00000000000..e542aa8539c --- /dev/null +++ b/Content.Server/Body/Components/PoorlyDigestible.cs @@ -0,0 +1,92 @@ +using Content.Server.Nutrition.Components; +using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.Reagent; +using Content.Shared.FixedPoint; +using Content.Shared.Tag; +using Content.Shared.Whitelist; +using Robust.Shared.GameObjects; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Content.Server.Body.Components +{ + [DataDefinition] + public sealed partial class PoorlyDigestibleFood + { + /// + /// Reagents that get multiplied by the Factor field. + /// + [DataField("reducedReagents")] + public List? ReducedReagents = null; + + /// + /// Food containing at least one of these tags is affected as long as it doesn't hit any BlacklistTags. + /// + [DataField("whitelistTags", customTypeSerializer: typeof(PrototypeIdListSerializer))] + public List? WhitelistTags = null; + + /// + /// Food containing any of these tags is not affected. + /// + [DataField("blacklistTags", customTypeSerializer: typeof(PrototypeIdListSerializer))] + public List? BlacklistTags = null; + + /// + /// Factor that the reagent quantities are multiplied by. + /// + [DataField("factor")] + public FixedPoint2 Factor = 1f; + + /// + /// Reagent that is used to replace the volume taken away by the Factor multiplication. + /// + [DataField("replacementReagent")] + public string? ReplacementReagentID = null; + + public bool AffectsFood(EntityUid foodEnt, IEntityManager entityManager) + { + if (WhitelistTags is null) + return false; + + var tagSys = entityManager.System(); + + if (BlacklistTags is not null && tagSys.HasAnyTag(foodEnt, BlacklistTags)) + return false; + + return tagSys.HasAnyTag(foodEnt, WhitelistTags); + } + + public Solution ModifySolution(Solution solution) + { + // In case someone forgot to set the reagents being replaced, we do nothing. + if (ReducedReagents is null || Factor <= 0f) + return solution; + + // Recreating the list since we can't set quentities in-place. + List newReagents = new(); + FixedPoint2 removedQuantity = 0f; + foreach (var quantity in solution.Contents) + { + if (!ReducedReagents.Contains(quantity.Reagent.Prototype)) + { + newReagents.Add(quantity); + continue; + } + + removedQuantity += quantity.Quantity; + newReagents.Add(new ReagentQuantity(quantity.Reagent, quantity.Quantity * Factor)); + } + removedQuantity *= 1f - Factor; + + if (ReplacementReagentID is string reagentId) + newReagents.Add(new ReagentQuantity(new ReagentId(reagentId, null), removedQuantity)); + + solution.SetContents(newReagents); + return solution; + } + } +} diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index d541ca4d7c4..a8192534a15 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -47,6 +47,12 @@ public sealed partial class StomachComponent : Component [DataField] public EntityWhitelist? SpecialDigestible = null; + /// + /// Data responsible to describe what foods this stomach is incapable of processing efficiently. + /// + [DataField] + public PoorlyDigestibleFood? PoorlyDigestibleFood = null; + /// /// Used to track how long each reagent has been in the stomach /// diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 84355f03c16..f630a876407 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -264,6 +264,10 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg } _reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion); + + if (stomachToUse.PoorlyDigestibleFood?.AffectsFood(entity, EntityManager) == true) + split = stomachToUse.PoorlyDigestibleFood.ModifySolution(split); + _stomach.TryTransferSolution(stomachToUse.Owner, split, stomachToUse); var flavors = args.FlavorMessage; diff --git a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml index 9455c594cc7..6eb5c66134f 100644 --- a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml +++ b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml @@ -4,14 +4,18 @@ noSpawn: true components: - type: Stomach - poorlyDigestible: - tags: + poorlyDigestibleFood: + reducedReagents: + - Nutriment + - Vitamin + whitelistTags: - Fruit # LostParadise's lore states the vulpkanin race isn't really adapted to plant food - Vegetable - Bread + blacklistTags: + - Meat # Meat-based food is excluded in order not to force the carnivores to be meat-purists factor: 0.25 - vomitChance: 0.02 - replacement: reagent-indigestible-fiber + replacementReagent: IndigestibleFiber - type: SolutionContainerManager solutions: stomach: diff --git a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml index 001f14ab4a5..42dedbfc7ed 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml @@ -4,13 +4,17 @@ noSpawn: true components: - type: Stomach - poorlyDigestible: - tags: + poorlyDigestibleFood: + reducedReagents: + - Nutriment + - Vitamin + whitelistTags: - Fruit # The bread isn't included according to the LostParadise's lore - Vegetable + blacklistTags: + - Meat # Meat-based food is excluded in order not to force the carnivores to be meat-purists factor: 0.25 - vomitChance: 0.02 - replacement: reagent-indigestible-fiber + replacementReagent: IndigestibleFiber - type: SolutionContainerManager solutions: stomach: From 1b0087fd7d5405e3191842ac588586eaa09e198c Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 18:20:41 +0700 Subject: [PATCH 07/14] Removed metabolizer types previously added --- Resources/Prototypes/Chemistry/metabolizer_types.yml | 8 -------- Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml | 2 +- .../Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Resources/Prototypes/Chemistry/metabolizer_types.yml b/Resources/Prototypes/Chemistry/metabolizer_types.yml index e8f5bcc7567..316b8f02b53 100644 --- a/Resources/Prototypes/Chemistry/metabolizer_types.yml +++ b/Resources/Prototypes/Chemistry/metabolizer_types.yml @@ -41,14 +41,6 @@ id: Moth name: moth -- type: metabolizerType - id: Vulpkanin - name: vulpkanin - -- type: metabolizerType - id: Tajaran - name: tajaran - - type: metabolizerType id: Arachnid name: arachnid diff --git a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml index 6eb5c66134f..ef3f2c81cb0 100644 --- a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml +++ b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml @@ -27,7 +27,7 @@ Quantity: 5 - type: Metabolizer maxReagents: 3 - metabolizerTypes: [ Animal, Vulpkanin ] + metabolizerTypes: [ Animal ] groups: - id: Food - id: Drink diff --git a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml index 42dedbfc7ed..5451d79e311 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml @@ -26,7 +26,7 @@ Quantity: 5 - type: Metabolizer maxReagents: 3 - metabolizerTypes: [ Animal, Tajaran ] + metabolizerTypes: [ Animal ] groups: - id: Food - id: Drink From fad20a40012a1ea31a5bf6e2b2b262540c91221e Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 19:46:40 +0700 Subject: [PATCH 08/14] Added IndigestibleFiber reagent --- .../reagents/meta/consumable/food/food.ftl | 3 +++ .../reagents/meta/consumable/food/food.ftl | 2 ++ .../Reagents/Consumable/Food/food.yml | 19 ++++++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl index 5f89fea5759..2057873acee 100644 --- a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl +++ b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl @@ -18,3 +18,6 @@ reagent-desc-butter = You can believe it! reagent-name-pumpkin-flesh = pumpkin flesh reagent-desc-pumpkin-flesh = The mushy, sweet remains of a pumpkin. + +reagent-name-indigestible-fibre = indigestible dietary fibre +reagent-desc-indigestible-fibre = Residual of a digestive system poorly adapted to plant-derived food. diff --git a/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl b/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl index be724720e08..000defb8cd8 100644 --- a/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl +++ b/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl @@ -12,3 +12,5 @@ reagent-name-butter = сливочное масло reagent-desc-butter = Предположительно, сливочное! reagent-name-pumpkin-flesh = мякоть тыквы reagent-desc-pumpkin-flesh = Кашеобразные, сладкие остатки тыквы. +reagent-name-indigestible-fibre = неперивариваемые растительные волокна +reagent-desc-indigestible-fibre = Остаточные продукты пищеварительной системы, плохо приспособленной к растительной пище. diff --git a/Resources/Prototypes/Reagents/Consumable/Food/food.yml b/Resources/Prototypes/Reagents/Consumable/Food/food.yml index 03ebf7cc321..7ad7af54b8b 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/food.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/food.yml @@ -100,4 +100,21 @@ name: reagent-name-pumpkin-flesh desc: reagent-desc-pumpkin-flesh flavor: pumpkin - color: "#fc9300" \ No newline at end of file + color: "#fc9300" + +- type: reagent + id: IndigestibleFiber + name: reagent-name-indigestible-fibre + group: Foods + desc: reagent-desc-indigestible-fibre + flavor: terrible + color: "#54753d" + physicalDesc: reagent-physical-desc-pungent + metabolisms: + Drink: + effects: + - !type:ChemVomit + conditions: + - !type:ReagentThreshold + min: 4 + probability: 0.02 From 082fec068acb6dec784adb9e3dcfff97b0e66956 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 20:33:49 +0700 Subject: [PATCH 09/14] Retagged pizza to conform to the new system --- .../DeltaV/Body/Organs/vulpkanin.yml | 2 ++ .../Objects/Consumable/Food/Baked/pizza.yml | 30 ++++++++++++++++++- .../Objects/Consumable/Food/Baked/pizza.yml | 2 ++ .../Species/Tajaran/Body/Organs/Tajaran.yml | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml index ef3f2c81cb0..208c31a9fe4 100644 --- a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml +++ b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml @@ -12,6 +12,8 @@ - Fruit # LostParadise's lore states the vulpkanin race isn't really adapted to plant food - Vegetable - Bread + - Pizza # Basic pizza is also bakery + - Wheat blacklistTags: - Meat # Meat-based food is excluded in order not to force the carnivores to be meat-purists factor: 0.25 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml index bdce1d44086..121d9d9a3d6 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml @@ -78,6 +78,10 @@ - state: margherita - type: SliceableFood slice: FoodPizzaMargheritaSlice + - type: Tag + tags: + - Pizza + - Vegetable - type: entity name: slice of margherita pizza @@ -93,6 +97,10 @@ - type: Sprite layers: - state: margherita-slice + - type: Tag + tags: + - Pizza + - Vegetable - type: entity name: meat pizza @@ -200,7 +208,11 @@ Quantity: 5 - ReagentId: Vitamin Quantity: 5 - + - type: Tag + tags: + - Pizza + - Vegetable + - type: entity name: slice of vegetable pizza parent: FoodPizzaSliceBase @@ -230,6 +242,10 @@ Quantity: 1 - ReagentId: Vitamin Quantity: 1 + - type: Tag + tags: + - Pizza + - Vegetable # Tastes like crust, tomato, cheese, carrot. @@ -321,6 +337,10 @@ Quantity: 5 - ReagentId: DoctorsDelight Quantity: 6 + - type: Tag + tags: + - Pizza + - Vegetable - type: entity name: slice of dank pizza @@ -348,6 +368,10 @@ Quantity: 0.8 - ReagentId: DoctorsDelight Quantity: 1 + - type: Tag + tags: + - Pizza + - Vegetable # Tastes like crust, tomato, cheese, meat, satisfaction. - type: entity @@ -411,6 +435,10 @@ - state: pineapple - type: SliceableFood slice: FoodPizzaPineappleSlice + - type: Tag + tags: + - Meat + - Pizza - type: entity name: slice of pineapple pizza diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/Baked/pizza.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/Baked/pizza.yml index 8c96635b06b..fe7292a7dfd 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/Baked/pizza.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/Baked/pizza.yml @@ -24,6 +24,7 @@ - type: Tag tags: - Pizza + - Vegetable # Yes, I am aware that corn is technically a fruit, but the tagging system is enough of a mess as it is - type: entity name: slice of corncob crust pizza @@ -49,6 +50,7 @@ - type: Tag tags: - Pizza + - Vegetable - type: entity name: firecracker pizza diff --git a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml index 5451d79e311..eb6d7e8ad59 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml @@ -9,7 +9,7 @@ - Nutriment - Vitamin whitelistTags: - - Fruit # The bread isn't included according to the LostParadise's lore + - Fruit # Bread/Pizza tags aren't included according to the LostParadise's lore - Vegetable blacklistTags: - Meat # Meat-based food is excluded in order not to force the carnivores to be meat-purists From dc2bb724de1a6f724196745d62cf478d440b7d12 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 20:51:12 +0700 Subject: [PATCH 10/14] Added Meat tag for the dumplings --- .../Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml index b1bbdfb5305..3a6cd2d7a3b 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml @@ -456,6 +456,9 @@ Quantity: 8 - ReagentId: Protein Quantity: 2 + - type: Tag + tags: + - Meat - type: entity name: chèvre chaud From 2ff2fa5965b8389b2bf8de76b24fe6493712ebd4 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 22:06:51 +0700 Subject: [PATCH 11/14] Fixed formatting to match LPP --- .../Body/Components/StomachComponent.cs | 5 +++-- .../Nutrition/EntitySystems/FoodSystem.cs | 5 +++-- .../DietaryRework}/AccumulateReagent.cs | 0 .../DietaryRework}/PoorlyDigestible.cs | 0 .../_LostParadise/prototypes/reagents/food.ftl | 2 ++ .../reagents/meta/consumable/food/food.ftl | 3 --- .../_LostParadise/prototypes/reagents/food.ftl | 2 ++ .../reagents/meta/consumable/food/food.ftl | 2 -- .../Prototypes/DeltaV/Body/Organs/vulpkanin.yml | 2 +- .../Reagents/Consumable/Food/food.yml | 17 ----------------- .../Species/Tajaran/Body/Organs/Tajaran.yml | 2 +- .../Prototypes/_LostParadise/Reagents/food.yml | 16 ++++++++++++++++ 12 files changed, 28 insertions(+), 28 deletions(-) rename Content.Server/{Chemistry/ReagentEffects => _LostParadise/DietaryRework}/AccumulateReagent.cs (100%) rename Content.Server/{Body/Components => _LostParadise/DietaryRework}/PoorlyDigestible.cs (100%) create mode 100644 Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl create mode 100644 Resources/Locale/ru-RU/_LostParadise/prototypes/reagents/food.ftl create mode 100644 Resources/Prototypes/_LostParadise/Reagents/food.yml diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index a8192534a15..cedf56f729e 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -48,10 +48,11 @@ public sealed partial class StomachComponent : Component public EntityWhitelist? SpecialDigestible = null; /// + /// Добавлено LostParadise. /// Data responsible to describe what foods this stomach is incapable of processing efficiently. /// - [DataField] - public PoorlyDigestibleFood? PoorlyDigestibleFood = null; + [DataField("poorlyDigestibleFood")] + public PoorlyDigestibleFood? LPP_PoorlyDigestibleFood = null; /// /// Used to track how long each reagent has been in the stomach diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index f630a876407..63097dbfbd0 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -265,8 +265,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion); - if (stomachToUse.PoorlyDigestibleFood?.AffectsFood(entity, EntityManager) == true) - split = stomachToUse.PoorlyDigestibleFood.ModifySolution(split); + // Добавлено LostParadise. + if (stomachToUse.LPP_PoorlyDigestibleFood?.AffectsFood(entity, EntityManager) == true) + split = stomachToUse.LPP_PoorlyDigestibleFood.ModifySolution(split); _stomach.TryTransferSolution(stomachToUse.Owner, split, stomachToUse); diff --git a/Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs b/Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs similarity index 100% rename from Content.Server/Chemistry/ReagentEffects/AccumulateReagent.cs rename to Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs diff --git a/Content.Server/Body/Components/PoorlyDigestible.cs b/Content.Server/_LostParadise/DietaryRework/PoorlyDigestible.cs similarity index 100% rename from Content.Server/Body/Components/PoorlyDigestible.cs rename to Content.Server/_LostParadise/DietaryRework/PoorlyDigestible.cs diff --git a/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl b/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl new file mode 100644 index 00000000000..ed2b8d37f77 --- /dev/null +++ b/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl @@ -0,0 +1,2 @@ +reagent-name-indigestible-fibre = indigestible dietary fibre +reagent-desc-indigestible-fibre = Residual of a digestive system poorly adapted to plant-derived food. diff --git a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl index 2057873acee..5f89fea5759 100644 --- a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl +++ b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl @@ -18,6 +18,3 @@ reagent-desc-butter = You can believe it! reagent-name-pumpkin-flesh = pumpkin flesh reagent-desc-pumpkin-flesh = The mushy, sweet remains of a pumpkin. - -reagent-name-indigestible-fibre = indigestible dietary fibre -reagent-desc-indigestible-fibre = Residual of a digestive system poorly adapted to plant-derived food. diff --git a/Resources/Locale/ru-RU/_LostParadise/prototypes/reagents/food.ftl b/Resources/Locale/ru-RU/_LostParadise/prototypes/reagents/food.ftl new file mode 100644 index 00000000000..b74829b8d92 --- /dev/null +++ b/Resources/Locale/ru-RU/_LostParadise/prototypes/reagents/food.ftl @@ -0,0 +1,2 @@ +reagent-name-indigestible-fibre = неперевариваемые растительные волокна +reagent-desc-indigestible-fibre = Остаточные продукты пищеварительной системы, плохо приспособленной к растительной пище. diff --git a/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl b/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl index 000defb8cd8..be724720e08 100644 --- a/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl +++ b/Resources/Locale/ru-RU/reagents/meta/consumable/food/food.ftl @@ -12,5 +12,3 @@ reagent-name-butter = сливочное масло reagent-desc-butter = Предположительно, сливочное! reagent-name-pumpkin-flesh = мякоть тыквы reagent-desc-pumpkin-flesh = Кашеобразные, сладкие остатки тыквы. -reagent-name-indigestible-fibre = неперивариваемые растительные волокна -reagent-desc-indigestible-fibre = Остаточные продукты пищеварительной системы, плохо приспособленной к растительной пище. diff --git a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml index 208c31a9fe4..ea43b8a3cde 100644 --- a/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml +++ b/Resources/Prototypes/DeltaV/Body/Organs/vulpkanin.yml @@ -17,7 +17,7 @@ blacklistTags: - Meat # Meat-based food is excluded in order not to force the carnivores to be meat-purists factor: 0.25 - replacementReagent: IndigestibleFiber + replacementReagent: LPPIndigestibleFiber - type: SolutionContainerManager solutions: stomach: diff --git a/Resources/Prototypes/Reagents/Consumable/Food/food.yml b/Resources/Prototypes/Reagents/Consumable/Food/food.yml index 7ad7af54b8b..12603efb82d 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/food.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/food.yml @@ -101,20 +101,3 @@ desc: reagent-desc-pumpkin-flesh flavor: pumpkin color: "#fc9300" - -- type: reagent - id: IndigestibleFiber - name: reagent-name-indigestible-fibre - group: Foods - desc: reagent-desc-indigestible-fibre - flavor: terrible - color: "#54753d" - physicalDesc: reagent-physical-desc-pungent - metabolisms: - Drink: - effects: - - !type:ChemVomit - conditions: - - !type:ReagentThreshold - min: 4 - probability: 0.02 diff --git a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml index eb6d7e8ad59..5d633e940b9 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Mobs/Species/Tajaran/Body/Organs/Tajaran.yml @@ -14,7 +14,7 @@ blacklistTags: - Meat # Meat-based food is excluded in order not to force the carnivores to be meat-purists factor: 0.25 - replacementReagent: IndigestibleFiber + replacementReagent: LPPIndigestibleFiber - type: SolutionContainerManager solutions: stomach: diff --git a/Resources/Prototypes/_LostParadise/Reagents/food.yml b/Resources/Prototypes/_LostParadise/Reagents/food.yml new file mode 100644 index 00000000000..e55fa8260c1 --- /dev/null +++ b/Resources/Prototypes/_LostParadise/Reagents/food.yml @@ -0,0 +1,16 @@ +- type: reagent + id: LPPIndigestibleFiber + name: reagent-name-indigestible-fibre + group: Foods + desc: reagent-desc-indigestible-fibre + flavor: terrible + color: "#54753d" + physicalDesc: reagent-physical-desc-pungent + metabolisms: + Drink: + effects: + - !type:ChemVomit + conditions: + - !type:ReagentThreshold + min: 5 + probability: 0.02 From e3b19336ce36697481e350e0b3b37ed1c8a32dee Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 22:11:38 +0700 Subject: [PATCH 12/14] Fixed minor typos --- .../{DietaryRework => CarnivoresDiet}/AccumulateReagent.cs | 1 - .../{DietaryRework => CarnivoresDiet}/PoorlyDigestible.cs | 0 .../Locale/en-US/_LostParadise/prototypes/reagents/food.ftl | 2 +- 3 files changed, 1 insertion(+), 2 deletions(-) rename Content.Server/_LostParadise/{DietaryRework => CarnivoresDiet}/AccumulateReagent.cs (97%) rename Content.Server/_LostParadise/{DietaryRework => CarnivoresDiet}/PoorlyDigestible.cs (100%) diff --git a/Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs b/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs similarity index 97% rename from Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs rename to Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs index bb61133e233..c3ec5183c10 100644 --- a/Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs +++ b/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs @@ -108,7 +108,6 @@ public override void Effect(ReagentEffectArgs args) protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) { - // Could use a different translation string as well, but this one is close enough to ignore it for now if (Reagent != null && prototype.TryIndex(Reagent, out ReagentPrototype? reagentProto)) { return Loc.GetString("reagent-effect-guidebook-accumulate-reagent-reagent", diff --git a/Content.Server/_LostParadise/DietaryRework/PoorlyDigestible.cs b/Content.Server/_LostParadise/CarnivoresDiet/PoorlyDigestible.cs similarity index 100% rename from Content.Server/_LostParadise/DietaryRework/PoorlyDigestible.cs rename to Content.Server/_LostParadise/CarnivoresDiet/PoorlyDigestible.cs diff --git a/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl b/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl index ed2b8d37f77..3bc8e16ea1c 100644 --- a/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl +++ b/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl @@ -1,2 +1,2 @@ reagent-name-indigestible-fibre = indigestible dietary fibre -reagent-desc-indigestible-fibre = Residual of a digestive system poorly adapted to plant-derived food. +reagent-desc-indigestible-fibre = Residues of a digestive system poorly adapted to plant-derived food. From 58dcebbb3538b364e445b15638f90fc6a852da56 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 22:11:38 +0700 Subject: [PATCH 13/14] Fixed minor typos --- .../{DietaryRework => CarnivoresDiet}/AccumulateReagent.cs | 1 - .../{DietaryRework => CarnivoresDiet}/PoorlyDigestible.cs | 0 Resources/Locale/en-US/_LostParadise/Guidebook/effects.ftl | 2 ++ .../Locale/en-US/_LostParadise/prototypes/reagents/food.ftl | 2 +- Resources/Locale/en-US/guidebook/chemistry/effects.ftl | 3 --- Resources/Locale/ru-RU/_LostParadise/Guidebook/effects.ftl | 2 ++ Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl | 2 -- 7 files changed, 5 insertions(+), 7 deletions(-) rename Content.Server/_LostParadise/{DietaryRework => CarnivoresDiet}/AccumulateReagent.cs (97%) rename Content.Server/_LostParadise/{DietaryRework => CarnivoresDiet}/PoorlyDigestible.cs (100%) create mode 100644 Resources/Locale/en-US/_LostParadise/Guidebook/effects.ftl create mode 100644 Resources/Locale/ru-RU/_LostParadise/Guidebook/effects.ftl diff --git a/Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs b/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs similarity index 97% rename from Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs rename to Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs index bb61133e233..c3ec5183c10 100644 --- a/Content.Server/_LostParadise/DietaryRework/AccumulateReagent.cs +++ b/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs @@ -108,7 +108,6 @@ public override void Effect(ReagentEffectArgs args) protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) { - // Could use a different translation string as well, but this one is close enough to ignore it for now if (Reagent != null && prototype.TryIndex(Reagent, out ReagentPrototype? reagentProto)) { return Loc.GetString("reagent-effect-guidebook-accumulate-reagent-reagent", diff --git a/Content.Server/_LostParadise/DietaryRework/PoorlyDigestible.cs b/Content.Server/_LostParadise/CarnivoresDiet/PoorlyDigestible.cs similarity index 100% rename from Content.Server/_LostParadise/DietaryRework/PoorlyDigestible.cs rename to Content.Server/_LostParadise/CarnivoresDiet/PoorlyDigestible.cs diff --git a/Resources/Locale/en-US/_LostParadise/Guidebook/effects.ftl b/Resources/Locale/en-US/_LostParadise/Guidebook/effects.ftl new file mode 100644 index 00000000000..d84a9de7d25 --- /dev/null +++ b/Resources/Locale/en-US/_LostParadise/Guidebook/effects.ftl @@ -0,0 +1,2 @@ +reagent-effect-guidebook-accumulate-reagent-reagent = + Accumulates as long as there's a {$reagent} source present in the bloodstream \ No newline at end of file diff --git a/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl b/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl index ed2b8d37f77..3bc8e16ea1c 100644 --- a/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl +++ b/Resources/Locale/en-US/_LostParadise/prototypes/reagents/food.ftl @@ -1,2 +1,2 @@ reagent-name-indigestible-fibre = indigestible dietary fibre -reagent-desc-indigestible-fibre = Residual of a digestive system poorly adapted to plant-derived food. +reagent-desc-indigestible-fibre = Residues of a digestive system poorly adapted to plant-derived food. diff --git a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl index 9006d290a31..dbb24a3cafd 100644 --- a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl @@ -157,9 +157,6 @@ reagent-effect-guidebook-adjust-reagent-group = *[-1] from } the solution -reagent-effect-guidebook-accumulate-reagent-reagent = - Accumulates as long as there's a {$reagent} source present in the bloodstream - reagent-effect-guidebook-adjust-temperature = { $chance -> [1] { $deltasign -> diff --git a/Resources/Locale/ru-RU/_LostParadise/Guidebook/effects.ftl b/Resources/Locale/ru-RU/_LostParadise/Guidebook/effects.ftl new file mode 100644 index 00000000000..99d4826411b --- /dev/null +++ b/Resources/Locale/ru-RU/_LostParadise/Guidebook/effects.ftl @@ -0,0 +1,2 @@ +reagent-effect-guidebook-accumulate-reagent-reagent = + Накапливается в кровеносной системе, пока в ней имеется вещество, добавляющее {$reagent} \ No newline at end of file diff --git a/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl b/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl index deb923fc2da..1539f5d7b0a 100644 --- a/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/ru-RU/guidebook/chemistry/effects.ftl @@ -143,8 +143,6 @@ reagent-effect-guidebook-adjust-reagent-group = [1] к *[-1] из } раствора -reagent-effect-guidebook-accumulate-reagent-reagent = - Накапливается в кровеносной системе, пока в ней имеется вещество, добавляющее {$reagent} reagent-effect-guidebook-adjust-temperature = { $chance -> [1] From a75b6c51ac676d5ad8a1ae193d570b2855274ef7 Mon Sep 17 00:00:00 2001 From: NeLepus Date: Sun, 13 Oct 2024 23:01:45 +0700 Subject: [PATCH 14/14] Fixed extra import packaging error --- .../_LostParadise/CarnivoresDiet/AccumulateReagent.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs b/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs index c3ec5183c10..95bd6c65bc4 100644 --- a/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs +++ b/Content.Server/_LostParadise/CarnivoresDiet/AccumulateReagent.cs @@ -1,18 +1,10 @@ -using Content.Server.Atmos.Components; using Content.Server.Body.Components; -using Content.Shared.Body.Organ; -using Content.Shared.Body.Prototypes; using Content.Shared.Chemistry.Components; -using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; using JetBrains.Annotations; -using JetBrains.FormatRipper.Elf; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Utility; -using SixLabors.ImageSharp.Formats; -using System.Linq; namespace Content.Server.Chemistry.ReagentEffects {