Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Binary.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILWrapper", "..\ILWrapper\I
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Endscript", "..\Endscript\Endscript\Endscript.csproj", "{ACC9EEB0-18B8-4EBA-B9D0-739E9C4501A1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreExtensions", "..\CoreExtensions\CoreExtensions\CoreExtensions.csproj", "{4C6FAA97-A899-4EFC-94B0-9E0DA55FB99B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +35,10 @@ Global
{ACC9EEB0-18B8-4EBA-B9D0-739E9C4501A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACC9EEB0-18B8-4EBA-B9D0-739E9C4501A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACC9EEB0-18B8-4EBA-B9D0-739E9C4501A1}.Release|Any CPU.Build.0 = Release|Any CPU
{4C6FAA97-A899-4EFC-94B0-9E0DA55FB99B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C6FAA97-A899-4EFC-94B0-9E0DA55FB99B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C6FAA97-A899-4EFC-94B0-9E0DA55FB99B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C6FAA97-A899-4EFC-94B0-9E0DA55FB99B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 1 addition & 7 deletions Binary/Binary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>binary.ico</ApplicationIcon>
<Version>2.1.0</Version>
<Version>2.5.5</Version>
<Authors>MaxHwoy</Authors>
<Description>Tool for editing Need for Speed binary files (.BIN, .BUN, .LZC).</Description>
<Copyright>Copyright © 2020 MaxHwoy</Copyright>
Expand All @@ -26,12 +26,6 @@
<ProjectReference Include="..\..\Nikki\Nikki\Nikki.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="CoreExtensions">
<HintPath>..\..\Nikki\Nikki\CoreExtensions.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Update="Prompt\Combo.cs">
<SubType>Form</SubType>
Expand Down
26 changes: 21 additions & 5 deletions Binary/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,22 @@ private void EMSMainNewLauncher_Click(object sender, EventArgs e)
{
using var form = new LanMaker();
form.ShowDialog();

if (form.WasCreated)
{

var result = MessageBox.Show("New launcher was created. Would you like to load it?", "Prompt",
MessageBoxButtons.YesNo, MessageBoxIcon.Question);

if (result == DialogResult.Yes)
{

this.LoadProfile(form.NewLanPath, true);

}

}

}

private void EMSMainLoadFiles_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -856,12 +872,12 @@ private void EMSWindowsNew_Click(object sender, EventArgs e)

private void EMSHelpAbout_Click(object sender, EventArgs e)
{
MessageBox.Show("Binary by MaxHwoy v2.1.0", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("Binary by MaxHwoy v2.5.5", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

private void EMSHelpTutorials_Click(object sender, EventArgs e)
{
MessageBox.Show("Coming soon TM", "Info", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
MessageBox.Show("Join Discord server at the start page to get help and full tool documentation!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}

#endregion
Expand Down Expand Up @@ -1369,9 +1385,9 @@ private void LoadProfile(string filename, bool showerrors)

this.EditorPropertyGrid.SelectedObject = null;
this.Profile = BaseProfile.NewProfile(launch.GameID, launch.Directory);
this.EditorStatusLabel.Text = "Loading... Please wait...";

var watch = new Stopwatch();
this.EditorStatusLabel.Text = "Loading... Please wait...";
watch.Start();

this.Profile.Load(launch);
Expand Down Expand Up @@ -1459,8 +1475,8 @@ private void SaveProfile()
{
#endif

var watch = new Stopwatch();
this.EditorStatusLabel.Text = "Saving... Please wait...";
var watch = new Stopwatch();
watch.Start();

this.Profile.Save();
Expand Down Expand Up @@ -1521,7 +1537,7 @@ private void EditorTreeView_AfterSelect(object sender, TreeViewEventArgs e)
this.ManageButtonScriptNode(e.Node);

this.EditorPropertyGrid.SelectedObject = selected;
this.EditorNodeInfo.Text = $"| {e.Node.Nodes.Count} subnodes";
this.EditorNodeInfo.Text = $"| Index: {e.Node.Index} | {e.Node.Nodes.Count} subnodes";
}

private void EditorTreeView_DoubleClick(object sender, EventArgs e)
Expand Down
14 changes: 11 additions & 3 deletions Binary/Interact/AttribCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,39 @@ private void PopulateAttribTypesBasedOnGame(GameINT game)
this.AttribTypeComboBox.SelectedIndex = 0;
break;

case GameINT.Underground1:
case GameINT.Underground2:
case GameINT.MostWanted:
this.AttribTypeComboBox.Items.AddRange(new string[]
{
Boolean, /// <see cref="Nikki.Support.MostWanted.Attributes.BoolAttribute"/>
/// <see cref="Nikki.Support.Underground2.Attributes.BoolAttribute"/>
/// <see cref="Nikki.Support.Underground1.Attributes.BoolAttribute"/>


Floating, /// <see cref="Nikki.Support.MostWanted.Attributes.FloatAttribute"/>
/// <see cref="Nikki.Support.Underground2.Attributes.FloatAttribute"/>
/// <see cref="Nikki.Support.Underground1.Attributes.FloatAttribute"/>


Integer, /// <see cref="Nikki.Support.MostWanted.Attributes.IntAttribute"/>
/// <see cref="Nikki.Support.Underground2.Attributes.IntAttribute"/>
/// <see cref="Nikki.Support.Underground1.Attributes.IntAttribute"/>


Key, /// <see cref="Nikki.Support.MostWanted.Attributes.KeyAttribute"/>
/// <see cref="Nikki.Support.Underground2.Attributes.KeyAttribute"/>
/// <see cref="Nikki.Support.Underground1.Attributes.KeyAttribute"/>


String, /// <see cref="Nikki.Support.MostWanted.Attributes.StringAttribute"/>
/// <see cref="Nikki.Support.Underground2.Attributes.StringAttribute"/>
/// <see cref="Nikki.Support.Underground1.Attributes.StringAttribute"/>

});
this.AttribTypeComboBox.SelectedIndex = 0;
break;

case GameINT.Underground1:
break;

default:
break;
}
Expand Down
5 changes: 5 additions & 0 deletions Binary/Interact/LanMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace Binary.Interact
public partial class LanMaker : Form
{
private bool IsValidDirectoryChosen => Directory.Exists(this.LanMakerTextBoxDir.Text);
public bool WasCreated { get; private set; }
public string NewLanPath { get; private set; }

public LanMaker()
{
Expand Down Expand Up @@ -90,6 +92,9 @@ private void LanMakerButtonSave_Click(object sender, EventArgs e)
MessageBox.Show($"File {dialog.FileName} has been saved.", "Success",
MessageBoxButtons.OK, MessageBoxIcon.Information);

this.WasCreated = true;
this.NewLanPath = dialog.FileName;

}
}

Expand Down
44 changes: 37 additions & 7 deletions Binary/IntroUI.Designer.cs

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

14 changes: 8 additions & 6 deletions Binary/IntroUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,21 @@ private void IntroPictureUser_Click(object sender, EventArgs e)

private void IntroPictureModder_Click(object sender, EventArgs e)
{
// If password check was not done yet
// If password check was not done yet (deprecated)
/*
if (!Configurations.Default.PassPassed)
{
using var form = new ModderPass();

if (form.ShowDialog() != DialogResult.OK)
{

return;

}

}
*/

this.ModderInteract();
ForcedX.GCCollect();
Expand Down Expand Up @@ -325,12 +327,12 @@ private void AskForGameRun(BaseProfile profile)

private void PictureBoxDiscord_Click(object sender, EventArgs e)
{
Utils.OpenBrowser("https://discord.gg/jzksXXn");
Utils.OpenBrowser("https://discord.gg/xy5TjTa");
}

private void PictureBoxUpdates_Click(object sender, EventArgs e)
{
MessageBox.Show("No updates yet, follow discord server for news", "Updates");
Utils.OpenBrowser("https://github.com/SpeedReflect/Binary/tags");
}

private void PictureBoxAutoBackups_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -368,7 +370,7 @@ private void PictureBoxSoon_Click(object sender, EventArgs e)

private void LabelBinary_Click(object sender, EventArgs e)
{
MessageBox.Show("Binary by MaxHwoy v2.1.0", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("Binary by MaxHwoy v2.5.5", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
41 changes: 31 additions & 10 deletions Binary/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,35 @@ static void Main()

private static void SetDependencyPaths(string thispath)
{
CarbonProfile.MainHashList = Path.Combine(thispath, @"mainkeys\carbon.txt");
CarbonProfile.CustomHashList = Path.Combine(thispath, @"userkeys\carbon.txt");
MostWantedProfile.MainHashList = Path.Combine(thispath, @"mainkeys\mostwanted.txt");
MostWantedProfile.CustomHashList = Path.Combine(thispath, @"userkeys\mostwanted.txt");
Underground2Profile.MainHashList = Path.Combine(thispath, @"mainkeys\underground2.txt");
Underground2Profile.CustomHashList = Path.Combine(thispath, @"userkeys\underground2.txt");
ProstreetProfile.MainHashList = Path.Combine(thispath, @"mainkeys\prostreet.txt");
ProstreetProfile.CustomHashList = Path.Combine(thispath, @"userkeys\prostreet.txt");
var userdir = Path.Combine(thispath, "userkeys");
var mainc = Path.Combine(thispath, @"mainkeys\carbon.txt");
var userc = Path.Combine(thispath, @"userkeys\carbon.txt");
var mainmw = Path.Combine(thispath, @"mainkeys\mostwanted.txt");
var usermw = Path.Combine(thispath, @"userkeys\mostwanted.txt");
var mainps = Path.Combine(thispath, @"mainkeys\prostreet.txt");
var userps = Path.Combine(thispath, @"userkeys\prostreet.txt");
var mainug1 = Path.Combine(thispath, @"mainkeys\underground1.txt");
var userug1 = Path.Combine(thispath, @"userkeys\underground1.txt");
var mainug2 = Path.Combine(thispath, @"mainkeys\underground2.txt");
var userug2 = Path.Combine(thispath, @"userkeys\underground2.txt");

CarbonProfile.MainHashList = mainc;
CarbonProfile.CustomHashList = userc;
MostWantedProfile.MainHashList = mainmw;
MostWantedProfile.CustomHashList = usermw;
ProstreetProfile.MainHashList = mainps;
ProstreetProfile.CustomHashList = userps;
Underground1Profile.MainHashList = mainug1;
Underground1Profile.CustomHashList = userug1;
Underground2Profile.MainHashList = mainug2;
Underground2Profile.CustomHashList = userug2;

if (!Directory.Exists(userdir)) Directory.CreateDirectory(userdir);
if (!File.Exists(userc)) { using var _ = File.Create(userc); }
if (!File.Exists(usermw)) { using var _ = File.Create(usermw); }
if (!File.Exists(userps)) { using var _ = File.Create(userps); }
if (!File.Exists(userug1)) { using var _ = File.Create(userug1); }
if (!File.Exists(userug2)) { using var _ = File.Create(userug2); }
}

public static void ThreadExceptionHandler(object sender, ThreadExceptionEventArgs e)
Expand Down Expand Up @@ -112,8 +133,8 @@ public static void ThreadExceptionHandler(object sender, ThreadExceptionEventArg
if (form is Editor editor)
{

editor.EmergencySaveDatabase();
MessageBox.Show("Database backup up.", "Done");
//editor.EmergencySaveDatabase();
//MessageBox.Show("Database backup up.", "Done");

}

Expand Down
Loading