mirror of
https://github.com/Wincent01/InfectedRose.git
synced 2025-12-30 08:49:32 -06:00
Fixed path irregularities and added option to specify an explicit id
This commit is contained in:
@@ -10,6 +10,9 @@ namespace InfectedRose.Interface
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("explicit-id")]
|
||||
public int? ExplicitId { get; set; }
|
||||
|
||||
[JsonPropertyName("old-ids")]
|
||||
public string[]? OldIds { get; set; }
|
||||
|
||||
@@ -171,7 +171,14 @@ namespace InfectedRose.Interface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mod.ExplicitId.HasValue)
|
||||
{
|
||||
key = mod.ExplicitId.Value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mod.OldIds == null)
|
||||
{
|
||||
key = 0;
|
||||
@@ -185,7 +192,7 @@ namespace InfectedRose.Interface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
key = 0;
|
||||
|
||||
return false;
|
||||
@@ -261,8 +268,8 @@ namespace InfectedRose.Interface
|
||||
|
||||
// Get the relative path from root to asset
|
||||
var finalRelative = Path.GetRelativePath(root, final);
|
||||
|
||||
return finalRelative.Replace("/", "\\");
|
||||
|
||||
return finalRelative;
|
||||
}
|
||||
|
||||
public static int AddIcon(string file)
|
||||
|
||||
@@ -667,11 +667,9 @@ namespace InfectedRose.Interface
|
||||
if (Directory.Exists(ModContext.Configuration.Copy))
|
||||
{
|
||||
Directory.Delete(ModContext.Configuration.Copy, true);
|
||||
|
||||
Directory.CreateDirectory(ModContext.Configuration.Copy);
|
||||
}
|
||||
|
||||
CopyFilesRecursively(ModContext.Root, ModContext.Configuration.Copy);
|
||||
File.CreateSymbolicLink(ModContext.Configuration.Copy, ModContext.Root);
|
||||
}
|
||||
|
||||
origin = Console.GetCursorPosition();
|
||||
|
||||
Reference in New Issue
Block a user