feat: Удалены неиспользуемые файлы

This commit is contained in:
AURUMVORXX
2025-09-02 20:34:38 +05:00
parent 275bd6d8b1
commit fdfb01f825
9 changed files with 0 additions and 790 deletions

View File

@@ -1,54 +0,0 @@
from ..server import PythonWebsocketServer
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
async 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.
"""
data = f'return Daedalus.index({value})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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)
"""
data = f'return Daedalus.symbol({value})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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.
"""
data = f'return Daedalus.instance({value})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result

View File

@@ -1,94 +0,0 @@
class 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):
self._flags : int = 0
self._damage : int = 0
self._item_instance : str = ''
self._distance : int = 0
self._spell_id : int = 0
self._spell_level : int = 0
self._node : str = 0
def _initialize(self, **kwargs):
self.__dict__.update(kwargs)
@property
def flags(self) -> int:
return self._flags
@flags.setter
def flags(self, value):
self._flags = value
@property
def damage(self) -> int:
return self._damage
@damage.setter
def damage(self, value):
self._damage = value
@property
def item_instance(self) -> str:
return self._item_instance
@property
def distance(self) -> int:
return self._distance
@distance.setter
def distance(self, value):
self._distance = value
@property
def spell_id(self) -> int:
return self._spell_id
@spell_id.setter
def spell_id(self, value):
self._spell_id = value
@property
def spell_level(self) -> int:
return self._spell_level
@spell_level.setter
def spell_level(self, value):
self._spell_level = value
@property
def node(self) -> str:
return self._node
@node.setter
def node(self, value):
self._node = value

View File

@@ -1,184 +0,0 @@
from ..server import PythonWebsocketServer
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
async 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.
"""
data = f'return ItemsGround.getById({id})'
# TODO: Добавить десериализацию ItemGround
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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.
"""
data = f'return ItemsGround.create({data})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def destroy(id : int):
"""
This method will destroy the item ground by it's unique id.
**Parameters:**
* `int` **itemGroundId**: the item ground unique id.
"""
data = f'return ItemsGround.destroy({id})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
class 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):
self._id = -1
self._instance = ''
self._amount = -1
self._world = -1
self._virtualWorld = -1
self._position = -1
self._rotation = -1
def getPosition(self) -> dict:
"""
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 self._position
def getRotation(self) -> dict:
"""
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 self._rotation
async def setPosition(self, x: float, y: float, z: float):
"""
This method will set the item ground position in the world.
**Parameters:**
* `float` **x**: the position in the world on the x axis.
* `float` **y**: the position in the world on the y axis.
* `float` **z**: the position in the world on the z axis.
"""
data = f'return ItemsGround.getById({self.id}).setPosition({x}, {y}, {z})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
async def setRotation(self, x: float, y: float, z: float):
"""
This method will set the item ground rotation in the world.
**Parameters:**
* `float` **x**: the rotation in the world on the x axis.
* `float` **y**: the rotation in the world on the y axis.
* `float` **z**: the rotation in the world on the z axis.
"""
data = f'return ItemsGround.getById({self.id}).setRotation({x}, {y}, {z})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
async def get_physicsEnabled(self) -> bool:
"""
This method will get the item ground physicsEnabled flag.
**Returns:**
* `bool`: ``true`` if physics is enabled, otherwise ``false``
"""
data = f'return ItemsGround.getById({self.id}).physicsEnabled'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
async def set_physicsEnabled(self, enabled: bool):
"""
This method will set the item ground physicsEnabled flag.
**Parameters:**
* `bool` **enabled**: represents the state of physicsEnabled flag
"""
data = f'return ItemsGround.getById({self.id}).physicsEnabled = {enabled}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@property
def id(self) -> int:
return self._id
@property
def instance(self) -> str:
return self._instance
@property
def amount(self) -> int:
return self._amount
@property
def world(self) -> str:
return self._world
@property
def virtualWorld(self) -> int:
return self._virtualWorld
@virtualWorld.setter
def virtualWorld(self, value):
self._virtualWorld = value
def _initialize(self, **kwargs):
self.__dict__.update(kwargs)

View File

@@ -1,38 +0,0 @@
from ..server import PythonWebsocketServer
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
async 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.
"""
data = f'return Mds.id({mdsName})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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"`.
"""
data = f'return Mds.id({mdsId})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result

View File

@@ -1,161 +0,0 @@
from ..server import PythonWebsocketServer
class Sky:
"""
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
async def get_weather():
data = 'return Sky.weather'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def set_weather(value):
data = 'return Sky.weather = value'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def get_raining():
data = 'return Sky.raining'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def set_raining(value):
data = 'return Sky.raining = value'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def get_renderLightning():
data = 'return Sky.renderLightning'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def set_renderLightning(value):
data = 'return Sky.renderLightning = value'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def get_windScale():
data = 'return Sky.windScale'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def set_windScale(value):
data = 'return Sky.windScale = value'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def get_dontRain():
data = 'return Sky.dontRain'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async def set_dontRain(value):
data = 'return Sky.dontRain = value'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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.
"""
data = f'return Sky.setRainStartTime({hour}, {minute})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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.
"""
data = f'return Sky.setRainStopTime({hour}, {minute})'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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.
"""
data = 'return Sky.getRainStartTime()'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
@staticmethod
async 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.
"""
data = 'return Sky.getRainStopTime()'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result

