Chemistry JSON dump tool and companion GitHub Action (#6134)

* fuck

* oh boy

* Sorted every chem into guide groups

* WHY ARE YOU NOT ABSTRACT

* removes the target thing in favor of simply generating everything.

* eee

* Add group for med

* Update wiki JSON generation to use System.Text.Json

* Fix error on shutdown during wiki JSON generation

* First pass at automatic wiki workflow

* Add a temporary workaround while the build is continuing to give errors

* Update workflow to reference correct API url, track dependency.

* Compile wiki actions into one job rather than two

* Update page name to reference editable page

* Add other JSON file and parameterize root page path

* A few steps closer to using `System.Text.Json` to serialize properly

* Revert System.Text.Json and return to Newtonsoft.Json.

* Revert the revert. Return to System.Text.Json.

This reverts commit a5ea98dfdcfab3f605ac4d82d3b110f099324308.

* Add and register UniversalJsonConverter class.

* Narrow triggers for update-wiki GitHub action.

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
Sam Weaver
2022-01-17 14:50:02 -05:00
committed by GitHub
parent 5f3e83e493
commit 40e2e78e0f
27 changed files with 591 additions and 44 deletions

61
.github/workflows/update-wiki.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Update JSON files on wiki
on:
push:
branches: [ master, jsondump ]
paths:
- '.github/workflows/update-wiki.yml'
- 'Content.Shared/Chemistry/**.cs'
- 'Content.Server/Chemistry/**.cs'
- 'Content.Server/GuideGenerator/**.cs'
- 'Resources/Prototypes/Reagents/**.yml'
- 'Resources/Prototypes/Chemistry/**.yml'
- 'Resources/Prototypes/Recipes/Reactions/**.yml'
- 'RobustToolbox/'
jobs:
wiki:
name: Build and publish JSON for the wiki
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup submodule
run: |
git submodule update --init --recursive
- name: Pull engine updates
uses: space-wizards/submodule-dependency@v0.1.5
- name: Update Engine Submodules
run: |
cd RobustToolbox/
git submodule update --init --recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore /p:WarningsAsErrors=nullable /m
- name: Generate JSON
run: dotnet ./bin/Content.Server/Content.Server.dll --cvar autogen.destination_file=prototypes.json
continue-on-error: true
- name: Upload chem_prototypes.json
uses: jtmullen/mediawiki-edit-action@v0.1.1
with:
wiki_text_file: ./bin/Content.Server/data/chem_prototypes.json
edit_summary: Update chem_prototypes.json via GitHub Actions
page_name: "${{ secrets.WIKI_PAGE_ROOT }}/chem_prototypes.json"
api_url: https://wiki.spacestation14.io/w/api.php
username: ${{ secrets.WIKI_BOT_USER }}
password: ${{ secrets.WIKI_BOT_PASS }}
- name: Upload react_prototypes.json
uses: jtmullen/mediawiki-edit-action@v0.1.1
with:
wiki_text_file: ./bin/Content.Server/data/react_prototypes.json
edit_summary: Update react_prototypes.json via GitHub Actions
page_name: "${{ secrets.WIKI_PAGE_ROOT }}/react_prototypes.json"
api_url: https://wiki.spacestation14.io/w/api.php
username: ${{ secrets.WIKI_BOT_USER }}
password: ${{ secrets.WIKI_BOT_PASS }}

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Text.Json.Serialization;
using Content.Server.Chemistry.Components.SolutionManager; using Content.Server.Chemistry.Components.SolutionManager;
using Content.Server.Explosion.EntitySystems; using Content.Server.Explosion.EntitySystems;
using Content.Shared.Administration.Logs; using Content.Shared.Administration.Logs;
@@ -12,21 +13,36 @@ namespace Content.Server.Chemistry.ReactionEffects
[DataDefinition] [DataDefinition]
public class ExplosionReactionEffect : ReagentEffect public class ExplosionReactionEffect : ReagentEffect
{ {
[DataField("devastationRange")] private float _devastationRange = 1; [DataField("devastationRange")]
[DataField("heavyImpactRange")] private float _heavyImpactRange = 2; [JsonIgnore]
[DataField("lightImpactRange")] private float _lightImpactRange = 3; private float _devastationRange = 1;
[DataField("flashRange")] private float _flashRange;
[DataField("heavyImpactRange")]
[JsonIgnore]
private float _heavyImpactRange = 2;
[DataField("lightImpactRange")]
[JsonIgnore]
private float _lightImpactRange = 3;
[DataField("flashRange")]
[JsonIgnore]
private float _flashRange;
/// <summary> /// <summary>
/// If true, then scale ranges by intensity. If not, the ranges are the same regardless of reactant amount. /// If true, then scale ranges by intensity. If not, the ranges are the same regardless of reactant amount.
/// </summary> /// </summary>
[DataField("scaled")] private bool _scaled; [DataField("scaled")]
[JsonIgnore]
private bool _scaled;
/// <summary> /// <summary>
/// Maximum scaling on ranges. For example, if it equals 5, then it won't scaled anywhere past /// Maximum scaling on ranges. For example, if it equals 5, then it won't scaled anywhere past
/// 5 times the minimum reactant amount. /// 5 times the minimum reactant amount.
/// </summary> /// </summary>
[DataField("maxScale")] private float _maxScale = 1; [DataField("maxScale")]
[JsonIgnore]
private float _maxScale = 1;
public override bool ShouldLog => true; public override bool ShouldLog => true;
public override LogImpact LogImpact => LogImpact.High; public override LogImpact LogImpact => LogImpact.High;

View File

@@ -1,3 +1,4 @@
using System.Text.Json.Serialization;
using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Reagent;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
@@ -16,6 +17,7 @@ namespace Content.Server.Chemistry.ReagentEffects
/// <summary> /// <summary>
/// Damage to apply every metabolism cycle. Damage Ignores resistances. /// Damage to apply every metabolism cycle. Damage Ignores resistances.
/// </summary> /// </summary>
[JsonPropertyName("damage")]
[DataField("damage", required: true)] [DataField("damage", required: true)]
public DamageSpecifier Damage = default!; public DamageSpecifier Damage = default!;
@@ -23,10 +25,12 @@ namespace Content.Server.Chemistry.ReagentEffects
/// Should this effect scale the damage by the amount of chemical in the solution? /// Should this effect scale the damage by the amount of chemical in the solution?
/// Useful for touch reactions, like styptic powder or acid. /// Useful for touch reactions, like styptic powder or acid.
/// </summary> /// </summary>
[JsonPropertyName("scaleByQuantity")]
[DataField("scaleByQuantity")] [DataField("scaleByQuantity")]
public bool ScaleByQuantity = false; public bool ScaleByQuantity = false;
[DataField("ignoreResistances")] [DataField("ignoreResistances")]
[JsonPropertyName("ignoreResistances")]
public bool IgnoreResistances = true; public bool IgnoreResistances = true;
public override void Effect(ReagentEffectArgs args) public override void Effect(ReagentEffectArgs args)

View File

@@ -1,3 +1,4 @@
using System.IO;
using Content.Server.Administration.Managers; using Content.Server.Administration.Managers;
using Content.Server.Afk; using Content.Server.Afk;
using Content.Server.AI.Utility; using Content.Server.AI.Utility;
@@ -8,6 +9,7 @@ using Content.Server.Connection;
using Content.Server.Database; using Content.Server.Database;
using Content.Server.EUI; using Content.Server.EUI;
using Content.Server.GameTicking; using Content.Server.GameTicking;
using Content.Server.GuideGenerator;
using Content.Server.Info; using Content.Server.Info;
using Content.Server.IoC; using Content.Server.IoC;
using Content.Server.Maps; using Content.Server.Maps;
@@ -18,15 +20,19 @@ using Content.Server.Voting.Managers;
using Content.Shared.Actions; using Content.Shared.Actions;
using Content.Shared.Administration; using Content.Shared.Administration;
using Content.Shared.Alert; using Content.Shared.Alert;
using Content.Shared.CCVar;
using Content.Shared.Kitchen; using Content.Shared.Kitchen;
using Robust.Server;
using Robust.Server.Bql; using Robust.Server.Bql;
using Robust.Server.Player; using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Server.ServerStatus; using Robust.Server.ServerStatus;
using Robust.Shared.ContentPack; using Robust.Shared.ContentPack;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Server.Entry namespace Content.Server.Entry
{ {
@@ -62,45 +68,66 @@ namespace Content.Server.Entry
IoCManager.BuildGraph(); IoCManager.BuildGraph();
factory.GenerateNetIds(); factory.GenerateNetIds();
var configManager = IoCManager.Resolve<IConfigurationManager>();
var dest = configManager.GetCVar(CCVars.DestinationFile);
if (dest == "") //hacky but it keeps load times for the generator down.
{
_euiManager = IoCManager.Resolve<EuiManager>();
_voteManager = IoCManager.Resolve<IVoteManager>();
_euiManager = IoCManager.Resolve<EuiManager>(); IoCManager.Resolve<IChatSanitizationManager>().Initialize();
_voteManager = IoCManager.Resolve<IVoteManager>(); IoCManager.Resolve<IChatManager>().Initialize();
IoCManager.Resolve<IChatSanitizationManager>().Initialize(); var playerManager = IoCManager.Resolve<IPlayerManager>();
IoCManager.Resolve<IChatManager>().Initialize();
var playerManager = IoCManager.Resolve<IPlayerManager>(); var logManager = IoCManager.Resolve<ILogManager>();
logManager.GetSawmill("Storage").Level = LogLevel.Info;
logManager.GetSawmill("db.ef").Level = LogLevel.Info;
var logManager = IoCManager.Resolve<ILogManager>(); IoCManager.Resolve<IConnectionManager>().Initialize();
logManager.GetSawmill("Storage").Level = LogLevel.Info; IoCManager.Resolve<IServerDbManager>().Init();
logManager.GetSawmill("db.ef").Level = LogLevel.Info; IoCManager.Resolve<IServerPreferencesManager>().Init();
IoCManager.Resolve<INodeGroupFactory>().Initialize();
IoCManager.Resolve<IConnectionManager>().Initialize(); IoCManager.Resolve<IGamePrototypeLoadManager>().Initialize();
IoCManager.Resolve<IServerDbManager>().Init(); _voteManager.Initialize();
IoCManager.Resolve<IServerPreferencesManager>().Init(); }
IoCManager.Resolve<INodeGroupFactory>().Initialize();
IoCManager.Resolve<IGamePrototypeLoadManager>().Initialize();
_voteManager.Initialize();
} }
public override void PostInit() public override void PostInit()
{ {
base.PostInit(); base.PostInit();
IoCManager.Resolve<ISandboxManager>().Initialize(); var configManager = IoCManager.Resolve<IConfigurationManager>();
IoCManager.Resolve<RecipeManager>().Initialize(); var resourceManager = IoCManager.Resolve<IResourceManager>();
IoCManager.Resolve<ActionManager>().Initialize(); var dest = configManager.GetCVar(CCVars.DestinationFile);
IoCManager.Resolve<BlackboardManager>().Initialize(); var resPath = new ResourcePath(dest).ToRootedPath();
IoCManager.Resolve<ConsiderationsManager>().Initialize(); if (dest != "")
IoCManager.Resolve<IAdminManager>().Initialize(); {
IoCManager.Resolve<INpcBehaviorManager>().Initialize(); var file = resourceManager.UserData.OpenWriteText(resPath.WithName("chem_" + dest));
IoCManager.Resolve<IAfkManager>().Initialize(); ChemistryJsonGenerator.PublishJson(file);
IoCManager.Resolve<RulesManager>().Initialize(); file.Flush();
_euiManager.Initialize(); file = resourceManager.UserData.OpenWriteText(resPath.WithName("react_" + dest));
ReactionJsonGenerator.PublishJson(file);
file.Flush();
IoCManager.Resolve<IBaseServer>().Shutdown("Data generation done");
}
else
{
IoCManager.Resolve<ISandboxManager>().Initialize();
IoCManager.Resolve<RecipeManager>().Initialize();
IoCManager.Resolve<ActionManager>().Initialize();
IoCManager.Resolve<BlackboardManager>().Initialize();
IoCManager.Resolve<ConsiderationsManager>().Initialize();
IoCManager.Resolve<IAdminManager>().Initialize();
IoCManager.Resolve<INpcBehaviorManager>().Initialize();
IoCManager.Resolve<IAfkManager>().Initialize();
IoCManager.Resolve<RulesManager>().Initialize();
_euiManager.Initialize();
IoCManager.Resolve<IGameMapManager>().Initialize(); IoCManager.Resolve<IGameMapManager>().Initialize();
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<GameTicker>().PostInitialize(); IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<GameTicker>().PostInitialize();
IoCManager.Resolve<IBqlQueryManager>().DoAutoRegistrations(); IoCManager.Resolve<IBqlQueryManager>().DoAutoRegistrations();
}
} }
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs) public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
@@ -110,11 +137,11 @@ namespace Content.Server.Entry
switch (level) switch (level)
{ {
case ModUpdateLevel.PostEngine: case ModUpdateLevel.PostEngine:
{ {
_euiManager.SendUpdates(); _euiManager.SendUpdates();
_voteManager.Update(); _voteManager.Update();
break; break;
} }
} }
} }
} }

