Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
BadRyuner committed Jun 12, 2023
1 parent a5454ce commit fc786e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions PulsarModLoader/MPModChecks/MPModCheckManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private void UpdateMyModList()
for (int i = 0; i < UnprocessedMods.Count; i++)
{
PulsarMod currentMod = UnprocessedMods[i];
using (FileStream MyStream = File.OpenRead(currentMod.GetType().Assembly.Location))
using (FileStream MyStream = File.OpenRead(currentMod.VersionInfo.FileName))
{
MyStream.Position = 0;
byte[] Hash = MyHasher.ComputeHash(MyStream);
Expand All @@ -204,18 +204,19 @@ public byte[] SerializeHashlessUserData()
{
//Datastream storage structure:
writer.Write(Patches.GameVersion.PMLVersion); //--Header--
writer.Write(MyModList.Length); //string PMLVersion
writer.Write(MyModList.Length); //string PMLVersion
for (int i = 0; i < MyModList.Length; i++) //int modcount
{ //
MPModDataBlock dataBlock = MyModList[i]; //--ModData--
writer.Write(dataBlock.ModName); //string mod name
writer.Write(dataBlock.ModName); //string mod name
writer.Write(dataBlock.HarmonyIdentifier); //string harmony ident
writer.Write(dataBlock.Version); //string mod version
writer.Write((byte)dataBlock.MPRequirement);//byte MPRequirement
writer.Write(dataBlock.ModID); //string ModID
}
}
return dataStream.ToArray();

return dataStream.ToArray();
}

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions PulsarModLoader/PulsarMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public virtual string Version
{
get
{
return VersionInfo.FileVersion;
return VersionInfo?.FileVersion;
}
}

Expand All @@ -66,7 +66,7 @@ public virtual string Author
{
get
{
return VersionInfo.CompanyName;
return VersionInfo?.CompanyName;
}
}

Expand All @@ -77,7 +77,7 @@ public virtual string ShortDescription
{
get
{
return VersionInfo.FileDescription;
return VersionInfo?.FileDescription;
}
}

Expand All @@ -99,7 +99,7 @@ public virtual string Name
{
get
{
return VersionInfo.ProductName;
return VersionInfo?.ProductName;
}
}

Expand Down

0 comments on commit fc786e4

Please sign in to comment.