winstxnhdw / lc-hax

A powerful, feature-rich and highly performant internal cheat for the co-op indie horror video game, Lethal Company.
78 stars 25 forks source link

[FEATURE]: Hide / stop vanilla menu music #274

Closed xAstroBoy closed 4 months ago

xAstroBoy commented 5 months ago

i am super pissed that i cannot shut the music up, which i made this small mod, any enchancements are welcome.

private AudioSource? _MenuMusic;

internal AudioSource MenuMusic { get { if (this._MenuMusic == null) { this._MenuMusic = GameObject.Find("Canvas/MenuManager").GetComponent(); }

     return this._MenuMusic;
 }

}

IEnumerator TurnMusicMenuOff() {
    WaitForEndOfFrame waitForEndOfFrame = new();
    while (this.MenuMusic == null) yield return waitForEndOfFrame;
    this.MenuMusic.Stop();
    this.MenuMusic.loop = false;
}
winstxnhdw commented 5 months ago

This is fine but some people may not want to hide the menu music.

winstxnhdw commented 5 months ago

Maybe it is time I made a offline config file to allow users to configure these easily before compile-time.