View File

@@ -0,0 +1,40 @@
using System.IO;
using System.Linq;
using System.Text.Json;
using Content.Server.Administration.Logs.Converters;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
namespace Content.Server.GuideGenerator;
public class ChemistryJsonGenerator
{
public static void PublishJson(StreamWriter file)
{
var prototype = IoCManager.Resolve<IPrototypeManager>();
var prototypes =
prototype
.EnumeratePrototypes<ReagentPrototype>()
.Where(x => !x.Abstract)
.Select(x => new ReagentEntry(x))
.ToDictionary(x => x.Id, x => x);
var reactions =
prototype
.EnumeratePrototypes<ReactionPrototype>()
.Where(x => x.Products.Count != 0);
foreach (var reaction in reactions)
{
foreach (var product in reaction.Products.Keys)
{
prototypes[product].Recipes.Add(reaction.ID);
}
}
file.Write(JsonSerializer.Serialize(prototypes, new JsonSerializerOptions { WriteIndented = true }));
}
}

View File

@@ -0,0 +1,26 @@
using System.IO;
using System.Linq;
using System.Text.Json;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.FixedPoint;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
namespace Content.Server.GuideGenerator;
public class ReactionJsonGenerator
{
public static void PublishJson(StreamWriter file)
{
var prototype = IoCManager.Resolve<IPrototypeManager>();
var reactions =
prototype
.EnumeratePrototypes<ReactionPrototype>()
.Select(x => new ReactionEntry(x))
.ToDictionary(x => x.Id, x => x);
file.Write(JsonSerializer.Serialize(reactions, new JsonSerializerOptions { WriteIndented = true, IncludeFields = true }));
}
}

View File

@@ -0,0 +1,98 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using Content.Server.Body.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Converters;
using Robust.Shared.Maths;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.GuideGenerator;
public class ReagentEntry
{
[JsonPropertyName("id")]
public string Id { get; }
[JsonPropertyName("name")]
public string Name { get; }
[JsonPropertyName("group")]
public string Group { get; }
[JsonPropertyName("desc")]
public string Description { get; }
[JsonPropertyName("physicalDesc")]
public string PhysicalDescription { get; }
[JsonPropertyName("color")]
public string SubstanceColor { get; }
[JsonPropertyName("recipes")]
public List<string> Recipes { get; } = new();
[JsonPropertyName("metabolisms")]
public Dictionary<string, ReagentEffectsEntry>? Metabolisms { get; }
public ReagentEntry(ReagentPrototype proto)
{
Id = proto.ID;
Name = proto.Name;
Group = proto.Group;
Description = proto.Description;
PhysicalDescription = proto.PhysicalDescription;
SubstanceColor = proto.SubstanceColor.ToHex();
Metabolisms = proto.Metabolisms;
}
}
[JsonConverter(typeof(UniversalJsonConverter<ReactionEntry>))]
public class ReactionEntry
{
[JsonPropertyName("id")]
public string Id { get; }
[JsonPropertyName("name")]
public string Name { get; }
[JsonPropertyName("reactants")]
public Dictionary<string, ReactantEntry> Reactants { get; }
[JsonPropertyName("products")]
public Dictionary<string, float> Products { get; }
[JsonPropertyName("effects")]
public List<ReagentEffect> Effects { get; }
public ReactionEntry(ReactionPrototype proto)
{
Id = proto.ID;
Name = proto.Name;
Reactants =
proto.Reactants
.Select(x => KeyValuePair.Create(x.Key, new ReactantEntry(x.Value.Amount.Float(), x.Value.Catalyst)))
.ToDictionary(x => x.Key, x => x.Value);
Products =
proto.Products
.Select(x => KeyValuePair.Create(x.Key, x.Value.Float()))
.ToDictionary(x => x.Key, x => x.Value);
Effects = proto.Effects;
}
}
public class ReactantEntry
{
[JsonPropertyName("amount")]
public float Amount { get; }
[JsonPropertyName("catalyst")]
public bool Catalyst { get; }
public ReactantEntry(float amnt, bool cata)
{
Amount = amnt;
Catalyst = cata;
}
}

View File

@@ -626,5 +626,12 @@ namespace Content.Shared.CCVar
/// </summary> /// </summary>
public static readonly CVarDef<float> RulesWaitTime = public static readonly CVarDef<float> RulesWaitTime =
CVarDef.Create("rules.time", 45f, CVar.SERVER | CVar.REPLICATED); CVarDef.Create("rules.time", 45f, CVar.SERVER | CVar.REPLICATED);
/*
* Autogeneration
*/
public static readonly CVarDef<string> DestinationFile =
CVarDef.Create("autogen.destination_file", "", CVar.SERVER | CVar.SERVERONLY);
} }
} }

View File

