Skip to content

Commit

Permalink
imp - Used embedded resources for the rest of the kernel
Browse files Browse the repository at this point in the history
---

We've used embedded resources for the rest of the kernel, as we need more flexibility.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Apr 29, 2024
1 parent 1c5cd49 commit 1524e0a
Show file tree
Hide file tree
Showing 98 changed files with 106 additions and 6,766 deletions.
1 change: 0 additions & 1 deletion private/Nitrocid.Tests/Misc/Text/JsonToolsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using System.IO;
using Textify.General;
using Textify.Json;

namespace Nitrocid.Tests.Misc.Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
using Nitrocid.ConsoleBase.Colors;
using Terminaux.Writer.FancyWriters;
using Nitrocid.Languages;
using Nitrocid.ConsoleBase.Writers;
using Nitrocid.Drivers.RNG;
using Terminaux.Base;
using Terminaux.Colors.Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
using Nitrocid.Misc.Splash;
using Nitrocid.Modifications;
using System.Linq;
using Textify.Data;

namespace Nitrocid.Extras.Amusements
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Update="Resources\AddonResources.Designer.cs">
<DependentUpon>AddonResources.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\AddonResources.resx">
<SubType>Designer</SubType>
<LastGenOutput>AddonResources.Designer.cs</LastGenOutput>
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Include="Resources\*" />
</ItemGroup>

</Project>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Configuration.Instances;
using Nitrocid.Kernel.Configuration.Settings;
using Nitrocid.Misc.Reflection.Internal;

namespace Nitrocid.Extras.Amusements.Settings
{
Expand All @@ -32,7 +33,7 @@ public class AmusementsConfig : BaseKernelConfig, IKernelConfig
/// <inheritdoc/>
[JsonIgnore]
public override SettingsEntry[] SettingsEntries =>
ConfigTools.GetSettingsEntries(Resources.AddonResources.AmusementsSettings);
ConfigTools.GetSettingsEntries(ResourcesManager.GetData("AmusementsSettings.json", ResourcesType.Misc, typeof(AmusementsConfig).Assembly));

/// <summary>
/// What is the minimum number to choose?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Configuration.Instances;
using Nitrocid.Kernel.Configuration.Settings;
using Nitrocid.Misc.Reflection.Internal;

namespace Nitrocid.Extras.Amusements.Settings
{
Expand All @@ -32,7 +33,7 @@ public class AmusementsSaversConfig : BaseKernelConfig, IKernelConfig
/// <inheritdoc/>
[JsonIgnore]
public override SettingsEntry[] SettingsEntries =>
ConfigTools.GetSettingsEntries(Resources.AddonResources.AmusementsSaverSettings);
ConfigTools.GetSettingsEntries(ResourcesManager.GetData("AmusementsSaverSettings.json", ResourcesType.Misc, typeof(AmusementsConfig).Assembly));

/// <summary>
/// [Snaker] Enable truecolor support. Has a higher priority than 255 color support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Configuration.Instances;
using Nitrocid.Kernel.Configuration.Settings;
using Nitrocid.Misc.Reflection.Internal;
using Nitrocid.Misc.Text;

namespace Nitrocid.Extras.Amusements.Settings
Expand All @@ -33,7 +34,7 @@ public class AmusementsSplashesConfig : BaseKernelConfig, IKernelConfig
/// <inheritdoc/>
[JsonIgnore]
public override SettingsEntry[] SettingsEntries =>
ConfigTools.GetSettingsEntries(Resources.AddonResources.AmusementsSplashSettings);
ConfigTools.GetSettingsEntries(ResourcesManager.GetData("AmusementsSplashSettings.json", ResourcesType.Misc, typeof(AmusementsConfig).Assembly));

/// <summary>
/// [Quote] The progress text location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Update="Resources\AddonResources.Designer.cs">
<DependentUpon>AddonResources.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\AddonResources.resx">
<SubType>Designer</SubType>
<LastGenOutput>AddonResources.Designer.cs</LastGenOutput>
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Include="Resources\*" />
</ItemGroup>

</Project>

0 comments on commit 1524e0a

Please sign in to comment.