Skip to content

Commit

Permalink
Merge pull request #260 from SpaceWarpDev/hotfix-1.4.3
Browse files Browse the repository at this point in the history
Hotfix 1.4.3
  • Loading branch information
cheese3660 authored Aug 31, 2023
2 parents 1609869 + 102ce9d commit 17ed1af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<SpaceWarpVersion>1.4.2</SpaceWarpVersion>
<SpaceWarpVersion>1.4.3</SpaceWarpVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>11</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
4 changes: 2 additions & 2 deletions SpaceWarpBuildTemplate/swinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "Space-Warp is an API for KSP2 mod developers.",
"source": "https://github.com/SpaceWarpDev/SpaceWarp",
"version_check": "https://raw.githubusercontent.com/SpaceWarpDev/SpaceWarp/main/SpaceWarpBuildTemplate/swinfo.json",
"version": "1.4.2",
"version": "1.4.3",
"dependencies": [
{
"id": "UitkForKsp2",
Expand All @@ -24,7 +24,7 @@
}
],
"ksp2_version": {
"min": "0",
"min": "0.1.4.0",
"max": "*"
}
}
6 changes: 4 additions & 2 deletions SpaceWarpPatcher/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ private static (string name, string path) GetNameAndPath(FileInfo jsonFile)
var path = '"' + jsonFile.Directory.FullName.Replace("\"","\\\"").Replace("\\","\\\\") + '"';
var obj = JObject.Parse(File.ReadAllText(jsonFile.FullName));
var id = obj["mod_id"].Value<string>();
var replaced = id.Replace(".", "_").Replace(" ", "_");
var replaced = id.Replace(".", "_")
.Replace(" ", "_")
.Replace("-", "_");
return (replaced, path);
}

Expand Down Expand Up @@ -134,7 +136,7 @@ private static void GenerateSpaceWarpPathsDLL(bool changed, ManualLogSource true
var allSwinfos =
new DirectoryInfo(Path.Combine(Paths.BepInExRootPath, "plugins"))
.EnumerateFiles("swinfo.json", SearchOption.AllDirectories).Where(x => IsDisabled(x, allDisabled))
.Select(x => GetNameAndPath(x));
.Select(GetNameAndPath);
// Now we build the dll
var dll = "public static class SpaceWarpPaths {\n";
foreach (var swinfo in allSwinfos)
Expand Down

0 comments on commit 17ed1af

Please sign in to comment.