S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / API reference

IWeatherManager

Provides current-planet weather discovery, status, and host-safe starts.

View source ↗
CMAPI 1.0.0Standalone runtimeWindows x64Tested with Planet Crafter 2.008
Namespace CMAPIInterfaceAssembly CMAPI.API.dll
public interface IWeatherManager

Provides current-planet weather discovery, status, and host-safe starts.

Members

Events

property
IReadOnlyList<IWeatherEventDefinition> Events

Gets an immutable snapshot of natural weather and meteor events for the current planet. An empty list before world load is normal.

Status

property
WeatherSnapshot Status

Gets the current synchronized weather state.

TryGetEvent

method
bool TryGetEvent(string id, out IWeatherEventDefinition? weatherEvent)

Finds an event by exact stable ID, ignoring letter case.

FindEvents

method
IReadOnlyList<IWeatherEventDefinition> FindEvents(string search)

Finds events by partial ID or display name.

StartAsync

method
Task<EnvironmentActionResult> StartAsync( string eventId, WorldPosition? referencePosition = null )

Starts one synchronized current-planet weather event through the game's native weather manager.

This call is always host-only, may be called from any thread, refuses to replace an active event, respects terraformation-stage bounds, and performs game interaction on the main thread. CMAPI intentionally does not expose forced stopping until every environment and asteroid cleanup path is proven safe.