Files
Red 759778782c Cooking simulator 2: Soups (#1535)
* Update shield.yml

* Add soup bowls

Introduced new bowl entities (wooden, iron, gold, copper) for soups, including their sprites and prototype definitions. Added 'Soup' to the CP14FoodType enum and updated the food holder logic. Removed the unused CP14Plate tag from plate.yml and misc.yml.

* Add misc soup ingredient sprites and metadata

Introduced new 32x32 sprites for various soup ingredients, including flyagaric, flylumish, lumish, meat, meat2, meat_salad, mole, mud, pumpkin, sawdust, trash, and veg_stew. Added corresponding meta.json with state definitions and licensing information.

* veg soup recipe for testing

* soup displacement maps

* meal displacement eating

* fix double cookin plates

* soup cooking

* Update cooking_pot.yml

* Refactor solution handling for cooking and containers

Updated solution component names and types for cooking pots, bowls, buckets, barrels, and wells to improve consistency and functionality. Added and removed solution-related components, adjusted transfer logic, and cleaned up unused solution states and visual metadata. Also added food type checks in cooking system to prevent incorrect transfers.

* new soup recipes

* Unit test

* fix

* trading requests

* Update CP14Cooking.cs

* Update CP14Cooking.cs

* audio improve, egg and bread fix

* fix bugs

* integration
2025-07-17 17:35:13 +03:00

52 lines
1.3 KiB
C#

/*
* This file is sublicensed under MIT License
* https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT
*/
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;
using YamlDotNet.Serialization.Schemas;
namespace Content.Shared._CP14.Cooking.Requirements;
public sealed partial class ReagentRequired : CP14CookingCraftRequirement
{
[DataField(required: true)]
public HashSet<ProtoId<ReagentPrototype>> Reagents = default!;
[DataField]
public FixedPoint2 Amount = 10f;
public override bool CheckRequirement(IEntityManager entManager,
IPrototypeManager protoManager,
List<ProtoId<TagPrototype>> placedTags,
Solution? solution = null)
{
if (solution is null)
return false;
var passed = false;
foreach (var (reagent, quantity) in solution.Contents)
{
if (!Reagents.Contains(reagent.Prototype))
continue;
if (quantity < Amount)
continue;
passed = true;
break;
}
return passed;
}
public override float GetComplexity()
{
return 1;
}
}