Skip to content

Commit

Permalink
Отмена вики...
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgencheg committed Sep 1, 2024
1 parent 301e4fd commit 32ce555
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 95 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/Wiki.yml

This file was deleted.

1 change: 1 addition & 0 deletions Content.Server/GuideGenerator/ChemistryJsonGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static void PublishJson(StreamWriter file)
var serializeOptions = new JsonSerializerOptions
{
WriteIndented = true,
NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals, // Corvax-Wiki
Converters =
{
new UniversalJsonConverter<ReagentEffect>(),
Expand Down
1 change: 1 addition & 0 deletions Content.Server/GuideGenerator/ReactionJsonGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static void PublishJson(StreamWriter file)
var serializeOptions = new JsonSerializerOptions
{
WriteIndented = true,
NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals, // Corvax-Wiki
Converters =
{
new UniversalJsonConverter<ReagentEffect>(),
Expand Down
5 changes: 0 additions & 5 deletions Content.Server/GuideGenerator/UniversalJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ public override void Write(Utf8JsonWriter writer, T obj, JsonSerializerOptions o
// If the field has a [JsonIgnore] attribute, skip it
if (Attribute.GetCustomAttribute(prop, typeof(JsonIgnoreAttribute), true) != null) continue;

// If GetIndexParameters().Length is not 0 then it means that property is indexed
// And since we cannot get its values without passing index (which type can LITERALLY BE ANYTHING) then let's just skip it
// Yeah, i know that this will lead to a potential data loss, but what i can do about it?
if (prop.GetIndexParameters().Length != 0) continue; // Corvax-Wiki

// 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;
Expand Down

0 comments on commit 32ce555

Please sign in to comment.