LANCommander.PlaynitePlugin/LANCommander.PowerShell/Cmdlets/Get-GameManifest.cs
Pat Hartl a8ed46bff7 Change location of all metadata/script files in install directory
In order to support mods and expansions, there needs to be another place to hold game scripts and the manifest. These have been moved to the {InstallDir}\.lancommander\{GameId} directory.
2024-01-09 01:22:56 -06:00

23 lines
661 B
C#

using LANCommander.SDK;
using LANCommander.SDK.Helpers;
using System;
using System.Management.Automation;
namespace LANCommander.PowerShell.Cmdlets
{
[Cmdlet(VerbsCommon.Get, "GameManifest")]
[OutputType(typeof(GameManifest))]
public class GetGameManifestCmdlet : Cmdlet
{
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
public string Path { get; set; }
[Parameter(Mandatory = true)]
public Guid Id { get; set; }
protected override void ProcessRecord()
{
WriteObject(ManifestHelper.Read(Path, Id));
}
}
}