Skip to content

Commit 2f9b535

Browse files
committed
Remove "Sounds"
Since fetching is now explicit sounds have no purpose. Also do another cleanup pass.
1 parent 7e37faa commit 2f9b535

File tree

9 files changed

+235
-556
lines changed

9 files changed

+235
-556
lines changed

EnhancePoE/App.config

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@
7676
<setting name="ExaltedRecipe" serializeAs="String">
7777
<value>False</value>
7878
</setting>
79-
<setting name="Sound" serializeAs="String">
80-
<value>True</value>
81-
</setting>
82-
<setting name="Volume" serializeAs="String">
83-
<value>50</value>
84-
</setting>
8579
<setting name="StashTabBackgroundColor" serializeAs="String">
8680
<value>#14FFFFFF</value>
8781
</setting>
@@ -130,9 +124,6 @@
130124
<setting name="LockOverlayPosition" serializeAs="String">
131125
<value>False</value>
132126
</setting>
133-
<setting name="ItemPickupSoundFileLocation" serializeAs="String">
134-
<value>Default Sound</value>
135-
</setting>
136127
</EnhancePoE.Properties.Settings>
137128
</userSettings>
138129
<runtime>

EnhancePoE/EnhancePoE.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@
323323
<Resource Include="Assets\amulet.png" />
324324
<Resource Include="Assets\belt.png" />
325325
<Resource Include="Assets\ring.png" />
326-
<Content Include="Res\notificationSound.mp3">
327-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
328-
</Content>
329326
</ItemGroup>
330327
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
331328
</Project>

EnhancePoE/Model/Data.cs

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public static class Data
1111
{
1212
public static ActiveItemTypes ActiveItems { get; set; } = new ActiveItemTypes();
1313
public static ActiveItemTypes PreviousActiveItems { get; set; }
14-
public static MediaPlayer Player { get; set; } = new MediaPlayer();
1514

1615
public static int SetAmount { get; set; }
1716
public static int SetTargetAmount { get; set; }
@@ -280,20 +279,6 @@ public static void CheckActives()
280279
MainWindow.Overlay.WarningMessageVisibility = System.Windows.Visibility.Visible;
281280
return;
282281
}
283-
if ( Properties.Settings.Default.Sound )
284-
{
285-
PreviousActiveItems = new ActiveItemTypes
286-
{
287-
BootsActive = ActiveItems.BootsActive,
288-
GlovesActive = ActiveItems.GlovesActive,
289-
HelmetActive = ActiveItems.HelmetActive,
290-
WeaponActive = ActiveItems.WeaponActive,
291-
ChestActive = ActiveItems.ChestActive,
292-
RingActive = ActiveItems.RingActive,
293-
AmuletActive = ActiveItems.AmuletActive,
294-
BeltActive = ActiveItems.BeltActive
295-
};
296-
}
297282

298283
bool exaltedActive = Properties.Settings.Default.ExaltedRecipe;
299284

@@ -491,19 +476,6 @@ public static void CheckActives()
491476
}
492477

493478
Trace.WriteLine( fullSets, "full sets" );
494-
495-
if ( Properties.Settings.Default.Sound
496-
&& !( PreviousActiveItems.GlovesActive == ActiveItems.GlovesActive
497-
&& PreviousActiveItems.BootsActive == ActiveItems.BootsActive
498-
&& PreviousActiveItems.HelmetActive == ActiveItems.HelmetActive
499-
&& PreviousActiveItems.ChestActive == ActiveItems.ChestActive
500-
&& PreviousActiveItems.WeaponActive == ActiveItems.WeaponActive
501-
&& PreviousActiveItems.RingActive == ActiveItems.RingActive
502-
&& PreviousActiveItems.AmuletActive == ActiveItems.AmuletActive
503-
&& PreviousActiveItems.BeltActive == ActiveItems.BeltActive ) )
504-
{
505-
Player.Dispatcher.Invoke( () => PlayNotificationSound() );
506-
}
507479
}
508480
catch ( OperationCanceledException ex ) when ( ex.CancellationToken == ct )
509481
{
@@ -653,13 +625,6 @@ public static void CalculateItemAmounts()
653625
}
654626
}
655627

656-
public static void PlayNotificationSound()
657-
{
658-
Player.Volume = (double)( Properties.Settings.Default.Volume / 100.0 );
659-
Player.Position = TimeSpan.Zero;
660-
Player.Play();
661-
}
662-
663628
public static StashTab GetStashTabFromItem( Item item )
664629
{
665630
foreach ( var s in StashTabList.StashTabs )
@@ -685,21 +650,10 @@ public static void ActivateNextCell( bool active, Cell cell )
685650
s.TabHeaderColor = Brushes.Transparent;
686651
}
687652

688-
// remove and sound if itemlist empty
689-
if ( ItemSetListHighlight.Count > 0 )
690-
{
691-
if ( ItemSetListHighlight[0].ItemList.Count == 0 )
692-
{
693-
ItemSetListHighlight.RemoveAt( 0 );
694-
Player.Dispatcher.Invoke( () => PlayNotificationSound() );
695-
}
696-
}
697-
else
653+
// remove if itemlist empty
654+
if ( ItemSetListHighlight.Count > 0 && ItemSetListHighlight[0].ItemList.Count == 0 )
698655
{
699-
if ( ItemSetListHighlight.Count > 0 )
700-
{
701-
Player.Dispatcher.Invoke( () => PlayNotificationSound() );
702-
}
656+
ItemSetListHighlight.RemoveAt( 0 );
703657
}
704658

705659
// next item if itemlist not empty
@@ -774,7 +728,6 @@ public static void ActivateNextCell( bool active, Cell cell )
774728

775729
// activate next set
776730
ActivateNextCell( true, null );
777-
Player.Dispatcher.Invoke( () => PlayNotificationSound() );
778731
}
779732
}
780733
}

EnhancePoE/Properties/Settings.Designer.cs

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EnhancePoE/Properties/Settings.settings

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@
6868
<Setting Name="ExaltedRecipe" Type="System.Boolean" Scope="User">
6969
<Value Profile="(Default)">False</Value>
7070
</Setting>
71-
<Setting Name="Sound" Type="System.Boolean" Scope="User">
72-
<Value Profile="(Default)">True</Value>
73-
</Setting>
74-
<Setting Name="Volume" Type="System.Int32" Scope="User">
75-
<Value Profile="(Default)">50</Value>
76-
</Setting>
7771
<Setting Name="StashTabBackgroundColor" Type="System.String" Scope="User">
7872
<Value Profile="(Default)">#14FFFFFF</Value>
7973
</Setting>
@@ -122,8 +116,5 @@
122116
<Setting Name="LockOverlayPosition" Type="System.Boolean" Scope="User">
123117
<Value Profile="(Default)">False</Value>
124118
</Setting>
125-
<Setting Name="ItemPickupSoundFileLocation" Type="System.String" Scope="User">
126-
<Value Profile="(Default)">Default Sound</Value>
127-
</Setting>
128119
</Settings>
129120
</SettingsFile>
-29 KB
Binary file not shown.

0 commit comments

Comments
 (0)