From 3ced7d03371c4b64b1a2e9a07e95efa34bbdc183 Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Thu, 28 Mar 2024 00:07:19 +0300 Subject: [PATCH 01/34] draft --- Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt diff --git a/Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt b/Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt new file mode 100644 index 00000000000..e69de29bb2d From a147065dd1f4bacda217d530ad09de59ee110dac Mon Sep 17 00:00:00 2001 From: Dvir Date: Wed, 27 Mar 2024 23:23:19 +0200 Subject: [PATCH 02/34] Food System --- .../Body/Components/StomachComponent.cs | 14 +- .../Nutrition/Components/FoodComponent.cs | 35 ++++ .../Nutrition/EntitySystems/FoodSystem.cs | 156 ++++++++++++++++++ .../en-US/_NF/flavors/flavor-profiles.ftl | 1 + Resources/Locale/en-US/_NF/reagents/foods.ftl | 5 +- .../en-US/_NF/reagents/physical-desc.ftl | 1 + 6 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 Resources/Locale/en-US/_NF/flavors/flavor-profiles.ftl create mode 100644 Resources/Locale/en-US/_NF/reagents/physical-desc.ftl diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index fe93468f74e..821f4e7afaf 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -1,4 +1,4 @@ -using Content.Server.Body.Systems; +using Content.Server.Body.Systems; using Content.Server.Nutrition.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; @@ -64,5 +64,17 @@ public ReagentDelta(ReagentQuantity reagentQuantity) public void Increment(float delta) => Lifetime += delta; } + + /// + /// Frontier - Used by goblin for fliping the food quility effects + /// + [DataField] + public bool ReverseFoodQuality; + + /// + /// Frontier - Allow eating trash + /// + [DataField] + public bool TrashDigestion; } } diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index 5ead67a12b2..25e4f3a0c95 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -7,6 +7,30 @@ namespace Content.Server.Nutrition.Components; +public enum Quality : byte // Frontier +{ + High, + Normal, + Junk, + Nasty, + Toxin, + Trash, + MailOpened, + MailClosed +} + +public enum FinalQuality : byte // Frontier +{ + High, + Normal, + Junk, + Nasty, + Toxin, + Trash, + MailOpened, + MailClosed +} + [RegisterComponent, Access(typeof(FoodSystem))] public sealed partial class FoodComponent : Component { @@ -74,4 +98,15 @@ public sealed partial class FoodComponent : Component /// [DataField, ViewVariables(VVAccess.ReadWrite)] public bool RequireDead = true; + + /// + /// Frontier - Nasty food, used for goblins to know if they can eat it or not + /// + [ViewVariables(VVAccess.ReadWrite), DataField] // Frontier + public Quality Quality = Quality.Normal; + + /// + /// Frontier - Edited by the system to find the final quility results + /// + public FinalQuality FinalQuality = FinalQuality.Normal; } diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 2b627151339..ced6e5c0656 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -30,6 +30,12 @@ using Robust.Shared.Audio.Systems; using Robust.Shared.Utility; using System.Linq; +using Content.Server.Medical; // Frontier +using Content.Shared.Speech.EntitySystems; // Frontier +using Robust.Shared.Random; // Frontier +using Content.Shared.Jittering; // Frontier +using Content.Server.Chat.Systems; // Frontier +using Content.Shared.Tag; // Frontier namespace Content.Server.Nutrition.EntitySystems; @@ -54,6 +60,12 @@ public sealed class FoodSystem : EntitySystem [Dependency] private readonly StackSystem _stack = default!; [Dependency] private readonly StomachSystem _stomach = default!; [Dependency] private readonly UtensilSystem _utensil = default!; + [Dependency] private readonly VomitSystem _vomit = default!; // Frontier + [Dependency] private readonly SharedStutteringSystem _stuttering = default!; // Frontier + [Dependency] protected readonly IRobustRandom RobustRandom = default!; // Frontier + [Dependency] private readonly SharedJitteringSystem _jittering = default!; // Frontier + [Dependency] private readonly ChatSystem _chat = default!; // Frontier + [Dependency] private readonly TagSystem _tag = default!; // Frontier public const float MaxFeedDistance = 1.0f; @@ -230,6 +242,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg // Get the stomach with the highest available solution volume var highestAvailable = FixedPoint2.Zero; StomachComponent? stomachToUse = null; + var reverseFoodQuality = false; // Frontier foreach (var (stomach, _) in stomachs) { var owner = stomach.Owner; @@ -244,6 +257,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg stomachToUse = stomach; highestAvailable = stomachSol.AvailableVolume; + reverseFoodQuality = stomachToUse.ReverseFoodQuality; // Frontier } // No stomach so just popup a message that they can't eat. @@ -257,6 +271,143 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion); _stomach.TryTransferSolution(stomachToUse.Owner, split, stomachToUse); + /// Frontier - Goblin food system + if (entity.Comp.Quality == Quality.High) + entity.Comp.FinalQuality = FinalQuality.High; + else if (entity.Comp.Quality == Quality.Normal) + entity.Comp.FinalQuality = FinalQuality.Normal; + else if (entity.Comp.Quality == Quality.Junk) + entity.Comp.FinalQuality = FinalQuality.Junk; + else if (entity.Comp.Quality == Quality.Nasty) + entity.Comp.FinalQuality = FinalQuality.Nasty; + else if (entity.Comp.Quality == Quality.Toxin) + entity.Comp.FinalQuality = FinalQuality.Toxin; + else if (entity.Comp.Quality == Quality.Trash) + entity.Comp.FinalQuality = FinalQuality.Trash; + + if (reverseFoodQuality) + { + if (entity.Comp.Quality == Quality.High) + entity.Comp.FinalQuality = FinalQuality.Toxin; + else if (entity.Comp.Quality == Quality.Normal) + entity.Comp.FinalQuality = FinalQuality.Nasty; + else if (entity.Comp.Quality == Quality.Nasty) + entity.Comp.FinalQuality = FinalQuality.Normal; + else if (entity.Comp.Quality == Quality.Toxin) + entity.Comp.FinalQuality = FinalQuality.High; + } + + // TODO: Add detection for fried food on nasty to update it to toxin for goblins. + // TODO: Add inspect food but only for goblin eyes to see, goblins can tell food quality. + + string[] toxinsRegent = { "Toxin", "CarpoToxin", "Mold", "Amatoxin", "SulfuricAcid" }; + var speedRegent = "Stimulants"; + var damagingRegent = "Toxin"; + var emoteId = "Laugh"; + + TryComp(args.Target.Value, out var bloodStream); + + switch (entity.Comp.FinalQuality) + { + case FinalQuality.High: + if (reverseFoodQuality) + { + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + { + foreach (var reagent in toxinsRegent) + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + } + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 3), out _); // Add to blood + } + else + { + + } + break; + case FinalQuality.Normal: + if (reverseFoodQuality) + { + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + { + foreach (var reagent in toxinsRegent) + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + } + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 5), out _); // Add to blood + } + else + { + + } + break; + case FinalQuality.Junk: + if (reverseFoodQuality) + { + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + { + foreach (var reagent in toxinsRegent) + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + } + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 7), out _); // Add to blood + } + else + { + + } + break; + case FinalQuality.Nasty: + if (reverseFoodQuality) + { + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, damagingRegent, FixedPoint2.New((int) transferAmount / 5), out _); // Add to blood + _stuttering.DoStutter(args.Target.Value, TimeSpan.FromSeconds(5), false); // Gives stuttering + _jittering.DoJitter(args.Target.Value, TimeSpan.FromSeconds(5), true, 40f, 4f, true, null); + } + else + { + + } + break; + case FinalQuality.Toxin: + if (reverseFoodQuality) + { + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, damagingRegent, FixedPoint2.New((int) transferAmount / 3), out _); // Add to blood + _stuttering.DoStutter(args.Target.Value, TimeSpan.FromSeconds(5), false); // Gives stuttering + _jittering.DoJitter(args.Target.Value, TimeSpan.FromSeconds(5), true, 80f, 8f, true, null); + _chat.TryEmoteWithoutChat(args.Target.Value, emoteId); + + if (RobustRandom.Prob(.05f)) // 5% to puke + _vomit.Vomit(args.Target.Value); + } + else + { + + } + break; + case FinalQuality.Trash: + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + { + foreach (var reagent in toxinsRegent) + _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + } + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount), out _); // Add to blood + break; + default: + throw new ArgumentOutOfRangeException($"No implemented mask radio behavior for {entity.Comp.Quality}!"); + } /// Frontier + var flavors = args.FlavorMessage; if (forceFeed) @@ -402,6 +553,11 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List<(Stoma // Run through the mobs' stomachs foreach (var (comp, _) in stomachs) { + // Frontier - Allow trash eating + if (!comp.TrashDigestion && component.Quality == Quality.Trash) + return false; + // Frontier - Allow trash eating + // Find a stomach with a SpecialDigestible if (comp.SpecialDigestible == null) continue; diff --git a/Resources/Locale/en-US/_NF/flavors/flavor-profiles.ftl b/Resources/Locale/en-US/_NF/flavors/flavor-profiles.ftl new file mode 100644 index 00000000000..24494b508e3 --- /dev/null +++ b/Resources/Locale/en-US/_NF/flavors/flavor-profiles.ftl @@ -0,0 +1 @@ +flavor-base-trashjuice = trashy diff --git a/Resources/Locale/en-US/_NF/reagents/foods.ftl b/Resources/Locale/en-US/_NF/reagents/foods.ftl index c4e85782ce8..bd9ed7bcfc9 100644 --- a/Resources/Locale/en-US/_NF/reagents/foods.ftl +++ b/Resources/Locale/en-US/_NF/reagents/foods.ftl @@ -1 +1,4 @@ -reagent-name-flaverol = Flaverol \ No newline at end of file +reagent-name-flaverol = Flaverol + +reagent-name-trashjuice = trash juices +reagent-desc-trashjuice = Do you really want to know what it is? diff --git a/Resources/Locale/en-US/_NF/reagents/physical-desc.ftl b/Resources/Locale/en-US/_NF/reagents/physical-desc.ftl new file mode 100644 index 00000000000..24bb74a5ea4 --- /dev/null +++ b/Resources/Locale/en-US/_NF/reagents/physical-desc.ftl @@ -0,0 +1 @@ +reagent-physical-desc-trashjuice = ... Wait.. Did it just move? From 199e72bf8e47b7f8e10582c5bcaa9dd1f319d904 Mon Sep 17 00:00:00 2001 From: Dvir Date: Wed, 27 Mar 2024 23:25:18 +0200 Subject: [PATCH 03/34] Create fun.yml --- Resources/Prototypes/_NF/Reagents/fun.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Resources/Prototypes/_NF/Reagents/fun.yml diff --git a/Resources/Prototypes/_NF/Reagents/fun.yml b/Resources/Prototypes/_NF/Reagents/fun.yml new file mode 100644 index 00000000000..2aa9b87f761 --- /dev/null +++ b/Resources/Prototypes/_NF/Reagents/fun.yml @@ -0,0 +1,15 @@ +- type: reagent + id: TrashJuice + name: reagent-name-trashjuice + desc: reagent-desc-trashjuice + physicalDesc: reagent-physical-desc-trashjuice + flavor: sharp + color: "#767C00" +# metabolisms: +# Food: +# effects: +# - !type:SatiateHunger +# factor: 0 +# conditions: +# - !type:OrganType +# type: Goblin From d9862dbc1235adab9e884f29d2ff50ec79f3f117 Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Thu, 28 Mar 2024 00:31:15 +0300 Subject: [PATCH 04/34] food stuffs --- .../Objects/Consumable/Food/Baked/bread.yml | 5 +++- .../Objects/Consumable/Food/Baked/donut.yml | 2 ++ .../Objects/Consumable/Food/Baked/pie.yml | 6 +++++ .../Objects/Consumable/Food/Baked/pizza.yml | 2 ++ .../Objects/Consumable/Food/burger.yml | 27 +++++++++++++++++++ .../Objects/Consumable/Food/ingredients.yml | 2 ++ .../Objects/Consumable/Food/meals.yml | 5 ++++ .../Entities/Objects/Consumable/Food/meat.yml | 12 +++++++++ .../Objects/Consumable/Food/produce.yml | 2 ++ .../Objects/Consumable/Food/skewer.yml | 4 +++ .../Objects/Consumable/Food/snacks.yml | 14 ++++++++++ .../Entities/Objects/Consumable/Food/soup.yml | 2 ++ Resources/Prototypes/Reagents/toxins.yml | 9 +++++++ 13 files changed, 91 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml index 452f66c316a..9ba21939ab0 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml @@ -453,6 +453,7 @@ - cobwebs - bread - type: Food + quality: Toxin # Frontier, New Food Quality System - type: Sprite layers: - state: spidermeat @@ -475,7 +476,6 @@ tags: - Meat - Bread -# Tastes like bread, cobwebs. - type: entity name: spider meat bread slice @@ -488,6 +488,7 @@ - cobwebs - bread - type: Food + quality: Toxin # Frontier, New Food Quality System - type: Sprite layers: - state: spidermeat-slice @@ -800,6 +801,8 @@ Quantity: 4 - ReagentId: Mold Quantity: 7 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System # Tastes like decaying fungus. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml index e174f397347..de87dddf76a 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml @@ -467,3 +467,5 @@ reagents: - ReagentId: Amatoxin Quantity: 10 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml index be96ee357bc..e7b814aa120 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml @@ -31,6 +31,8 @@ - type: Tag tags: - Pie + - type: Food # Frontier, New Food Quality System + quality: High # Frontier, New Food Quality System - type: entity parent: FoodInjectableBase # Not sliceable @@ -56,6 +58,8 @@ Quantity: 1 - ReagentId: Flavorol Quantity: 1.5 + - type: Food # Frontier, New Food Quality System + quality: High # Frontier, New Food Quality System # Pie @@ -434,6 +438,8 @@ Quantity: 4 - ReagentId: Flavorol Quantity: 6 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System # Tastes like pie, mushrooms. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml index 2d5ae0e2823..e225debe943 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml @@ -11,6 +11,7 @@ - oily - bread - type: Food + quality: High # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/Baked/pizza.rsi - type: SolutionContainerManager @@ -43,6 +44,7 @@ - oily - bread - type: Food + quality: Toxin # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/Baked/pizza.rsi - type: SolutionContainerManager diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml index 9d87fce4352..d17d1d7215d 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml @@ -32,6 +32,7 @@ - bun - meaty - type: Food + quality: High # Frontier, New Food Quality System transferAmount: 5 - type: Sprite sprite: Objects/Consumable/Food/burger.rsi @@ -96,6 +97,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System # Tastes like bun, grass. - type: entity @@ -124,6 +127,8 @@ - type: Tag tags: - Meat + - type: Food + quality: Normal # Frontier, New Food Quality System # Tastes like bun, bacon. - type: entity @@ -154,6 +159,8 @@ - type: Tag tags: - Meat + - type: Food + quality: Normal # Frontier, New Food Quality System - type: entity name: bearger @@ -183,6 +190,8 @@ - type: Tag tags: - Meat + - type: Food + quality: Normal # Frontier, New Food Quality System - type: entity name: big bite burger @@ -300,6 +309,8 @@ - type: Tag tags: - Meat + - type: Food + quality: Normal # Frontier, New Food Quality System # TODO: Make this work. # - type: Sprite # state: plate @@ -370,6 +381,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System - type: entity name: corger #not curger @@ -455,6 +468,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System - type: entity name: duck sandwich # Burger for you sick bastards @@ -526,6 +541,8 @@ - type: Tag tags: - Meat + - type: Food + quality: Normal # Frontier, New Food Quality System # Tastes like bun, fish. - type: entity @@ -614,6 +631,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System - type: entity name: McGuffin @@ -705,6 +724,8 @@ Quantity: 1 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System # Tastes like . - type: entity @@ -735,6 +756,8 @@ - type: Tag tags: - Meat + - type: Food + quality: Normal # Frontier, New Food Quality System - type: entity name: rat burger @@ -764,6 +787,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System # Tastes like bun, HEAT. - type: entity @@ -936,6 +961,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System # Tastes like bun, acid. # Note: I would put a bunch of colored burgers here as listed in the tg .dm but diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml index 1df6615a9fb..aa38b2d81f7 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml @@ -619,6 +619,8 @@ - type: Tag tags: - Trash + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: entity name: cocoa beans diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml index 1ec52c28893..58e48364afb 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml @@ -13,6 +13,7 @@ - type: Item storedRotation: -90 - type: Food + quality: High # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/meals.rsi - type: SolutionContainerManager @@ -252,6 +253,8 @@ tags: - CubanCarp - Meat + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System # Tastes like fish, batter, hot peppers. - type: entity @@ -547,6 +550,8 @@ - type: Tag tags: - Meat + - type: Food # Frontier, New Food Quality System + quality: Nasty # Frontier, New Food Quality System # tastes exotic - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml index 167a0288e3f..a7f091a0c72 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml @@ -67,6 +67,8 @@ entity: FoodMeatRotten # once it would say bloated, turn into the rotten prototype stage: 1 + - type: Food + quality: Nasty # Frontier, New Food Quality System # bruh - type: Tag @@ -154,6 +156,8 @@ reagents: - ReagentId: CarpoToxin Quantity: 5 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: entity name: raw bacon @@ -455,6 +459,8 @@ Quantity: 4 - ReagentId: Fat Quantity: 4 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: entity name: raw spider meat @@ -554,6 +560,8 @@ - type: SliceableFood count: 3 slice: FoodMeatXenoCutlet + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: entity name: raw rouny meat @@ -1247,6 +1255,8 @@ reagents: - ReagentId: SulfuricAcid Quantity: 20 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: entity name: raw killer tomato cutlet @@ -1469,3 +1479,5 @@ Quantity: 1 - ReagentId: Protein Quantity: 1 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index bf9717bd56c..0349ff08f92 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -1392,6 +1392,8 @@ - type: Extractable grindableSolutionName: food - type: BadFood + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: entity name: gatfruit diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml index 29f865e6362..2e6dd248cf6 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml @@ -128,6 +128,8 @@ Quantity: 2 - ReagentId: Flavorol Quantity: 5 + - type: Food + quality: Nasty # Frontier, New Food Quality System - type: entity name: double rat kebab @@ -150,6 +152,8 @@ Quantity: 6 - ReagentId: Flavorol Quantity: 10 + - type: Food + quality: Nasty # Frontier, New Food Quality System - type: entity name: fiesta kebab diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index 20c3003f2df..b119a611298 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -7,6 +7,7 @@ abstract: true components: - type: Food + quality: Junk # Frontier, New Food Quality System - type: Tag tags: - FoodSnack @@ -478,6 +479,19 @@ - type: SpaceGarbage - type: StaticPrice price: 1 + - type: FlavorProfile # Frontier, Goblins + flavors: # Frontier, Goblins + - funny # Frontier, Goblins + - type: Food # Frontier, Goblins + quality: Trash # Frontier, New Food Quality System +# requiresSpecialDigestion: true # Frontier, Goblins + - type: SolutionContainerManager # Frontier + solutions: # Frontier + food: # Frontier + maxVol: 1 # Frontier + reagents: # Frontier + - ReagentId: TrashJuice # Frontier + Quantity: 1 # Frontier - type: entity noSpawn: true diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml index 8ad8343f5cc..564580efbd5 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml @@ -603,6 +603,8 @@ Quantity: 6 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System # Soup - type: entity diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 18d47932740..f7d312cd098 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -111,6 +111,9 @@ Poison: effects: - !type:HealthChange + conditions: + - !type:OrganType + type: Human damage: types: Poison: 1 @@ -502,6 +505,12 @@ shouldHave: false reagent: Protein amount: 0.5 + - !type:AdjustReagent # Frontier: Goblin + conditions: # Frontier: Goblin + - !type:OrganType # Frontier: Goblin + type: Goblin # Frontier: Goblin + reagent: Protein # Frontier: Goblin + amount: 0.5 # Frontier: Goblin - type: reagent id: Allicin From 2fca6436deda2b1abb51e3a9f299aee4dff1416b Mon Sep 17 00:00:00 2001 From: ErhardSteinhauer <65374927+ErhardSteinhauer@users.noreply.github.com> Date: Thu, 28 Mar 2024 00:32:26 +0300 Subject: [PATCH 05/34] there_do_be_goblins.txt --- Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt diff --git a/Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt b/Resources/Prototypes/_NF/Entities/Mobs/there_do_be_goblins.txt deleted file mode 100644 index e69de29bb2d..00000000000 From 142b1a3106b573398dfbf125a60c9439c81f727d Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Thu, 28 Mar 2024 00:34:37 +0300 Subject: [PATCH 06/34] revert changes to toxins.yml --- Resources/Prototypes/Reagents/toxins.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index f7d312cd098..18d47932740 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -111,9 +111,6 @@ Poison: effects: - !type:HealthChange - conditions: - - !type:OrganType - type: Human damage: types: Poison: 1 @@ -505,12 +502,6 @@ shouldHave: false reagent: Protein amount: 0.5 - - !type:AdjustReagent # Frontier: Goblin - conditions: # Frontier: Goblin - - !type:OrganType # Frontier: Goblin - type: Goblin # Frontier: Goblin - reagent: Protein # Frontier: Goblin - amount: 0.5 # Frontier: Goblin - type: reagent id: Allicin From 03ce1a69dae48949ac824b10d3c85f6fbae44d57 Mon Sep 17 00:00:00 2001 From: Dvir Date: Wed, 27 Mar 2024 23:50:23 +0200 Subject: [PATCH 07/34] Update pie.yml --- .../Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml index e7b814aa120..8f00a5645ac 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml @@ -25,14 +25,13 @@ - ReagentId: Flavorol Quantity: 11 - type: Food #All pies here made with a pie tin; unless you're some kind of savage, you're probably not destroying this when you eat or slice the pie! + quality: High # Frontier, New Food Quality System trash: FoodPlateTin - type: SliceableFood count: 4 - type: Tag tags: - Pie - - type: Food # Frontier, New Food Quality System - quality: High # Frontier, New Food Quality System - type: entity parent: FoodInjectableBase # Not sliceable From 0c821134849f5fcdb41a3e29333d4e18351d0278 Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Thu, 28 Mar 2024 00:56:46 +0300 Subject: [PATCH 08/34] mail things --- .../Entities/Objects/Specific/Mail/base_mail.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml index 73a75cae24d..fd52b33e07d 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml @@ -94,14 +94,14 @@ types: Blunt: 10 - type: CargoSellBlacklist - - type: Food # Frontier - Moth food - requiresSpecialDigestion: true + - type: Food # Frontier + quality: Trash # Frontier, New Food Quality System - type: SolutionContainerManager solutions: food: maxVol: 1 reagents: - - ReagentId: Nothing + - ReagentId: TrashJuice Quantity: 1 # This empty parcel is allowed to exist and evade the tests for the admin From 06c29ad9df94991c8bf08c443286e0e41b6c3946 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:36:38 +0300 Subject: [PATCH 09/34] Update StomachComponent.cs --- Content.Server/Body/Components/StomachComponent.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index 821f4e7afaf..e414fba5693 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -76,5 +76,11 @@ public ReagentDelta(ReagentQuantity reagentQuantity) /// [DataField] public bool TrashDigestion; + + /// + /// Frontier - Allow eating fiber like food (Moth food) + /// + [DataField] + public bool FiberDigestion; } } From 85538a277ee41bb32d82eb373aca2ced635b3b2e Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:37:05 +0300 Subject: [PATCH 10/34] Update FoodComponent.cs --- Content.Server/Nutrition/Components/FoodComponent.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index 25e4f3a0c95..6e596c7f200 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -15,8 +15,7 @@ public enum Quality : byte // Frontier Nasty, Toxin, Trash, - MailOpened, - MailClosed + Fiber } public enum FinalQuality : byte // Frontier @@ -27,8 +26,7 @@ public enum FinalQuality : byte // Frontier Nasty, Toxin, Trash, - MailOpened, - MailClosed + Fiber } [RegisterComponent, Access(typeof(FoodSystem))] From c4e7c52d91292e1d73ef9a667c3e4a39460d5aaa Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:37:59 +0300 Subject: [PATCH 11/34] Update StomachComponent.cs --- Content.Server/Body/Components/StomachComponent.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index e414fba5693..ffe24461288 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -82,5 +82,11 @@ public ReagentDelta(ReagentQuantity reagentQuantity) /// [DataField] public bool FiberDigestion; + + /// + /// Frontier - Allow eating mail TODO: Move this to a switch before fully added. + /// + [DataField] + public bool MailDigestion; } } From a41995adc6d7a6fc075ff998a44d5f2841d7df04 Mon Sep 17 00:00:00 2001 From: Dvir Date: Fri, 3 May 2024 15:45:27 +0300 Subject: [PATCH 12/34] Food System Multi types support --- .../Nutrition/Components/FoodComponent.cs | 31 +--- .../Nutrition/EntitySystems/FoodSystem.cs | 142 +++++++++--------- 2 files changed, 73 insertions(+), 100 deletions(-) diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index 6e596c7f200..e6a44116b11 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -5,29 +5,9 @@ using Robust.Shared.Audio; using Robust.Shared.Prototypes; -namespace Content.Server.Nutrition.Components; - -public enum Quality : byte // Frontier -{ - High, - Normal, - Junk, - Nasty, - Toxin, - Trash, - Fiber -} +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array; -public enum FinalQuality : byte // Frontier -{ - High, - Normal, - Junk, - Nasty, - Toxin, - Trash, - Fiber -} +namespace Content.Server.Nutrition.Components; [RegisterComponent, Access(typeof(FoodSystem))] public sealed partial class FoodComponent : Component @@ -100,11 +80,12 @@ public sealed partial class FoodComponent : Component /// /// Frontier - Nasty food, used for goblins to know if they can eat it or not /// - [ViewVariables(VVAccess.ReadWrite), DataField] // Frontier - public Quality Quality = Quality.Normal; + [ViewVariables(VVAccess.ReadWrite), DataField] // Frontier + public string[] Quality = { "Normal" }; /// /// Frontier - Edited by the system to find the final quility results /// - public FinalQuality FinalQuality = FinalQuality.Normal; + [ViewVariables(VVAccess.ReadWrite), DataField] // Frontier + public string FinalQuality = "Normal"; } diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 5fe1b57b11c..f1395aacbfa 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -271,45 +271,51 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _reaction.DoEntityReaction(args.Target.Value, solution, ReactionMethod.Ingestion); _stomach.TryTransferSolution(stomachToUse.Owner, split, stomachToUse); - /// Frontier - Goblin food system - if (entity.Comp.Quality == Quality.High) - entity.Comp.FinalQuality = FinalQuality.High; - else if (entity.Comp.Quality == Quality.Normal) - entity.Comp.FinalQuality = FinalQuality.Normal; - else if (entity.Comp.Quality == Quality.Junk) - entity.Comp.FinalQuality = FinalQuality.Junk; - else if (entity.Comp.Quality == Quality.Nasty) - entity.Comp.FinalQuality = FinalQuality.Nasty; - else if (entity.Comp.Quality == Quality.Toxin) - entity.Comp.FinalQuality = FinalQuality.Toxin; - else if (entity.Comp.Quality == Quality.Trash) - entity.Comp.FinalQuality = FinalQuality.Trash; - - if (reverseFoodQuality) + /// Frontier - Food quality system + var foodQuality = entity.Comp.Quality; + var foodFinalQuality = entity.Comp.FinalQuality; + + foreach (var quality in foodQuality) { - if (entity.Comp.Quality == Quality.High) - entity.Comp.FinalQuality = FinalQuality.Toxin; - else if (entity.Comp.Quality == Quality.Normal) - entity.Comp.FinalQuality = FinalQuality.Nasty; - else if (entity.Comp.Quality == Quality.Nasty) - entity.Comp.FinalQuality = FinalQuality.Normal; - else if (entity.Comp.Quality == Quality.Toxin) - entity.Comp.FinalQuality = FinalQuality.High; - } + if (quality == null) + continue; + else if (quality == "High") + foodFinalQuality = "High"; + else if (quality == "Normal") + foodFinalQuality = "Normal"; + else if (quality == "Junk") + foodFinalQuality = "Junk"; + else if (quality == "Nasty") + foodFinalQuality = "Nasty"; + else if (quality == "Toxin") + foodFinalQuality = "Toxin"; + else if (quality == "Trash") + foodFinalQuality = "Trash"; + + if (reverseFoodQuality) + { + if (quality == "High") + foodFinalQuality = "Toxin"; + else if (quality == "Normal") + foodFinalQuality = "Nasty"; + else if (quality == "Nasty") + foodFinalQuality = "Normal"; + else if (quality == "Toxin") + foodFinalQuality = "High"; + } - // TODO: Add detection for fried food on nasty to update it to toxin for goblins. - // TODO: Add inspect food but only for goblin eyes to see, goblins can tell food quality. + // TODO: Add detection for fried food on nasty to update it to toxin for goblins. + // TODO: Add inspect food but only for goblin eyes to see, goblins can tell food quality. - string[] toxinsRegent = { "Toxin", "CarpoToxin", "Mold", "Amatoxin", "SulfuricAcid" }; - var speedRegent = "Stimulants"; - var damagingRegent = "Toxin"; - var emoteId = "Laugh"; + string[] toxinsRegent = { "Toxin", "CarpoToxin", "Mold", "Amatoxin", "SulfuricAcid" }; + var speedRegent = "Stimulants"; + var damagingRegent = "Toxin"; + var emoteId = "Laugh"; - TryComp(args.Target.Value, out var bloodStream); + TryComp(args.Target.Value, out var bloodStream); - switch (entity.Comp.FinalQuality) - { - case FinalQuality.High: + if (foodFinalQuality == "High") + { if (reverseFoodQuality) { if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) @@ -321,12 +327,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 3), out _); // Add to blood } - else - { - - } - break; - case FinalQuality.Normal: + } + else if (foodFinalQuality == "Normal") + { if (reverseFoodQuality) { if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) @@ -338,12 +341,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 5), out _); // Add to blood } - else - { - - } - break; - case FinalQuality.Junk: + } + else if (foodFinalQuality == "Junk") + { if (reverseFoodQuality) { if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) @@ -355,12 +355,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 7), out _); // Add to blood } - else - { - - } - break; - case FinalQuality.Nasty: + } + else if (foodFinalQuality == "Nasty") + { if (reverseFoodQuality) { if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) @@ -370,12 +367,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _stuttering.DoStutter(args.Target.Value, TimeSpan.FromSeconds(5), false); // Gives stuttering _jittering.DoJitter(args.Target.Value, TimeSpan.FromSeconds(5), true, 40f, 4f, true, null); } - else - { - - } - break; - case FinalQuality.Toxin: + } + else if (foodFinalQuality == "Toxin") + { if (reverseFoodQuality) { if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) @@ -389,24 +383,22 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg if (RobustRandom.Prob(.05f)) // 5% to puke _vomit.Vomit(args.Target.Value); } - else - { - - } - break; - case FinalQuality.Trash: - if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + } + else if (foodFinalQuality == "Trash") + { + if (reverseFoodQuality) { - foreach (var reagent in toxinsRegent) - _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood - _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) + { + foreach (var reagent in toxinsRegent) + _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + } + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount), out _); // Add to blood } - if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) - _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount), out _); // Add to blood - break; - default: - throw new ArgumentOutOfRangeException($"No implemented mask radio behavior for {entity.Comp.Quality}!"); - } /// Frontier + } + } var flavors = args.FlavorMessage; @@ -554,7 +546,7 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List<(Stoma foreach (var (comp, _) in stomachs) { // Frontier - Allow trash eating - if (!comp.TrashDigestion && component.Quality == Quality.Trash) + if (!comp.TrashDigestion && component.Quality.Contains("Trash")) return false; // Frontier - Allow trash eating From 9693762adf2109353716bb5c83ed8333912b8a8a Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Fri, 3 May 2024 15:46:04 +0300 Subject: [PATCH 13/34] trash eating gob stomach --- Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml b/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml index b514153338b..03efefb646a 100644 --- a/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml +++ b/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml @@ -134,6 +134,8 @@ - ReagentId: UncookedAnimalProteins Quantity: 5 - type: Stomach + reverseFoodQuality: true + trashDigestion: true - type: Metabolizer maxReagents: 3 metabolizerTypes: [ Animal ] # [ Goblin ] From fe792f79d1e8223c2264f168b27772a56fb38fa0 Mon Sep 17 00:00:00 2001 From: Dvir Date: Fri, 3 May 2024 15:49:24 +0300 Subject: [PATCH 14/34] Update FoodSystem.cs --- .../Nutrition/EntitySystems/FoodSystem.cs | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index f1395aacbfa..90a5cf2daf6 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -273,35 +273,34 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg /// Frontier - Food quality system var foodQuality = entity.Comp.Quality; - var foodFinalQuality = entity.Comp.FinalQuality; foreach (var quality in foodQuality) { if (quality == null) continue; else if (quality == "High") - foodFinalQuality = "High"; + entity.Comp.FinalQuality = "High"; else if (quality == "Normal") - foodFinalQuality = "Normal"; + entity.Comp.FinalQuality = "Normal"; else if (quality == "Junk") - foodFinalQuality = "Junk"; + entity.Comp.FinalQuality = "Junk"; else if (quality == "Nasty") - foodFinalQuality = "Nasty"; + entity.Comp.FinalQuality = "Nasty"; else if (quality == "Toxin") - foodFinalQuality = "Toxin"; + entity.Comp.FinalQuality = "Toxin"; else if (quality == "Trash") - foodFinalQuality = "Trash"; + entity.Comp.FinalQuality = "Trash"; if (reverseFoodQuality) { if (quality == "High") - foodFinalQuality = "Toxin"; + entity.Comp.FinalQuality = "Toxin"; else if (quality == "Normal") - foodFinalQuality = "Nasty"; + entity.Comp.FinalQuality = "Nasty"; else if (quality == "Nasty") - foodFinalQuality = "Normal"; + entity.Comp.FinalQuality = "Normal"; else if (quality == "Toxin") - foodFinalQuality = "High"; + entity.Comp.FinalQuality = "High"; } // TODO: Add detection for fried food on nasty to update it to toxin for goblins. @@ -314,7 +313,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg TryComp(args.Target.Value, out var bloodStream); - if (foodFinalQuality == "High") + if (entity.Comp.FinalQuality == "High") { if (reverseFoodQuality) { @@ -328,7 +327,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 3), out _); // Add to blood } } - else if (foodFinalQuality == "Normal") + else if (entity.Comp.FinalQuality == "Normal") { if (reverseFoodQuality) { @@ -342,7 +341,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 5), out _); // Add to blood } } - else if (foodFinalQuality == "Junk") + else if (entity.Comp.FinalQuality == "Junk") { if (reverseFoodQuality) { @@ -356,7 +355,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount / 7), out _); // Add to blood } } - else if (foodFinalQuality == "Nasty") + else if (entity.Comp.FinalQuality == "Nasty") { if (reverseFoodQuality) { @@ -368,7 +367,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _jittering.DoJitter(args.Target.Value, TimeSpan.FromSeconds(5), true, 40f, 4f, true, null); } } - else if (foodFinalQuality == "Toxin") + else if (entity.Comp.FinalQuality == "Toxin") { if (reverseFoodQuality) { @@ -384,7 +383,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _vomit.Vomit(args.Target.Value); } } - else if (foodFinalQuality == "Trash") + else if (entity.Comp.FinalQuality == "Trash") { if (reverseFoodQuality) { From bd8426884912c5780136094f53434df7318a9b4f Mon Sep 17 00:00:00 2001 From: Dvir Date: Fri, 3 May 2024 16:11:24 +0300 Subject: [PATCH 15/34] Update FoodSystem.cs --- .../Nutrition/EntitySystems/FoodSystem.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 90a5cf2daf6..2bbe0085298 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -385,17 +385,14 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg } else if (entity.Comp.FinalQuality == "Trash") { - if (reverseFoodQuality) + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) { - if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) - { - foreach (var reagent in toxinsRegent) - _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood - _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood - } - if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) - _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount), out _); // Add to blood + foreach (var reagent in toxinsRegent) + _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, reagent, FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood + _solutionContainer.RemoveReagent(stomachToUse!.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood } + if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) + _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount), out _); // Add to blood } } From a3cf9599775061de5c1b32420f8aaf57227fa56a Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Fri, 3 May 2024 16:37:48 +0300 Subject: [PATCH 16/34] more trash food --- .../Objects/Consumable/Food/frozen.yml | 4 ++-- .../Objects/Consumable/Food/produce.yml | 4 ++-- .../Objects/Consumable/Food/snacks.yml | 15 +-------------- .../Prototypes/Entities/Objects/Misc/box.yml | 2 +- .../Entities/Objects/Misc/candles.yml | 2 +- .../Entities/Objects/Misc/spaceshroom.yml | 6 ++++++ .../Objects/Consumable/Food/spoiled.yml | 4 ++++ .../Entities/Objects/Consumable/Food/trash.yml | 18 ++++++++++++++++++ .../Objects/Consumable/Food/meat_goblin.yml | 4 ++-- 9 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml index c760e5e3ebb..96365536aef 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml @@ -251,7 +251,7 @@ - type: entity name: paper cone - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: FoodFrozenSnowconeTrash description: A crumpled paper cone used for an icy treat. Worthless. components: @@ -264,7 +264,7 @@ - type: entity name: popsicle stick - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: FoodFrozenPopsicleTrash description: Once held a delicious treat. Now, 'tis barren. components: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index ad4f49a0aa9..d862e265e09 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -301,7 +301,7 @@ - type: entity name: banana peel - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: TrashBananaPeel components: - type: Sprite @@ -946,7 +946,7 @@ - type: entity name: corn cob - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: FoodCornTrash description: Not a dang kernel left. components: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index 8aae72935bb..dffa508e8d8 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -460,7 +460,7 @@ - type: entity noSpawn: true - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: FoodPacketTrash description: This is rubbish. abstract: true @@ -480,19 +480,6 @@ - type: SpaceGarbage - type: StaticPrice price: 1 - - type: FlavorProfile # Frontier, Goblins - flavors: # Frontier, Goblins - - funny # Frontier, Goblins - - type: Food # Frontier, Goblins - quality: Trash # Frontier, New Food Quality System -# requiresSpecialDigestion: true # Frontier, Goblins - - type: SolutionContainerManager # Frontier - solutions: # Frontier - food: # Frontier - maxVol: 1 # Frontier - reagents: # Frontier - - ReagentId: TrashJuice # Frontier - Quantity: 1 # Frontier - type: entity noSpawn: true diff --git a/Resources/Prototypes/Entities/Objects/Misc/box.yml b/Resources/Prototypes/Entities/Objects/Misc/box.yml index edb1a812391..c46b0760b0b 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/box.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/box.yml @@ -1,6 +1,6 @@ - type: entity id: BoxBase - parent: BaseStorageItem + parent: [ BaseStorageItem, TrashSolutionInjector ] # Frontier abstract: true components: - type: Sprite diff --git a/Resources/Prototypes/Entities/Objects/Misc/candles.yml b/Resources/Prototypes/Entities/Objects/Misc/candles.yml index bef37e5fd08..f9c127461a9 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/candles.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/candles.yml @@ -1,6 +1,6 @@ - type: entity name: candle - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: Candle description: A thin wick threaded through fat. components: diff --git a/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml b/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml index 9ec6ce0ed11..a55b535fa6c 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml @@ -5,6 +5,8 @@ suffix: Structure description: A cluster of wild mushrooms that likes to grow in dark, moist environments. components: + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: Sprite sprite: Objects/Misc/spaceshroom.rsi state: structure @@ -45,6 +47,8 @@ id: FoodSpaceshroom description: A wild mushroom. There's no telling what effect it could have... components: + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: Produce - type: Sprite sprite: Objects/Misc/spaceshroom.rsi @@ -103,6 +107,8 @@ id: FoodSpaceshroomCooked description: A wild mushroom that has been cooked through. It seems the heat has removed its chemical effects. components: + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System - type: FlavorProfile flavors: - spaceshroomcooked diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml index 766fd9cfddc..f13159a28c5 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml @@ -6,6 +6,8 @@ description: "It's probably still edible, just need to scrape this thing off. And this one too. And this one." noSpawn: true components: + - type: Food + quality: Toxin - type: Sprite layers: - sprite: Objects/Consumable/Food/meat.rsi @@ -36,6 +38,8 @@ description: "It's probably still edible, just need to scrape this thing off. And this one too. And this one." noSpawn: true components: + - type: Food + quality: Toxin - type: Sprite layers: - sprite: Objects/Consumable/Food/meat.rsi diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml new file mode 100644 index 00000000000..b0fdf72b1a7 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml @@ -0,0 +1,18 @@ +- type: entity + noSpawn: true + id: TrashSolutionInjector + abstract: true + components: + - type: FlavorProfile + flavors: + - funny + - type: Food + quality: Trash +# requiresSpecialDigestion: true # Frontier, Goblins + - type: SolutionContainerManager + solutions: + food: + maxVol: 1 + reagents: + - ReagentId: TrashJuice + Quantity: 1 diff --git a/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml b/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml index af27157d276..5b586db46f0 100644 --- a/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml +++ b/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml @@ -7,5 +7,5 @@ - type: Sprite state: rotten color: lime -# - type: Food # Frontier, New Food Quality System -# quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier, New Food Quality System + quality: Toxin # Frontier, New Food Quality System From 24c27e8237865e6c8063dd2ba3816bf67ca143c9 Mon Sep 17 00:00:00 2001 From: Dvir Date: Fri, 3 May 2024 17:10:11 +0300 Subject: [PATCH 17/34] Food --- .../Nutrition/EntitySystems/FoodSystem.cs | 16 ++++++++++++++-- .../_NF/nutrition/components/food-component.ftl | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 2bbe0085298..8c99bf28465 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -273,6 +273,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg /// Frontier - Food quality system var foodQuality = entity.Comp.Quality; + //var showFlavors = true; // Frontier foreach (var quality in foodQuality) { @@ -311,6 +312,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg var damagingRegent = "Toxin"; var emoteId = "Laugh"; + //var msgNasty = Loc.GetString("food-system-nasty", ("used", args.Used), ("target", args.Target)); + //var msgToxin = Loc.GetString("food-system-toxin", ("used", args.Used), ("target", args.Target)); + TryComp(args.Target.Value, out var bloodStream); if (entity.Comp.FinalQuality == "High") @@ -359,6 +363,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { if (reverseFoodQuality) { + //showFlavors = false; // Frontier + //_popup.PopupEntity(msgNasty, args.Target.Value, args.User); + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) @@ -371,6 +378,9 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { if (reverseFoodQuality) { + //showFlavors = false; // Frontier + //_popup.PopupEntity(msgToxin, args.Target.Value, args.User); + if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood if (_solutionContainer.ResolveSolution(args.Target.Value, bloodStream!.ChemicalSolutionName, ref bloodStream.ChemicalSolution)) @@ -402,7 +412,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { var targetName = Identity.Entity(args.Target.Value, EntityManager); var userName = Identity.Entity(args.User, EntityManager); - _popup.PopupEntity(Loc.GetString("food-system-force-feed-success", ("user", userName), ("flavors", flavors)), entity.Owner, entity.Owner); + //if (showFlavors) // Frontier + _popup.PopupEntity(Loc.GetString("food-system-force-feed-success", ("user", userName), ("flavors", flavors)), entity.Owner, entity.Owner); _popup.PopupEntity(Loc.GetString("food-system-force-feed-success-user", ("target", targetName)), args.User, args.User); @@ -411,7 +422,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg } else { - _popup.PopupEntity(Loc.GetString(entity.Comp.EatMessage, ("food", entity.Owner), ("flavors", flavors)), args.User, args.User); + //if (showFlavors) // Frontier + _popup.PopupEntity(Loc.GetString(entity.Comp.EatMessage, ("food", entity.Owner), ("flavors", flavors)), args.User, args.User); // log successful voluntary eating _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} ate {ToPrettyString(entity.Owner):food}"); diff --git a/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl b/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl new file mode 100644 index 00000000000..b01fc76648b --- /dev/null +++ b/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl @@ -0,0 +1,2 @@ +food-system-nasty = This food gross. +food-system-toxin = This food bad. From f890786734511d559ca0d9a0a9ba05a81a182526 Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 4 May 2024 02:12:07 +0300 Subject: [PATCH 18/34] Allow goblin to eat open mail only --- .../Body/Components/StomachComponent.cs | 12 +++--- .../Nutrition/Components/FoodComponent.cs | 3 +- .../Nutrition/EntitySystems/FoodSystem.cs | 40 +++++++++++++------ Content.Server/Nyanotrasen/Mail/MailSystem.cs | 3 ++ .../Objects/Specific/Mail/base_mail.yml | 2 +- 5 files changed, 39 insertions(+), 21 deletions(-) diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index 2c3e4a14cea..01aa15ee070 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -74,24 +74,24 @@ public ReagentDelta(ReagentQuantity reagentQuantity) /// Frontier - Used by goblin for fliping the food quility effects /// [DataField] - public bool ReverseFoodQuality; + public bool ReverseFoodQuality = false; /// - /// Frontier - Allow eating trash + /// Frontier - Allow eating mail TODO: Move this to a switch before fully added. /// [DataField] - public bool TrashDigestion; + public bool MailDigestion = false; /// /// Frontier - Allow eating fiber like food (Moth food) /// [DataField] - public bool FiberDigestion; + public bool FiberDigestion = false; /// - /// Frontier - Allow eating mail TODO: Move this to a switch before fully added. + /// Frontier - Allow eating trash /// [DataField] - public bool MailDigestion; + public bool TrashDigestion = false; } } diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index e6a44116b11..479dfc8beae 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -4,12 +4,13 @@ using Content.Shared.FixedPoint; using Robust.Shared.Audio; using Robust.Shared.Prototypes; +using Content.Server.Mail; // Frontier using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array; namespace Content.Server.Nutrition.Components; -[RegisterComponent, Access(typeof(FoodSystem))] +[RegisterComponent, Access(typeof(FoodSystem), typeof(MailSystem))] // Frontier public sealed partial class FoodComponent : Component { [DataField] diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 8c99bf28465..427bf5567fe 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -273,7 +273,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg /// Frontier - Food quality system var foodQuality = entity.Comp.Quality; - //var showFlavors = true; // Frontier + var showFlavors = true; foreach (var quality in foodQuality) { @@ -289,7 +289,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg entity.Comp.FinalQuality = "Nasty"; else if (quality == "Toxin") entity.Comp.FinalQuality = "Toxin"; - else if (quality == "Trash") + else if ((quality == "Trash") || (quality == "Mail") || (quality == "Fiber")) entity.Comp.FinalQuality = "Trash"; if (reverseFoodQuality) @@ -312,8 +312,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg var damagingRegent = "Toxin"; var emoteId = "Laugh"; - //var msgNasty = Loc.GetString("food-system-nasty", ("used", args.Used), ("target", args.Target)); - //var msgToxin = Loc.GetString("food-system-toxin", ("used", args.Used), ("target", args.Target)); + var msgNasty = Loc.GetString("food-system-nasty", ("used", args.Used), ("target", args.Target)); + var msgToxin = Loc.GetString("food-system-toxin", ("used", args.Used), ("target", args.Target)); TryComp(args.Target.Value, out var bloodStream); @@ -363,8 +363,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { if (reverseFoodQuality) { - //showFlavors = false; // Frontier - //_popup.PopupEntity(msgNasty, args.Target.Value, args.User); + showFlavors = false; + _popup.PopupEntity(msgNasty, args.Target.Value, args.User); if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood @@ -378,8 +378,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { if (reverseFoodQuality) { - //showFlavors = false; // Frontier - //_popup.PopupEntity(msgToxin, args.Target.Value, args.User); + showFlavors = false; + _popup.PopupEntity(msgToxin, args.Target.Value, args.User); if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) _solutionContainer.RemoveReagent(stomachToUse.Solution.Value, "Flavorol", FixedPoint2.New((int) transferAmount)); // Remove from body before it goes to blood @@ -405,6 +405,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _solutionContainer.TryAddReagent(bloodStream.ChemicalSolution.Value, speedRegent, FixedPoint2.New((int) transferAmount), out _); // Add to blood } } + /// Frontier - Food quality system end var flavors = args.FlavorMessage; @@ -412,7 +413,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { var targetName = Identity.Entity(args.Target.Value, EntityManager); var userName = Identity.Entity(args.User, EntityManager); - //if (showFlavors) // Frontier + if (showFlavors) // Frontier _popup.PopupEntity(Loc.GetString("food-system-force-feed-success", ("user", userName), ("flavors", flavors)), entity.Owner, entity.Owner); _popup.PopupEntity(Loc.GetString("food-system-force-feed-success-user", ("target", targetName)), args.User, args.User); @@ -422,7 +423,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg } else { - //if (showFlavors) // Frontier + if (showFlavors) // Frontier _popup.PopupEntity(Loc.GetString(entity.Comp.EatMessage, ("food", entity.Owner), ("flavors", flavors)), args.User, args.User); // log successful voluntary eating @@ -553,10 +554,23 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List<(Stoma // Run through the mobs' stomachs foreach (var (comp, _) in stomachs) { - // Frontier - Allow trash eating - if (!comp.TrashDigestion && component.Quality.Contains("Trash")) + // Frontier - Food system hack job + var foodQuality = component.Quality; + var allowEating = true; + foreach (var quality in foodQuality) + { + if (!comp.MailDigestion && quality == "Mail") + allowEating = true; + else if (!comp.FiberDigestion && quality == "Fiber") + allowEating = true; + else if (!comp.TrashDigestion && quality == "Trash") + allowEating = true; + else + allowEating = false; + } + if (allowEating) return false; - // Frontier - Allow trash eating + // Frontier - Food system hack job // Find a stomach with a SpecialDigestible if (comp.SpecialDigestible == null) diff --git a/Content.Server/Nyanotrasen/Mail/MailSystem.cs b/Content.Server/Nyanotrasen/Mail/MailSystem.cs index ffb173acdf4..baff5801405 100644 --- a/Content.Server/Nyanotrasen/Mail/MailSystem.cs +++ b/Content.Server/Nyanotrasen/Mail/MailSystem.cs @@ -735,6 +735,9 @@ public void OpenMail(EntityUid uid, MailComponent? component = null, EntityUid? _handsSystem.PickupOrDrop(user, entity); } + if (TryComp(uid, out var food)) // Frontier + food.Quality = new string[] { "Mail", "Fiber", "Trash" }; + _tagSystem.AddTag(uid, "Trash"); _tagSystem.AddTag(uid, "Recyclable"); component.IsEnabled = false; diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml index fd52b33e07d..a384ac9caad 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml @@ -95,7 +95,7 @@ Blunt: 10 - type: CargoSellBlacklist - type: Food # Frontier - quality: Trash # Frontier, New Food Quality System + quality: Mail # Frontier, New Food Quality System - type: SolutionContainerManager solutions: food: From 94294be53c25a6a363980115d6db5448ee1430ec Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Sat, 4 May 2024 03:53:47 +0300 Subject: [PATCH 19/34] yml fixes --- .../Prototypes/Body/Organs/Animal/animal.yml | 4 +- Resources/Prototypes/Body/Organs/human.yml | 4 +- Resources/Prototypes/Body/Parts/base.yml | 2 + .../Objects/Consumable/Food/Baked/bread.yml | 18 ++-- .../Objects/Consumable/Food/Baked/cake.yml | 3 + .../Objects/Consumable/Food/Baked/donut.yml | 4 +- .../Objects/Consumable/Food/Baked/pie.yml | 12 ++- .../Objects/Consumable/Food/Baked/pizza.yml | 5 +- .../Objects/Consumable/Food/burger.yml | 99 ++++++++++++++----- .../Entities/Objects/Consumable/Food/egg.yml | 3 +- .../Objects/Consumable/Food/frozen.yml | 1 + .../Objects/Consumable/Food/meals.yml | 6 +- .../Entities/Objects/Consumable/Food/meat.yml | 68 ++++++++++--- .../Objects/Consumable/Food/noodles.yml | 4 + .../Objects/Consumable/Food/produce.yml | 4 +- .../Objects/Consumable/Food/skewer.yml | 9 +- .../Objects/Consumable/Food/snacks.yml | 2 +- .../Entities/Objects/Consumable/Food/soup.yml | 7 +- .../_NF/Body/Organs/goblin_organs.yml | 31 +++--- .../Objects/Consumable/Food/Baked/misc.yml | 2 + .../Objects/Consumable/Food/burger.yml | 2 + .../Entities/Objects/Consumable/Food/meat.yml | 14 +++ .../Objects/Consumable/Food/produce.yml | 2 + .../Objects/Consumable/Food/spoiled.yml | 4 +- .../Objects/Consumable/Food/trash.yml | 3 +- .../Objects/Consumable/Food/meat_goblin.yml | 11 --- 26 files changed, 228 insertions(+), 96 deletions(-) delete mode 100644 Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml diff --git a/Resources/Prototypes/Body/Organs/Animal/animal.yml b/Resources/Prototypes/Body/Organs/Animal/animal.yml index 89acef82927..dd35b71709c 100644 --- a/Resources/Prototypes/Body/Organs/Animal/animal.yml +++ b/Resources/Prototypes/Body/Organs/Animal/animal.yml @@ -4,8 +4,8 @@ abstract: true components: - type: Organ - - type: Food -# quality: Nasty # Frontier + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier - type: Sprite sprite: Mobs/Species/Human/organs.rsi - type: StaticPrice diff --git a/Resources/Prototypes/Body/Organs/human.yml b/Resources/Prototypes/Body/Organs/human.yml index 6cd4996926a..b0bb6bbd357 100644 --- a/Resources/Prototypes/Body/Organs/human.yml +++ b/Resources/Prototypes/Body/Organs/human.yml @@ -6,8 +6,8 @@ - type: Sprite sprite: Mobs/Species/Human/organs.rsi - type: Organ - - type: Food -# quality: Nasty # Frontier + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier - type: Extractable grindableSolutionName: organ - type: SolutionContainerManager diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index 836d0f140af..e011d2ad2e3 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -6,6 +6,8 @@ name: "body part" abstract: true components: + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier - type: Damageable damageContainer: Biological - type: BodyPart diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml index 9ba21939ab0..0d29be7c156 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml @@ -10,6 +10,7 @@ flavors: - bread - type: Food + quality: [ "Normal" ] # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/Baked/bread.rsi - type: Tag @@ -452,8 +453,8 @@ flavors: - cobwebs - bread - - type: Food - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: Sprite layers: - state: spidermeat @@ -487,8 +488,8 @@ flavors: - cobwebs - bread - - type: Food - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: Sprite layers: - state: spidermeat-slice @@ -574,7 +575,8 @@ flavors: - acid - bread - - type: Food + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: Sprite layers: - state: xenomeat @@ -737,6 +739,8 @@ id: FoodBreadGarlicSlice description: Alas, it is limited. components: + - type: Food # Frontier + quality: [ "High" ] # Frontier, New Food Quality System - type: FlavorProfile flavors: - bread @@ -801,8 +805,8 @@ Quantity: 4 - ReagentId: Mold Quantity: 7 - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System # Tastes like decaying fungus. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml index 9cdf49c27eb..9234be5d719 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml @@ -10,6 +10,7 @@ flavors: - sweet - type: Food + quality: [ "High" ] # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/Baked/cake.rsi - type: SolutionContainerManager @@ -165,6 +166,8 @@ state: brain - type: SliceableFood slice: FoodCakeBrainSlice + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml index de87dddf76a..9cea116a100 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml @@ -467,5 +467,5 @@ reagents: - ReagentId: Amatoxin Quantity: 10 - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml index 019346c8b19..9af112171f3 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml @@ -25,7 +25,7 @@ - ReagentId: Flavorol Quantity: 11 - type: Food #All pies here made with a pie tin; unless you're some kind of savage, you're probably not destroying this when you eat or slice the pie! - quality: High # Frontier, New Food Quality System + quality: [ "High" ] # Frontier, New Food Quality System trash: FoodPlateTin - type: SliceableFood count: 4 @@ -57,8 +57,8 @@ Quantity: 1 - ReagentId: Flavorol Quantity: 1.5 - - type: Food # Frontier, New Food Quality System - quality: High # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "High" ] # Frontier, New Food Quality System # Pie @@ -330,6 +330,8 @@ tags: - Meat - Pie + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: slice of xeno pie @@ -349,6 +351,8 @@ tags: - Meat - Pie + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System # Tastes like pie, meat, acid. - type: entity @@ -440,7 +444,7 @@ - ReagentId: Flavorol Quantity: 6 - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + quality: [ "Toxin" ] # Frontier, New Food Quality System # Tastes like pie, mushrooms. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml index 9785e6d5113..6b7cf99ff20 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml @@ -11,7 +11,7 @@ - oily - bread - type: Food - quality: High # Frontier, New Food Quality System + quality: [ "High" ] # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/Baked/pizza.rsi - type: SolutionContainerManager @@ -44,7 +44,6 @@ - oily - bread - type: Food - quality: Toxin # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/Baked/pizza.rsi - type: SolutionContainerManager @@ -555,4 +554,6 @@ Quantity: 2 - ReagentId: Vitamin Quantity: 1 + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System # Tastes like stale crust, rancid cheese, mushroom. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml index d17d1d7215d..25897d49bec 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml @@ -31,8 +31,8 @@ flavors: - bun - meaty - - type: Food - quality: High # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "High" ] # Frontier, New Food Quality System transferAmount: 5 - type: Sprite sprite: Objects/Consumable/Food/burger.rsi @@ -97,8 +97,9 @@ - type: Tag tags: - Meat - - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, grass. - type: entity @@ -127,8 +128,9 @@ - type: Tag tags: - Meat - - type: Food - quality: Normal # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, bacon. - type: entity @@ -159,8 +161,9 @@ - type: Tag tags: - Meat - - type: Food - quality: Normal # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: bearger @@ -190,8 +193,9 @@ - type: Tag tags: - Meat - - type: Food - quality: Normal # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: big bite burger @@ -250,6 +254,9 @@ - type: Tag tags: - Meat + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, brains. - type: entity @@ -279,6 +286,9 @@ - type: Tag tags: - Meat + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: cheese burger @@ -309,8 +319,9 @@ - type: Tag tags: - Meat - - type: Food - quality: Normal # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # TODO: Make this work. # - type: Sprite # state: plate @@ -382,7 +393,7 @@ tags: - Meat - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + quality: [ "Nasty" ] # Frontier, New Food Quality System - type: entity name: corger #not curger @@ -437,6 +448,9 @@ - type: Tag tags: - Meat + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: crazy hamburger # Burger for you euro-cucks @@ -468,8 +482,9 @@ - type: Tag tags: - Meat - - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: duck sandwich # Burger for you sick bastards @@ -524,6 +539,9 @@ Quantity: 5 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, pure electricity. - type: entity @@ -541,8 +559,9 @@ - type: Tag tags: - Meat - - type: Food - quality: Normal # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, fish. - type: entity @@ -572,6 +591,9 @@ Quantity: 1 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, HEAT. - type: entity @@ -601,6 +623,9 @@ tags: - ClothMade - Meat + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, ectoplasm. - type: entity @@ -631,8 +656,9 @@ - type: Tag tags: - Meat - - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: McGuffin @@ -724,8 +750,9 @@ Quantity: 1 - ReagentId: Flavorol Quantity: 5 - - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like . - type: entity @@ -756,8 +783,9 @@ - type: Tag tags: - Meat - - type: Food - quality: Normal # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier - type: entity name: rat burger @@ -787,8 +815,9 @@ - type: Tag tags: - Meat - - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, HEAT. - type: entity @@ -816,6 +845,9 @@ - type: Tag tags: - Meat + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, lettuce, sludge. - type: entity @@ -843,6 +875,9 @@ Quantity: 4 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, redditors. - type: entity @@ -870,6 +905,9 @@ Quantity: 10 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, silver. - type: entity @@ -930,6 +968,9 @@ Quantity: 3 - ReagentId: Flavorol Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, tofu. - type: entity @@ -961,8 +1002,9 @@ - type: Tag tags: - Meat - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier # Tastes like bun, acid. # Note: I would put a bunch of colored burgers here as listed in the tg .dm but @@ -995,4 +1037,7 @@ - type: Tag tags: - Meat + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System + transferAmount: 5 # Frontier \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml index 8cd2fa70ee5..7cf33c3b317 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml @@ -11,6 +11,7 @@ - Egg - Meat - type: Food + quality: [ "Normal" ] # Frontier, New Food Quality System trash: Eggshells - type: Sprite sprite: Objects/Consumable/Food/egg.rsi @@ -71,7 +72,7 @@ # Splat - type: entity name: eggshells - parent: BaseItem + parent: [ BaseItem, TrashSolutionInjector ] # Frontier id: Eggshells description: You're walkin' on 'em bud. components: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml index 96365536aef..595763fbef8 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml @@ -7,6 +7,7 @@ abstract: true components: - type: Food + quality: [ "Normal" ] # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/frozen.rsi - type: SolutionContainerManager diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml index 58e48364afb..7c3cd5b1742 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml @@ -13,7 +13,7 @@ - type: Item storedRotation: -90 - type: Food - quality: High # Frontier, New Food Quality System + quality: [ "High" ] # Frontier, New Food Quality System - type: Sprite sprite: Objects/Consumable/Food/meals.rsi - type: SolutionContainerManager @@ -254,7 +254,7 @@ - CubanCarp - Meat - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + quality: [ "Toxin" ] # Frontier, New Food Quality System # Tastes like fish, batter, hot peppers. - type: entity @@ -551,7 +551,7 @@ tags: - Meat - type: Food # Frontier, New Food Quality System - quality: Nasty # Frontier, New Food Quality System + quality: [ "Nasty" ] # Frontier, New Food Quality System # tastes exotic - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml index 2131668d529..b6e6cb5bc8a 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml @@ -67,8 +67,8 @@ entity: FoodMeatRotten # once it would say bloated, turn into the rotten prototype stage: 1 - - type: Food - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System # bruh - type: Tag @@ -157,7 +157,7 @@ - ReagentId: CarpoToxin Quantity: 5 - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: raw bacon @@ -462,8 +462,8 @@ Quantity: 4 - ReagentId: Fat Quantity: 4 - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: raw spider meat @@ -484,6 +484,8 @@ - type: SliceableFood count: 3 slice: FoodMeatSpiderCutlet + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: raw spider leg @@ -501,6 +503,8 @@ Quantity: 10 - ReagentId: Fat Quantity: 3 + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: meatwheat clump @@ -563,8 +567,8 @@ - type: SliceableFood count: 3 slice: FoodMeatXenoCutlet - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: raw rouny meat @@ -594,6 +598,8 @@ graph: RounySteak node: start defaultTarget: rouny steak + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: killer tomato meat @@ -632,6 +638,8 @@ damage: types: Blunt: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: meat clown @@ -743,6 +751,8 @@ - type: Construction graph: MeatSteak node: meat steak + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: bacon @@ -774,6 +784,8 @@ - type: Construction graph: Bacon node: bacon + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: cooked bear @@ -803,6 +815,8 @@ - type: Construction graph: BearSteak node: filet migrawr + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: penguin filet @@ -831,6 +845,8 @@ - type: Construction graph: PenguinSteak node: cooked penguin + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: cooked chicken @@ -859,6 +875,8 @@ - type: Construction graph: ChickenSteak node: cooked chicken + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: fried chicken @@ -887,6 +905,8 @@ Quantity: 5 - ReagentId: Protein Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: cooked duck @@ -915,6 +935,8 @@ - type: Construction graph: DuckSteak node: cooked duck + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: cooked crab @@ -943,6 +965,8 @@ - type: Construction graph: CrabSteak node: cooked crab + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: goliath steak @@ -969,6 +993,8 @@ - type: Construction graph: GoliathSteak node: goliath steak + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: rouny steak @@ -1028,6 +1054,8 @@ - type: Construction graph: LizardSteak node: lizard steak + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: boiled spider leg @@ -1071,6 +1099,8 @@ Quantity: 5 - ReagentId: Protein Quantity: 5 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System # Cutlets @@ -1263,8 +1293,8 @@ reagents: - ReagentId: SulfuricAcid Quantity: 20 - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: raw killer tomato cutlet @@ -1301,6 +1331,8 @@ Quantity: 1 - ReagentId: Protein Quantity: 1 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System # Cooked @@ -1325,6 +1357,8 @@ Quantity: 2 - ReagentId: Protein Quantity: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: bear cutlet @@ -1350,6 +1384,8 @@ Quantity: 2 - ReagentId: Protein Quantity: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: penguin cutlet @@ -1373,6 +1409,8 @@ Quantity: 2 - ReagentId: Protein Quantity: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: chicken cutlet @@ -1396,6 +1434,8 @@ Quantity: 2 - ReagentId: Protein Quantity: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: duck cutlet @@ -1419,6 +1459,8 @@ Quantity: 2 - ReagentId: Protein Quantity: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: lizard cutlet @@ -1443,6 +1485,8 @@ Quantity: 2 - ReagentId: Protein Quantity: 2 + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: entity name: spider cutlet @@ -1465,6 +1509,8 @@ Quantity: 1 - ReagentId: Protein Quantity: 1 + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: xeno cutlet @@ -1487,5 +1533,5 @@ Quantity: 1 - ReagentId: Protein Quantity: 1 - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml index 47a64a1fc7c..e13098745ab 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml @@ -7,6 +7,8 @@ abstract: true description: Now that's a nice pasta! components: + - type: Food # Frontier + quality: [ "High" ] # Frontier, New Food Quality System - type: Item storedRotation: -90 - type: Sprite @@ -28,6 +30,8 @@ id: FoodNoodlesBoiled description: A plain dish of noodles, this needs more ingredients. components: + - type: Food # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System - type: FlavorProfile flavors: - pasta diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index d862e265e09..45303d27c84 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -1429,8 +1429,8 @@ - type: Extractable grindableSolutionName: food - type: BadFood - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: gatfruit diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml index fac5904d29f..19ce2d38517 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml @@ -7,6 +7,7 @@ abstract: true components: - type: Food + quality: [ "Normal" ] # Frontier, New Food Quality System trash: FoodKebabSkewer - type: Sprite sprite: Objects/Consumable/Food/skewer.rsi @@ -128,8 +129,8 @@ Quantity: 2 - ReagentId: Flavorol Quantity: 5 - - type: Food - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System - type: entity name: double rat kebab @@ -152,8 +153,8 @@ Quantity: 6 - ReagentId: Flavorol Quantity: 10 - - type: Food - quality: Nasty # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System - type: entity name: fiesta kebab diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index dffa508e8d8..b1b347ae642 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -7,7 +7,7 @@ abstract: true components: - type: Food - quality: Junk # Frontier, New Food Quality System + quality: [ "Low" ] # Frontier, New Food Quality System - type: Tag tags: - FoodSnack diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml index 11e3b858f5e..50da376601c 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml @@ -8,6 +8,7 @@ - type: Item storedRotation: -90 - type: Food + quality: [ "High" ] # Frontier, New Food Quality System trash: FoodBowlBig utensil: Spoon - type: SolutionContainerManager @@ -603,8 +604,8 @@ Quantity: 6 - ReagentId: Flavorol Quantity: 5 - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System # Soup - type: entity @@ -1018,6 +1019,8 @@ tags: - Meat - Soup + - type: Food # Frontier + quality: [ "Nasty" ] # Frontier, New Food Quality System - type: entity name: miso soup diff --git a/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml b/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml index 03efefb646a..20ae09bdf65 100644 --- a/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml +++ b/Resources/Prototypes/_NF/Body/Organs/goblin_organs.yml @@ -1,5 +1,14 @@ - type: entity - parent: OrganHumanBrain + id: BaseGoblinOrgan + parent: BaseHumanOrganUnGibbable + abstract: true + components: + - type: Gibbable + - type: Food + quality: [ "Toxin" ] + +- type: entity + parent: [ OrganHumanBrain, BaseGoblinOrgan ] id: OrganGoblinBrain name: brain suffix: Goblin @@ -21,7 +30,7 @@ - Meat - type: entity - parent: OrganHumanEyes + parent: [ OrganHumanEyes, BaseGoblinOrgan ] id: OrganGoblinEyes name: eyes suffix: Goblin @@ -33,7 +42,7 @@ - state: eyeball-r - type: entity - parent: OrganHumanTongue + parent: [ OrganHumanTongue, BaseGoblinOrgan ] id: OrganGoblinTongue name: tongue suffix: Goblin @@ -43,7 +52,7 @@ state: tongue - type: entity - parent: OrganHumanAppendix + parent: [ OrganHumanAppendix, BaseGoblinOrgan ] id: OrganGoblinAppendix name: appendix suffix: Goblin @@ -56,7 +65,7 @@ visible: false - type: entity - parent: OrganHumanEars + parent: [ OrganHumanEars, BaseGoblinOrgan ] id: OrganGoblinEars name: ears suffix: Goblin @@ -66,7 +75,7 @@ state: ears - type: entity - parent: BaseHumanOrgan + parent: BaseGoblinOrgan id: OrganGoblinLungs name: lungs suffix: Goblin @@ -102,7 +111,7 @@ Quantity: 5 - type: entity - parent: OrganHumanHeart + parent: [ OrganHumanHeart, BaseGoblinOrgan ] id: OrganGoblinHeart name: heart suffix: Goblin @@ -114,7 +123,7 @@ metabolizerTypes: [ Goblin ] - type: entity - parent: [ OrganHumanStomach, OrganAnimalStomach ] + parent: [ OrganHumanStomach, BaseGoblinOrgan, OrganAnimalStomach ] id: OrganGoblinStomach name: stomach suffix: Goblin @@ -149,7 +158,7 @@ - id: Alcohol - type: entity - parent: OrganHumanLiver + parent: [ OrganHumanLiver, BaseGoblinOrgan ] id: OrganGoblinLiver name: liver suffix: Goblin @@ -159,13 +168,13 @@ state: liver - type: Metabolizer # The liver metabolizes certain chemicals only, like alcohol. maxReagents: 1 - metabolizerTypes: [ Goblin ] + metabolizerTypes: [ Animal ] # [ Goblin ] groups: - id: Alcohol rateModifier: 0.1 # removes alcohol very slowly along with the stomach removing it as a drink - type: entity - parent: OrganHumanKidneys + parent: [ OrganHumanKidneys, BaseGoblinOrgan ] id: OrganGoblinKidneys name: kidneys suffix: Goblin diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/Baked/misc.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/Baked/misc.yml index 9bd9ea2ac28..6d2696b81d5 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/Baked/misc.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/Baked/misc.yml @@ -5,6 +5,8 @@ description: This cookie looks incredibly delicious. Whoever made it must really appreciate you. suffix: DO NOT MAP components: + - type: Food + quality: [ "High" ] - type: Sprite state: cookie-sugar - type: FlavorProfile diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/burger.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/burger.yml index 6d5cf330679..d97ad959354 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/burger.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/burger.yml @@ -29,3 +29,5 @@ - type: Tag tags: - Meat + - type: Food + quality: [ "High" ] diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/meat.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/meat.yml index bda82a7ca92..ee36312f469 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/meat.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/meat.yml @@ -24,3 +24,17 @@ price: 750 # - type: StealTarget # stealGroup: FoodMeatCat + - type: Food + quality: [ "Nasty" ] + +- type: entity + parent: FoodMeatRotten + id: FoodMeatGoblin + name: raw goblin meat + description: Just look at that marbling! Oh, wait, is that plastic? + components: + - type: Sprite + state: rotten + color: lime + - type: Food + quality: [ "Toxin" ] diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/produce.yml index 9ab84a26dc1..83977dcbb48 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/produce.yml @@ -23,3 +23,5 @@ - type: Tag tags: - Fruit + - type: Food + quality: [ "Normal" ] diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml index f13159a28c5..2be4584aaf0 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/spoiled.yml @@ -7,7 +7,7 @@ noSpawn: true components: - type: Food - quality: Toxin + quality: [ "Toxin" ] - type: Sprite layers: - sprite: Objects/Consumable/Food/meat.rsi @@ -39,7 +39,7 @@ noSpawn: true components: - type: Food - quality: Toxin + quality: [ "Toxin" ] - type: Sprite layers: - sprite: Objects/Consumable/Food/meat.rsi diff --git a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml index b0fdf72b1a7..ccf7b15a168 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Consumable/Food/trash.yml @@ -7,8 +7,7 @@ flavors: - funny - type: Food - quality: Trash -# requiresSpecialDigestion: true # Frontier, Goblins + quality: [ "Trash" ] - type: SolutionContainerManager solutions: food: diff --git a/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml b/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml deleted file mode 100644 index 5b586db46f0..00000000000 --- a/Resources/Prototypes/_NF/Objects/Consumable/Food/meat_goblin.yml +++ /dev/null @@ -1,11 +0,0 @@ -- type: entity - parent: FoodMeatRotten - id: FoodMeatGoblin - name: raw goblin meat - description: Just look at that marbling! Wait, is that microplastic? - components: - - type: Sprite - state: rotten - color: lime - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System From e9a96a64deaa6fab18429b1cdcca88b5e0babb1e Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Sat, 4 May 2024 04:04:23 +0300 Subject: [PATCH 20/34] more yml fixes --- .../Entities/Objects/Consumable/Food/ingredients.yml | 4 ++-- .../Prototypes/Entities/Objects/Misc/spaceshroom.yml | 12 ++++++------ .../Entities/Objects/Specific/Mail/base_mail.yml | 11 ++--------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml index aa38b2d81f7..26bd33300e7 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml @@ -619,8 +619,8 @@ - type: Tag tags: - Trash - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: entity name: cocoa beans diff --git a/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml b/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml index a55b535fa6c..c9b32cfe995 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/spaceshroom.yml @@ -5,8 +5,8 @@ suffix: Structure description: A cluster of wild mushrooms that likes to grow in dark, moist environments. components: - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: Sprite sprite: Objects/Misc/spaceshroom.rsi state: structure @@ -47,8 +47,8 @@ id: FoodSpaceshroom description: A wild mushroom. There's no telling what effect it could have... components: - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: Produce - type: Sprite sprite: Objects/Misc/spaceshroom.rsi @@ -107,8 +107,8 @@ id: FoodSpaceshroomCooked description: A wild mushroom that has been cooked through. It seems the heat has removed its chemical effects. components: - - type: Food # Frontier, New Food Quality System - quality: Toxin # Frontier, New Food Quality System + - type: Food # Frontier + quality: [ "Toxin" ] # Frontier, New Food Quality System - type: FlavorProfile flavors: - spaceshroomcooked diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml index a384ac9caad..86ed92d3bf4 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml @@ -8,6 +8,8 @@ size: Normal - type: Mail - type: AccessReader + - type: Food # Frontier + quality: [ "Trash", "Mail" ] # Frontier, New Food Quality System - type: Sprite scale: 0.7, 0.7 # Frontier sprite: Nyanotrasen/Objects/Specific/Mail/mail.rsi @@ -94,15 +96,6 @@ types: Blunt: 10 - type: CargoSellBlacklist - - type: Food # Frontier - quality: Mail # Frontier, New Food Quality System - - type: SolutionContainerManager - solutions: - food: - maxVol: 1 - reagents: - - ReagentId: TrashJuice - Quantity: 1 # This empty parcel is allowed to exist and evade the tests for the admin # mailto command. From 0b59814d18e27396da7d4b05cc8dc473340828a5 Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 4 May 2024 15:12:33 +0300 Subject: [PATCH 21/34] No More refill --- Content.Server/Nutrition/EntitySystems/FoodSystem.cs | 2 ++ Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 427bf5567fe..591ee86d9ac 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -440,6 +440,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg args.Repeat = !forceFeed; + _solutionContainer.SetCapacity(soln.Value, soln.Value.Comp.Solution.MaxVolume - transferAmount); // Frontier - You cannot eat a cake and leave it whole + if (TryComp(entity, out var stack)) { //Not deleting whole stack piece will make troubles with grinding object diff --git a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs index 3ea42811b66..e6bddec16d4 100644 --- a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs @@ -58,6 +58,8 @@ private bool TrySliceFood(EntityUid uid, EntityUid user, EntityUid usedItem, return false; } + _solutionContainerSystem.SetCapacity(soln.Value, soln.Value.Comp.Solution.MaxVolume - (solution.Volume / FixedPoint2.New(component.Count))); // Frontier - You cannot eat a cake and leave it whole + var sliceUid = Slice(uid, user, component, transform); var lostSolution = _solutionContainerSystem.SplitSolution(soln.Value, solution.Volume / FixedPoint2.New(component.Count)); From 39aefbd02308e2107d40b2f41dfb31789f7a466d Mon Sep 17 00:00:00 2001 From: ErhardSteinhauer <65374927+ErhardSteinhauer@users.noreply.github.com> Date: Sat, 4 May 2024 15:34:36 +0300 Subject: [PATCH 22/34] less corn in cob --- .../Prototypes/Entities/Objects/Consumable/Food/produce.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 45303d27c84..e7e8b49b5e5 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -964,7 +964,7 @@ maxVol: 20 reagents: - ReagentId: Cornmeal - Quantity: 10 + Quantity: 3 # Frontier, from 10 to 3 - type: entity name: onion From 0d099eed927bfb5d71f2d4e838075cd30229d251 Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 4 May 2024 18:28:36 +0300 Subject: [PATCH 23/34] Pain --- .../Nutrition/EntitySystems/FoodSystem.cs | 46 ++++++++++++------- .../Objects/Specific/Mail/base_mail.yml | 4 +- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 591ee86d9ac..697eab513ea 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -558,34 +558,46 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List<(Stoma { // Frontier - Food system hack job var foodQuality = component.Quality; - var allowEating = true; + var block = false; foreach (var quality in foodQuality) { - if (!comp.MailDigestion && quality == "Mail") - allowEating = true; - else if (!comp.FiberDigestion && quality == "Fiber") - allowEating = true; - else if (!comp.TrashDigestion && quality == "Trash") - allowEating = true; - else - allowEating = false; + if (quality == "Mail" || quality == "Fiber" || quality == "Trash") + { + if (comp.MailDigestion && quality == "Mail") + { + block = false; + break; + } + else if (comp.TrashDigestion && quality == "Trash") + { + block = false; + break; + } + else if (comp.TrashDigestion && quality == "Trash") + { + block = false; + break; + } + else + block = true; + } } - if (allowEating) + if (block) return false; // Frontier - Food system hack job // Find a stomach with a SpecialDigestible - if (comp.SpecialDigestible == null) - continue; + //if (comp.SpecialDigestible == null) + // continue; // Check if the food is in the whitelist - if (comp.SpecialDigestible.IsValid(food, EntityManager)) - return true; + //if (comp.SpecialDigestible.IsValid(food, EntityManager)) + // return true; // They can only eat whitelist food and the food isn't in the whitelist. It's not edible. - return false; + //return false; } - if (component.RequiresSpecialDigestion) - return false; + //if (component.RequiresSpecialDigestion) + // return false; return digestible; } diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml index 86ed92d3bf4..6675fba2ff5 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml @@ -1,5 +1,5 @@ - type: entity - parent: BaseItem + parent: [ BaseItem , TrashSolutionInjector ] # Frontier abstract: true id: BaseMail name: mail-item-name-unaddressed @@ -8,8 +8,6 @@ size: Normal - type: Mail - type: AccessReader - - type: Food # Frontier - quality: [ "Trash", "Mail" ] # Frontier, New Food Quality System - type: Sprite scale: 0.7, 0.7 # Frontier sprite: Nyanotrasen/Objects/Specific/Mail/mail.rsi From 0d15fce8eb2ed35d9725dc90b9f10d79baeb9bae Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 4 May 2024 18:39:50 +0300 Subject: [PATCH 24/34] Fixing --- .../Nutrition/EntitySystems/FoodSystem.cs | 28 +++++++++---------- .../Objects/Specific/Mail/base_mail.yml | 4 ++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 697eab513ea..4401e15e41e 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -558,46 +558,46 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List<(Stoma { // Frontier - Food system hack job var foodQuality = component.Quality; - var block = false; + var foodQualityblock = false; foreach (var quality in foodQuality) { if (quality == "Mail" || quality == "Fiber" || quality == "Trash") { if (comp.MailDigestion && quality == "Mail") { - block = false; + foodQualityblock = false; break; } - else if (comp.TrashDigestion && quality == "Trash") + else if (comp.FiberDigestion && quality == "Fiber") { - block = false; + foodQualityblock = false; break; } else if (comp.TrashDigestion && quality == "Trash") { - block = false; + foodQualityblock = false; break; } else - block = true; + foodQualityblock = true; } } - if (block) + if (foodQualityblock) return false; // Frontier - Food system hack job // Find a stomach with a SpecialDigestible - //if (comp.SpecialDigestible == null) - // continue; + if (comp.SpecialDigestible == null) + continue; // Check if the food is in the whitelist - //if (comp.SpecialDigestible.IsValid(food, EntityManager)) - // return true; + if (comp.SpecialDigestible.IsValid(food, EntityManager)) + return true; // They can only eat whitelist food and the food isn't in the whitelist. It's not edible. - //return false; + return false; } - //if (component.RequiresSpecialDigestion) - // return false; + if (component.RequiresSpecialDigestion) + return false; return digestible; } diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml index 6675fba2ff5..8d4b00433a9 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml @@ -93,7 +93,9 @@ damage: types: Blunt: 10 - - type: CargoSellBlacklist + - type: CargoSellBlacklist # Frontier + - type: Food # Frontier + quality: [ "Mail" ] # Frontier, New Food Quality System # This empty parcel is allowed to exist and evade the tests for the admin # mailto command. From 052d6199e4b3ed522d78b96ceda361d2ad2c1775 Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 4 May 2024 18:57:40 +0300 Subject: [PATCH 25/34] Moff --- Resources/Prototypes/Body/Organs/moth.yml | 1 + .../Objects/Consumable/Food/produce.yml | 3 ++- .../Prototypes/Entities/Objects/Misc/paper.yml | 5 +++-- .../Entities/Objects/Consumable/Food/moth.yml | 18 ++++++++++++------ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Resources/Prototypes/Body/Organs/moth.yml b/Resources/Prototypes/Body/Organs/moth.yml index 4d44dbad42f..e3584a3cbd8 100644 --- a/Resources/Prototypes/Body/Organs/moth.yml +++ b/Resources/Prototypes/Body/Organs/moth.yml @@ -10,6 +10,7 @@ # - Fruit # - Pill # - Crayon + fiberDigestion: true - type: SolutionContainerManager solutions: stomach: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index e7e8b49b5e5..2903f394455 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -1856,7 +1856,8 @@ flavors: - cotton - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal", "Fiber" ] # Frontier, New Food Quality System - type: SolutionContainerManager solutions: food: diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index ee6ed9a70b9..e68cd266aa7 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -63,6 +63,7 @@ solution: food delay: 7 forceFeedDelay: 7 + quality: [ "Fiber" ] # Frontier, New Food Quality System - type: BadFood - type: SolutionContainerManager solutions: @@ -71,8 +72,8 @@ reagents: - ReagentId: Fiber Quantity: 1 - - type: StaticPrice - price: 0 # Stop fax copy abuse. + - type: StaticPrice # Frontier - Stop fax copy abuse. + price: 0 # Frontier - type: entity name: paper scrap diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/moth.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/moth.yml index c365459480c..53f99edccc5 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/moth.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Consumable/Food/moth.yml @@ -542,7 +542,8 @@ tags: - MothFood - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal", "Fiber" ] # Frontier, New Food Quality System #Tastes like cotton and broth - type: entity @@ -1117,7 +1118,8 @@ tags: - MothFood - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal", "Fiber" ] # Frontier, New Food Quality System - type: entity name: slice of cotton pizza @@ -1137,7 +1139,8 @@ tags: - MothFood - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal", "Fiber" ] # Frontier, New Food Quality System # Tastes like crust, cotton, cheese # Sweets @@ -1199,7 +1202,8 @@ tags: - MothFood - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System #Tastes like vanilla and clouds. - type: entity @@ -1229,7 +1233,8 @@ tags: - MothFood - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System #Tastes like vanilla and clouds. - type: entity @@ -1270,6 +1275,7 @@ tags: - MothFood - type: Food - requiresSpecialDigestion: true +# requiresSpecialDigestion: true # Frontier + quality: [ "Normal" ] # Frontier, New Food Quality System #Tastes like muffin, dust and lint From 118699e13af814590b4741b66cb9f2ea32915aba Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 4 May 2024 19:25:49 +0300 Subject: [PATCH 26/34] Update paper.yml --- Resources/Prototypes/Entities/Objects/Misc/paper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index e68cd266aa7..3e150a0df56 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -63,7 +63,7 @@ solution: food delay: 7 forceFeedDelay: 7 - quality: [ "Fiber" ] # Frontier, New Food Quality System + quality: [ "Trash", "Fiber" ] # Frontier, New Food Quality System - type: BadFood - type: SolutionContainerManager solutions: From eaee2bffec8b53379e1f1f9dbb8122eedde1d14f Mon Sep 17 00:00:00 2001 From: Dvir Date: Thu, 30 May 2024 23:41:18 +0300 Subject: [PATCH 27/34] Fixup --- .../Nutrition/Components/FoodComponent.cs | 4 +- .../Nutrition/EntitySystems/FoodSystem.cs | 38 ++++++++++--------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index 479dfc8beae..294e5287b6f 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -81,12 +81,12 @@ public sealed partial class FoodComponent : Component /// /// Frontier - Nasty food, used for goblins to know if they can eat it or not /// - [ViewVariables(VVAccess.ReadWrite), DataField] // Frontier + [DataField, ViewVariables] // Frontier public string[] Quality = { "Normal" }; /// /// Frontier - Edited by the system to find the final quility results /// - [ViewVariables(VVAccess.ReadWrite), DataField] // Frontier + [DataField, ViewVariables] // Frontier public string FinalQuality = "Normal"; } diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 4401e15e41e..2abdc84ab7a 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -556,35 +556,39 @@ private bool IsDigestibleBy(EntityUid food, FoodComponent component, List<(Stoma // Run through the mobs' stomachs foreach (var (comp, _) in stomachs) { - // Frontier - Food system hack job + // Frontier - Food System var foodQuality = component.Quality; - var foodQualityblock = false; + bool foodQualityBlock = false; + + // Map each quality to the corresponding component property for digestion capability + var digestionMap = new Dictionary + { + {"Mail", comp.MailDigestion}, + {"Fiber", comp.FiberDigestion}, + {"Trash", comp.TrashDigestion} + }; + foreach (var quality in foodQuality) { - if (quality == "Mail" || quality == "Fiber" || quality == "Trash") + if (digestionMap.ContainsKey(quality)) { - if (comp.MailDigestion && quality == "Mail") + // Set foodQualityBlock based on whether the specific digestion capability is true + // If the component can digest this type of quality, set to false and break out of the loop + if (digestionMap[quality]) { - foodQualityblock = false; + foodQualityBlock = false; break; } - else if (comp.FiberDigestion && quality == "Fiber") - { - foodQualityblock = false; - break; - } - else if (comp.TrashDigestion && quality == "Trash") + else { - foodQualityblock = false; - break; + // If the component cannot digest this quality, set to true + foodQualityBlock = true; } - else - foodQualityblock = true; } } - if (foodQualityblock) + if (foodQualityBlock) return false; - // Frontier - Food system hack job + // Frontier - Food System // Find a stomach with a SpecialDigestible if (comp.SpecialDigestible == null) From 7298cf624870bd23e71e50c8a511f90dd68f035c Mon Sep 17 00:00:00 2001 From: Dvir Date: Thu, 30 May 2024 23:45:25 +0300 Subject: [PATCH 28/34] Update burger.yml --- .../Objects/Consumable/Food/burger.yml | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml index 25897d49bec..1b736d44336 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml @@ -99,7 +99,6 @@ - Meat - type: Food # Frontier quality: [ "Nasty" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, grass. - type: entity @@ -130,7 +129,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, bacon. - type: entity @@ -163,7 +161,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: bearger @@ -195,7 +192,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: big bite burger @@ -256,7 +252,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, brains. - type: entity @@ -288,7 +283,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: cheese burger @@ -321,7 +315,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # TODO: Make this work. # - type: Sprite # state: plate @@ -450,7 +443,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: crazy hamburger # Burger for you euro-cucks @@ -484,7 +476,6 @@ - Meat - type: Food # Frontier quality: [ "Nasty" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: duck sandwich # Burger for you sick bastards @@ -541,7 +532,6 @@ Quantity: 5 - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, pure electricity. - type: entity @@ -561,7 +551,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, fish. - type: entity @@ -593,7 +582,6 @@ Quantity: 5 - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, HEAT. - type: entity @@ -625,7 +613,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, ectoplasm. - type: entity @@ -658,7 +645,6 @@ - Meat - type: Food # Frontier quality: [ "Nasty" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: McGuffin @@ -752,7 +738,6 @@ Quantity: 5 - type: Food # Frontier quality: [ "Nasty" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like . - type: entity @@ -785,7 +770,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - type: entity name: rat burger @@ -817,7 +801,6 @@ - Meat - type: Food # Frontier quality: [ "Nasty" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, HEAT. - type: entity @@ -847,7 +830,6 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, lettuce, sludge. - type: entity @@ -877,7 +859,6 @@ Quantity: 5 - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, redditors. - type: entity @@ -907,7 +888,6 @@ Quantity: 5 - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, silver. - type: entity @@ -970,7 +950,6 @@ Quantity: 5 - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, tofu. - type: entity @@ -1004,7 +983,6 @@ - Meat - type: Food # Frontier quality: [ "Toxin" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier # Tastes like bun, acid. # Note: I would put a bunch of colored burgers here as listed in the tg .dm but @@ -1039,5 +1017,3 @@ - Meat - type: Food # Frontier quality: [ "Normal" ] # Frontier, New Food Quality System - transferAmount: 5 # Frontier - \ No newline at end of file From 7a6338ed9d34b9a195c0d85eb2432b722abcb5dc Mon Sep 17 00:00:00 2001 From: Dvir Date: Thu, 30 May 2024 23:48:46 +0300 Subject: [PATCH 29/34] Update FoodSystem.cs --- .../Nutrition/EntitySystems/FoodSystem.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 2abdc84ab7a..e508a545108 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -279,18 +279,8 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg { if (quality == null) continue; - else if (quality == "High") - entity.Comp.FinalQuality = "High"; - else if (quality == "Normal") - entity.Comp.FinalQuality = "Normal"; - else if (quality == "Junk") - entity.Comp.FinalQuality = "Junk"; - else if (quality == "Nasty") - entity.Comp.FinalQuality = "Nasty"; - else if (quality == "Toxin") - entity.Comp.FinalQuality = "Toxin"; - else if ((quality == "Trash") || (quality == "Mail") || (quality == "Fiber")) - entity.Comp.FinalQuality = "Trash"; + else + entity.Comp.FinalQuality = quality; if (reverseFoodQuality) { From 6c7010f390f521fb10936d17035b7560631064d4 Mon Sep 17 00:00:00 2001 From: Dvir Date: Thu, 30 May 2024 23:49:28 +0300 Subject: [PATCH 30/34] Update FoodSystem.cs --- Content.Server/Nutrition/EntitySystems/FoodSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index e508a545108..f00c76c9319 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -383,7 +383,7 @@ private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent arg _vomit.Vomit(args.Target.Value); } } - else if (entity.Comp.FinalQuality == "Trash") + else if (entity.Comp.FinalQuality == "Trash" || entity.Comp.FinalQuality == "Mail" || entity.Comp.FinalQuality == "Fiber") { if (_solutionContainer.ResolveSolution(stomachToUse.Owner, stomachToUse.BodySolutionName, ref stomachToUse.Solution)) { From 483d04845c70413e8a3fb34f56ddc90c59c050c8 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Thu, 30 May 2024 23:51:03 +0300 Subject: [PATCH 31/34] Update Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl Co-authored-by: whatston3 <166147148+whatston3@users.noreply.github.com> --- .../Locale/en-US/_NF/nutrition/components/food-component.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl b/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl index b01fc76648b..4eb8b5f8ee6 100644 --- a/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl +++ b/Resources/Locale/en-US/_NF/nutrition/components/food-component.ftl @@ -1,2 +1,2 @@ -food-system-nasty = This food gross. -food-system-toxin = This food bad. +food-system-nasty = That food was gross. +food-system-toxin = That food was bad. From 311260b529999de3bb0728b61e805dcef1ea49ed Mon Sep 17 00:00:00 2001 From: Dvir Date: Fri, 31 May 2024 00:05:11 +0300 Subject: [PATCH 32/34] Update FoodSystem.cs --- Content.Server/Nutrition/EntitySystems/FoodSystem.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index f00c76c9319..4306d3666d3 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -206,6 +206,18 @@ private void OnFeedFood(Entity entity, ref AfterInteractEvent arg return (true, true); } + public enum Quality // Frontier + { + Toxin, + Nasty, + Normal, + High, + Junk, + Mail, + Fiber, + Trash + } + private void OnDoAfter(Entity entity, ref ConsumeDoAfterEvent args) { if (args.Cancelled || args.Handled || entity.Comp.Deleted || args.Target == null) From 92dd46bfd0a1aaf32fe23cbfd6b6e19547232b5b Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Fri, 31 May 2024 18:45:24 +0300 Subject: [PATCH 33/34] Update Resources/Locale/en-US/_NF/reagents/foods.ftl Co-authored-by: whatston3 <166147148+whatston3@users.noreply.github.com> --- Resources/Locale/en-US/_NF/reagents/foods.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Locale/en-US/_NF/reagents/foods.ftl b/Resources/Locale/en-US/_NF/reagents/foods.ftl index bd9ed7bcfc9..87f00449b55 100644 --- a/Resources/Locale/en-US/_NF/reagents/foods.ftl +++ b/Resources/Locale/en-US/_NF/reagents/foods.ftl @@ -1,4 +1,4 @@ reagent-name-flaverol = Flaverol -reagent-name-trashjuice = trash juices +reagent-name-trashjuice = trash juice reagent-desc-trashjuice = Do you really want to know what it is? From 38f6b4edc9187a5a05a91a3ba3e70dec5bbd6858 Mon Sep 17 00:00:00 2001 From: "steinhauer.erhard" Date: Fri, 14 Jun 2024 14:40:07 +0300 Subject: [PATCH 34/34] mail --- .../Objects/Specific/Mail/base_mail.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml index 4f4592c3723..667ca0885a3 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Specific/Mail/base_mail.yml @@ -5,7 +5,8 @@ name: mail-item-name-unaddressed components: - type: Item - size: Normal +# size: Normal # Frontier + storedRotation: -90 - type: Mail - type: AccessReader - type: Sprite @@ -19,8 +20,8 @@ map: ["enum.MailVisualLayers.FragileStamp"] visible: false - map: ["enum.MailVisualLayers.JobStamp"] - scale: 0.5, 0.5 - offset: 0.275, 0.2 + scale: 0.8, 0.8 # Frontier 0.5<0.8 + offset: 0.225, 0.165 # Frontier (0.275, 0.2)<(0.225, 0.165) - state: locked map: ["enum.MailVisualLayers.Lock"] - state: priority @@ -93,8 +94,15 @@ types: Blunt: 10 - type: CargoSellBlacklist # Frontier - - type: Food # Frontier - quality: [ "Mail" ] # Frontier, New Food Quality System + - type: Food # Frontier - Moth food + requiresSpecialDigestion: true + - type: SolutionContainerManager + solutions: + food: + maxVol: 1 + reagents: + - ReagentId: Nothing + Quantity: 1 # This empty parcel is allowed to exist and evade the tests for the admin # mailto command.