From d235a28a1dbe6c944129c430fe44f19f3d7666bf Mon Sep 17 00:00:00 2001 From: AURUMVORXX Date: Wed, 6 Nov 2024 11:23:17 +0300 Subject: [PATCH] docs: Added DamageDescription class + fix for string -> str format in the ItemGround docs --- docs/classes/game/DamageDescription.md | 3 +++ g2o/damage.py | 28 ++++++++++++++++++++++++++ g2o/items.py | 4 ++-- mkdocs.yml | 2 ++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 docs/classes/game/DamageDescription.md diff --git a/docs/classes/game/DamageDescription.md b/docs/classes/game/DamageDescription.md new file mode 100644 index 0000000..f1ec14d --- /dev/null +++ b/docs/classes/game/DamageDescription.md @@ -0,0 +1,3 @@ +# `class` DamageDescription +--- +::: g2o.damage.DamageDescription \ No newline at end of file diff --git a/g2o/damage.py b/g2o/damage.py index 1732e6e..120c671 100644 --- a/g2o/damage.py +++ b/g2o/damage.py @@ -1,7 +1,35 @@ 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__() diff --git a/g2o/items.py b/g2o/items.py index db342d3..2736252 100644 --- a/g2o/items.py +++ b/g2o/items.py @@ -8,13 +8,13 @@ class ItemGround(sqg2o.ItemGround): ## `int` id *(read-only)* Represents the unique id of the item ground. - ## `string` instance *(read-only)* + ## `str` instance *(read-only)* Represents the item instance of the item ground. ## `int` amount *(read-only)* Represents the item amount of item ground. - ## `string` world *(read-only)* + ## `str` world *(read-only)* Represents the item ground world (.ZEN file path). ## `int` virtualWorld diff --git a/mkdocs.yml b/mkdocs.yml index 59e13a3..e618b0f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,6 +18,8 @@ nav: - How to use: index.md - QnA: qna.md - Classes: + - Game: + - DamageDescription: classes/game/DamageDescription.md - Item: - ItemGround: classes/item/ItemGround.md - Network: