Skip to content

Commit

Permalink
Add custom cassette music + improve build process (#176)
Browse files Browse the repository at this point in the history
* fix: suppress warnings

* fix: update script to add directory if inexistent

as mentioned in #174

* feature: custom cassette music

fixes: #125

* fix: account for duplicate cassette songs
  • Loading branch information
Jeremy-Vidaurri authored Sep 5, 2024
1 parent 068e7c2 commit 0514d8c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
26 changes: 7 additions & 19 deletions Randomizer/RandoLogic/RandoLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public static AreaKey GenerateMap(RandoSettings settings)
private LinkedMap Map;
private RandoSettings Settings;
private Capabilities Caps;
private HashSet<String> CassetteSongs = new HashSet<string>();
public static Dictionary<string, string> RandomDialogMappings = new Dictionary<string, string>();

private void ResetRooms()
Expand Down Expand Up @@ -256,28 +257,15 @@ private AudioState PickAudioState()

private string PickCassetteAudio()
{
switch (this.Random.Next(8))
foreach (var area in AreaData.Areas)
{
case 0:
return SFX.cas_01_forsaken_city;
case 1:
return SFX.cas_02_old_site;
case 2:
return SFX.cas_03_resort;
case 3:
return SFX.cas_04_cliffside;
case 4:
return SFX.cas_05_mirror_temple;
case 5:
return SFX.cas_06_reflection;
case 6:
return SFX.cas_07_summit;
case 7:
default:
return SFX.cas_08_core;
if (area.CassetteSong == null) continue;
CassetteSongs.Add(area.CassetteSong);
}
int songCount = CassetteSongs.Count;
return CassetteSongs.ElementAt(this.Random.Next(songCount));
}

private string PickCompleteScreen()
{
uint seed = this.Settings.IntSeed;
Expand Down
3 changes: 3 additions & 0 deletions Randomizer/Randomizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<ItemGroup>
<Reference Include="Celeste">
<HintPath>..\packages\lib-stripped\Celeste.exe</HintPath>
Expand Down
1 change: 1 addition & 0 deletions bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dotnet build
VERSION=$(cat Randomizer/everest.yaml | grep '^ Version' | cut -d' ' -f 4)
FILENAME=dist/Randomizer_${VERSION}${2}.zip
rm -f $FILENAME
mkdir -p dist
cd Randomizer/bin/${1-Debug}
zip -r ../../../${FILENAME} *
echo Finished in ${FILENAME}

0 comments on commit 0514d8c

Please sign in to comment.