-
Notifications
You must be signed in to change notification settings - Fork 14
API
This is the start of an API that (hopefully) will be used by all weather-like mods, like; SF1, Atmos and Atmos2.
It is recommended to use CWI in the future for small interactions like checking for rain / snow or time. As it is aimed at being used by other time/weather-mods.
Note: This is still WIP, might change in the future!
Unlike SF1, SF2 has been build up in subcategories, making it more organized. E.g;
StormFox2.Weather.<X>has all the weather functions.
Due to StormFox 2 being more asynchronous, it is required that most additions (i.e new weather-types) are created on both the client and server.
Note: Most functions are inaccessible until stormfox2.preinit and stormfox2.postinit-hook gets called!
Tip: To check if StormFox2 is installed, you can do if StormFox2 then ..
| Variables | Description |
|---|---|
StormFox2.Version |
Version number |
| Main Hooks | Description |
|---|---|
stormfox2.preinit |
Gets called just before stormfox2.postinit. Use this for new weather-types or heavy edits. |
stormfox2.postinit |
Gets called when SF2 is done loading. Use this for interactions. |
| Subcategories | Description |
|---|---|
StormFox2.Time
|
Time related functions. |
StormFox2.Temperature
|
Temperature functions. |
StormFox2.Weather |
Weather related functions. |
StormFox2.Downfall |
Downfall is particle functions like raindrops. |
StormFox2.Terrain |
Terrain are objects that change the map. I.e "snow" that change textures. |
StormFox2.Map |
Map functions gives access to map-related data and functions. |
StormFox2.Data |
Data holds all calculated variables that are used by effects. |
StormFox2.Network |
Sets and sends the data to all clients |
StormFox2.Client |
Contains the GetQualityNumber function. |
StormFox2.Environment |
Functions regarding the clients current environment. I.e if they're outside. |
Wiki
-
CWI
-
Time
-
Temperature
-
Weather (TBD)
-
Sun (TBD)
-
Moon (TBD)
-
Downfall (TBD)
-
Terrain (TBD)
-
Map (TBD)
-
Data (TBD)
-
Network (TBD)
-
Client (TBD)
-
Environment (TBD)
StormFox2.Version
StormFox2.Network
StormFox2.Client