@@ -1,7 +1,10 @@
using System.Collections.Generic; using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Content.Shared.Administration.Logs; using Content.Shared.Administration.Logs;
using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Reagent;
using Content.Shared.Converters;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using JetBrains.Annotations; using JetBrains.Annotations;
@@ -18,26 +21,32 @@ namespace Content.Shared.Chemistry.Reagent
/// </summary> /// </summary>
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
[MeansImplicitUse] [MeansImplicitUse]
[JsonConverter(typeof(UniversalJsonConverter<ReagentEffect>))]
public abstract class ReagentEffect public abstract class ReagentEffect
{ {
[JsonPropertyName("id")] private protected string _id => this.GetType().Name;
/// <summary> /// <summary>
/// The list of conditions required for the effect to activate. Not required. /// The list of conditions required for the effect to activate. Not required.
/// </summary> /// </summary>
[JsonPropertyName("conditions")]
[DataField("conditions")] [DataField("conditions")]
public ReagentEffectCondition[]? Conditions; public ReagentEffectCondition[]? Conditions;
/// <summary> /// <summary>
/// What's the chance, from 0 to 1, that this effect will occur? /// What's the chance, from 0 to 1, that this effect will occur?
/// </summary> /// </summary>
[JsonPropertyName("probability")]
[DataField("probability")] [DataField("probability")]
public float Probability = 1.0f; public float Probability = 1.0f;
[JsonIgnore]
[DataField("logImpact")] [DataField("logImpact")]
public virtual LogImpact LogImpact { get; } = LogImpact.Low; public virtual LogImpact LogImpact { get; } = LogImpact.Low;
/// <summary> /// <summary>
/// Should this reagent effect log at all? /// Should this reagent effect log at all?
/// </summary> /// </summary>
[JsonIgnore]
[DataField("shouldLog")] [DataField("shouldLog")]
public virtual bool ShouldLog { get; } = false; public virtual bool ShouldLog { get; } = false;

View File

@@ -1,4 +1,5 @@
using Content.Shared.Chemistry.Components; using System.Text.Json.Serialization;
using Content.Shared.Converters;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
@@ -7,8 +8,11 @@ namespace Content.Shared.Chemistry.Reagent
{ {
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
[MeansImplicitUse] [MeansImplicitUse]
[JsonConverter(typeof(UniversalJsonConverter<ReagentEffectCondition>))]
public abstract class ReagentEffectCondition public abstract class ReagentEffectCondition
{ {
[JsonPropertyName("id")] private protected string _id => this.GetType().Name;
public abstract bool Condition(ReagentEffectArgs args); public abstract bool Condition(ReagentEffectArgs args);
} }
} }

View File

@@ -1,9 +1,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization;
using Content.Shared.Administration.Logs; using Content.Shared.Administration.Logs;
using Content.Shared.Body.Prototypes; using Content.Shared.Body.Prototypes;
using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction; using Content.Shared.Chemistry.Reaction;
using Content.Shared.Converters;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
@@ -30,6 +32,9 @@ namespace Content.Shared.Chemistry.Reagent
[DataField("name")] [DataField("name")]
public string Name { get; } = string.Empty; public string Name { get; } = string.Empty;
[DataField("group")]
public string Group { get; } = "Unknown";
[DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))] [DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string? Parent { get; private set; } public string? Parent { get; private set; }
@@ -139,17 +144,20 @@ namespace Content.Shared.Chemistry.Reagent
} }
[DataDefinition] [DataDefinition]
[JsonConverter(typeof(UniversalJsonConverter<ReagentEffectsEntry>))]
public class ReagentEffectsEntry public class ReagentEffectsEntry
{ {
/// <summary> /// <summary>
/// Amount of reagent to metabolize, per metabolism cycle. /// Amount of reagent to metabolize, per metabolism cycle.
/// </summary> /// </summary>
[JsonPropertyName("rate")]
[DataField("metabolismRate")] [DataField("metabolismRate")]
public FixedPoint2 MetabolismRate = FixedPoint2.New(0.5f); public FixedPoint2 MetabolismRate = FixedPoint2.New(0.5f);
/// <summary> /// <summary>
/// A list of effects to apply when these reagents are metabolized. /// A list of effects to apply when these reagents are metabolized.
/// </summary> /// </summary>
[JsonPropertyName("effects")]
[DataField("effects", required: true)] [DataField("effects", required: true)]
public ReagentEffect[] Effects = default!; public ReagentEffect[] Effects = default!;
} }

View File

@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Content.Shared.Converters
{
// This class is used as a shim to help do polymorphic serialization of objects into JSON
// (serializing objects that inherit abstract base classes or interfaces) since
// System.Text.Json (our new JSON solution) doesn't support that while Newtonsoft.Json (our old
// solution) does.
public class UniversalJsonConverter<T> : JsonConverter<T>
{
// We can convert anything! Probably.
public override bool CanConvert(Type typeToConvert)
{
return true;
}
// We don't support deserialization right now. In order to do so, we'd need to bundle a
// field like "$type" with our objects so they'd be reserialized into the correct base class
// but that presents a security hazard.
public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
// Throwing a NotImplementedException here allows the Utf8JsonReader to provide
// an error message that provides the specific JSON path of the problematic object
// rather than a generic error message. At least in theory. Haven't tested that.
throw new NotImplementedException();
}
// The bread and butter. Deserialize an object of parameter type T.
// This method is automatically called when the JSON writer finds an object of a type
// where we've registered this class as its converter using the [JsonConverter(...)] attribute
public override void Write(Utf8JsonWriter writer, T obj, JsonSerializerOptions options)
{
// If the object is null, don't include it.
if (obj is null)
{
writer.WriteNullValue();
return;
}
// Use reflection to get a list of fields and properties on the object we're serializing.
// Using obj.GetType() here instead of typeof(T) allows us to get the true base class rather
// than the abstract ancestor, even if we're parameterized with that abstract class.
FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
PropertyInfo[] properties = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
// Since the JSON writer will have already written the field name, we need to write the object itself.
// Since we only use this class to serialize complex objects, we know we'll be writing a JSON object, so open one.
writer.WriteStartObject();
// For each field, try to write it into the object.
foreach (FieldInfo field in fields)
{
// If the field has a [JsonIgnore] attribute, skip it
if (Attribute.GetCustomAttribute(field, typeof(JsonIgnoreAttribute), true) != null) continue;
// exclude fields that are compiler autogenerated like "__BackingField" fields
if (Attribute.GetCustomAttribute(field, typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute), true) != null) continue;
// If the field has a [JsonPropertyName] attribute, get the property name. Otherwise, use the field name.
JsonPropertyNameAttribute? attr = (JsonPropertyNameAttribute?) Attribute.GetCustomAttribute(field, typeof(JsonPropertyNameAttribute), true);
string name = attr == null ? field.Name : attr.Name;
// Write a new key/value pair into the JSON object itself.
WriteKV(writer, name, field.GetValue(obj), options);
}
// Repeat the same process for each property.
foreach (PropertyInfo prop in properties)
{
// If the field has a [JsonIgnore] attribute, skip it
if (Attribute.GetCustomAttribute(prop, typeof(JsonIgnoreAttribute), true) != null) continue;
// If the property has a [JsonPropertyName] attribute, get the property name. Otherwise, use the property name.
JsonPropertyNameAttribute? attr = (JsonPropertyNameAttribute?) Attribute.GetCustomAttribute(prop, typeof(JsonPropertyNameAttribute), true);
string name = attr == null ? prop.Name : attr.Name;
// Write a new key/value pair into the JSON object itself.
WriteKV(writer, name, prop.GetValue(obj), options);
}
// Close the object, we're done!
writer.WriteEndObject();
}
// This is a little utility method to write a key/value pair inside a JSON object.
// It's used for all the actual writing.
public void WriteKV(Utf8JsonWriter writer, string key, object? obj, JsonSerializerOptions options)
{
// First, write the property name
writer.WritePropertyName(key);
// Then, recurse. This ensures that primitive values will be written directly, while
// more complex values can use any custom converters we've registered (like this one.)
JsonSerializer.Serialize(writer, obj, options);
}
}
}

View File

@@ -9,7 +9,9 @@ using Robust.Shared.ViewVariables;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.Json.Serialization;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Shared.Converters;
namespace Content.Shared.Damage namespace Content.Shared.Damage
{ {
@@ -21,17 +23,21 @@ namespace Content.Shared.Damage
/// functions to apply resistance sets and supports basic math operations to modify this dictionary. /// functions to apply resistance sets and supports basic math operations to modify this dictionary.
/// </remarks> /// </remarks>
[DataDefinition] [DataDefinition]
[JsonConverter(typeof(UniversalJsonConverter<DamageSpecifier>))]
public class DamageSpecifier public class DamageSpecifier
{ {
[JsonPropertyName("types")]
[DataField("types", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, DamageTypePrototype>))] [DataField("types", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, DamageTypePrototype>))]
private readonly Dictionary<string,FixedPoint2>? _damageTypeDictionary; private readonly Dictionary<string,FixedPoint2>? _damageTypeDictionary;
[JsonPropertyName("groups")]
[DataField("groups", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, DamageGroupPrototype>))] [DataField("groups", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, DamageGroupPrototype>))]
private readonly Dictionary<string, FixedPoint2>? _damageGroupDictionary; private readonly Dictionary<string, FixedPoint2>? _damageGroupDictionary;
/// <summary> /// <summary>
/// Main DamageSpecifier dictionary. Most DamageSpecifier functions exist to somehow modifying this. /// Main DamageSpecifier dictionary. Most DamageSpecifier functions exist to somehow modifying this.
/// </summary> /// </summary>
[JsonIgnore]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public Dictionary<string, FixedPoint2> DamageDict public Dictionary<string, FixedPoint2> DamageDict
{ {
@@ -43,6 +49,7 @@ namespace Content.Shared.Damage
} }
set => _damageDict = value; set => _damageDict = value;
} }
[JsonIgnore]
private Dictionary<string, FixedPoint2>? _damageDict; private Dictionary<string, FixedPoint2>? _damageDict;
/// <summary> /// <summary>
@@ -53,11 +60,13 @@ namespace Content.Shared.Damage
/// in another. For this purpose, you should instead use <see cref="TrimZeros()"/> and then check the <see /// in another. For this purpose, you should instead use <see cref="TrimZeros()"/> and then check the <see
/// cref="Empty"/> property. /// cref="Empty"/> property.
/// </remarks> /// </remarks>
[JsonIgnore]
public FixedPoint2 Total => DamageDict.Values.Sum(); public FixedPoint2 Total => DamageDict.Values.Sum();
/// <summary> /// <summary>
/// Whether this damage specifier has any entries. /// Whether this damage specifier has any entries.
/// </summary> /// </summary>
[JsonIgnore]
public bool Empty => DamageDict.Count == 0; public bool Empty => DamageDict.Count == 0;
#region constructors #region constructors

View File

@@ -1,6 +1,8 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Shared.FixedPoint namespace Content.Shared.FixedPoint
@@ -10,6 +12,7 @@ namespace Content.Shared.FixedPoint
/// To enforce this level of precision, floats are shifted by 2 decimal points, rounded, and converted to an int. /// To enforce this level of precision, floats are shifted by 2 decimal points, rounded, and converted to an int.
/// </summary> /// </summary>
[Serializable] [Serializable]
[JsonConverter(typeof(FixedPointJsonConverter))]
public struct FixedPoint2 : ISelfSerialize, IComparable<FixedPoint2>, IEquatable<FixedPoint2>, IFormattable public struct FixedPoint2 : ISelfSerialize, IComparable<FixedPoint2>, IEquatable<FixedPoint2>, IFormattable
{ {
private int _value; private int _value;
@@ -291,4 +294,19 @@ namespace Content.Shared.FixedPoint
return acc; return acc;
} }
} }
public class FixedPointJsonConverter : JsonConverter<FixedPoint2>
{
public override void Write(Utf8JsonWriter writer, FixedPoint2 value, JsonSerializerOptions options)
{
writer.WriteNumberValue(value.Float());
}
public override FixedPoint2 Read(ref Utf8JsonReader reader, Type objectType, JsonSerializerOptions options)
{
// Throwing a NotSupportedException here allows the error
// message to provide path information.
throw new NotSupportedException();
}
}
} }

