mlaumcherb/Млаумчерб.Клиент/классы/GameArguments.cs
2024-09-29 08:21:48 +05:00

28 lines
750 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DTLib.Extensions;
namespace Млаумчерб.Клиент.классы;
public class GameArguments : ArgumentsWithPlaceholders
{
private static readonly string[] _enabled_features =
[
"has_custom_resolution"
];
public GameArguments(VersionDescriptor d)
{
if (d.minecraftArguments is not null)
{
raw_args.AddRange(d.minecraftArguments.SplitToList(' ', quot: '"'));
}
else if (d.arguments is not null)
{
foreach (var av in d.arguments.game)
{
if(Буржуазия.CheckRules(av.rules, _enabled_features))
raw_args.AddRange(av.value);
}
}
}
}