View File

@@ -1,129 +0,0 @@
import inspect
class Constant:
AC_SPEED_HACK = None
DAMAGE_CTX = None
EQUIPMENT_CTX = None
DAMAGE_UNKNOWN = None
DAMAGE_BARRIER = None
DAMAGE_BLUNT = None
DAMAGE_EDGE = None
DAMAGE_FIRE = None
DAMAGE_FLY = None
DAMAGE_MAGIC = None
DAMAGE_POINT = None
DAMAGE_FALL = None
DEBUG_MODE = None
CLIENT_SIDE = None
SERVER_SIDE = None
HAND_LEFT = None
HAND_RIGHT = None
ITEM_CAT_NONE = None
ITEM_CAT_NF = None
ITEM_CAT_FF = None
ITEM_CAT_MUN = None
ITEM_CAT_ARMOR = None
ITEM_CAT_FOOD = None
ITEM_CAT_DOCS = None
ITEM_CAT_POTION = None
ITEM_CAT_LIGHT = None
ITEM_CAT_RUNE = None
ITEM_CAT_MAGIC = None
ITEM_FLAG_DAG = None
ITEM_FLAG_SWD = None
ITEM_FLAG_AXE = None
ITEM_FLAG_2HD_SWD = None
ITEM_FLAG_2HD_AXE = None
ITEM_FLAG_SHIELD = None
ITEM_FLAG_BOW = None
ITEM_FLAG_CROSSBOW = None
ITEM_FLAG_RING = None
ITEM_FLAG_AMULET = None
ITEM_FLAG_BELT = None
ITEM_FLAG_DROPPED = None
ITEM_FLAG_MI = None
ITEM_FLAG_MULTI = None
ITEM_FLAG_NFOCUS = None
ITEM_FLAG_CREATEAMMO = None
ITEM_FLAG_NSPLIT = None
ITEM_FLAG_DRINK = None
ITEM_FLAG_TORCH = None
ITEM_FLAG_THROW = None
ITEM_FLAG_ACTIVE = None
ITEM_WEAR_NO = None
ITEM_WEAR_TORSO = None
ITEM_WEAR_HEAD = None
ITEM_WEAR_LIGHT = None
DISCONNECTED = None
LOST_CONNECTION = None
HAS_CRASHED = None
ATTACK_RUN = None
ATTACK_FORWARD = None
ATTACK_LEFT = None
ATTACK_RIGHT = None
ACTION_CLEAR_QUEUE = None
ACTION_APPLY_OVERLAY = None
ACTION_REMOVE_OVERLAY = None
ACTION_PLAY_ANI = None
ACTION_STOP_ANI = None
ACTION_EQUIP_ITEM = None
ACTION_UNEQUIP_ITEM = None
ACTION_WEAPON_MODE = None
ACTION_DRAW_WEAPON = None
ACTION_REMOVE_WEAPON = None
ACTION_USE_ITEM = None
ACTION_USE_ITEM_TO_STATE = None
ACTION_READY_SPELL = None
ACTION_UNREADY_SPELL = None
ACTION_ATTACK_MELEE_WEAPON = None
ACTION_ATTACK_RANGED_WEAPON = None
ACTION_SPELL_CAST = None
ACTION_USE_MOB_SCHEME = None
ACTION_SHOOT_AT = None
ACTION_START_AIM_AT = None
ACTION_STOP_AIM_AT = None
ACTION_SCRIPT = None
WEAPON_1H = None
WEAPON_2H = None
WEAPON_BOW = None
WEAPON_CBOW = None
TALENT_1H = None
TALENT_2H = None
TALENT_BOW = None
TALENT_CROSSBOW = None
TALENT_PICK_LOCKS = None
TALENT_PICKPOCKET = None
TALENT_MAGE = None
TALENT_SNEAK = None
TALENT_REGENERATE = None
TALENT_FIREMASTER = None
TALENT_ACROBATIC = None
TALENT_PICKPOCKET_UNUSED = None
TALENT_SMITH = None
TALENT_RUNES = None
TALENT_ALCHEMY = None
TALENT_THROPHY = None
TALENT_A = None
TALENT_B = None
TALENT_C = None
TALENT_D = None
TALENT_E = None
TALENT_MAX = None
WEAPONMODE_NONE = None
WEAPONMODE_FIST = None
WEAPONMODE_DAG = None
WEAPONMODE_1HS = None
WEAPONMODE_2HS = None
WEAPONMODE_BOW = None
WEAPONMODE_CBOW = None
WEAPONMODE_MAG = None
WEAPONMODE_MAX = None
WEATHER_SNOW = None
WEATHER_RAIN = None
@classmethod
def _update(cls, constants):
existing_vars = [name for name, _ in inspect.getmembers(cls) if not name.startswith('_') and not inspect.ismodule(_)]
for key, val in constants.items():
if key in existing_vars:
setattr(cls, key, val)

