mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-02 10:43:31 +00:00
Fixed crash on WebServer start failure for #200
Added Sombra (and Ana) for #201
This commit is contained in:
parent
1330b547d7
commit
590d6991fe
@ -46,6 +46,8 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
Lúcio,
|
Lúcio,
|
||||||
Mercy,
|
Mercy,
|
||||||
Symmetra,
|
Symmetra,
|
||||||
Zenyatta
|
Zenyatta,
|
||||||
|
Ana,
|
||||||
|
Sombra
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10,14 +10,16 @@ using Artemis.Profiles.Layers.Models;
|
|||||||
using Artemis.Services;
|
using Artemis.Services;
|
||||||
using Artemis.Utilities;
|
using Artemis.Utilities;
|
||||||
using Artemis.Utilities.DataReaders;
|
using Artemis.Utilities.DataReaders;
|
||||||
|
using Artemis.ViewModels;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.Overwatch
|
namespace Artemis.Modules.Games.Overwatch
|
||||||
{
|
{
|
||||||
public class OverwatchModel : GameModel
|
public class OverwatchModel : GameModel
|
||||||
{
|
{
|
||||||
private readonly PipeServer _pipeServer;
|
private readonly DebugViewModel _debugViewModel;
|
||||||
private readonly MetroDialogService _dialogService;
|
private readonly MetroDialogService _dialogService;
|
||||||
|
private readonly PipeServer _pipeServer;
|
||||||
private DateTime _characterChange;
|
private DateTime _characterChange;
|
||||||
private string _lastMessage;
|
private string _lastMessage;
|
||||||
// Using sticky values on these since they can cause flickering
|
// Using sticky values on these since they can cause flickering
|
||||||
@ -27,11 +29,13 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
private DateTime _ultimateReady;
|
private DateTime _ultimateReady;
|
||||||
private DateTime _ultimateUsed;
|
private DateTime _ultimateUsed;
|
||||||
|
|
||||||
public OverwatchModel(DeviceManager deviceManager, PipeServer pipeServer, MetroDialogService dialogService)
|
public OverwatchModel(DeviceManager deviceManager, PipeServer pipeServer, MetroDialogService dialogService,
|
||||||
|
DebugViewModel debugViewModel)
|
||||||
: base(deviceManager, SettingsProvider.Load<OverwatchSettings>(), new OverwatchDataModel())
|
: base(deviceManager, SettingsProvider.Load<OverwatchSettings>(), new OverwatchDataModel())
|
||||||
{
|
{
|
||||||
_pipeServer = pipeServer;
|
_pipeServer = pipeServer;
|
||||||
_dialogService = dialogService;
|
_dialogService = dialogService;
|
||||||
|
_debugViewModel = debugViewModel;
|
||||||
Name = "Overwatch";
|
Name = "Overwatch";
|
||||||
ProcessName = "Overwatch";
|
ProcessName = "Overwatch";
|
||||||
Scale = 4;
|
Scale = 4;
|
||||||
@ -70,7 +74,9 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
new CharacterColor {Character = OverwatchCharacter.Lúcio, Color = Color.FromRgb(34, 142, 2)},
|
new CharacterColor {Character = OverwatchCharacter.Lúcio, Color = Color.FromRgb(34, 142, 2)},
|
||||||
new CharacterColor {Character = OverwatchCharacter.Mercy, Color = Color.FromRgb(243, 226, 106)},
|
new CharacterColor {Character = OverwatchCharacter.Mercy, Color = Color.FromRgb(243, 226, 106)},
|
||||||
new CharacterColor {Character = OverwatchCharacter.Symmetra, Color = Color.FromRgb(46, 116, 148)},
|
new CharacterColor {Character = OverwatchCharacter.Symmetra, Color = Color.FromRgb(46, 116, 148)},
|
||||||
new CharacterColor {Character = OverwatchCharacter.Zenyatta, Color = Color.FromRgb(248, 218, 26)}
|
new CharacterColor {Character = OverwatchCharacter.Zenyatta, Color = Color.FromRgb(248, 218, 26)},
|
||||||
|
new CharacterColor {Character = OverwatchCharacter.Ana, Color = Color.FromRgb(16, 36, 87)},
|
||||||
|
new CharacterColor {Character = OverwatchCharacter.Sombra, Color = Color.FromRgb(20, 5, 101)}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,8 +133,7 @@ namespace Artemis.Modules.Games.Overwatch
|
|||||||
if (colors == null)
|
if (colors == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: Get the debug viewmodel and update the color array
|
_debugViewModel.UpdateRazerDisplay(colors);
|
||||||
//_events.PublishOnUIThread(new RazerColorArrayChanged(colors));
|
|
||||||
|
|
||||||
// Determine general game state
|
// Determine general game state
|
||||||
ParseGameSate(gameDataModel, colors);
|
ParseGameSate(gameDataModel, colors);
|
||||||
|
|||||||
@ -53,8 +53,8 @@ using System.Windows;
|
|||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.5.0.2")]
|
[assembly: AssemblyVersion("1.5.0.4")]
|
||||||
[assembly: AssemblyFileVersion("1.5.0.2")]
|
[assembly: AssemblyFileVersion("1.5.0.4")]
|
||||||
[assembly: InternalsVisibleTo("Artemis.Tests")]
|
[assembly: InternalsVisibleTo("Artemis.Tests")]
|
||||||
[assembly: InternalsVisibleTo("Artemis.Explorables")]
|
[assembly: InternalsVisibleTo("Artemis.Explorables")]
|
||||||
|
|
||||||
|
|||||||
@ -49,9 +49,9 @@ namespace Artemis.Utilities.GameState
|
|||||||
{
|
{
|
||||||
_listener.Start();
|
_listener.Start();
|
||||||
}
|
}
|
||||||
catch (HttpListenerException e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.Error(e, "Couldn't start the webserver on port {0}.", Port);
|
_logger.Error(e, "Couldn't start the webserver on port {0}. Try selecting a different port", Port);
|
||||||
Running = false;
|
Running = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user