Environment Utilities

Weather Utils

class BBWeatherUtils

Bases: object

Utilities for manipulating the weather.

classmethod get_weather_service()

Get the service that handles weather functions.

Returns:

The weather service or None if not available.

Return type:

WeatherService or None

classmethod load_weather_event_by_guid(weather_event)

Load a Weather Event by its GUID

Parameters:

weather_event (int) – The GUID of the Weather Event to load.

Returns:

The loaded Weather Event or None if not found.

Return type:

WeatherEvent or None

classmethod trigger_weather_event(weather_event, duration)

Trigger a weather event to occur. This will change the currently active weather.

Parameters:
  • weather_event (int) – The weather event to trigger.

  • duration (int) – The duration in Sim hours the weather should last.