Skip to content

Commit

Permalink
Убрал остатки упоминаний корвакса
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed May 30, 2024
1 parent 94367f9 commit cbf7f25
Show file tree
Hide file tree
Showing 82 changed files with 670 additions and 1,158 deletions.
4 changes: 2 additions & 2 deletions Content.Client/Lobby/UI/CharacterSetupGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
Text="{Loc 'character-setup-gui-character-setup-stats-button'}"
StyleClasses="ButtonBig"
HorizontalAlignment="Right" />
<!-- Corvax-Sponsor-Start -->
<!-- Sunrise-Sponsor-Start -->
<Button Name="SponsorButton"
Text="{Loc 'character-setup-gui-character-setup-sponsor-button'}"
Visible="False"
StyleClasses="ButtonBig" />
<!-- Corvax-Sponsor-End -->
<!-- Sunrise-Sponsor-End -->
<Button Name="RulesButton"
Text="{Loc 'character-setup-gui-character-setup-rules-button'}"
StyleClasses="ButtonBig"/>
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@
<Control HorizontalExpand="True"/>
<OptionButton Name="SpawnPriorityButton" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Corvax-TTS-Start -->
<!-- Sunrise-TTS-Start -->
<BoxContainer HorizontalExpand="True" Visible="False" Name="TTSContainer">
<Label Text="{Loc 'humanoid-profile-editor-voice-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="VoiceButton" HorizontalAlignment="Right" />
<Button Name="VoicePlayButton" Text="{Loc 'humanoid-profile-editor-voice-play'}" MaxWidth="80" />
</BoxContainer>
<!-- Corvax-TTS-End -->
<!-- Sunrise-TTS-End -->
</BoxContainer>
<!-- Skin -->
<BoxContainer Margin="10" HorizontalExpand="True" Orientation="Vertical">
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Research/UI/ResearchConsoleMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
Title="{Loc 'research-console-menu-title'}"
MinSize="625 400"
SetSize="760 550"> <!-- Corvax-Localization -->
SetSize="760 550"> <!-- Russian-Localization -->
<BoxContainer Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True">
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<Label Text="{Loc 'voice-mask-name-change-speech-style'}" />
<OptionButton Name="SpeechVerbSelector" /> <!-- Populated in LoadVerbs -->
</BoxContainer>
<!-- Corvax-TTS-Start -->
<!-- Sunrise-TTS-Start -->
<BoxContainer Orientation="Horizontal" Margin="5" Visible="False" Name="TTSContainer">
<Label Text="{Loc 'voice-mask-voice-change-info'}" />
<OptionButton Name="VoiceSelector" /> <!-- Populated in LoadVerbs -->
</BoxContainer>
<!-- Corvax-TTS-End -->
<!-- Sunrise-TTS-End -->
</BoxContainer>
</controls:FancyWindow>
7 changes: 4 additions & 3 deletions Content.Server/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server._Sunrise.GuideGenerator;
using Content.Server._Sunrise.TTS;
using Content.Server.Acz;
using Content.Server.Administration;
Expand All @@ -6,7 +7,6 @@
using Content.Server.Afk;
using Content.Server.Chat.Managers;
using Content.Server.Connection;
using Content.Server.Corvax.GuideGenerator;
using Content.Server.Database;
using Content.Server.EUI;
using Content.Server.GameTicking;
Expand All @@ -31,6 +31,7 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using ReactionJsonGenerator = Content.Server._Sunrise.GuideGenerator.ReactionJsonGenerator;

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

Check failure on line 34 in Content.Server/Entry/EntryPoint.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ReactionJsonGenerator' does not exist in the namespace 'Content.Server._Sunrise.GuideGenerator' (are you missing an assembly reference?)

