Skip to content

Commit

Permalink
Merge pull request #25 from MopsieX/release/release-1.6
Browse files Browse the repository at this point in the history
Release/release 1.6
  • Loading branch information
TimeMaster18 authored Jan 5, 2020
2 parents cab1f64 + 72b241a commit ecaf893
Show file tree
Hide file tree
Showing 19 changed files with 1,037 additions and 819 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project is still in its early stages, much more will hopefully come soon :)
### Features:
- Launch the game in offline mode, single player.
- Play any map, survival or endless modes
- Play with Max
- Play with Maximilian, Gabriella, Smolder, Ivy, Hogarth and Bionka
- Choose traps and gear
- Choose your skin and your dye
- Choose Guardians
Expand All @@ -35,4 +35,3 @@ This project is still in its early stages, much more will hopefully come soon :)
### Known Problems
- Hero HP doesn't scale as expected
- UI of the launcher is lacking

10 changes: 5 additions & 5 deletions SingleplayerLauncher/ConfigFile.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System.IO;
using IniParser;
using IniParser;
using IniParser.Model;
using System.IO;

namespace SingleplayerLauncher
{
class ConfigFile
internal class ConfigFile
{
private FileIniDataParser parser;
private string path; // (filename too)
private readonly FileIniDataParser parser;
private readonly string path; // (filename too)
public IniData data;
//public Dictionary<string, Dictionary<string, string>> configDict;

Expand Down
220 changes: 104 additions & 116 deletions SingleplayerLauncher/Hero.cs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion SingleplayerLauncher/LauncherMainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

159 changes: 68 additions & 91 deletions SingleplayerLauncher/LauncherMainForm.cs

Large diffs are not rendered by default.

41 changes: 14 additions & 27 deletions SingleplayerLauncher/LoadoutEditorForm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Newtonsoft.Json.Linq;
using SingleplayerLauncher.Resources;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -8,29 +8,16 @@ namespace SingleplayerLauncher
{
public partial class LoadoutEditorForm : Form
{
readonly List<ComboBox> comBoxLoadoutSlots;
readonly List<ComboBox> comBoxGuardianSlots;
private readonly List<ComboBox> comBoxLoadoutSlots;
private readonly List<ComboBox> comBoxGuardianSlots;
public static List<byte[]> bytes = new List<byte[]>();
private readonly Hero hero = Hero.Instance;

private const int nLoadoutSlots = 9;
private const int nGuardianSlots = 2;

//TODO move defaults to a resource file
readonly string[] defaultLoadout =
{
"Mending Root", "Mage's Clover", "Barricade",
"Viscous Tar", "Flip Trap", "Wall Blades",
"Arrow Wall", "Concussive Pounder", "Ceiling Ballista"
};

readonly string[] defaultGuardians =
{
"Dragon Guardian", "Serpent Guardian"
};

public LoadoutEditorForm()
{
{
InitializeComponent();

comBoxLoadoutSlots = new List<ComboBox>()
Expand All @@ -44,34 +31,34 @@ public LoadoutEditorForm()
{
comBoxGuardianSlot1, comBoxGuardianSlot2
};
}
}

private void LoadoutEditor_Load(object sender, EventArgs e)
{
PopulateSlots(this.comBoxLoadoutSlots, Resources.traps.Keys.ToList());
PopulateSlots(this.comBoxLoadoutSlots, Resources.gear.Keys.ToList());
PopulateSlots(this.comBoxGuardianSlots, Resources.guardians.Keys.ToList());
PopulateSlots(comBoxLoadoutSlots, Resources.Loadout.Traps.Keys.ToList());
PopulateSlots(comBoxLoadoutSlots, Resources.Loadout.Gear.Keys.ToList());
PopulateSlots(comBoxGuardianSlots, Resources.Loadout.Guardians.Keys.ToList());

// TODO implement a way of loading previous loadout used
// Placeholder -> Default loadout
SetDefaultSlots(this.comBoxLoadoutSlots, this.defaultLoadout);
SetDefaultSlots(this.comBoxGuardianSlots, this.defaultGuardians);
SetDefaultSlots(comBoxLoadoutSlots, DefaultValues.Loadout);
SetDefaultSlots(comBoxGuardianSlots, DefaultValues.Guardians);
}

private void btnSave_Click(object sender, EventArgs e)
{
SetDefaultLoadoutInForm();
Settings.Instance["loadout"] = hero.Loadout;
Settings.Instance["loadout"] = hero.Loadout;
Settings.Save();
this.Close();
Close();
}

private void SetDefaultLoadoutInForm()
{
{
hero.Loadout = SaveLoadout();
hero.Guardians = SaveGuardians();

this.Close();
Close();
}

private void PopulateSlots(List<ComboBox> comBoxSlotList, List<String> entryList)
Expand Down
8 changes: 1 addition & 7 deletions SingleplayerLauncher/ModLoaderForm.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SingleplayerLauncher
Expand All @@ -14,7 +8,7 @@ public partial class ModLoaderForm : Form
public ModLoaderForm()
{
InitializeComponent();
}
}

private void ModLoaderForm_Load(object sender, EventArgs e)
{
Expand Down
2 changes: 1 addition & 1 deletion SingleplayerLauncher/Mods/NoTrapCap.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SingleplayerLauncher.Mods
{
public class NoTrapCap:Mod
public class NoTrapCap : Mod
{
public NoTrapCap(UPKFile UPKFile) : base(UPKFile)
{
Expand Down
6 changes: 2 additions & 4 deletions SingleplayerLauncher/Program.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace SingleplayerLauncher
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
1 change: 0 additions & 1 deletion SingleplayerLauncher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
Loading

0 comments on commit ecaf893

Please sign in to comment.