@ascentbv/ts-common - v1.0.170
    Preparing search index...

    Class WeatherCache

    Weather cache - tracks weather per dimension via weatherChange events

    There is no native getter for weather; the cache listens to world.afterEvents.weatherChange and keeps the latest state.

    // Before - no native way to read current weather

    // After
    const weather = CacheLayer.getWeather(dimension);
    CacheLayer.setWeather(dimension, WeatherType.Rain);
    Index

    Constructors

    Methods

    Constructors

    Methods