Skip to content

Commit

Permalink
ModManager compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Oct 6, 2018
1 parent 4c4715d commit 266e71d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions About/Manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
<Manifest>
<identifier>net.pardeike.rimworld.mod.reversecommands</identifier>
<version>1.0.6.0</version>
<tags>
<li>Mod</li>
<li>0.19</li>
<li>1.0</li>
</tags>
<targetVersions>
<li>0.19.0</li>
<li>1.0.0</li>
</targetVersions>
<dependencies>
</dependencies>
<incompatibleWith>
Expand Down
Binary file modified Assemblies/ReverseCommands.dll
Binary file not shown.
5 changes: 3 additions & 2 deletions Source/MultiVersionModFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ static void Postfix(ModMetaData __instance, ref bool __result)

[HarmonyPatch(typeof(Workshop))]
[HarmonyPatch("SetWorkshopItemDataFrom")]
public static class MultiVersionModFix2
public static class MultiVersionModFix3
{
static IList<string> GetTags(string rootDir)
{
var xml = new XmlDocument();
xml.Load(rootDir + Path.DirectorySeparatorChar + "About" + Path.DirectorySeparatorChar + "Manifest.xml");
return xml.SelectNodes("/Manifest/tags/li").Cast<XmlNode>().Select(node => node.InnerText).ToList();
var tags = xml.SelectNodes("/Manifest/targetVersions/li").Cast<XmlNode>().Select(node => (node.InnerText + "$").Replace(".0$", ""));
return tags.Add("Mod").ToList();
}

static void Postfix(UGCUpdateHandle_t updateHandle, WorkshopItemHook hook)
Expand Down

0 comments on commit 266e71d

Please sign in to comment.