Skip to content

Commit

Permalink
added include all assets from LSM
Browse files Browse the repository at this point in the history
  • Loading branch information
kianzarrin committed Oct 27, 2021
1 parent f7c8070 commit 32e5f7a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LoadOrder/UI/LoadOrderWindow.Designer.cs

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

18 changes: 17 additions & 1 deletion LoadOrder/UI/SubscribeDialog.Designer.cs

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

16 changes: 15 additions & 1 deletion LoadOrder/UI/SubscribeDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using CO.PlatformServices;
using CO.Packaging;

namespace LoadOrderTool.UI {
public partial class SubscribeDialog : Form {
Expand Down Expand Up @@ -86,6 +88,18 @@ private void SubscribeAll_Click(object sender, EventArgs e) {
private void btnCancel_Click(object sender, EventArgs e) => Close();

void CleanupTextBox() => tbIDs.Text = GetIDs(tbIDs.Text).Join(" ");


private void btnIncludeAll_Click(object sender, EventArgs e) {
CleanupTextBox();
var ids = GetIDs(tbIDs.Text);
var assets = PackageManager.instance.GetAssets();
foreach (var id in ids) {
var publishedFileId = new PublishedFileId(ulong.Parse(id));
var asset = assets.FirstOrDefault(_a => _a.IsWorkshop && _a.PublishedFileId == publishedFileId);
if (asset == null) continue;
asset.IsIncludedPending = true;
}
LoadOrderWindow.Instance.dataGridAssets.Refresh();
}
}
}
2 changes: 1 addition & 1 deletion Version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<AssemblyVersion>1.1.6.*</AssemblyVersion>
<AssemblyVersion>1.1.7.*</AssemblyVersion>
</PropertyGroup>
</Project>

0 comments on commit 32e5f7a

Please sign in to comment.