View File

@@ -1,7 +1,6 @@
- type: reagentDispenserInventory - type: reagentDispenserInventory
id: SodaDispenserInventory id: SodaDispenserInventory
inventory: inventory:
- Water - Water
- Ice - Ice
- Coffee - Coffee

View File

@@ -1,5 +1,6 @@
- type: reagent - type: reagent
id: BaseDrink id: BaseDrink
group: Drinks
abstract: true abstract: true
metabolisms: metabolisms:
Drink: Drink:
@@ -37,6 +38,7 @@
- type: reagent - type: reagent
id: BaseAlcohol id: BaseAlcohol
group: Drinks
abstract: true abstract: true
metabolisms: metabolisms:
Drink: Drink:

View File

@@ -9,6 +9,7 @@
- type: reagent - type: reagent
id: Cream id: Cream
name: cream name: cream
group: Drinks
desc: The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh? desc: The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?
physicalDesc: creamy physicalDesc: creamy
color: "#DFD7AF" color: "#DFD7AF"
@@ -75,6 +76,7 @@
- type: reagent - type: reagent
id: Lemonade id: Lemonade
name: lemonade name: lemonade
group: Drinks
desc: Drink using lemon juice, water, and a sweetener such as cane sugar or honey. desc: Drink using lemon juice, water, and a sweetener such as cane sugar or honey.
physicalDesc: tart physicalDesc: tart
color: "#FFFF00" color: "#FFFF00"
@@ -88,6 +90,7 @@
- type: reagent - type: reagent
id: Milk id: Milk
name: milk name: milk
group: Drinks
desc: An opaque white liquid produced by the mammary glands of mammals. desc: An opaque white liquid produced by the mammary glands of mammals.
physicalDesc: opaque physicalDesc: opaque
color: "#DFDFDF" color: "#DFDFDF"
@@ -105,6 +108,7 @@
- type: reagent - type: reagent
id: MilkOat id: MilkOat
name: oat milk name: oat milk
group: Drinks
desc: Surprisingly tasty. desc: Surprisingly tasty.
physicalDesc: refreshing physicalDesc: refreshing
color: "#302000" color: "#302000"
@@ -117,6 +121,7 @@
- type: reagent - type: reagent
id: MilkSoy id: MilkSoy
name: soy milk name: soy milk
group: Drinks
desc: Surprisingly tasty. desc: Surprisingly tasty.
physicalDesc: refreshing physicalDesc: refreshing
color: "#302000" color: "#302000"
@@ -129,6 +134,7 @@
- type: reagent - type: reagent
id: MilkSpoiled id: MilkSpoiled
name: spoiled milk name: spoiled milk
group: Drinks
desc: This milk has gone rancid. desc: This milk has gone rancid.
physicalDesc: putrid physicalDesc: putrid
color: "#faffba" color: "#faffba"
@@ -142,6 +148,7 @@
id: Nothing id: Nothing
name: nothing name: nothing
desc: Absolutely nothing. desc: Absolutely nothing.
group: Drinks
physicalDesc: nothing physicalDesc: nothing
spritePath: nothing.rsi spritePath: nothing.rsi
metabolisms: metabolisms:
@@ -154,6 +161,7 @@
- type: reagent - type: reagent
id: NukaCola id: NukaCola
name: nuka cola name: nuka cola
group: Drinks
desc: Cola, cola never changes. desc: Cola, cola never changes.
physicalDesc: fizzy physicalDesc: fizzy
color: "#100800" color: "#100800"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Astrotame id: Astrotame
name: Astrotame name: Astrotame
group: Foods
desc: The sweetness of a thousand sugars but none of the calories. desc: The sweetness of a thousand sugars but none of the calories.
# physicalDesc: # physicalDesc:
color: aquamarine color: aquamarine
@@ -8,6 +9,7 @@
- type: reagent - type: reagent
id: BbqSauce id: BbqSauce
name: BBQ sauce name: BBQ sauce
group: Foods
desc: Hand wipes not included. desc: Hand wipes not included.
physicalDesc: Gloopy. physicalDesc: Gloopy.
color: darkred color: darkred
@@ -15,6 +17,7 @@
- type: reagent - type: reagent
id: Cornoil id: Cornoil
name: corn oil name: corn oil
group: Foods
desc: Corn oil, A delicious oil used in cooking. Made from corn. desc: Corn oil, A delicious oil used in cooking. Made from corn.
# physicalDesc: # physicalDesc:
color: yellow color: yellow
@@ -22,6 +25,7 @@
- type: reagent - type: reagent
id: Frostoil id: Frostoil
name: frostoil name: frostoil
group: Foods
desc: Leaves the tongue numb in its passage. desc: Leaves the tongue numb in its passage.
# physicalDesc: # physicalDesc:
color: skyblue color: skyblue
@@ -29,6 +33,7 @@
- type: reagent - type: reagent
id: HorseradishSauce id: HorseradishSauce
name: horseradish sauce name: horseradish sauce
group: Foods
desc: Smelly horseradish sauce. desc: Smelly horseradish sauce.
physicalDesc: Overpowering. physicalDesc: Overpowering.
color: gray color: gray
@@ -36,6 +41,7 @@
- type: reagent - type: reagent
id: Hotsauce id: Hotsauce
name: hotsauce name: hotsauce
group: Foods
desc: Burns so good. desc: Burns so good.
# physicalDesc: # physicalDesc:
color: red color: red
@@ -43,6 +49,7 @@
- type: reagent - type: reagent
id: Ketchup id: Ketchup
name: ketchup name: ketchup
group: Foods
desc: Made from pureed tomatoes and flavored with spices. desc: Made from pureed tomatoes and flavored with spices.
# physicalDesc: # physicalDesc:
color: red color: red
@@ -50,6 +57,7 @@
- type: reagent - type: reagent
id: Soysauce id: Soysauce
name: soy sauce name: soy sauce
group: Foods
desc: A salty soy-based flavoring. desc: A salty soy-based flavoring.
# physicalDesc: # physicalDesc:
color: saddlebrown color: saddlebrown
@@ -57,6 +65,7 @@
- type: reagent - type: reagent
id: TableSalt id: TableSalt
name: table salt name: table salt
group: Foods
desc: Commonly known as salt, Sodium Chloride is often used to season food or kill borers instantly. desc: Commonly known as salt, Sodium Chloride is often used to season food or kill borers instantly.
physicalDesc: grainy physicalDesc: grainy
color: "#a1000b" color: "#a1000b"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Nutriment id: Nutriment
name: nutriment name: nutriment
group: Foods
desc: All the vitamins, minerals, and carbohydrates the body needs in pure form. desc: All the vitamins, minerals, and carbohydrates the body needs in pure form.
physicalDesc: opaque physicalDesc: opaque
color: "#664330" color: "#664330"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Flour id: Flour
name: flour name: flour
group: Foods
desc: Used for baking. desc: Used for baking.
physicalDesc: powdery physicalDesc: powdery
color: white color: white
@@ -13,6 +14,7 @@
- type: reagent - type: reagent
id: Oats id: Oats
name: oats name: oats
group: Foods
desc: Used for a variety of tasty purposes. desc: Used for a variety of tasty purposes.
physicalDesc: coarse physicalDesc: coarse
color: tan color: tan
@@ -25,6 +27,7 @@
- type: reagent - type: reagent
id: Enzyme id: Enzyme
name: universal enzyme name: universal enzyme
group: Foods
desc: Used in cooking various dishes. desc: Used in cooking various dishes.
color: "#009900" color: "#009900"
metabolisms: metabolisms:
@@ -36,6 +39,7 @@
- type: reagent - type: reagent
id: Egg id: Egg
name: egg name: egg
group: Foods
desc: Used for baking. desc: Used for baking.
physicalDesc: mucus-like physicalDesc: mucus-like
color: white color: white
@@ -48,6 +52,7 @@
- type: reagent - type: reagent
id: Sugar id: Sugar
name: sugar name: sugar
group: Foods
desc: Tasty spacey sugar! desc: Tasty spacey sugar!
physicalDesc: physicalDesc:
color: white color: white
@@ -60,6 +65,7 @@
- type: reagent - type: reagent
id: Blackpepper id: Blackpepper
name: black pepper name: black pepper
group: Foods
desc: Often used to flavor food or make people sneeze. desc: Often used to flavor food or make people sneeze.
physicalDesc: Grainy. physicalDesc: Grainy.
color: black color: black
@@ -72,6 +78,7 @@
- type: reagent - type: reagent
id: Vinegar id: Vinegar
name: vinegar name: vinegar
group: Foods
desc: Often used to flavor food. desc: Often used to flavor food.
color: tan color: tan
metabolisms: metabolisms:
@@ -83,6 +90,7 @@
- type: reagent - type: reagent
id: Rice id: Rice
name: rice name: rice
group: Foods
desc: Hard, small white grains. desc: Hard, small white grains.
color: white color: white
metabolisms: metabolisms:
@@ -93,6 +101,7 @@
- type: reagent - type: reagent
id: OilOlive id: OilOlive
name: olive oil name: olive oil
group: Foods
desc: Viscous and fragrant. desc: Viscous and fragrant.
color: olive color: olive
metabolisms: metabolisms:
@@ -104,6 +113,7 @@
- type: reagent - type: reagent
id: Oil id: Oil
name: oil name: oil
group: Foods
desc: Used by chefs to cook. desc: Used by chefs to cook.
physicalDesc: oily physicalDesc: oily
color: "#b67823" color: "#b67823"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: EZNutrient id: EZNutrient
name: EZ nutrient name: EZ nutrient
group: Botanical
desc: Give your plants some of those EZ nutrients! desc: Give your plants some of those EZ nutrients!
color: "#664330" color: "#664330"
physicalDesc: thick physicalDesc: thick
@@ -11,6 +12,7 @@
- type: reagent - type: reagent
id: Left4Zed id: Left4Zed
name: left-4-zed name: left-4-zed
group: Botanical
desc: A cocktail of mutagenic compounds, which cause plant life to become highly unstable. desc: A cocktail of mutagenic compounds, which cause plant life to become highly unstable.
color: "#5b406c" color: "#5b406c"
physicalDesc: heterogeneous physicalDesc: heterogeneous
@@ -26,6 +28,7 @@
- type: reagent - type: reagent
id: PestKiller id: PestKiller
name: pest killer name: pest killer
group: Botanical
desc: A mixture that targets pests. desc: A mixture that targets pests.
color: "#9e9886" color: "#9e9886"
physicalDesc: bubbling physicalDesc: bubbling
@@ -38,6 +41,7 @@
- type: reagent - type: reagent
id: PlantBGone id: PlantBGone
name: plant-B-gone name: plant-B-gone
group: Botanical
desc: A harmful toxic mixture to kill plantlife. Do not ingest! desc: A harmful toxic mixture to kill plantlife. Do not ingest!
color: "#49002E" color: "#49002E"
physicalDesc: bubbling physicalDesc: bubbling
@@ -54,6 +58,7 @@
- type: reagent - type: reagent
id: RobustHarvest id: RobustHarvest
name: robust harvest name: robust harvest
group: Botanical
desc: Plant-enhancing hormones, good for increasing potency. desc: Plant-enhancing hormones, good for increasing potency.
color: "#3e901c" color: "#3e901c"
physicalDesc: robust physicalDesc: robust
@@ -71,6 +76,7 @@
- type: reagent - type: reagent
id: WeedKiller id: WeedKiller
name: weed killer name: weed killer
group: Botanical
desc: A mixture that targets weeds. desc: A mixture that targets weeds.
color: "#968395" color: "#968395"
physicalDesc: bubbling physicalDesc: bubbling
@@ -83,6 +89,7 @@
- type: reagent - type: reagent
id: Ammonia id: Ammonia
name: ammonia name: ammonia
group: Botanical
desc: An effective fertilizer which is better than what is available to the botanist initially, though it isn't as powerful as Diethylamine desc: An effective fertilizer which is better than what is available to the botanist initially, though it isn't as powerful as Diethylamine
physicalDesc: pungent physicalDesc: pungent
color: "#77b58e" color: "#77b58e"
@@ -104,6 +111,7 @@
- type: reagent - type: reagent
id: Diethylamine id: Diethylamine
name: diethylamine name: diethylamine
group: Botanical
desc: A very potent fertilizer. desc: A very potent fertilizer.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#a1000b" color: "#a1000b"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Aluminium # We use real words here. id: Aluminium # We use real words here.
name: aluminium name: aluminium
group: Elements
desc: A silver, soft, non-magnetic, and ductile metal. desc: A silver, soft, non-magnetic, and ductile metal.
physicalDesc: metallic physicalDesc: metallic
color: "#848789" color: "#848789"
@@ -10,6 +11,7 @@
- type: reagent - type: reagent
id: Carbon id: Carbon
name: carbon name: carbon
group: Elements
desc: A black, crystalline solid. desc: A black, crystalline solid.
physicalDesc: crystalline physicalDesc: crystalline
color: "#22282b" color: "#22282b"
@@ -19,6 +21,7 @@
- type: reagent - type: reagent
id: Chlorine id: Chlorine
name: chlorine name: chlorine
group: Elements
desc: A yellow-green gas which is toxic to humans. desc: A yellow-green gas which is toxic to humans.
physicalDesc: gaseous physicalDesc: gaseous
color: "#a2ff00" color: "#a2ff00"
@@ -37,6 +40,7 @@
- type: reagent - type: reagent
id: Copper id: Copper
name: copper name: copper
group: Elements
desc: A soft, malleable, and ductile metal with very high thermal and electrical conductivity. desc: A soft, malleable, and ductile metal with very high thermal and electrical conductivity.
physicalDesc: metallic physicalDesc: metallic
color: "#b05b3c" color: "#b05b3c"
@@ -46,6 +50,7 @@
- type: reagent - type: reagent
id: Fluorine id: Fluorine
name: fluorine name: fluorine
group: Elements
desc: A highly toxic pale yellow gas. Extremely reactive. desc: A highly toxic pale yellow gas. Extremely reactive.
physicalDesc: gaseous physicalDesc: gaseous
color: "#808080" color: "#808080"
@@ -64,6 +69,7 @@
- type: reagent - type: reagent
id: Gold id: Gold
name: gold name: gold
group: Elements
desc: Gold is a dense, soft, shiny metal and the most malleable and ductile metal known. desc: Gold is a dense, soft, shiny metal and the most malleable and ductile metal known.
physicalDesc: metallic physicalDesc: metallic
color: "#F7C430" color: "#F7C430"
@@ -73,6 +79,7 @@
- type: reagent - type: reagent
id: Hydrogen id: Hydrogen
name: hydrogen name: hydrogen
group: Elements
desc: A light, flammable gas. desc: A light, flammable gas.
physicalDesc: gaseous physicalDesc: gaseous
color: "#808080" color: "#808080"
@@ -82,6 +89,7 @@
- type: reagent - type: reagent
id: Iodine id: Iodine
name: iodine name: iodine
group: Elements
desc: Commonly added to table salt as a nutrient. On its own it tastes far less pleasing. desc: Commonly added to table salt as a nutrient. On its own it tastes far less pleasing.
physicalDesc: Dark Brown physicalDesc: Dark Brown
color: "#BC8A00" color: "#BC8A00"
@@ -91,6 +99,7 @@
- type: reagent - type: reagent
id: Iron id: Iron
name: iron name: iron
group: Elements
desc: A silvery-grey metal which forms iron oxides (rust) with contact with air. Commonly alloyed with other elements to create alloys such as steel. desc: A silvery-grey metal which forms iron oxides (rust) with contact with air. Commonly alloyed with other elements to create alloys such as steel.
physicalDesc: metallic physicalDesc: metallic
color: "#434b4d" color: "#434b4d"
@@ -100,6 +109,7 @@
- type: reagent - type: reagent
id: Lithium id: Lithium
name: lithium name: lithium
group: Elements
desc: A soft, silvery-white alkali metal. It is highly reactive, and ignites if it makes contact with water. desc: A soft, silvery-white alkali metal. It is highly reactive, and ignites if it makes contact with water.
physicalDesc: shiny physicalDesc: shiny
color: "#c6c8cc" color: "#c6c8cc"
@@ -110,6 +120,7 @@
- type: reagent - type: reagent
id: Mercury id: Mercury
name: mercury name: mercury
group: Elements
desc: A silver metal which is liquid at room temperature. It is highly toxic to humans. desc: A silver metal which is liquid at room temperature. It is highly toxic to humans.
physicalDesc: shiny physicalDesc: shiny
color: "#929296" color: "#929296"
@@ -126,6 +137,7 @@
- type: reagent - type: reagent
id: Nitrogen id: Nitrogen
name: nitrogen name: nitrogen
group: Elements
desc: A colorless, odorless unreactive gas. Highly stable. desc: A colorless, odorless unreactive gas. Highly stable.
physicalDesc: gaseous physicalDesc: gaseous
color: "#808080" color: "#808080"
@@ -135,6 +147,7 @@
- type: reagent - type: reagent
id: Oxygen id: Oxygen
name: oxygen name: oxygen
group: Elements
desc: An oxidizing, colorless gas. desc: An oxidizing, colorless gas.
physicalDesc: gaseous physicalDesc: gaseous
color: "#808080" color: "#808080"
@@ -144,6 +157,7 @@
- type: reagent - type: reagent
id: Potassium id: Potassium
name: potassium name: potassium
group: Elements
desc: A soft, shiny grey metal. Even more reactive than lithium. desc: A soft, shiny grey metal. Even more reactive than lithium.
physicalDesc: shiny physicalDesc: shiny
color: "#c6c8cc" color: "#c6c8cc"
@@ -153,6 +167,7 @@
- type: reagent - type: reagent
id: Phosphorus id: Phosphorus
name: phosphorus name: phosphorus
group: Elements
desc: A reactive metal used in pyrotechnics and weapons. desc: A reactive metal used in pyrotechnics and weapons.
physicalDesc: powdery physicalDesc: powdery
color: "#ede4e4" color: "#ede4e4"
@@ -169,6 +184,7 @@
- type: reagent - type: reagent
id: Radium id: Radium
name: radium name: radium
group: Elements
parent: Uranium parent: Uranium
desc: A radioactive metal, silvery-white in its pure form. It glows due to its radioactivity and is highly toxic. desc: A radioactive metal, silvery-white in its pure form. It glows due to its radioactivity and is highly toxic.
physicalDesc: glowing physicalDesc: glowing
@@ -179,6 +195,7 @@
- type: reagent - type: reagent
id: Silicon id: Silicon
name: silicon name: silicon
group: Elements
desc: A hard and brittle crystalline solid with a blue-grey color. desc: A hard and brittle crystalline solid with a blue-grey color.
physicalDesc: crystalline physicalDesc: crystalline
color: "#364266" color: "#364266"
@@ -188,6 +205,7 @@
- type: reagent - type: reagent
id: Silver id: Silver
name: silver name: silver
group: Elements
desc: A soft, white, lustrous transition metal, it has the highest electrical conductivity of any element and the highest thermal conductivity of any metal. desc: A soft, white, lustrous transition metal, it has the highest electrical conductivity of any element and the highest thermal conductivity of any metal.
physicalDesc: reasonably metallic physicalDesc: reasonably metallic
color: "#d0d0d0" color: "#d0d0d0"
@@ -197,6 +215,7 @@
- type: reagent - type: reagent
id: Sulfur id: Sulfur
name: sulfur name: sulfur
group: Elements
desc: A yellow, crystalline solid. desc: A yellow, crystalline solid.
physicalDesc: powdery physicalDesc: powdery
color: "#fff385" color: "#fff385"
@@ -206,6 +225,7 @@
- type: reagent - type: reagent
id: Sodium id: Sodium
name: sodium name: sodium
group: Elements
desc: A silvery-white alkali metal. Highly reactive in its pure form. #thanks visne <3 desc: A silvery-white alkali metal. Highly reactive in its pure form. #thanks visne <3
physicalDesc: metallic physicalDesc: metallic
color: "#c6c8cc" color: "#c6c8cc"
@@ -215,6 +235,7 @@
- type: reagent - type: reagent
id: Uranium id: Uranium
name: uranium name: uranium
group: Elements
desc: A grey metallic chemical element in the actinide series, weakly radioactive. desc: A grey metallic chemical element in the actinide series, weakly radioactive.
physicalDesc: metallic physicalDesc: metallic
color: "#8fa191" color: "#8fa191"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Carpetium id: Carpetium
name: carpetium name: carpetium
group: Special
desc: A mystical chemical, usually outsourced from the Clown Planet, that covers everything it touches in carpet. desc: A mystical chemical, usually outsourced from the Clown Planet, that covers everything it touches in carpet.
physicalDesc: fibrous physicalDesc: fibrous
color: "#800000" color: "#800000"
@@ -27,6 +28,7 @@
- type: reagent - type: reagent
id: BuzzochloricBees id: BuzzochloricBees
name: Buzzochloric Bees name: Buzzochloric Bees
group: Toxins
desc: "Liquid bees. Oh god it's LIQUID BEES NO-" desc: "Liquid bees. Oh god it's LIQUID BEES NO-"
physicalDesc: buzzy physicalDesc: buzzy
color: "#FFD35D" color: "#FFD35D"
@@ -130,6 +132,7 @@
- type: reagent - type: reagent
id: Licoxide id: Licoxide
name: Licoxide name: Licoxide
group: Toxins
desc: It looks... electrifying. desc: It looks... electrifying.
physicalDesc: electric physicalDesc: electric
color: "#FDD023" color: "#FDD023"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Alkycosine id: Alkycosine
name: alkycosine name: alkycosine
group: Medicine
desc: Lessens the damage to neurological tissue. More effective at treating brain damage than alkysine and also a fairly effective painkiller as well. Caution is needed in its creation to avoid mixing bleach and the chlorine needed to make alkysine. desc: Lessens the damage to neurological tissue. More effective at treating brain damage than alkysine and also a fairly effective painkiller as well. Caution is needed in its creation to avoid mixing bleach and the chlorine needed to make alkysine.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#9e232b" color: "#9e232b"
@@ -9,6 +10,7 @@
- type: reagent - type: reagent
id: Alkysine id: Alkysine
name: alkysine name: alkysine
group: Medicine
desc: Lessens the damage to neurological tissue, effective even after catastrophic injury. Used for treating brain damage and also a fairly effective painkiller. desc: Lessens the damage to neurological tissue, effective even after catastrophic injury. Used for treating brain damage and also a fairly effective painkiller.
physicalDesc: oily physicalDesc: oily
color: "#ff8c00" color: "#ff8c00"
@@ -17,6 +19,7 @@
- type: reagent - type: reagent
id: Dylovene id: Dylovene
name: dylovene name: dylovene
group: Medicine
desc: A broad-spectrum anti-toxin, which treats toxin damage in the blood stream. Overdosing will cause vomiting, dizzyness and pain. desc: A broad-spectrum anti-toxin, which treats toxin damage in the blood stream. Overdosing will cause vomiting, dizzyness and pain.
physicalDesc: translucent physicalDesc: translucent
color: "#3a1d8a" color: "#3a1d8a"
@@ -37,6 +40,7 @@
- type: reagent - type: reagent
id: Diphenhydramine id: Diphenhydramine
name: diphenhydramine name: diphenhydramine
group: Medicine
desc: Rapidly purges the body of histamine and reduces jitteriness. desc: Rapidly purges the body of histamine and reduces jitteriness.
physicalDesc: chalky physicalDesc: chalky
color: "#64ffe6" color: "#64ffe6"
@@ -54,6 +58,7 @@
- type: reagent - type: reagent
id: Arithrazine id: Arithrazine
name: arithrazine name: arithrazine
group: Medicine
desc: A slightly unstable medication used for the most extreme any serious case of radiation poisoning. Lowers radiation level at over twice the rate Hyronalin does and will heal toxin damage at the same time. Deals very minor brute damage to the patient over time, but the patient's body will typically out-regenerate it easily. desc: A slightly unstable medication used for the most extreme any serious case of radiation poisoning. Lowers radiation level at over twice the rate Hyronalin does and will heal toxin damage at the same time. Deals very minor brute damage to the patient over time, but the patient's body will typically out-regenerate it easily.
physicalDesc: cloudy physicalDesc: cloudy
color: "#bd5902" color: "#bd5902"
@@ -70,6 +75,7 @@
- type: reagent - type: reagent
id: Bicaridine id: Bicaridine
name: bicaridine name: bicaridine
group: Medicine
desc: An analgesic which is highly effective at treating brute damage. It is useful for stabilizing people who have been severely beaten, as well as treating less life-threatening injuries. In the case of bleeding (internal or external), bicaridine will slow down the bleeding heavily. If the dosage exceeds the overdose limit, it'll stop it outright. desc: An analgesic which is highly effective at treating brute damage. It is useful for stabilizing people who have been severely beaten, as well as treating less life-threatening injuries. In the case of bleeding (internal or external), bicaridine will slow down the bleeding heavily. If the dosage exceeds the overdose limit, it'll stop it outright.
physicalDesc: opaque physicalDesc: opaque
color: "#ffaa00" color: "#ffaa00"
@@ -84,6 +90,7 @@
- type: reagent - type: reagent
id: Cryoxadone id: Cryoxadone
name: cryoxadone name: cryoxadone
group: Medicine
desc: Required for the proper function of cryogenics. Heals all standard types of damage very swiftly, but only works in temperatures under 170K (usually this means cryo cells). Can also slowly heal clone damage, such as caused by cloning or Slimes. desc: Required for the proper function of cryogenics. Heals all standard types of damage very swiftly, but only works in temperatures under 170K (usually this means cryo cells). Can also slowly heal clone damage, such as caused by cloning or Slimes.
physicalDesc: fizzy physicalDesc: fizzy
color: "#0091ff" color: "#0091ff"
@@ -111,6 +118,7 @@
- type: reagent - type: reagent
id: Clonexadone id: Clonexadone
name: clonexadone name: clonexadone
group: Medicine
parent: Cryoxadone parent: Cryoxadone
desc: Heals standard damage in the same as Cryoxadone, with the same temperature requirement. Significantly more effective than the former at treating cellular damage, although both can be used simultaneously. Best used in cryo cells. desc: Heals standard damage in the same as Cryoxadone, with the same temperature requirement. Significantly more effective than the former at treating cellular damage, although both can be used simultaneously. Best used in cryo cells.
physicalDesc: bubbly physicalDesc: bubbly
@@ -124,6 +132,7 @@
- type: reagent - type: reagent
id: Citalopram id: Citalopram
name: citalopram name: citalopram
group: Medicine
desc: Prevents hallucination slightly. desc: Prevents hallucination slightly.
physicalDesc: cloudy physicalDesc: cloudy
color: "#21693c" color: "#21693c"
@@ -133,6 +142,7 @@
- type: reagent - type: reagent
id: Dermaline id: Dermaline
name: dermaline name: dermaline
group: Medicine
desc: An advanced chemical that is more effective at treating burn damage than Kelotane. desc: An advanced chemical that is more effective at treating burn damage than Kelotane.
physicalDesc: translucent physicalDesc: translucent
color: "#215263" color: "#215263"
@@ -147,6 +157,7 @@
- type: reagent - type: reagent
id: Dexalin id: Dexalin
name: dexalin name: dexalin
group: Medicine
desc: Used for treating oxygen deprivation. In most cases where it is likely to be needed, the strength of Dexalin Plus will probably be more useful (Results in 1 unit instead of 2). desc: Used for treating oxygen deprivation. In most cases where it is likely to be needed, the strength of Dexalin Plus will probably be more useful (Results in 1 unit instead of 2).
physicalDesc: opaque physicalDesc: opaque
color: "#0041a8" color: "#0041a8"
@@ -161,6 +172,7 @@
- type: reagent - type: reagent
id: DexalinPlus id: DexalinPlus
name: dexalin plus name: dexalin plus
group: Medicine
desc: Used in treatment of extreme cases of oxygen deprivation. Even a single unit immediately counters all oxygen loss, which is hugely useful in many circumstances. Any dose beyond this will continue to counter oxygen loss until it is metabolized, essentially removing the need to breathe. desc: Used in treatment of extreme cases of oxygen deprivation. Even a single unit immediately counters all oxygen loss, which is hugely useful in many circumstances. Any dose beyond this will continue to counter oxygen loss until it is metabolized, essentially removing the need to breathe.
physicalDesc: cloudy physicalDesc: cloudy
color: "#4da0bd" color: "#4da0bd"
@@ -175,6 +187,7 @@
- type: reagent - type: reagent
id: Ethylredoxrazine id: Ethylredoxrazine
name: ethylredoxrazine name: ethylredoxrazine
group: Medicine
desc: Neutralises the effects of alcohol in the blood stream. Though it is commonly needed, it is rarely requested. desc: Neutralises the effects of alcohol in the blood stream. Though it is commonly needed, it is rarely requested.
physicalDesc: opaque physicalDesc: opaque
color: "#2d5708" color: "#2d5708"
@@ -184,6 +197,7 @@
- type: reagent - type: reagent
id: Epinephrine id: Epinephrine
name: epinephrine name: epinephrine
group: Medicine
desc: Effective at bringing people back from a critical state. Reduces some stun times. Easy to overdose on. desc: Effective at bringing people back from a critical state. Reduces some stun times. Easy to overdose on.
physicalDesc: odorless physicalDesc: odorless
color: "#d2fffa" color: "#d2fffa"
@@ -243,6 +257,7 @@
- type: reagent - type: reagent
id: Hyperzine id: Hyperzine
name: hyperzine name: hyperzine
group: Medicine
desc: A highly effective, long lasting muscle stimulant. It allows greater freedom of movement in bulky clothing although it has the side effect of causing some twitching. Dangerous in higher doses. desc: A highly effective, long lasting muscle stimulant. It allows greater freedom of movement in bulky clothing although it has the side effect of causing some twitching. Dangerous in higher doses.
physicalDesc: translucent physicalDesc: translucent
color: "#17bd61" color: "#17bd61"
@@ -250,6 +265,7 @@
- type: reagent - type: reagent
id: Hyronalin id: Hyronalin
name: hyronalin name: hyronalin
group: Medicine
desc: A weak treatment for radiation damage. Considered to be useful mainly for genetic modification, where it reduces radiation levels, and thus the chance of genetic mutations. Largely outclassed by Arithrazine. desc: A weak treatment for radiation damage. Considered to be useful mainly for genetic modification, where it reduces radiation levels, and thus the chance of genetic mutations. Largely outclassed by Arithrazine.
physicalDesc: cloudy physicalDesc: cloudy
color: "#4cb580" color: "#4cb580"
@@ -264,6 +280,7 @@
- type: reagent - type: reagent
id: Imidazoline id: Imidazoline
name: imidazoline name: imidazoline
group: Medicine
desc: Effective in treating eye trauma. It heals damage caused by physical or chemical trauma, though it is ineffective in treating genetic defects in the eyes. desc: Effective in treating eye trauma. It heals damage caused by physical or chemical trauma, though it is ineffective in treating genetic defects in the eyes.
physicalDesc: pungent physicalDesc: pungent
color: "#f7ef00" color: "#f7ef00"
@@ -272,6 +289,7 @@
- type: reagent - type: reagent
id: Inacusiate id: Inacusiate
name: inacusiate name: inacusiate
group: Medicine
desc: You only need 1u for Inacusiate to be effective. Cures deafness instantly. Useful after an explosion. desc: You only need 1u for Inacusiate to be effective. Cures deafness instantly. Useful after an explosion.
physicalDesc: pungent physicalDesc: pungent
color: "#c4c04b" color: "#c4c04b"
@@ -280,6 +298,7 @@
- type: reagent - type: reagent
id: Inaprovaline id: Inaprovaline
name: inaprovaline name: inaprovaline
group: Medicine
desc: Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients- it stops oxygen loss when the patient is in critical health. It'll also slow down bleeding (internal or external) by half while in the body. Acts as a decent painkiller. desc: Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients- it stops oxygen loss when the patient is in critical health. It'll also slow down bleeding (internal or external) by half while in the body. Acts as a decent painkiller.
physicalDesc: opaque physicalDesc: opaque
color: "#731024" color: "#731024"
@@ -298,6 +317,7 @@
- type: reagent - type: reagent
id: Kelotane id: Kelotane
name: kelotane name: kelotane
group: Medicine
desc: Treats burn damage and prevents infection. desc: Treats burn damage and prevents infection.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#bf3d19" color: "#bf3d19"
@@ -312,6 +332,7 @@
- type: reagent - type: reagent
id: Leporazine id: Leporazine
name: leporazine name: leporazine
group: Medicine
desc: This keeps a patient's body temperature stable. High doses can allow short periods of unprotected EVA, but prevents use of the cryogenics tubes. desc: This keeps a patient's body temperature stable. High doses can allow short periods of unprotected EVA, but prevents use of the cryogenics tubes.
physicalDesc: pungent physicalDesc: pungent
color: "#ff7db5" color: "#ff7db5"
@@ -336,6 +357,7 @@
- type: reagent - type: reagent
id: Methylin id: Methylin
name: methylin name: methylin
group: Medicine
desc: An intelligence enhancer, also used in the treatment of attention deficit hyperactivity disorder. Also known as Ritalin. Allows monkeys (not diona nymphs) to understand human speech and improves their dexterity as long as they have some in their system. Causes toxin and brain damage in higher doses. desc: An intelligence enhancer, also used in the treatment of attention deficit hyperactivity disorder. Also known as Ritalin. Allows monkeys (not diona nymphs) to understand human speech and improves their dexterity as long as they have some in their system. Causes toxin and brain damage in higher doses.
physicalDesc: acrid physicalDesc: acrid
color: "#a700c4" color: "#a700c4"
@@ -343,6 +365,7 @@
- type: reagent - type: reagent
id: Oxycodone id: Oxycodone
name: oxycodone name: oxycodone
group: Medicine
desc: A very effective painkiller, about 250% as strong as Tramadol. desc: A very effective painkiller, about 250% as strong as Tramadol.
physicalDesc: acrid physicalDesc: acrid
color: "#c4a300" color: "#c4a300"
@@ -350,6 +373,7 @@
- type: reagent - type: reagent
id: Phalanximine id: Phalanximine
name: phalanximine name: phalanximine
group: Medicine
desc: Used in the treatment of cancer, is as effective as Anti-Toxin. Causes moderate radiation and hair loss. desc: Used in the treatment of cancer, is as effective as Anti-Toxin. Causes moderate radiation and hair loss.
physicalDesc: acrid physicalDesc: acrid
color: "#c8ff75" color: "#c8ff75"
@@ -366,6 +390,7 @@
- type: reagent - type: reagent
id: Paroxetine id: Paroxetine
name: paroxetine name: paroxetine
group: Medicine
desc: Prevents hallucination, but has a 10% chance of causing intense hallucinations. desc: Prevents hallucination, but has a 10% chance of causing intense hallucinations.
physicalDesc: acrid physicalDesc: acrid
color: "#fffbad" color: "#fffbad"
@@ -374,6 +399,7 @@
- type: reagent - type: reagent
id: Ryetalyn id: Ryetalyn
name: ryetalyn name: ryetalyn
group: Medicine
desc: You only need 1u for Ryetalin to work. Deactivates genetic defects and powers, restoring a patient to an ideal state. May be useful if genetics is unable to function properly. Deactivated effects return if the patient's genes are modified again. desc: You only need 1u for Ryetalin to work. Deactivates genetic defects and powers, restoring a patient to an ideal state. May be useful if genetics is unable to function properly. Deactivated effects return if the patient's genes are modified again.
physicalDesc: cloudy physicalDesc: cloudy
color: "#532fd4" color: "#532fd4"
@@ -381,6 +407,7 @@
- type: reagent - type: reagent
id: Spaceacillin id: Spaceacillin
name: spaceacillin name: spaceacillin
group: Medicine
desc: A theta-lactam antibiotic. A common and very useful medicine, effective against many diseases likely to be encountered in space. Slows progression of diseases. desc: A theta-lactam antibiotic. A common and very useful medicine, effective against many diseases likely to be encountered in space. Slows progression of diseases.
physicalDesc: opaque physicalDesc: opaque
color: "#9942f5" color: "#9942f5"
@@ -388,6 +415,7 @@
- type: reagent - type: reagent
id: Synaptizine id: Synaptizine
name: synaptizine name: synaptizine
group: Medicine
desc: Toxic, but treats hallucinations, drowsiness & halves the duration of paralysis, stuns and knockdowns. One unit is enough to treat hallucinations; two units is deadly. desc: Toxic, but treats hallucinations, drowsiness & halves the duration of paralysis, stuns and knockdowns. One unit is enough to treat hallucinations; two units is deadly.
physicalDesc: pungent physicalDesc: pungent
color: "#d49a2f" color: "#d49a2f"
@@ -410,6 +438,7 @@
- type: reagent - type: reagent
id: Tramadol id: Tramadol
name: tramadol name: tramadol
group: Medicine
desc: A simple, yet effective painkiller. Very effective for patients in shock. desc: A simple, yet effective painkiller. Very effective for patients in shock.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#2f6ed4" color: "#2f6ed4"
@@ -417,6 +446,7 @@
- type: reagent - type: reagent
id: Tricordrazine id: Tricordrazine
name: tricordrazine name: tricordrazine
group: Medicine
desc: A wide-spectrum stimulant, originally derived from Cordrazine. Is capable of healing all four main damage types simultaneously, however it only heals at half the rate of conventional healing chemicals. Because of its low potency, it's best used as a supplement to other medicines. desc: A wide-spectrum stimulant, originally derived from Cordrazine. Is capable of healing all four main damage types simultaneously, however it only heals at half the rate of conventional healing chemicals. Because of its low potency, it's best used as a supplement to other medicines.
physicalDesc: opaque physicalDesc: opaque
color: "#00e5ff" color: "#00e5ff"
@@ -434,6 +464,7 @@
- type: reagent - type: reagent
id: ChloralHydrate id: ChloralHydrate
name: chloral hydrate name: chloral hydrate
group: Medicine
desc: A powerful sedative which causes death in doses upwards of 16.2 units. Sends the patient to sleep almost instantly. desc: A powerful sedative which causes death in doses upwards of 16.2 units. Sends the patient to sleep almost instantly.
physicalDesc: acrid physicalDesc: acrid
color: "#18c9b1" color: "#18c9b1"
@@ -442,6 +473,7 @@
- type: reagent - type: reagent
id: Cryptobiolin id: Cryptobiolin
name: cryptobiolin name: cryptobiolin
group: Medicine
desc: Causes confusion and dizziness. This is essential to make Spaceacillin. desc: Causes confusion and dizziness. This is essential to make Spaceacillin.
physicalDesc: fizzy physicalDesc: fizzy
color: "#081a80" color: "#081a80"
@@ -450,6 +482,7 @@
- type: reagent - type: reagent
id: Lipozine id: Lipozine
name: lipozine name: lipozine
group: Medicine
desc: Causes weight loss upon consumption. desc: Causes weight loss upon consumption.
physicalDesc: oily physicalDesc: oily
color: "#2690b5" color: "#2690b5"
@@ -463,6 +496,7 @@
- type: reagent - type: reagent
id: Sterilizine id: Sterilizine
name: sterilizine name: sterilizine
group: Medicine
desc: Helps the patient when used during surgery, may also decontaminate objects and surfaces that bear pathogens. Is currently useless due to infections not being a thing. desc: Helps the patient when used during surgery, may also decontaminate objects and surfaces that bear pathogens. Is currently useless due to infections not being a thing.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#7cad37" color: "#7cad37"
@@ -470,6 +504,7 @@
- type: reagent - type: reagent
id: Omnizine id: Omnizine
name: Omnizine name: Omnizine
group: Medicine
desc: A soothing milky liquid with an iridescent gleam. A well known conspiracy theory says that it's origins remain a mystery because knowing the secrets of its production would render most commercial pharmaceuticals obsolete. desc: A soothing milky liquid with an iridescent gleam. A well known conspiracy theory says that it's origins remain a mystery because knowing the secrets of its production would render most commercial pharmaceuticals obsolete.
physicalDesc: soothing physicalDesc: soothing
color: "#fcf7f9" color: "#fcf7f9"
@@ -487,6 +522,7 @@
- type: reagent - type: reagent
id: Ultravasculine id: Ultravasculine
name: Ultravasculine name: Ultravasculine
group: Medicine
desc: Rapidly flushes toxins from the body, but places some stress on the veins. Do not overdose. desc: Rapidly flushes toxins from the body, but places some stress on the veins. Do not overdose.
physicalDesc: thick and grainy physicalDesc: thick and grainy
color: "#520e30" color: "#520e30"

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Desoxyephedrine id: Desoxyephedrine
name: desoxyephedrine name: desoxyephedrine
group: Narcotics
desc: Desoxyephedrine is a potent stimulant with dangerous side-effects if too much is consumed. desc: Desoxyephedrine is a potent stimulant with dangerous side-effects if too much is consumed.
physicalDesc: translucent physicalDesc: translucent
color: "#FAFAFA" color: "#FAFAFA"
@@ -42,6 +43,7 @@
- type: reagent - type: reagent
id: Ephedrine id: Ephedrine
name: ephedrine name: ephedrine
group: Narcotics
desc: Increases stun resistance and movement speed, giving you hand cramps. Overdose deals toxin damage and inhibits breathing. desc: Increases stun resistance and movement speed, giving you hand cramps. Overdose deals toxin damage and inhibits breathing.
physicalDesc: Bone white physicalDesc: Bone white
color: "#D2FFFA" color: "#D2FFFA"
@@ -78,6 +80,7 @@
- type: reagent - type: reagent
id: THC id: THC
name: THC name: THC
group: Narcotics
desc: The main psychoactive compound in cannabis. desc: The main psychoactive compound in cannabis.
color: "#808080" color: "#808080"
physicalDesc: crystalline physicalDesc: crystalline
@@ -90,6 +93,7 @@
- type: reagent - type: reagent
id: THCOil id: THCOil
name: THC oil name: THC oil
group: Narcotics
desc: Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than in it's natural form and can be used to numb chronic pain in patients. desc: Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than in it's natural form and can be used to numb chronic pain in patients.
physicalDesc: skunky physicalDesc: skunky
color: "#DAA520" color: "#DAA520"
@@ -97,6 +101,7 @@
- type: reagent - type: reagent
id: Nicotine id: Nicotine
name: Nicotine name: Nicotine
group: Narcotics
desc: Dangerous and highly addictive. desc: Dangerous and highly addictive.
color: "#C0C0C0" color: "#C0C0C0"
physicalDesc: strong smelling physicalDesc: strong smelling
@@ -107,6 +112,7 @@
- type: reagent - type: reagent
id: Impedrezene id: Impedrezene
name: impedrezene name: impedrezene
group: Narcotics
desc: A narcotic that impedes one's ability by slowing down the higher brain cell functions. Causes massive brain damage. desc: A narcotic that impedes one's ability by slowing down the higher brain cell functions. Causes massive brain damage.
physicalDesc: acrid physicalDesc: acrid
color: "#215263" color: "#215263"
@@ -114,6 +120,7 @@
- type: reagent - type: reagent
id: SpaceDrugs id: SpaceDrugs
name: space drugs name: space drugs
group: Narcotics
desc: An illegal compound which induces a number of effects such as loss of balance and visual artefacts. desc: An illegal compound which induces a number of effects such as loss of balance and visual artefacts.
physicalDesc: syrupy physicalDesc: syrupy
color: "#63806e" color: "#63806e"

