mild reagent prototype cleanup + other misc garbage (#22630)
This commit is contained in:
@@ -26,22 +26,22 @@ public sealed class SolutionSystemTests
|
||||
|
||||
- type: reagent
|
||||
id: TestReagentA
|
||||
name: nah
|
||||
desc: nah
|
||||
physicalDesc: nah
|
||||
name: reagent-name-nothing
|
||||
desc: reagent-desc-nothing
|
||||
physicalDesc: reagent-physical-desc-nothing
|
||||
|
||||
- type: reagent
|
||||
id: TestReagentB
|
||||
name: nah
|
||||
desc: nah
|
||||
physicalDesc: nah
|
||||
name: reagent-name-nothing
|
||||
desc: reagent-desc-nothing
|
||||
physicalDesc: reagent-physical-desc-nothing
|
||||
|
||||
- type: reagent
|
||||
id: TestReagentC
|
||||
specificHeat: 2.0
|
||||
name: nah
|
||||
desc: nah
|
||||
physicalDesc: nah
|
||||
name: reagent-name-nothing
|
||||
desc: reagent-desc-nothing
|
||||
physicalDesc: reagent-physical-desc-nothing
|
||||
";
|
||||
[Test]
|
||||
public async Task TryAddTwoNonReactiveReagent()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Shared.Body.Prototypes;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.GuideGenerator;
|
||||
|
||||
@@ -29,7 +32,7 @@ public sealed class ReagentEntry
|
||||
public List<string> Recipes { get; } = new();
|
||||
|
||||
[JsonPropertyName("metabolisms")]
|
||||
public Dictionary<string, ReagentEffectsEntry>? Metabolisms { get; }
|
||||
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms { get; }
|
||||
|
||||
public ReagentEntry(ReagentPrototype proto)
|
||||
{
|
||||
|
||||
@@ -27,30 +27,30 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
[IdDataField]
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
[DataField("name", required: true)]
|
||||
private string Name { get; set; } = default!;
|
||||
[DataField(required: true)]
|
||||
private LocId Name { get; set; }
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public string LocalizedName => Loc.GetString(Name);
|
||||
|
||||
[DataField("group")]
|
||||
[DataField]
|
||||
public string Group { get; private set; } = "Unknown";
|
||||
|
||||
[ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<ReagentPrototype>))]
|
||||
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<ReagentPrototype>))]
|
||||
public string[]? Parents { get; private set; }
|
||||
|
||||
[NeverPushInheritance]
|
||||
[AbstractDataFieldAttribute]
|
||||
[AbstractDataField]
|
||||
public bool Abstract { get; private set; }
|
||||
|
||||
[DataField("desc", required: true)]
|
||||
private string Description { get; set; } = default!;
|
||||
private LocId Description { get; set; }
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public string LocalizedDescription => Loc.GetString(Description);
|
||||
|
||||
[DataField("physicalDesc", required: true)]
|
||||
private string PhysicalDescription { get; set; } = default!;
|
||||
private LocId PhysicalDescription { get; set; } = default!;
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public string LocalizedPhysicalDescription => Loc.GetString(PhysicalDescription);
|
||||
@@ -58,16 +58,16 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
/// <summary>
|
||||
/// Is this reagent recognizable to the average spaceman (water, welding fuel, ketchup, etc)?
|
||||
/// </summary>
|
||||
[DataField("recognizable")]
|
||||
public bool Recognizable = false;
|
||||
[DataField]
|
||||
public bool Recognizable;
|
||||
|
||||
[DataField("flavor", customTypeSerializer:typeof(PrototypeIdSerializer<FlavorPrototype>))]
|
||||
public string? Flavor;
|
||||
[DataField]
|
||||
public ProtoId<FlavorPrototype>? Flavor;
|
||||
|
||||
/// <summary>
|
||||
/// There must be at least this much quantity in a solution to be tasted.
|
||||
/// </summary>
|
||||
[DataField("flavorMinimum")]
|
||||
[DataField]
|
||||
public FixedPoint2 FlavorMinimum = FixedPoint2.New(0.1f);
|
||||
|
||||
[DataField("color")]
|
||||
@@ -77,47 +77,48 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
/// The specific heat of the reagent.
|
||||
/// How much energy it takes to heat one unit of this reagent by one Kelvin.
|
||||
/// </summary>
|
||||
[DataField("specificHeat")]
|
||||
[DataField]
|
||||
public float SpecificHeat { get; private set; } = 1.0f;
|
||||
|
||||
[DataField("boilingPoint")]
|
||||
[DataField]
|
||||
public float? BoilingPoint { get; private set; }
|
||||
|
||||
[DataField("meltingPoint")]
|
||||
[DataField]
|
||||
public float? MeltingPoint { get; private set; }
|
||||
|
||||
[DataField("metamorphicSprite")]
|
||||
[DataField]
|
||||
public SpriteSpecifier? MetamorphicSprite { get; private set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// If this reagent is part of a puddle is it slippery.
|
||||
/// </summary>
|
||||
[DataField("slippery")]
|
||||
public bool Slippery = false;
|
||||
[DataField]
|
||||
public bool Slippery;
|
||||
|
||||
/// <summary>
|
||||
/// How much reagent slows entities down if it's part of a puddle.
|
||||
/// 0 - no slowdown; 1 - can't move.
|
||||
/// </summary>
|
||||
[DataField("viscosity")]
|
||||
public float Viscosity = 0;
|
||||
[DataField]
|
||||
public float Viscosity;
|
||||
|
||||
[DataField("metabolisms", serverOnly: true, customTypeSerializer: typeof(PrototypeIdDictionarySerializer<ReagentEffectsEntry, MetabolismGroupPrototype>))]
|
||||
public Dictionary<string, ReagentEffectsEntry>? Metabolisms = null;
|
||||
[DataField(serverOnly: true)]
|
||||
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms;
|
||||
|
||||
[DataField("reactiveEffects", serverOnly: true, customTypeSerializer: typeof(PrototypeIdDictionarySerializer<ReactiveReagentEffectEntry, ReactiveGroupPrototype>))]
|
||||
public Dictionary<string, ReactiveReagentEffectEntry>? ReactiveEffects = null;
|
||||
[DataField(serverOnly: true)]
|
||||
public Dictionary<ProtoId<ReactiveGroupPrototype>, ReactiveReagentEffectEntry>? ReactiveEffects;
|
||||
|
||||
[DataField("tileReactions", serverOnly: true)]
|
||||
[DataField(serverOnly: true)]
|
||||
public List<ITileReaction> TileReactions = new(0);
|
||||
|
||||
[DataField("plantMetabolism", serverOnly: true)]
|
||||
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.
|
||||
[DataField("footstepSound")]
|
||||
[DataField]
|
||||
public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater");
|
||||
|
||||
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume)
|
||||
@@ -171,7 +172,7 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
{
|
||||
public string ReagentPrototype;
|
||||
|
||||
public Dictionary<string, ReagentEffectsGuideEntry>? GuideEntries;
|
||||
public Dictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsGuideEntry>? GuideEntries;
|
||||
|
||||
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-Pacified = combat pacification
|
||||
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-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-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-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-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-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-name-nicotine = Nicotine
|
||||
reagent-name-nicotine = nicotine
|
||||
reagent-desc-nicotine = Dangerous and highly addictive, but that's what the propaganda says.
|
||||
|
||||
reagent-name-impedrezene = impedrezene
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
- type: reagent
|
||||
id: HotCocoa
|
||||
name: reagent-name-cocoa
|
||||
name: reagent-name-hot-cocoa
|
||||
parent: BaseDrink
|
||||
desc: reagent-desc-cocoa
|
||||
desc: reagent-desc-hot-cocoa
|
||||
physicalDesc: reagent-physical-desc-aromatic
|
||||
flavor: chocolate
|
||||
color: "#664300"
|
||||
|
||||
Reference in New Issue
Block a user