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:
@@ -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;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
@@ -16,6 +17,7 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
/// <summary>
|
||||
/// Damage to apply every metabolism cycle. Damage Ignores resistances.
|
||||
/// </summary>
|
||||
[JsonPropertyName("damage")]
|
||||
[DataField("damage", required: true)]
|
||||
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?
|
||||
/// Useful for touch reactions, like styptic powder or acid.
|
||||
/// </summary>
|
||||
[JsonPropertyName("scaleByQuantity")]
|
||||
[DataField("scaleByQuantity")]
|
||||
public bool ScaleByQuantity = false;
|
||||
|
||||
[DataField("ignoreResistances")]
|
||||
[JsonPropertyName("ignoreResistances")]
|
||||
public bool IgnoreResistances = true;
|
||||
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
|
||||
Reference in New Issue
Block a user