Skip to content

Commit

Permalink
Add source URL and remove extra check for mod license
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDisk committed Jul 14, 2023
1 parent 04fe910 commit 9018cf4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion PulsarModLoader/CustomGUI/GUIMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ void WindowFunction(int WindowID)
Label($"Author: {mod.Author}");
Label($"Name: {mod.Name}");
Label($"Version: {mod.Version}");
Label($"License: {mod.License ?? "Proprietary"}");
Label($"License: {mod.License}");
if(!string.IsNullOrEmpty(mod.SourceURL))
{
Label($"SourceURL: {mod.SourceURL}");
}
if (mod.ShortDescription != string.Empty)
Label($"Short Description: {mod.ShortDescription}");
if (mod.LongDescription != string.Empty)
Expand Down
2 changes: 1 addition & 1 deletion PulsarModLoader/ModManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public PulsarMod LoadMod(string assemblyPath)
activeMods.Add(mod.Name, mod);
OnModSuccessfullyLoaded?.Invoke(mod.Name, mod);

Logger.Info($"Loaded Mod: {mod.Name}, Version: {mod.Version}, Author: {mod.Author}, License: {mod.License}");
Logger.Info($"Loaded Mod: {mod.Name}, Version: {mod.Version}, Author: {mod.Author}, License: {mod.License}, SourceURL: {(mod.SourceURL.Length != 0 ? mod.SourceURL : "N/A")}");

if (ModUpdateCheck.IsUpdateAviable(mod))
Logger.Info($"↑ ↑ ↑ !This mod is outdated! ↑ ↑ ↑");
Expand Down
13 changes: 12 additions & 1 deletion PulsarModLoader/PulsarMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public virtual string License
{
get
{
return null; //This has to be null to allow the Coalcase to work later on
return "Proprietary";
}
}

Expand All @@ -70,6 +70,17 @@ public virtual string ReadmeURL
}
}

/// <SourceURL>
/// Sourcecode for the mod.
/// </SourceURL>
public virtual string SourceURL
{
get
{
return string.Empty;
}
}

/// <summary>
/// Version of mod. Displayed in mod list.
/// </summary>
Expand Down

0 comments on commit 9018cf4

Please sign in to comment.