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

View File

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