Another niche soaring question: any var or other way to detect usage of lift visualisation?

our multiplayer soaring group is up to a couple of thousand members obviously
including inexperienced gliding folks and I’ve just learned some pilots are
putting the ‘visualise lift’ setting on a hotkey as if it’s a normal feature
inside a glider. We don’t need to disable it but it would be hugely valuable
to be able to detect when a player has used it in the same way we detect slews
or the use of the engine. I can’t find anything in the SDK that would provide
any hook to work out whether that visualisation being used - does anyone know
of a solution?

Hello @B21 There is no simvar or key event for this at the moment. However, if
you check the Weather.js file in fs-base-ui/html_UI/JS/Services/ (it
is used by the weather panel in the UI), you’ll notice there is a
JS_LISTENER_WEATHER you can register to and it exposes callbacks to get
and set the thermal visualization. I hope this helps. Regards, Sylvain

thanks again for this advice. Including Weather.js and using example code from
WeatherEditionMenu.js I’ve tried with:

class MyInstrument extends BaseInstrument {
    constructor() {
        this.weather_listener = RegisterWeatherListener();
    viz_toggle(viz, toggled, title) {
        console.log("weather_listener on_thermals_viz_toggle", viz, toggled, title);

this.weather_listener.connected goes to true which is promising, but
tragically I can’t find a way that the viz_toggle callback actually gets
called when I move the slider in UI during a flight. If there’s something
obvious I’ve missed I’d appreciate a hint in the right direction, but
otherwise maybe this code will help others get started with weather callbacks.