Skip to content

Commit

Permalink
Merge pull request #565 from TheTrackerCouncil/fix-msu-messages
Browse files Browse the repository at this point in the history
Fix MSU messages
  • Loading branch information
MattEqualsCoder authored Sep 15, 2024
2 parents a4f315b + f6d5119 commit 1476c70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/TrackerCouncil.Smz3.Chat.Twitch/Models/TwitchPoll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TwitchPoll : TwitchAPIResponse
/// </summary>
public bool IsPollSuccessful => WinningChoice?.Votes > 0;

public bool WasPollTerminated => "TERMINATED".Equals(Status, StringComparison.OrdinalIgnoreCase);
public bool WasPollTerminated => "TERMINATED".Equals(Status, StringComparison.OrdinalIgnoreCase) || "ARCHIVED".Equals(Status, StringComparison.OrdinalIgnoreCase);

/// <summary>
/// Returns choice that was voted on the most
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ public static class ConfigServiceCollectionExtensions
{
public static IServiceCollection AddConfigs(this IServiceCollection services)
{
services.AddSingleton<Smz3.Data.Configuration.ConfigProvider>();
services.AddSingleton<ConfigProvider>();
services.AddTransient(serviceProvider =>
{
var configProvider = serviceProvider.GetRequiredService<Smz3.Data.Configuration.ConfigProvider>();
var configProvider = serviceProvider.GetRequiredService<ConfigProvider>();
return configProvider.GetMapConfig();
});

Expand Down
7 changes: 4 additions & 3 deletions src/TrackerCouncil.Smz3.Tracking/VoiceCommands/MsuModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using MSURandomizerLibrary.Models;
using MSURandomizerLibrary.Services;
using TrackerCouncil.Smz3.Abstractions;
using TrackerCouncil.Smz3.Data.Configuration;
using TrackerCouncil.Smz3.Data.Configuration.ConfigFiles;
using TrackerCouncil.Smz3.Tracking.Services;

Expand Down Expand Up @@ -40,7 +41,7 @@ public class MsuModule : TrackerModule, IDisposable
/// <param name="msuMonitorService"></param>
/// <param name="msuTypeService"></param>
/// <param name="msuUserOptionsService"></param>
/// <param name="msuConfig"></param>
/// <param name="config"></param>
/// <param name="gameService"></param>
public MsuModule(
TrackerBase tracker,
Expand All @@ -51,14 +52,14 @@ public MsuModule(
IMsuMonitorService msuMonitorService,
IMsuTypeService msuTypeService,
IMsuUserOptionsService msuUserOptionsService,
MsuConfig msuConfig,
Configs config,
IGameService gameService)
: base(tracker, itemService, worldService, logger)
{
_gameService = gameService;
_msuMonitorService = msuMonitorService;
var msuType = msuTypeService.GetSMZ3MsuType();
_msuConfig = msuConfig;
_msuConfig = config.MsuConfig;
_validTrackNumbers = msuType!.ValidTrackNumbers;

if (!File.Exists(tracker.RomPath))
Expand Down
2 changes: 1 addition & 1 deletion src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<Version>9.8.4</Version>
<Version>9.8.5</Version>
<AssemblyName>SMZ3CasRandomizer</AssemblyName>
<ApplicationIcon>Assets\smz3.ico</ApplicationIcon>
<RootNamespace>$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
Expand Down

0 comments on commit 1476c70

Please sign in to comment.