A helper for Celeste. Originally created by PenguinOwl and now maintained by the Communal Helper organization.
The release build can be downloaded here.
Head to our issues page to leave a bug report or feature request.
This mod uses a ModInterop API, which allows you to import methods into your own mods without referencing BGswitch directly. To use it, add BGswitch as an optional dependency and use the version where the methods you need were exported (or later).
Check out the API code for documentation on individual methods.
Basic usage guide and version info:
// Add somewhere in your mod. You only need to include delegates that you need.[ModImportName("BGswitch")]publicstaticclassBGswitchImports{// Added in v1.2.0publicstaticFunc<bool>IsBGMode;publicstaticAction<bool,bool>SetBGMode;publicstaticFunc<Action<bool>,Component>GetBGModeListener;}// Add to YourModule.Load()typeof(BGswitchImports).ModInterop();// Example usagespublicvoidLogMode(boolmode){Logger.Log("MyMod",$"BG mode changed to: {mode }");}Componentlistener=GetBGModeListener?.Invoke(LogMode);if(listener!=null){myEntity.Add(listener);}if(BGswitchImports.IsBGMode?.Invoke()??false){Logger.Log("MyMod","BG mode is active! Let's turn it off.");SetBGMode?.Invoke(false,false);}