Compare commits
No commits in common. "00c2d14a06ff118b2a50bdd541aae7e8d07e1062" and "1b962831a025497dadf75e067e358c28c8ad2fff" have entirely different histories.
00c2d14a06
...
1b962831a0
|
@ -5,13 +5,10 @@
|
|||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<PublishAot>true</PublishAot>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotMake.CommandLine" Version="1.8.8" />
|
||||
<PackageReference Include="clifx" Version="2.3.5" />
|
||||
<PackageReference Include="TinyEmbree" Version="1.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
using DotMake.CommandLine;
|
||||
using CliFx;
|
||||
using CliFx.Attributes;
|
||||
using IConsole = CliFx.Infrastructure.IConsole;
|
||||
|
||||
namespace KeepersCompound.Lightmapper;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
public static async Task<int> Main(string[] args) =>
|
||||
await Cli.RunAsync<LightCommand>(args);
|
||||
public static async Task<int> Main() =>
|
||||
await new CliApplicationBuilder().AddCommandsFromThisAssembly().Build().RunAsync();
|
||||
}
|
||||
|
||||
[CliCommand(Description = "Compute lightmaps for a NewDark .MIS/.COW")]
|
||||
public class LightCommand
|
||||
[Command(Description = "Compute lightmaps for a NewDark .MIS/.COW")]
|
||||
public class LightCommand : ICommand
|
||||
{
|
||||
[CliArgument(Description = "The path to the root Thief installation.")]
|
||||
public required string InstallPath { get; set; }
|
||||
|
||||
[CliArgument(Description = "The folder name of the fan mission. For OMs this is blank.")]
|
||||
public required string CampaignName { get; set; }
|
||||
|
||||
[CliArgument(Description = "The name of the mission file including extension.")]
|
||||
public required string MissionName { get; set; }
|
||||
|
||||
[CliOption(Description = "Name of output file excluding extension.")]
|
||||
public string OutputName { get; set; } = "kc_lit";
|
||||
[CommandParameter(0, Description = "The path to the root Thief installation.")]
|
||||
public required string InstallPath { get; init; }
|
||||
[CommandParameter(1, Description = "The folder name of the fan mission. For OMs this is blank.")]
|
||||
public required string CampaignName { get; init; }
|
||||
[CommandParameter(2, Description = "The name of the mission file including extension.")]
|
||||
public required string MissionName { get; init; }
|
||||
[CommandOption("output", 'o', Description = "Name of output file excluding extension.")]
|
||||
public string OutputName { get; init; } = "kc_lit";
|
||||
|
||||
public void Run()
|
||||
public ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
Timing.Reset();
|
||||
|
||||
|
||||
var lightMapper = new LightMapper(InstallPath, CampaignName, MissionName);
|
||||
lightMapper.Light();
|
||||
lightMapper.Save(OutputName);
|
||||
|
||||
|
||||
Timing.LogAll();
|
||||
return default;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue