Browse Source

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

tags/v1.0.0
NorbiPeti 3 years ago
parent
commit
407724fb0d
5 changed files with 27 additions and 3 deletions
  1. +6
    -0
      GCMM/MainForm.cs
  2. +5
    -2
      GCMM/MainModInstaller.cs
  3. +12
    -0
      GCMM/Properties/Settings.Designer.cs
  4. +3
    -0
      GCMM/Properties/Settings.settings
  5. +1
    -1
      README.md

+ 6
- 0
GCMM/MainForm.cs 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;


+ 5
- 2
GCMM/MainModInstaller.cs 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;
}


+ 12
- 0
GCMM/Properties/Settings.Designer.cs 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;
}
}
}
}

+ 3
- 0
GCMM/Properties/Settings.settings 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>

+ 1
- 1
README.md 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


Loading…
Cancel
Save