docs: Added docs for Daedalus and Sky classes

This commit is contained in:
AURUMVORXX
2024-11-07 12:17:42 +03:00
parent 11fd12bf57
commit 4eaa9e4e2e
5 changed files with 82 additions and 2 deletions

View File

@@ -1,15 +1,42 @@
import sqg2o
class Daedalus:
"""
This class represents Daedalus scripting interface.
Original: [Daedalus](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/game/Daedalus/)
"""
@staticmethod
def index(value : str) -> int:
"""
This method will get the daedalus symbol index by its name.
**Parameters:**
* `str` **name**: the name of the daedalus symbol.
**Returns `int`:**
the daedalus symbol index number.
"""
return sqg2o.Daedalus.index(value)
@staticmethod
def symbol(value : str) -> dict:
"""
This method will get the daedalus symbol by its name.
**Parameters:**
* `str` **name**: the name of the daedalus symbol.
**Returns `dict`:**
the daedalus symbol (empty if there's no symbol with given name)
"""
return sqg2o.Daedalus.symbol(value)
@staticmethod
def instance(value : str) -> dict:
"""
This method will get the all of the daedalus instance variables.
**Parameters:**
* `str` **instanceName**: the name of the daedalus instance.
**Returns `dict`:**
the object containing all of the daedalus instance variables.
"""
return sqg2o.Daedalus.instance(value)

View File

@@ -42,20 +42,65 @@ class SkyMeta(type):
sqg2o.Sky.dontRain = value
class Sky(metaclass=SkyMeta):
"""
This class represents data packet that gets send over the network.
Original: [Sky](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/game/Sky/)
## `int` weather
Represents the sky weather. For more information see [Weather Constants](../../constants/weather.md)
## `bool` raining
Represents the raining/snowing state.
## `bool` renderLightning
Represents the lightning feature during raining state.
Lightning will only be rendered during raining and when weatherWeight is larger than 0.5
## `float` windScale
Represents the sky wind scale used during raining/snowing.
## `bool` dontRain
Represents the sky dontRain feature.
When it's enabled, the rain/snow won't fall.
"""
@staticmethod
def setRainStartTime(hour : int, minute : int):
"""
This method will set the sky weather time when it starts raining/snowing.
**Parameters:**
* `int` **hour**: the sky weather raining start hour.
* `int` **minute**: the sky weather raining start min.
"""
sqg2o.Sky.setRainStartTime(hour, minute)
@staticmethod
def setRainStopTime(hour : int, minute : int):
"""
This method will set the sky weather time when it stops raining/snowing.
**Parameters:**
* `int` **hour**: the sky weather raining stop hour.
* `int` **minute**: the sky weather raining stop min.
"""
sqg2o.Sky.setRainStopTime(hour, minute)
@staticmethod
def getRainStartTime() -> dict:
"""
This method will get the sky weather time when it starts raining/snowing.
**Returns `dict`:**
* `int` **hour**: the sky weather raining start hour.
* `int` **minute**: the sky weather raining start min.
"""
return sqg2o.Sky.getRainStartTime()
@staticmethod
def getRainStopTime() -> dict:
"""
This method will get the sky weather time when it stops raining/snowing.
**Returns `dict`:**
* `int` **hour**: the sky weather raining stop hour.
* `int` **minute**: the sky weather raining stop min.
"""
return sqg2o.Sky.getRainStopTime()