Skip to content
This repository was archived by the owner on Mar 17, 2018. It is now read-only.

Commit 1be0b55

Browse files
committed
Merge pull request ParkitectNexus#62 from ParkitectNexus/develop
2.1.5980.38291
2 parents e3b2b41 + 7ea13ad commit 1be0b55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+386
-499
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "external/xwt"]
22
path = external/xwt
3-
url = https://github.com/mono/xwt.git
3+
url = https://github.com/ikkentim/xwt.git

AppImage/Packager.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ mkdir -p ./$APP/$APP.AppDir/usr/bin
1515
mkdir -p ./$APP/$APP.AppDir/usr/opt
1616

1717
#build Nexus Client and copy release into bin
18-
xbuild /p:Configuration=Release ./../src/ParkitectNexus.Client.Linux.Xwt/ParkitectNexus.Client.Linux.Xwt.csproj
19-
cp -R ./../src/ParkitectNexus.Client.Linux.Xwt/bin/Release/* ./$APP/$APP.AppDir/usr/bin
18+
xbuild /p:Configuration=Release ./../src/ParkitectNexus.Client.Linux/ParkitectNexus.Client.Linux.csproj
19+
cp -R ./../bin/Release/* ./$APP/$APP.AppDir/usr/bin
2020

2121
# Figure out $VERSION
2222
VERSION=$(git describe origin/master --tags $(git rev-list --tags --max-count=0))

AppImage/parkitectnexus

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export MONO_CONFIG=././etc/mono/config
66
export MONO_CFG_DIR=././etc
77

88
././bin/mozroots --import --sync
9-
././bin/mono "././bin/ParkitectNexus.Client.Linux.Xwt.exe" "$@"
9+
././bin/mono "././bin/ParkitectNexus.Client.Linux.exe" "$@"
1010

1111

1212

external/xwt

Submodule xwt updated from 157ffe3 to feeb4e2

images/.directory

Lines changed: 0 additions & 4 deletions
This file was deleted.
26.3 KB
Loading

src/ParkitectNexus.Client.Base/App.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public bool Initialize(ToolkitType type)
120120

121121
_migrator.Migrate();
122122
ModLoaderUtil.InstallModLoader(_parkitect, _log);
123-
123+
_taskManager.Add<CheckForUpdatesTask>();
124124
return true;
125125
}
126126

src/ParkitectNexus.Client.Base/Pages/AssetsPageView.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,43 @@
2323
using ParkitectNexus.Data.Game;
2424
using ParkitectNexus.Data.Presenter;
2525
using ParkitectNexus.Data.Utilities;
26+
using ParkitectNexus.Data.Web;
2627
using Xwt;
2728
using Xwt.Drawing;
2829
using Image = System.Drawing.Image;
30+
using System.Linq;
2931

3032
namespace ParkitectNexus.Client.Base.Pages
3133
{
3234
public class AssetsPageView : LoadableDataTileView
3335
{
36+
private string[] _requiredAssets;
3437
private readonly IParkitect _parkitect;
38+
private readonly IWebsite _website;
3539
private readonly ILogger _log;
3640
private readonly AssetType _type;
3741

38-
public AssetsPageView(IParkitect parkitect, ILogger log, AssetType type, IPresenter parent, string displayName)
42+
public AssetsPageView(IParkitect parkitect, IWebsite website, ILogger log, AssetType type, IPresenter parent, string displayName)
3943
: base(log, displayName)
4044
{
4145
if (!(parent is MainView))
4246
throw new ArgumentException("parent must be MainView", nameof(parent));
4347

4448
_parkitect = parkitect;
49+
_website = website;
4550
_log = log;
4651
_type = type;
4752
MainView = (MainView) parent;
4853

4954
parkitect.Assets.AssetAdded += Assets_AssetAdded;
5055
parkitect.Assets.AssetRemoved += Assets_AssetRemoved;
56+
57+
GetRequiredMods();
58+
}
59+
60+
private async void GetRequiredMods()
61+
{
62+
_requiredAssets = await _website.API.GetRequiredModIdentifiers();
5163
}
5264

5365
public MainView MainView { get; }
@@ -92,7 +104,10 @@ protected virtual void PopulateViewBoxWithImage(VBox vBox, IAsset asset)
92104

93105
protected virtual void PopulateViewBoxWithButtons(VBox vBox, IAsset asset)
94106
{
95-
var deleteButton = new Button("Delete");
107+
var canDelete = _requiredAssets == null || !_requiredAssets.Contains(asset.Id);
108+
109+
var deleteButton = new Button("Delete") { Sensitive = canDelete };
110+
96111
deleteButton.Clicked += (sender, args) =>
97112
{
98113
if (

src/ParkitectNexus.Client.Base/Pages/BlueprintsPageView.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
using ParkitectNexus.Data.Game;
1616
using ParkitectNexus.Data.Presenter;
1717
using ParkitectNexus.Data.Utilities;
18+
using ParkitectNexus.Data.Web;
1819

1920
namespace ParkitectNexus.Client.Base.Pages
2021
{
2122
public class BlueprintsPageView : AssetsPageView
2223
{
23-
public BlueprintsPageView(IParkitect parkitect, ILogger log, IPresenter parent)
24-
: base(parkitect, log, AssetType.Blueprint, parent, "Blueprints")
24+
public BlueprintsPageView(IParkitect parkitect, IWebsite website, ILogger log, IPresenter parent)
25+
: base(parkitect, website, log, AssetType.Blueprint, parent, "Blueprints")
2526
{
2627
}
2728
}
28-
}
29+
}

src/ParkitectNexus.Client.Base/Pages/ModsPageView.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1313

1414
using System.Diagnostics;
15+
using System.Linq;
1516
using ParkitectNexus.Data.Assets;
1617
using ParkitectNexus.Data.Assets.Modding;
1718
using ParkitectNexus.Data.Game;
@@ -26,12 +27,14 @@ namespace ParkitectNexus.Client.Base.Pages
2627
{
2728
public class ModsPageView : AssetsPageView
2829
{
30+
private readonly IParkitect _parkitect;
2931
private readonly IQueueableTaskManager _queueableTaskManager;
3032
private readonly IWebsite _website;
3133

3234
public ModsPageView(IParkitect parkitect, ILogger log, IPresenter parent, IQueueableTaskManager queueableTaskManager,
33-
IWebsite website) : base(parkitect, log, AssetType.Mod, parent, "Mods")
35+
IWebsite website) : base(parkitect, website, log, AssetType.Mod, parent, "Mods")
3436
{
37+
_parkitect = parkitect;
3538
_queueableTaskManager = queueableTaskManager;
3639
_website = website;
3740
}
@@ -114,4 +117,4 @@ protected override void PopulateViewBoxWithButtons(VBox vBox, IAsset asset)
114117

115118
#endregion
116119
}
117-
}
120+
}

0 commit comments

Comments
 (0)