docs: Added docs for Daedalus and Sky classes
This commit is contained in:
3
docs/classes/game/Daedalus.md
Normal file
3
docs/classes/game/Daedalus.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# `static class` Daedalus
|
||||
---
|
||||
::: g2o.classes.daedalus.Daedalus
|
||||
3
docs/classes/game/Sky.md
Normal file
3
docs/classes/game/Sky.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# `static class` Sky
|
||||
---
|
||||
::: g2o.classes.sky.Sky
|
||||
@@ -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)
|
||||
@@ -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()
|
||||
|
||||
@@ -20,6 +20,8 @@ nav:
|
||||
- QnA: qna.md
|
||||
- Classes:
|
||||
- Game:
|
||||
- Daedalus: classes/game/Daedalus.md
|
||||
- Sky: classes/game/Sky.md
|
||||
- DamageDescription: classes/game/DamageDescription.md
|
||||
- Item:
|
||||
- ItemGround: classes/item/ItemGround.md
|
||||
|
||||
Reference in New Issue
Block a user