Don't complain if we don't know about the mod files

This commit is contained in:
Norbi Peti 2020-06-18 20:05:14 +02:00
parent 0494106680
commit 407724fb0d
5 changed files with 27 additions and 3 deletions

View file

@ -45,6 +45,12 @@ If you encounter an issue while the game is patched, report it to us. If you thi
private void Form1_Load(object sender, EventArgs e)
{
if (Settings.Default.NeedsUpdate)
{
Settings.Default.Upgrade();
Settings.Default.NeedsUpdate = false;
Settings.Default.Save();
}
modlist.Items.Clear();
UpdateButton(installbtn, false);
modinfobox.Text = defaultInfo;

View file

@ -87,8 +87,11 @@ namespace GCMM
continue;
}
if (File.Exists(completeFileName) && !mod.ModFiles.Contains(completeFileName) && file.FullName != "Plugins/" + mod.Name + ".dll")
{ //If it's part of the mod files, then it's an update and it didn't originally exist in the game - the last condition is for dll->zip changes
if ((mod.Version == null || mod.ModFiles.Count != 0) //Negated: The mod is installed and we don't know about any of its files
&& File.Exists(completeFileName) // OR it's a new file
&& !mod.ModFiles.Contains(completeFileName) // OR it's known to be part of the mod already
&& file.FullName != "Plugins/" + mod.Name + ".dll") // OR it's the plugin's DLL (dll->zip release)
{
if (MessageBox.Show("The mod zip contains a file that exists as part of the game. Do you want to skip this file?\n" + file.FullName + "\nOnly choose No if it's part of a previous installation of the mod.", "File is part of the game", MessageBoxButtons.YesNo) == DialogResult.Yes)
continue;
}

View file

@ -58,5 +58,17 @@ namespace GCMM.Properties {
this["UseProxy"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool NeedsUpdate {
get {
return ((bool)(this["NeedsUpdate"]));
}
set {
this["NeedsUpdate"] = value;
}
}
}
}

View file

@ -11,5 +11,8 @@
<Setting Name="UseProxy" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="NeedsUpdate" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -1,7 +1,7 @@
# Gamecraft Mod Manager
A manager that handles everything needed to use mods for Gamecraft.
**Note:** If you already have mods installed that have extra files, the mod manager will treat them as game files which will cause issues with updating the mod. To solve this, remove the mod files and install the mod through this application - or say No to each prompt while updating.
**Note:** If you already have a mod installed the manager won't know about what files it has until it's updated through GCMM. If you uninstall the mod before updating it, it'll only remove the plugin dll and then treat the other mod files as part of Gamecraft.
## Features
* Download and run GCIPA if needed