Custom Walls And Floors (CWF)

Custom Walls And Floors (CWF)

8k Downloads

Harp of Yoba -> Harp doesn't work if music is disabled at title screen

sapid opened this issue ยท 1 comments

commented

If the music is disabled at the title screen (by clicking the musical note at the top left to X it out), the Harp won't work. There's no crash - the Harp will go on cooldown without an animation, and this error will appear in the console.

   at HarpOfYobaRedux.Instrument.play() in D:\Programming\Games\Mods\GitHub\Stardew-Valley-Mods\HarpOfYobaRedux\Instrument.cs:line 225
   at HarpOfYobaRedux.Instrument.DoFunction(GameLocation location, Int32 x, Int32 y, Int32 power, Farmer who) in D:\Programming\Games\Mods\GitHub\Stardew-Valley-Mods\HarpOfYobaRedux\Instrument.cs:line 204
   at StardewValley.Game1.toolAnimationDone(Farmer who) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 7530
   at StardewValley.Tool.beginUsing(GameLocation location, Int32 x, Int32 y, Farmer who) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Tools\Tool.cs:line 442
   at StardewValley.Farmer.performBeginUsingTool() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Farmer.cs:line 3603
   at Netcode.NetEvent0.Poll() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Netcode\NetEvent.cs:line 32
   at Netcode.NetEvent0.Fire() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Netcode\NetEvent.cs:line 24
   at StardewValley.Farmer.BeginUsingTool() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Farmer.cs:line 3594
   at StardewValley.Game1.pressUseToolButton() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 8084
   at StardewValley.Game1.<>c__DisplayClass651_0.<UpdateControlInput>b__0() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 10022
   at StardewValley.ModHooks.OnGame1_UpdateControlInput(KeyboardState& keyboardState, MouseState& mouseState, GamePadState& gamePadState, Action action) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\ModHooks.cs:line 11
   at StardewValley.Game1.UpdateControlInput(GameTime time) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 9592
   at StardewValley.Game1._update(GameTime gameTime) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 2380
   at Update_Patch1(Object gameTime, GameTime )

It looks to me like play() in Instrument.cs, line 225 needs to check if Game1.currentSong.Name is null before assigning it. resetMusic() may need patching as well to handle the case of no previous music.

commented

After thinking about this a little more, and doing a little digging, this may actually be a compatibility issue with a bug in another mod. Loading into the game with AutoLoadGame seems to prevent music from playing unless I back out to the title screen after loading in.