namespace Content.Server.Entry
{
Expand Down Expand Up @@ -131,7 +132,7 @@ public override void PostInit()
file = resourceManager.UserData.OpenWriteText(resPath.WithName("react_" + dest));
ReactionJsonGenerator.PublishJson(file);
file.Flush();
// Corvax-Wiki-Start
// Wiki-Start
file = resourceManager.UserData.OpenWriteText(resPath.WithName("entity_" + dest));
EntityJsonGenerator.PublishJson(file);
file.Flush();
Expand All @@ -141,7 +142,7 @@ public override void PostInit()
file = resourceManager.UserData.OpenWriteText(resPath.WithName("healthchangereagents_" + dest));
HealthChangeReagentsJsonGenerator.PublishJson(file);
file.Flush();
// Corvax-Wiki-End
// Wiki-End
IoCManager.Resolve<IBaseServer>().Shutdown("Data generation done");
}
else
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/GuideGenerator/ChemistryJsonGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void PublishJson(StreamWriter file)
var serializeOptions = new JsonSerializerOptions
{
WriteIndented = true,
NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals, // Corvax-Wiki
NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals, // Wiki
Converters =
{
new UniversalJsonConverter<ReagentEffect>(),
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/GuideGenerator/ReactionJsonGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public static void PublishJson(StreamWriter file)
.Select(x => new ReactionEntry(x))
.ToDictionary(x => x.Id, x => x);

// Corvax-Wiki-Start
// Wiki-Start
if (reactions is not null) AddMixingCategories(reactions, prototype);
// Corvax-Wiki-End
// Wiki-End

var serializeOptions = new JsonSerializerOptions
{
WriteIndented = true,
NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals, // Corvax-Wiki
NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals, // Wiki
Converters =
{
new UniversalJsonConverter<ReagentEffect>(),
Expand Down
25 changes: 13 additions & 12 deletions Content.Server/GuideGenerator/ReagentEntry.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System.Linq;
using System.Text.Json.Serialization;
using Content.Server._Sunrise.GuideGenerator;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Server.Corvax.GuideGenerator;
using ReagentEffectsEntry = Content.Server._Sunrise.GuideGenerator.ReagentEffectsEntry;

namespace Content.Server.GuideGenerator;

Expand All @@ -27,33 +28,33 @@ public sealed class ReagentEntry
public string SubstanceColor { get; }

[JsonPropertyName("textColor")]
public string TextColor { get; } // Corvax-Wiki
public string TextColor { get; } // Wiki

[JsonPropertyName("recipes")]
public List<string> Recipes { get; } = new();

[JsonPropertyName("metabolisms")]
public Dictionary<string, Corvax.GuideGenerator.ReagentEffectsEntry>? Metabolisms { get; } // Corvax-Wiki
public Dictionary<string, ReagentEffectsEntry>? Metabolisms { get; } // Wiki

public ReagentEntry(ReagentPrototype proto)
{
Id = proto.ID;
Name = TextTools.TextTools.CapitalizeString(proto.LocalizedName); // Corvax-Wiki
Name = TextTools.TextTools.CapitalizeString(proto.LocalizedName); // Wiki
Group = proto.Group;
Description = proto.LocalizedDescription;
PhysicalDescription = proto.LocalizedPhysicalDescription;
SubstanceColor = proto.SubstanceColor.ToHex();

// Corvax-Wiki-Start
// Wiki-Start
var r = proto.SubstanceColor.R;
var g = proto.SubstanceColor.G;
var b = proto.SubstanceColor.B;
TextColor = (0.2126f * r + 0.7152f * g + 0.0722f * b > 0.5
? Color.Black
: Color.White).ToHex();

Metabolisms = proto.Metabolisms?.ToDictionary(x => x.Key.Id, x => new Corvax.GuideGenerator.ReagentEffectsEntry(x.Value));
// Corvax-Wiki-End
Metabolisms = proto.Metabolisms?.ToDictionary(x => x.Key.Id, x => new ReagentEffectsEntry(x.Value));
// Wiki-End
}
}

Expand All @@ -71,7 +72,7 @@ public sealed class ReactionEntry
[JsonPropertyName("products")]
public Dictionary<string, float> Products { get; }

// Corvax-Wiki-Start
// Wiki-Start
[JsonPropertyName("mixingCategories")]
public List<MixingCategoryEntry> MixingCategories { get; } = new();

Expand All @@ -88,13 +89,13 @@ public sealed class ReactionEntry
public List<ReagentEffectEntry> ExportEffects { get; } = new();

[JsonIgnore]
// Corvax-Wiki-End
// Wiki-End
public List<ReagentEffect> Effects { get; }

public ReactionEntry(ReactionPrototype proto)
{
Id = proto.ID;
Name = TextTools.TextTools.CapitalizeString(proto.Name); // Corvax-Wiki
Name = TextTools.TextTools.CapitalizeString(proto.Name); // Wiki
Reactants =
proto.Reactants
.Select(x => KeyValuePair.Create(x.Key, new ReactantEntry(x.Value.Amount.Float(), x.Value.Catalyst)))
Expand All @@ -105,12 +106,12 @@ public ReactionEntry(ReactionPrototype proto)
.ToDictionary(x => x.Key, x => x.Value);
Effects = proto.Effects;

// Corvax-Wiki-Start
// Wiki-Start
ExportEffects = proto.Effects.Select(x => new ReagentEffectEntry(x)).ToList();
MinTemp = proto.MinimumTemperature;
MaxTemp = proto.MaximumTemperature;
HasMax = !float.IsPositiveInfinity(MaxTemp);
// Corvax-Wiki-End
// Wiki-End
}
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Server/GuideGenerator/UniversalJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override void Write(Utf8JsonWriter writer, T obj, JsonSerializerOptions o
// 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 (prop.GetIndexParameters().Length != 0) continue; // 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);
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/_Sunrise/GuideGenerator/EntityEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class EntityEntry
public EntityEntry(EntityPrototype proto)
{
Id = proto.ID;
Name = TextTools.TextTools.CapitalizeString(proto.Name); // Corvax-Wiki
Name = TextTools.TextTools.CapitalizeString(proto.Name); // Wiki
Description = proto.Description;
}
}
2 changes: 1 addition & 1 deletion Content.Server/_Sunrise/GuideGenerator/GrindRecipeEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public GrindRecipeEntry(EntityPrototype proto)
// B) Have "SolutionContainerManager" component on it.
// C) Have "GrindableSolution" declared in "SolutionContainerManager" component.
// D) Have solution with name declared in "SolutionContainerManager.GrindableSolution" inside its "SolutionContainerManager" component.
// F) Have "Food" in its name (see Content.Server/Corvax/GuideGenerator/MealsRecipesJsonGenerator.cs)
// F) Have "Food" in its name (see Content.Server/_Sunrise/GuideGenerator/MealsRecipesJsonGenerator.cs)
if (proto.Components.TryGetComponent("Extractable", out var extractableComp) && proto.Components.TryGetComponent("SolutionContainerManager", out var solutionCompRaw))
{
var extractable = (ExtractableComponent) extractableComp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using Content.Server.Chemistry.ReagentEffects;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Prototypes;
using System.IO;
using System.Linq;
using System.Text.Json;
using static Content.Server.GuideGenerator.ChemistryJsonGenerator;
using Content.Server.Chemistry.ReagentEffects;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Prototypes;

namespace Content.Server.Corvax.GuideGenerator;
namespace Content.Server._Sunrise.GuideGenerator;
public sealed class HealthChangeReagentsJsonGenerator
{
public static void PublishJson(StreamWriter file)
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/_Sunrise/GuideGenerator/MixingCategoryEntry.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Shared.Chemistry.Reaction;
using System.Text.Json.Serialization;
using Content.Shared.Chemistry.Reaction;

namespace Content.Server.Corvax.GuideGenerator;
namespace Content.Server._Sunrise.GuideGenerator;

public sealed class MixingCategoryEntry
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Corvax.GuideGenerator;
using Content.Server.GuideGenerator;
using Content.Shared.Chemistry.Reaction;
using Robust.Shared.Prototypes;

Expand Down
4 changes: 2 additions & 2 deletions Content.Server/_Sunrise/GuideGenerator/ReagentEffectEntry.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.Json.Serialization;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Prototypes;
using System.Text.Json.Serialization;

namespace Content.Server.Corvax.GuideGenerator;
namespace Content.Server._Sunrise.GuideGenerator;
public sealed class ReagentEffectEntry
{
[JsonPropertyName("id")]
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/_Sunrise/GuideGenerator/ReagentEffectsEntry.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Shared.FixedPoint;
using System.Linq;
using System.Text.Json.Serialization;
using Content.Shared.FixedPoint;

namespace Content.Server.Corvax.GuideGenerator;
namespace Content.Server._Sunrise.GuideGenerator;
public sealed class ReagentEffectsEntry
{
[JsonPropertyName("rate")]
Expand Down
1 change: 0 additions & 1 deletion Content.Server/_Sunrise/StationGoal/StationGoalCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Linq;
using Content.Server.Administration;
using Content.Server.Corvax.StationGoal;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.Prototypes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Linq;
using Content.Server.Corvax.StationGoal;
using Content.Server.Paper;
using Content.Shared.Fax.Components;
using Content.Shared.GameTicking;
Expand Down
10 changes: 3 additions & 7 deletions Content.Shared/Preferences/Loadouts/RoleLoadout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void EnsureValid(HumanoidCharacterProfile profile, ICommonSession session
{
var groupRemove = new ValueList<string>();
var protoManager = collection.Resolve<IPrototypeManager>();
var netManager = collection.Resolve<INetManager>(); // Corvax-Loadouts
var netManager = collection.Resolve<INetManager>();

if (!protoManager.TryIndex(Role, out var roleProto))
{
Expand All @@ -74,7 +74,6 @@ public void EnsureValid(HumanoidCharacterProfile profile, ICommonSession session
continue;
}

// Corvax-Loadouts-Start
var groupProtoLoadouts = groupProto.Loadouts;
if (collection.TryResolveType<ISharedLoadoutsManager>(out var loadoutsManager) && group.Id == "Inventory")
{
Expand All @@ -90,7 +89,6 @@ public void EnsureValid(HumanoidCharacterProfile profile, ICommonSession session

groupProtoLoadouts = prototypes.Select(id => (ProtoId<LoadoutPrototype>)id).ToList();
}
// Corvax-Loadouts-End

var loadouts = groupLoadouts[..Math.Min(groupLoadouts.Count, groupProto.MaxLimit)];

Expand All @@ -113,13 +111,11 @@ public void EnsureValid(HumanoidCharacterProfile profile, ICommonSession session
continue;
}

// Corvax-Loadouts-Start: Validate if loadout exist in group. It's can't be f real
if (!groupProtoLoadouts.Contains(loadout.Prototype))
{
loadouts.RemoveAt(i);
continue;
}
// Corvax-Loadouts-End

// Validate the loadout can be applied (e.g. points).
if (!IsValid(profile, session, loadout.Prototype, collection, out _))
Expand All @@ -136,9 +132,9 @@ public void EnsureValid(HumanoidCharacterProfile profile, ICommonSession session
// If you put invalid ones first but that's your fault for not using sensible defaults
if (loadouts.Count < groupProto.MinLimit)
{
for (var i = 0; i < Math.Min(groupProto.MinLimit, groupProtoLoadouts.Count); i++) // Corvax-Loadout: Use groupProtoLoadouts instead of groupProto.Loadouts
for (var i = 0; i < Math.Min(groupProto.MinLimit, groupProtoLoadouts.Count); i++)
{
if (!protoManager.TryIndex(groupProtoLoadouts[i], out var loadoutProto)) // Corvax-Loadout
if (!protoManager.TryIndex(groupProtoLoadouts[i], out var loadoutProto))
continue;

var defaultLoadout = new Loadout()
Expand Down
Loading

0 comments on commit cbf7f25

Please sign in to comment.