Merge branch 'dev'
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
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)
|
||||
@@ -1,86 +0,0 @@
|
||||
import sqg2o
|
||||
|
||||
class DamageDescription(sqg2o.DamageDescription):
|
||||
"""
|
||||
This class represents damage information.
|
||||
Original: [DamageDescription](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/item/DamageDescription//)
|
||||
|
||||
## `int` flags
|
||||
Represents the damage flags.
|
||||
|
||||
## `int` damage
|
||||
Represents the total damage taken.
|
||||
|
||||
## `str` item_instance *(read-only)*
|
||||
!!! note
|
||||
Can be empty if there is no weapon.
|
||||
Represents the weapon instance used to deal damage.
|
||||
|
||||
## `int` distance
|
||||
Represents the total distance, calculated from origin point to target.
|
||||
|
||||
## `int` spell_id
|
||||
Represents the spell id.
|
||||
|
||||
## `int` spell_level
|
||||
Represents the level of chargeable spells.
|
||||
|
||||
## `str` node
|
||||
!!! note
|
||||
Can be empty if there was no projectile.
|
||||
Represents the name of the node hit by a point projectile.
|
||||
"""
|
||||
def __init__(self):
|
||||
return super().__init__()
|
||||
|
||||
@property
|
||||
def item_instance(self):
|
||||
return super().item_instance
|
||||
|
||||
@property
|
||||
def flags(self):
|
||||
return super().flags
|
||||
|
||||
@flags.setter
|
||||
def flags(self, value):
|
||||
super().flags = value
|
||||
|
||||
@property
|
||||
def damage(self):
|
||||
return super().damage
|
||||
|
||||
@damage.setter
|
||||
def damage(self, value):
|
||||
super().damage = value
|
||||
|
||||
@property
|
||||
def distance(self):
|
||||
return super().distance
|
||||
|
||||
@distance.setter
|
||||
def distance(self, value):
|
||||
super().distance = value
|
||||
|
||||
@property
|
||||
def spell_id(self):
|
||||
return super().spell_id
|
||||
|
||||
@spell_id.setter
|
||||
def spell_id(self, value):
|
||||
super().spell_id = value
|
||||
|
||||
@property
|
||||
def spell_level(self):
|
||||
return super().spell_level
|
||||
|
||||
@spell_level.setter
|
||||
def spell_level(self, value):
|
||||
super().spell_level = value
|
||||
|
||||
@property
|
||||
def node(self):
|
||||
return super().node
|
||||
|
||||
@node.setter
|
||||
def node(self, value):
|
||||
super().node = value
|
||||
@@ -1,110 +0,0 @@
|
||||
import sqg2o
|
||||
|
||||
class ItemsGround:
|
||||
"""
|
||||
This class represents item ground manager.
|
||||
Original: [ItemsGround](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/item/ItemsGround/)
|
||||
"""
|
||||
@staticmethod
|
||||
def getById(id : int):
|
||||
"""
|
||||
This method will retrieve the item ground object by its unique id.
|
||||
|
||||
**Parameters:**
|
||||
* `int` **itemGroundId**: the unique item ground id.
|
||||
|
||||
**Returns `ItemGround`:**
|
||||
the item ground object or `throws an exception` if the object cannot be found.
|
||||
"""
|
||||
return sqg2o.ItemsGround.getById(id)
|
||||
|
||||
@staticmethod
|
||||
def create(data : dict) -> int:
|
||||
"""
|
||||
This method will create the item ground.
|
||||
|
||||
**Parameters:**
|
||||
* `dict {instance, amount=1, physicsEnabled=false position={x=0,y=0,z=0}, rotation={x=0,y=0,z=0}, world=CONFIG_WORLD, virtualWorld=0}`:
|
||||
* `string` **instance**: the scripting instance of game item.
|
||||
* `bool` **physicsEnabled**: the physics state of the item ground.
|
||||
* `dict {x, y, z}` **position**: the position of the item ground in the world.
|
||||
* `dict {x, y, z}` **rotation**: the rotation of the item ground in the world.
|
||||
* `string` **world**: the world the item ground is in (.ZEN file path).
|
||||
* `int` **virtualWorld**: the virtual world id in range <0, 65535>.
|
||||
|
||||
**Returns `int`:**
|
||||
the item ground id.
|
||||
"""
|
||||
return sqg2o.ItemsGround.create(data)
|
||||
|
||||
@staticmethod
|
||||
def destroy(id : int):
|
||||
"""
|
||||
This method will destroy the item ground by it's unique id.
|
||||
**Parameters:**
|
||||
* `int` **itemGroundId**: the item ground unique id.
|
||||
"""
|
||||
sqg2o.ItemsGround.destroy(id)
|
||||
|
||||
class ItemGround(sqg2o.ItemGround):
|
||||
"""
|
||||
This class represents item on the ground.
|
||||
Original: [ItemGround](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/item/ItemGround//)
|
||||
|
||||
## `int` id *(read-only)*
|
||||
Represents the unique id of the item ground.
|
||||
|
||||
## `str` instance *(read-only)*
|
||||
Represents the item instance of the item ground.
|
||||
|
||||
## `int` amount *(read-only)*
|
||||
Represents the item amount of item ground.
|
||||
|
||||
## `str` world *(read-only)*
|
||||
Represents the item ground world (.ZEN file path).
|
||||
|
||||
## `int` virtualWorld
|
||||
Represents the virtual world of item ground.
|
||||
"""
|
||||
def __init__(self):
|
||||
return super().__init__()
|
||||
|
||||
def getPosition() -> tuple:
|
||||
"""
|
||||
This method will get the item ground position on the world.
|
||||
**Returns `tuple(float, float, float)`:**
|
||||
`X-Y-Z` item ground position on the world.
|
||||
"""
|
||||
return super().getPosition()
|
||||
|
||||
def getRotation() -> tuple:
|
||||
"""
|
||||
This method will get the item ground rotation on the world.
|
||||
**Returns `tuple(float, float, float)`:**
|
||||
`X-Y-Z` item ground roration on the world.
|
||||
"""
|
||||
return super().getRotation()
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return super().id
|
||||
|
||||
@property
|
||||
def instance(self):
|
||||
return super().instance
|
||||
|
||||
@property
|
||||
def amount(self):
|
||||
return super().amount
|
||||
|
||||
@property
|
||||
def world(self):
|
||||
return super().world
|
||||
|
||||
@property
|
||||
def virtualWorld(self):
|
||||
return super().virtualWorld
|
||||
|
||||
@virtualWorld.setter
|
||||
def virtualWorld(self, value):
|
||||
super().virtualWorld = value
|
||||
@@ -1,30 +0,0 @@
|
||||
import sqg2o
|
||||
|
||||
class Mds:
|
||||
"""
|
||||
This class represents mds manager for conversion between mds id & mds instance. This manager will work for every registered mds in `mds.xml` file.
|
||||
Original: [Mds](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/shared-classes/mds/Mds/)
|
||||
"""
|
||||
@staticmethod
|
||||
def id(mdsName : str) -> int:
|
||||
"""
|
||||
This method will convert the mds name to mds id.
|
||||
**Parameters:**
|
||||
* `str` **mdsName**: the mds name, e.g: `"HumanS_Sprint.mds"`.
|
||||
|
||||
**Returns `int`:**
|
||||
the unique mds id.
|
||||
"""
|
||||
return sqg2o.Mds.id(mdsName)
|
||||
|
||||
@staticmethod
|
||||
def name(mdsId : int) -> str:
|
||||
"""
|
||||
This method will convert the mds id to mds name.
|
||||
**Parameters:**
|
||||
* `int` **mdsId**: the mds id.
|
||||
|
||||
**Returns `str`:**
|
||||
the mds name, e.g: `"HumanS_Sprint.mds"`.
|
||||
"""
|
||||
return sqg2o.Mds.name(mdsId)
|
||||
@@ -1,106 +0,0 @@
|
||||
import sqg2o
|
||||
|
||||
class SkyMeta(type):
|
||||
@property
|
||||
def weather(self):
|
||||
return sqg2o.Sky.weather
|
||||
|
||||
@weather.setter
|
||||
def weather(self, value):
|
||||
sqg2o.Sky.weather
|
||||
|
||||
@property
|
||||
def raining(self):
|
||||
return sqg2o.Sky.raining
|
||||
|
||||
@raining.setter
|
||||
def raining(self, value):
|
||||
sqg2o.Sky.raining = value
|
||||
|
||||
@property
|
||||
def renderLightning(self):
|
||||
return sqg2o.Sky.renderLightning
|
||||
|
||||
@renderLightning.setter
|
||||
def renderLightning(self, value):
|
||||
sqg2o.Sky.renderLightning = value
|
||||
|
||||
@property
|
||||
def windScale(self):
|
||||
return sqg2o.Sky.windScale
|
||||
|
||||
@windScale.setter
|
||||
def windScale(self, value):
|
||||
sqg2o.Sky.windScale = value
|
||||
|
||||
@property
|
||||
def dontRain(self):
|
||||
return sqg2o.Sky.dontRain
|
||||
|
||||
@dontRain.setter
|
||||
def dontRain(self, value):
|
||||
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()
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
|
||||
import sqg2o
|
||||
|
||||
class Way(sqg2o.Way):
|
||||
"""
|
||||
This class represents Way constructed from waypoints.
|
||||
Original: [Way](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/waypoint/Way/)
|
||||
|
||||
## `str` start *(read-only)*
|
||||
Represents the start waypoint for Way.
|
||||
|
||||
## `str` end *(read-only)*
|
||||
Represents the end waypoint for Way.
|
||||
"""
|
||||
def __init__(self, world : str, startWp : str, endWp : str):
|
||||
"""
|
||||
## Parameters
|
||||
`str` **world**: the name of the world from config.xml.
|
||||
`str` **startWp**: the name of the start waypoint.
|
||||
`str` **endWp**: the name of the end waypoint.
|
||||
"""
|
||||
return super().__init__(world, startWp, endWp)
|
||||
|
||||
def getWaypoints(self) -> list:
|
||||
"""
|
||||
This method will get the all waypoints between startWp & endWp.
|
||||
|
||||
## Returns
|
||||
`list [str]`: the list containing the names of all of the Way waypoints.
|
||||
"""
|
||||
return super().getWaypoints()
|
||||
|
||||
def getCountWaypoints(self):
|
||||
"""
|
||||
This method will get the number of waypoints between start waypoint & end waypoint.
|
||||
|
||||
## Returns
|
||||
`int`: the number of waypoints.
|
||||
"""
|
||||
return super().getCountWaypoints()
|
||||
|
||||
@property
|
||||
def start(self):
|
||||
return super().start
|
||||
|
||||
@property
|
||||
def end(self):
|
||||
return super().end
|
||||
Reference in New Issue
Block a user