View File

@@ -1,5 +1,7 @@
- type: reagent - type: reagent
id: BasePyrotechnic id: BasePyrotechnic
group: Pyrotechnic
abstract: true
reactiveEffects: reactiveEffects:
Flammable: Flammable:
methods: [ Touch ] methods: [ Touch ]

View File

@@ -1,6 +1,7 @@
- type: reagent - type: reagent
id: Toxin id: Toxin
name: toxin name: toxin
group: Toxins
desc: A Toxic chemical. desc: A Toxic chemical.
color: "#cf3600" color: "#cf3600"
physicalDesc: opaque physicalDesc: opaque
@@ -20,6 +21,7 @@
- type: reagent - type: reagent
id: PolytrinicAcid id: PolytrinicAcid
name: polytrinic acid name: polytrinic acid
group: Toxins
desc: An extremely corrosive chemical substance. The slightest touch of it will melt off most masks and headgear, and it deals extreme damage to anyone who comes directly into contact with it. desc: An extremely corrosive chemical substance. The slightest touch of it will melt off most masks and headgear, and it deals extreme damage to anyone who comes directly into contact with it.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#a1000b" color: "#a1000b"
@@ -60,6 +62,7 @@
- type: reagent - type: reagent
id: FluorosulfuricAcid id: FluorosulfuricAcid
name: fluorosulfuric acid name: fluorosulfuric acid
group: Toxins
desc: An extremely corrosive chemical substance. desc: An extremely corrosive chemical substance.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#5050ff" color: "#5050ff"
@@ -93,6 +96,7 @@
- type: reagent - type: reagent
id: SulfuricAcid id: SulfuricAcid
name: sulfuric acid name: sulfuric acid
group: Toxins
desc: A highly corrosive, oily, colorless liquid. desc: A highly corrosive, oily, colorless liquid.
physicalDesc: oily physicalDesc: oily
color: "#BF8C00" color: "#BF8C00"
@@ -134,6 +138,7 @@
- type: reagent - type: reagent
id: Plasma id: Plasma
name: plasma name: plasma
group: Toxins
desc: Funky, space-magic pixie dust. You probably shouldn't eat this, but we both know you will anyways. desc: Funky, space-magic pixie dust. You probably shouldn't eat this, but we both know you will anyways.
physicalDesc: gaseous physicalDesc: gaseous
color: "#7e009e" color: "#7e009e"
@@ -161,6 +166,7 @@
- type: reagent - type: reagent
id: UnstableMutagen id: UnstableMutagen
name: unstable mutagen name: unstable mutagen
group: Toxins
desc: Causes mutations when injected into living people or plants. High doses may be lethal, especially in humans. desc: Causes mutations when injected into living people or plants. High doses may be lethal, especially in humans.
physicalDesc: glowing physicalDesc: glowing
color: "#00ff5f" color: "#00ff5f"
@@ -180,6 +186,7 @@
- type: reagent - type: reagent
id: HeartbreakerToxin id: HeartbreakerToxin
name: heartbreaker toxin name: heartbreaker toxin
group: Toxins
desc: A hallucinogenic compound that is illegal under space law. A synthetic drug derived from Mindbreaker toxin, it blocks some neurological signals to the respiratory system which causes choking. desc: A hallucinogenic compound that is illegal under space law. A synthetic drug derived from Mindbreaker toxin, it blocks some neurological signals to the respiratory system which causes choking.
physicalDesc: strong-smelling physicalDesc: strong-smelling
color: "#5f959c" color: "#5f959c"
@@ -197,6 +204,7 @@
- type: reagent - type: reagent
id: Lexorin id: Lexorin
name: lexorin name: lexorin
group: Toxins
desc: Temporarily stops respiration and causes tissue damage. Large doses are fatal, and will cause people to pass out very quickly. Dexalin and Dexalin Plus will both remove it, however. desc: Temporarily stops respiration and causes tissue damage. Large doses are fatal, and will cause people to pass out very quickly. Dexalin and Dexalin Plus will both remove it, however.
physicalDesc: pungent physicalDesc: pungent
color: "#6b0007" color: "#6b0007"
@@ -211,6 +219,7 @@
- type: reagent - type: reagent
id: MindbreakerToxin id: MindbreakerToxin
name: mindbreaker toxin name: mindbreaker toxin
group: Toxins
desc: A potent hallucinogenic compound that is illegal under space law. Formerly known as LSD. desc: A potent hallucinogenic compound that is illegal under space law. Formerly known as LSD.
physicalDesc: opaque physicalDesc: opaque
color: "#77b58e" color: "#77b58e"
@@ -222,6 +231,7 @@
- type: reagent - type: reagent
id: Soporific id: Soporific
name: soporific (sleep-toxin) name: soporific (sleep-toxin)
group: Toxins
desc: A less powerful sedative that takes a while to work, intended to help insomniacs and patients that are too aggressive to be treated normally. Takes roughly 50 seconds to make the patient fall asleep. Is safe in large quantities. Can be counteracted with Anti-Toxin. desc: A less powerful sedative that takes a while to work, intended to help insomniacs and patients that are too aggressive to be treated normally. Takes roughly 50 seconds to make the patient fall asleep. Is safe in large quantities. Can be counteracted with Anti-Toxin.
physicalDesc: acrid physicalDesc: acrid
color: "#215263" color: "#215263"
@@ -230,6 +240,7 @@
- type: reagent - type: reagent
id: Histamine id: Histamine
name: histamine name: histamine
group: Toxins
desc: Histamine's effects become more dangerous depending on the dosage amount. They range from mildly annoying to incredibly lethal. desc: Histamine's effects become more dangerous depending on the dosage amount. They range from mildly annoying to incredibly lethal.
physicalDesc: abrasive physicalDesc: abrasive
color: "#FA6464" color: "#FA6464"
@@ -266,6 +277,7 @@
- type: reagent - type: reagent
id: Theobromine id: Theobromine
name: theobromine name: theobromine
group: Toxins
desc: Theobromine is a bitter alkaloid of the cacao plant found in chocolate, and some other foods. desc: Theobromine is a bitter alkaloid of the cacao plant found in chocolate, and some other foods.
physicalDesc: grainy physicalDesc: grainy
color: "#f5f5f5" color: "#f5f5f5"