mild reagent prototype cleanup + other misc garbage (#22630)
This commit is contained in:
@@ -26,22 +26,22 @@ public sealed class SolutionSystemTests
|
|||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: TestReagentA
|
id: TestReagentA
|
||||||
name: nah
|
name: reagent-name-nothing
|
||||||
desc: nah
|
desc: reagent-desc-nothing
|
||||||
physicalDesc: nah
|
physicalDesc: reagent-physical-desc-nothing
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: TestReagentB
|
id: TestReagentB
|
||||||
name: nah
|
name: reagent-name-nothing
|
||||||
desc: nah
|
desc: reagent-desc-nothing
|
||||||
physicalDesc: nah
|
physicalDesc: reagent-physical-desc-nothing
|
||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: TestReagentC
|
id: TestReagentC
|
||||||
specificHeat: 2.0
|
specificHeat: 2.0
|
||||||
name: nah
|
name: reagent-name-nothing
|
||||||
desc: nah
|
desc: reagent-desc-nothing
|
||||||
physicalDesc: nah
|
physicalDesc: reagent-physical-desc-nothing
|
||||||
";
|
";
|
||||||
[Test]
|
[Test]
|
||||||
public async Task TryAddTwoNonReactiveReagent()
|
public async Task TryAddTwoNonReactiveReagent()
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
using Content.Server.Body.Components;
|
||||||
|
using Content.Shared.Body.Prototypes;
|
||||||
using Content.Shared.Chemistry.Reaction;
|
using Content.Shared.Chemistry.Reaction;
|
||||||
using Content.Shared.Chemistry.Reagent;
|
using Content.Shared.Chemistry.Reagent;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Server.GuideGenerator;
|
namespace Content.Server.GuideGenerator;
|
||||||
|
|
||||||
@@ -29,7 +32,7 @@ public sealed class ReagentEntry
|
|||||||
public List<string> Recipes { get; } = new();
|
public List<string> Recipes { get; } = new();
|
||||||
|
|
||||||
[JsonPropertyName("metabolisms")]
|
[JsonPropertyName("metabolisms")]
|
||||||
public Dictionary<string, ReagentEffectsEntry>? Metabolisms { get; }
|
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms { get; }
|
||||||
|
|
||||||
public ReagentEntry(ReagentPrototype proto)
|
public ReagentEntry(ReagentPrototype proto)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,30 +27,30 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
[IdDataField]
|
[IdDataField]
|
||||||
public string ID { get; private set; } = default!;
|
public string ID { get; private set; } = default!;
|
||||||
|
|
||||||
[DataField("name", required: true)]
|
[DataField(required: true)]
|
||||||
private string Name { get; set; } = default!;
|
private LocId Name { get; set; }
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadOnly)]
|
[ViewVariables(VVAccess.ReadOnly)]
|
||||||
public string LocalizedName => Loc.GetString(Name);
|
public string LocalizedName => Loc.GetString(Name);
|
||||||
|
|
||||||
[DataField("group")]
|
[DataField]
|
||||||
public string Group { get; private set; } = "Unknown";
|
public string Group { get; private set; } = "Unknown";
|
||||||
|
|
||||||
[ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<ReagentPrototype>))]
|
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<ReagentPrototype>))]
|
||||||
public string[]? Parents { get; private set; }
|
public string[]? Parents { get; private set; }
|
||||||
|
|
||||||
[NeverPushInheritance]
|
[NeverPushInheritance]
|
||||||
[AbstractDataFieldAttribute]
|
[AbstractDataField]
|
||||||
public bool Abstract { get; private set; }
|
public bool Abstract { get; private set; }
|
||||||
|
|
||||||
[DataField("desc", required: true)]
|
[DataField("desc", required: true)]
|
||||||
private string Description { get; set; } = default!;
|
private LocId Description { get; set; }
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadOnly)]
|
[ViewVariables(VVAccess.ReadOnly)]
|
||||||
public string LocalizedDescription => Loc.GetString(Description);
|
public string LocalizedDescription => Loc.GetString(Description);
|
||||||
|
|
||||||
[DataField("physicalDesc", required: true)]
|
[DataField("physicalDesc", required: true)]
|
||||||
private string PhysicalDescription { get; set; } = default!;
|
private LocId PhysicalDescription { get; set; } = default!;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadOnly)]
|
[ViewVariables(VVAccess.ReadOnly)]
|
||||||
public string LocalizedPhysicalDescription => Loc.GetString(PhysicalDescription);
|
public string LocalizedPhysicalDescription => Loc.GetString(PhysicalDescription);
|
||||||
@@ -58,16 +58,16 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is this reagent recognizable to the average spaceman (water, welding fuel, ketchup, etc)?
|
/// Is this reagent recognizable to the average spaceman (water, welding fuel, ketchup, etc)?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("recognizable")]
|
[DataField]
|
||||||
public bool Recognizable = false;
|
public bool Recognizable;
|
||||||
|
|
||||||
[DataField("flavor", customTypeSerializer:typeof(PrototypeIdSerializer<FlavorPrototype>))]
|
[DataField]
|
||||||
public string? Flavor;
|
public ProtoId<FlavorPrototype>? Flavor;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// There must be at least this much quantity in a solution to be tasted.
|
/// There must be at least this much quantity in a solution to be tasted.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("flavorMinimum")]
|
[DataField]
|
||||||
public FixedPoint2 FlavorMinimum = FixedPoint2.New(0.1f);
|
public FixedPoint2 FlavorMinimum = FixedPoint2.New(0.1f);
|
||||||
|
|
||||||
[DataField("color")]
|
[DataField("color")]
|
||||||
@@ -77,47 +77,48 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
/// The specific heat of the reagent.
|
/// The specific heat of the reagent.
|
||||||
/// How much energy it takes to heat one unit of this reagent by one Kelvin.
|
/// How much energy it takes to heat one unit of this reagent by one Kelvin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("specificHeat")]
|
[DataField]
|
||||||
public float SpecificHeat { get; private set; } = 1.0f;
|
public float SpecificHeat { get; private set; } = 1.0f;
|
||||||
|
|
||||||
[DataField("boilingPoint")]
|
[DataField]
|
||||||
public float? BoilingPoint { get; private set; }
|
public float? BoilingPoint { get; private set; }
|
||||||
|
|
||||||
[DataField("meltingPoint")]
|
[DataField]
|
||||||
public float? MeltingPoint { get; private set; }
|
public float? MeltingPoint { get; private set; }
|
||||||
|
|
||||||
[DataField("metamorphicSprite")]
|
[DataField]
|
||||||
public SpriteSpecifier? MetamorphicSprite { get; private set; } = null;
|
public SpriteSpecifier? MetamorphicSprite { get; private set; } = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this reagent is part of a puddle is it slippery.
|
/// If this reagent is part of a puddle is it slippery.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("slippery")]
|
[DataField]
|
||||||
public bool Slippery = false;
|
public bool Slippery;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How much reagent slows entities down if it's part of a puddle.
|
/// How much reagent slows entities down if it's part of a puddle.
|
||||||
/// 0 - no slowdown; 1 - can't move.
|
/// 0 - no slowdown; 1 - can't move.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("viscosity")]
|
[DataField]
|
||||||
public float Viscosity = 0;
|
public float Viscosity;
|
||||||
|
|
||||||
[DataField("metabolisms", serverOnly: true, customTypeSerializer: typeof(PrototypeIdDictionarySerializer<ReagentEffectsEntry, MetabolismGroupPrototype>))]
|
[DataField(serverOnly: true)]
|
||||||
public Dictionary<string, ReagentEffectsEntry>? Metabolisms = null;
|
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms;
|
||||||
|
|
||||||
[DataField("reactiveEffects", serverOnly: true, customTypeSerializer: typeof(PrototypeIdDictionarySerializer<ReactiveReagentEffectEntry, ReactiveGroupPrototype>))]
|
[DataField(serverOnly: true)]
|
||||||
public Dictionary<string, ReactiveReagentEffectEntry>? ReactiveEffects = null;
|
public Dictionary<ProtoId<ReactiveGroupPrototype>, ReactiveReagentEffectEntry>? ReactiveEffects;
|
||||||
|
|
||||||
[DataField("tileReactions", serverOnly: true)]
|
[DataField(serverOnly: true)]
|
||||||
public List<ITileReaction> TileReactions = new(0);
|
public List<ITileReaction> TileReactions = new(0);
|
||||||
|
|
||||||
[DataField("plantMetabolism", serverOnly: true)]
|
[DataField("plantMetabolism", serverOnly: true)]
|
||||||
public List<ReagentEffect> PlantMetabolisms = new(0);
|
public List<ReagentEffect> PlantMetabolisms = new(0);
|
||||||
|
|
||||||
[DataField("pricePerUnit")] public float PricePerUnit;
|
[DataField]
|
||||||
|
public float PricePerUnit;
|
||||||
|
|
||||||
// TODO: Pick the highest reagent for sounds and add sticky to cola, juice, etc.
|
// TODO: Pick the highest reagent for sounds and add sticky to cola, juice, etc.
|
||||||
[DataField("footstepSound")]
|
[DataField]
|
||||||
public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater");
|
public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater");
|
||||||
|
|
||||||
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume)
|
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume)
|
||||||
@@ -171,7 +172,7 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
{
|
{
|
||||||
public string ReagentPrototype;
|
public string ReagentPrototype;
|
||||||
|
|
||||||
public Dictionary<string, ReagentEffectsGuideEntry>? GuideEntries;
|
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsGuideEntry>? GuideEntries;
|
||||||
|
|
||||||
public ReagentGuideEntry(ReagentPrototype proto, IPrototypeManager prototype, IEntitySystemManager entSys)
|
public ReagentGuideEntry(ReagentPrototype proto, IPrototypeManager prototype, IEntitySystemManager entSys)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,3 +10,4 @@ reagent-effect-status-effect-Drunk = drunkness
|
|||||||
reagent-effect-status-effect-PressureImmunity = pressure immunity
|
reagent-effect-status-effect-PressureImmunity = pressure immunity
|
||||||
reagent-effect-status-effect-Pacified = combat pacification
|
reagent-effect-status-effect-Pacified = combat pacification
|
||||||
reagent-effect-status-effect-RatvarianLanguage = ratvarian language patterns
|
reagent-effect-status-effect-RatvarianLanguage = ratvarian language patterns
|
||||||
|
reagent-effect-status-effect-StaminaModifier = modified stamina
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ reagent-desc-nothing = Absolutely nothing.
|
|||||||
reagent-name-nuclear-cola = nuclear cola
|
reagent-name-nuclear-cola = nuclear cola
|
||||||
reagent-desc-nuclear-cola = Cola, cola never changes.
|
reagent-desc-nuclear-cola = Cola, cola never changes.
|
||||||
|
|
||||||
|
reagent-name-hot-cocoa = hot cocoa
|
||||||
|
reagent-desc-hot-cocoa = Smells like the holidays!
|
||||||
|
|
||||||
reagent-name-soda-water = soda water
|
reagent-name-soda-water = soda water
|
||||||
reagent-desc-soda-water = A container of club soda. Why not make a scotch and soda?
|
reagent-desc-soda-water = A container of club soda. Why not make a scotch and soda?
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,8 @@ reagent-desc-protein = Found in certain meals, good for bodily health.
|
|||||||
reagent-name-cocoapowder = сocoa powder
|
reagent-name-cocoapowder = сocoa powder
|
||||||
reagent-desc-cocoapowder = From the best varieties of cocoa beans
|
reagent-desc-cocoapowder = From the best varieties of cocoa beans
|
||||||
|
|
||||||
|
reagent-name-butter = butter
|
||||||
|
reagent-desc-butter = You can believe it!
|
||||||
|
|
||||||
reagent-name-pumpkin-flesh = pumpkin flesh
|
reagent-name-pumpkin-flesh = pumpkin flesh
|
||||||
reagent-desc-pumpkin-flesh = The mushy, sweet remains of a pumpkin.
|
reagent-desc-pumpkin-flesh = The mushy, sweet remains of a pumpkin.
|
||||||
@@ -16,10 +16,10 @@ reagent-desc-thc = The main psychoactive compound in cannabis.
|
|||||||
reagent-name-thc-oil = THC oil
|
reagent-name-thc-oil = THC oil
|
||||||
reagent-desc-thc-oil = Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than its natural form and can be used to numb chronic pain in patients.
|
reagent-desc-thc-oil = Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than its natural form and can be used to numb chronic pain in patients.
|
||||||
|
|
||||||
reagent-name-bananadine = Bananadine
|
reagent-name-bananadine = bananadine
|
||||||
reagent-desc-bananadine = A mild psychedelic that is found in small traces in banana peels.
|
reagent-desc-bananadine = A mild psychedelic that is found in small traces in banana peels.
|
||||||
|
|
||||||
reagent-name-nicotine = Nicotine
|
reagent-name-nicotine = nicotine
|
||||||
reagent-desc-nicotine = Dangerous and highly addictive, but that's what the propaganda says.
|
reagent-desc-nicotine = Dangerous and highly addictive, but that's what the propaganda says.
|
||||||
|
|
||||||
reagent-name-impedrezene = impedrezene
|
reagent-name-impedrezene = impedrezene
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
- type: reagent
|
- type: reagent
|
||||||
id: HotCocoa
|
id: HotCocoa
|
||||||
name: reagent-name-cocoa
|
name: reagent-name-hot-cocoa
|
||||||
parent: BaseDrink
|
parent: BaseDrink
|
||||||
desc: reagent-desc-cocoa
|
desc: reagent-desc-hot-cocoa
|
||||||
physicalDesc: reagent-physical-desc-aromatic
|
physicalDesc: reagent-physical-desc-aromatic
|
||||||
flavor: chocolate
|
flavor: chocolate
|
||||||
color: "#664300"
|
color: "#664300"
|
||||||
|
|||||||
Reference in New Issue
Block a user