@rpgjs/server 5.0.0-alpha.33 → 5.0.0-alpha.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { WeatherState } from '../../../common/src';
1
2
  export interface MapOptions {
2
3
  /**
3
4
  * Map identifier. Allows to go to the map (for example with player.changeMap())
@@ -96,6 +97,27 @@ export interface MapOptions {
96
97
  * @memberof MapData
97
98
  * */
98
99
  sounds?: string[];
100
+ /**
101
+ * Initial weather state for this map.
102
+ *
103
+ * This value is applied when the map is loaded and can later be updated
104
+ * at runtime with `map.setWeather()` from server logic.
105
+ *
106
+ * ```ts
107
+ * @MapData({
108
+ * id: 'forest',
109
+ * file: require('./tmx/forest.tmx'),
110
+ * weather: {
111
+ * effect: 'fog',
112
+ * preset: 'rpgForestFog',
113
+ * params: { density: 1.2, height: 0.75 },
114
+ * transitionMs: 1200
115
+ * }
116
+ * })
117
+ * class ForestMap extends RpgMap {}
118
+ * ```
119
+ */
120
+ weather?: WeatherState | null;
99
121
  /**
100
122
  * Whether to stop all sounds before playing the map sounds when a player joins.
101
123
  *