Fix bug with App Launcher & upgrades

This commit is contained in:
Michael 2017-04-25 12:47:20 -04:00
parent 91c6b3bf1c
commit 0f2fc4271b

View file

@ -77,9 +77,9 @@ namespace ShiftOS.Engine
{
if (type.GetInterfaces().Contains(typeof(IShiftOSWindow)))
{
bool isAllowed = true;
foreach (var attr in type.GetCustomAttributes(false))
{
bool isAllowed = true;
if(attr is MultiplayerOnlyAttribute)
{
if(KernelWatchdog.MudConnected == false)
@ -92,10 +92,13 @@ namespace ShiftOS.Engine
{
if (attr is LauncherAttribute)
{
var launch = attr as LauncherAttribute;
if (launch.UpgradeInstalled)
if (Shiftorium.UpgradeAttributesUnlocked(type))
{
win.Add(new LauncherItem { DisplayData = launch, LaunchType = type });
var launch = attr as LauncherAttribute;
if (launch.UpgradeInstalled)
{
win.Add(new LauncherItem { DisplayData = launch, LaunchType = type });
}
}
}
}