28 lines
754 B
C#
28 lines
754 B
C#
using DTLib.Extensions;
|
||
|
||
namespace Млаумчерб.Клиент.классы;
|
||
|
||
public class GameArguments : ArgumentsWithPlaceholders
|
||
{
|
||
private static readonly string[] _enabled_features =
|
||
[
|
||
"has_custom_resolution"
|
||
];
|
||
|
||
public GameArguments(GameVersionDescriptor 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);
|
||
}
|
||
}
|
||
}
|
||
}
|