View File

@@ -1,130 +0,0 @@
from server import Server
async def applyPlayerOverlay(id: int, overlay: str):
return await Server.server_call(f'applyPlayerOverlay({id}, {overlay})')
async def drawWeapon(id: int, weaponMode: int):
return await Server.server_call(f'drawWeapon({id}, {weaponMode})')
async def equipItem(id: int, instance: str, slotId: int = -1):
return await Server.server_call(f'equipItem({id}, {instance}, {slotId})')
async def fadeOutAni(id: int, aniName: str):
return await Server.server_call(f'fadeOutAni({id}, {aniName})')
async def getPlayerAmulet(id: int):
return await Server.server_call(f'getPlayerAmulet({id})')
async def getPlayerAngle(id: int):
return await Server.server_call(f'getPlayerAngle({id})')
async def getPlayerAni(id: int):
return await Server.server_call(f'getPlayerAni({id})')
async def getPlayerAniId(id: int):
return await Server.server_call(f'getPlayerAniId({id})')
async def getPlayerArmor(id: int):
return await Server.server_call(f'getPlayerArmor({id})')
async def getPlayerAtVector(id: int):
return await Server.server_call(f'getPlayerAtVector({id})')
async def getPlayerBelt(id: int):
return await Server.server_call(f'getPlayerBelt({id})')
async def getPlayerCameraPosition(id: int):
return await Server.server_call(f'getPlayerCameraPosition({id})')
async def getPlayerCollision(id: int):
return await Server.server_call(f'getPlayerCollision({id})')
async def getPlayerDexterity(id: int):
return await Server.server_call(f'getPlayerDexterity({id})')
async def getPlayerFaceAnis(id: int):
return await Server.server_call(f'getPlayerFaceAnis({id})')
async def getPlayerFatness(id: int):
return await Server.server_call(f'getPlayerFatness({id})')
async def getPlayerFocus(id: int):
return await Server.server_call(f'getPlayerFocus({id})')
async def getPlayerHealth(id: int):
return await Server.server_call(f'getPlayerHealth({id})')
async def getPlayerHelmet(id: int):
return await Server.server_call(f'getPlayerHelmet({id})')
async def getPlayerIP(id: int):
return await Server.server_call(f'getPlayerIP({id})')
async def getPlayerInstance(id: int):
return await Server.server_call(f'getPlayerInstance({id})')
async def getPlayerInvisible(id: int):
return await Server.server_call(f'getPlayerInvisible({id})')
async def getPlayerMacAddr(id: int):
return await Server.server_call(f'getPlayerMacAddr({id})')
async def getPlayerMaxHealth(id: int):
return await Server.server_call(f'getPlayerMaxHealth({id})')
async def getPlayerMaxMana(id: int):
return await Server.server_call(f'getPlayerMaxMana({id})')
async def getPlayerMeleeWeapon(id: int):
return await Server.server_call(f'getPlayerMeleeWeapon({id})')
async def getPlayerName(id: int):
return await Server.server_call(f'getPlayerName({id})')
async def getPlayerOverlays(id: int):
return await Server.server_call(f'getPlayerOverlays({id})')
async def getPlayerPing(id: int):
return await Server.server_call(f'getPlayerPing({id})')
async def getPlayerPosition(id: int):
return await Server.server_call(f'getPlayerPosition({id})')
async def getPlayerRangedWeapon(id: int):
return await Server.server_call(f'getPlayerRangedWeapon({id})')
async def getPlayerRing(id: int, handId: int):
return await Server.server_call(f'getPlayerRing({id}, {handId})')
async def getPlayerScale(id: int):
return await Server.server_call(f'getPlayerScale({id}')
async def getPlayerSerial(id: int):
return await Server.server_call(f'getPlayerSerial({id}')
async def getPlayerShield(id: int):
return await Server.server_call(f'getPlayerShield({id}')
async def getPlayerSkillWeapon(id: int, skillId: int):
return await Server.server_call(f'getPlayerSkillWeapon({id}, {skillId}')
async def getPlayerSpell(id: int, slotId: int):
return await Server.server_call(f'getPlayerSpell({id}, {slotId}')
async def getPlayerTalent(id: int, talentId: int):
return await Server.server_call(f'getPlayerTalent({id}, {talentId}')
async def getPlayerUID(id: int):
return await Server.server_call(f'getPlayerUID({id}')
async def getPlayerVirtualWorld(id: int):
return await Server.server_call(f'getPlayerVirtualWorld({id}')
async def getPlayerVisual(id: int):
return await Server.server_call(f'getPlayerVisual({id}')
async def getPlayerWeaponMode(id: int):
return await Server.server_call(f'getPlayerWeaponMode({id}')
async def getPlayerWorld(id: int):
return await Server.server_call(f'getPlayerWorld({id}')