diff --git a/.github/workflows/docs_pages.yml b/.github/workflows/docs_pages.yml
index a28989d..b07b9fc 100644
--- a/.github/workflows/docs_pages.yml
+++ b/.github/workflows/docs_pages.yml
@@ -19,5 +19,4 @@ jobs:
pip install mkdocs-material
pip install mkdocs-callouts
pip install mkdocs-glightbox
- cd python/
mkdocs gh-deploy --force
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index ebc5e4a..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-name: release
-
-on: workflow_dispatch
-
-jobs:
- create-new-release:
- runs-on: ubuntu-latest
- permissions:
- contents: write
- outputs:
- assets_url: ${{ steps.create-release.outputs.upload_url }}
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Create release
- id: create-release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.run_number }}
- release_name: Release Title
- body_path: CHANGELOG.md
- draft: true
- release-win64:
- runs-on: windows-latest
- needs: create-new-release
- permissions:
- contents: write
- outputs:
- assets_url: ${{ steps.create-release.outputs.upload_url }}
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Install MSVC
- uses: ilammy/msvc-dev-cmd@v1
- - name: Install Python
- uses: actions/setup-python@v5
- with:
- python-version: '3.13'
- - name: Install CMake
- uses: lukka/get-cmake@latest
- - name: Init submodules
- run: git submodule update --init --recursive
- - name: CMake - Configure
- run: cmake . --preset Windows-x64-Release -DCMAKE_BUILD_TYPE="Release" -DCOUT_FILE_SUFFIX="x64"
- - name: CMake - Build
- run: cmake --build --preset Windows-x64-Release
- - name: Archive output files
- run: Compress-Archive -Path "python/g2o", "build/Windows-x64-Release/source/PyG2O.x64.dll" -Destination Windows-x64-Release.zip
- - name: Upload release
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.create-new-release.outputs.assets_url }}
- asset_path: ./Windows-x64-Release.zip
- asset_name: Windows-x64-Release.zip
- asset_content_type: application/zip
- release-arm64:
- runs-on: ubuntu-latest
- needs: create-new-release
- permissions:
- contents: write
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Install Python
- uses: actions/setup-python@v5
- with:
- python-version: '3.13'
- - name: Install CMake
- uses: lukka/get-cmake@latest
- - name: Init submodules
- run: git submodule update --init --recursive
- - name: CMake - Configure
- run: cmake . --preset Linux-x64-Release -DCMAKE_BUILD_TYPE="Release" -DCOUT_FILE_SUFFIX="x64"
- - name: CMake - Build
- run: cmake --build --preset Linux-x64-Release
- - name: Archive files
- uses: montudor/action-zip@v1
- with:
- args: zip -r Linux-x64-Release.zip python/g2o build/Linux-x64-Release/source/PyG2O.x64.so
- - name: Upload release
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.create-new-release.outputs.assets_url }}
- asset_path: ./Linux-x64-Release.zip
- asset_name: Linux-x64-Release.zip
- asset_content_type: application/zip
\ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index f6f44fd..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,6 +0,0 @@
-[submodule "source/dependencies/sqapi"]
- path = source/dependencies/sqapi
- url = https://gitlab.com/GothicMultiplayerTeam/dependencies/sqapi.git
-[submodule "source/dependencies/pybind11"]
- path = source/dependencies/pybind11
- url = https://github.com/pybind/pybind11.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index f848768..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-cmake_minimum_required(VERSION 3.21)
-set(CMAKE_CXX_STANDARD 20)
-set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
-
-project(PyG2O VERSION 1.3.1.0)
-set(PYG2O_MODULE_NAME PyG2O)
-
-add_subdirectory(source)
\ No newline at end of file
diff --git a/CMakePresets.json b/CMakePresets.json
deleted file mode 100644
index ebb9832..0000000
--- a/CMakePresets.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "version": 3,
- "configurePresets": [
- {
- "name": "windows",
- "hidden": true,
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build/${presetName}",
- "condition": {
- "type": "equals",
- "lhs": "${hostSystemName}",
- "rhs": "Windows"
- },
- "cacheVariables": {
- "CMAKE_C_COMPILER": "cl.exe",
- "CMAKE_CXX_COMPILER": "cl.exe"
- }
- },
- {
- "name": "linux",
- "hidden": true,
- "generator": "Unix Makefiles",
- "binaryDir": "${sourceDir}/build/${presetName}",
- "condition": {
- "type": "equals",
- "lhs": "${hostSystemName}",
- "rhs": "Linux"
- },
- "cacheVariables": {
- "CMAKE_CXX_FLAGS": "-static-libgcc -static-libstdc++"
- }
- },
- {
- "name": "x64",
- "hidden": true,
- "architecture": {
- "value": "x64",
- "strategy": "external"
- },
- "cacheVariables": {
- "OUT_FILE_SUFFIX": "x64"
- }
- },
- {
- "name": "arm64",
- "hidden": true,
- "architecture": {
- "value": "arm64",
- "strategy": "external"
- },
- "cacheVariables": {
- "OUT_FILE_SUFFIX": "arm64"
- }
- },
- {
- "name": "debug",
- "hidden": true,
- "cacheVariables": {
- "CMAKE_BUILD_TYPE": "Debug"
- }
- },
- {
- "name": "release",
- "hidden": true,
- "cacheVariables": {
- "CMAKE_BUILD_TYPE": "Release"
- }
- },
-
- { "name": "Windows-x64-Debug", "inherits": ["windows", "x64", "debug"] },
- { "name": "Windows-x64-Release", "inherits": ["windows", "x64", "release"] },
- { "name": "Linux-x64-Debug", "inherits": ["linux", "x64", "debug"] },
- { "name": "Linux-x64-Release", "inherits": ["linux", "x64", "release"] },
- { "name": "Linux-arm64-Debug", "inherits": ["linux", "arm64", "debug"] },
- { "name": "Linux-arm64-Release", "inherits": ["linux", "arm64", "release"] }
- ],
- "buildPresets": [
- { "name": "Windows-x64-Debug", "configurePreset": "Windows-x64-Debug" },
- { "name": "Windows-x64-Release", "configurePreset": "Windows-x64-Release" },
- { "name": "Linux-x64-Debug", "configurePreset": "Linux-x64-Debug" },
- { "name": "Linux-x64-Release", "configurePreset": "Linux-x64-Release" },
- { "name": "Linux-arm64-Debug", "configurePreset": "Linux-arm64-Debug" },
- { "name": "Linux-arm64-Release", "configurePreset": "Linux-arm64-Release" }
- ]
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index cff5f17..c736013 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,8 @@ Python support for server-side scripts in [Gothic 2 Online](https://gothic-onlin
**Documentation:** https://aurumvorxx.github.io/PyG2O/
-## How to build
-
Requirements:
-- Python 3.13
-- CMake
+- websockets
Steps:
1. Copy this repo to your local machine
diff --git a/docs/classes/game/Daedalus.md b/docs/classes/game/Daedalus.md
new file mode 100644
index 0000000..3954c34
--- /dev/null
+++ b/docs/classes/game/Daedalus.md
@@ -0,0 +1,3 @@
+# `static class` Daedalus
+---
+::: src.pyg2o.classes.daedalus.Daedalus
\ No newline at end of file
diff --git a/docs/classes/game/DamageDescription.md b/docs/classes/game/DamageDescription.md
new file mode 100644
index 0000000..c7439cb
--- /dev/null
+++ b/docs/classes/game/DamageDescription.md
@@ -0,0 +1,3 @@
+# `class` DamageDescription
+---
+::: src.pyg2o.classes.damage.DamageDescription
\ No newline at end of file
diff --git a/docs/classes/game/Sky.md b/docs/classes/game/Sky.md
new file mode 100644
index 0000000..517e994
--- /dev/null
+++ b/docs/classes/game/Sky.md
@@ -0,0 +1,3 @@
+# `static class` Sky
+---
+::: src.pyg2o.classes.sky.Sky
\ No newline at end of file
diff --git a/docs/classes/item/ItemGround.md b/docs/classes/item/ItemGround.md
new file mode 100644
index 0000000..40cfa9d
--- /dev/null
+++ b/docs/classes/item/ItemGround.md
@@ -0,0 +1,3 @@
+# `static class` ItemGround
+---
+::: src.pyg2o.classes.items.ItemGround
\ No newline at end of file
diff --git a/docs/classes/item/ItemsGround.md b/docs/classes/item/ItemsGround.md
new file mode 100644
index 0000000..e00cfa2
--- /dev/null
+++ b/docs/classes/item/ItemsGround.md
@@ -0,0 +1,3 @@
+# `static class` ItemsGround
+---
+::: src.pyg2o.classes.items.ItemsGround
\ No newline at end of file
diff --git a/docs/classes/mds/Mds.md b/docs/classes/mds/Mds.md
new file mode 100644
index 0000000..3279ac6
--- /dev/null
+++ b/docs/classes/mds/Mds.md
@@ -0,0 +1,3 @@
+# `static class` Mds
+---
+::: src.pyg2o.classes.mds.Mds
\ No newline at end of file
diff --git a/python/docs/comparing.md b/docs/comparing.md
similarity index 66%
rename from python/docs/comparing.md
rename to docs/comparing.md
index f5714cf..500ec74 100644
--- a/python/docs/comparing.md
+++ b/docs/comparing.md
@@ -1,55 +1,55 @@
* `addEventHandler` replaced with decorator [event](functions/event/event.md)
```python
-@g2o.event('onInit')
-def evtInitFirst(**kwargs):
+@pyg2o.event('onInit')
+async def evtInitFirst():
print('Hello')
-@g2o.event('onInit', 100) # '100' is priority
-def evtInitSecond(**kwargs):
+@pyg2o.event('onInit', 100) # '100' is priority
+async def evtInitSecond():
print('World')
```
---
* Positional arguments inside event handles replaced with keyword arguments (see names of all keywords on the each event page)
```python
-@g2o.event('onPlayerChangeColor')
-def evtColor(**kwargs):
- playerid = kwargs['playerid']
- r = kwargs['r']
- b = kwargs['b']
+@pyg2o.event('onPlayerChangeColor')
+async def evtColor(playerid, r, g, b):
+ pass
```
---
* `callEvent` now also requires to pass keyword arguments instead of positional arguments
```python
-@g2o.event('MyTestEvent')
-def testEvt(**kwargs):
- print(kwargs)
+@pyg2o.event('MyTestEvent')
+async def testEvt(name, id):
+ print(name, id)
g2o.callEvent('MyTestEvent', name = 'aurumvorax', id = 15)
# OR
g2o.callEvent('MyTestEvent', {'name': 'aurumvorax', 'id': 15})
# OR
args = {'name': 'aurumvorax', 'id': 15}
-g2o.callEvent('MyTestEvent', args)
+asyncio.create_task(pyg2o.callEvent('MyTestEvent', args))
```
---
-* `cancelEvent` replaced with returning `False` inside the handler
-*(you don't need to explicitly return `True` if you don't want to cancel the event)*
-```python
-@g2o.event('onPlayerTakeItem')
-def evtTake(**kwargs):
- return False
-```
+* `cancelEvent` temporarily disabled
---
* `isEventCancelled` replaced with built-in function property `cancelled`, alongside with the `eventName`
```python
-@g2o.event('onPlayerDropItem')
-def evtDrop(**kwargs):
+@pyg2o.event('onPlayerDropItem')
+async def evtDrop(**kwargs):
print(evtDrop.cancelled)
print(evtDrop.eventName)
```
------
-* Following functions have been removed RIP :(
+---
+Now all constants should be called via **Constant** class
+```pyton
+import pyg2o
+
+@pyg2o.event('onInit')
+async def evt_init():
+ print(pyg2o.Constant.SERVER_SIDE)
+```
+* Following functions and classes have been removed RIP :(
* `md5`
* `sha1`
@@ -71,7 +71,17 @@ def evtDrop(**kwargs):
* `eventValue`
* `getPlayerMagicLevel`
* `setPlayerMagicLevel`
+ * `Packet`
+ * `Way`
+ * `NpcAction`
+
+* Following constants has been removed:
+ * `UNRELIABLE`
+ * `UNRELIABLE_SEQUENCED`
+ * `RELIABLE`
+ * `RELIABLE_SEQUENCED`
+ * `RELIABLE_ORDERED`
---
* All functions and events that returned/passed a `null` in the Squirrel, now passes an empty string. Most notable in this list are all equipment related functions and events
* `onPlayerEquipAmulet`
@@ -92,6 +102,4 @@ def evtDrop(**kwargs):
* `getPlayerRangedWeapon`
* `getPlayerRing`
* `getPlayerShield`
- * `getPlayerSpell`
----
-* `ItemsGround.getById` throws an exception instead of returning `null` if there's no item with given ID
\ No newline at end of file
+ * `getPlayerSpell`
\ No newline at end of file
diff --git a/python/docs/constants/anticheat.md b/docs/constants/anticheat.md
similarity index 100%
rename from python/docs/constants/anticheat.md
rename to docs/constants/anticheat.md
diff --git a/python/docs/constants/context.md b/docs/constants/context.md
similarity index 100%
rename from python/docs/constants/context.md
rename to docs/constants/context.md
diff --git a/python/docs/constants/damage.md b/docs/constants/damage.md
similarity index 100%
rename from python/docs/constants/damage.md
rename to docs/constants/damage.md
diff --git a/python/docs/constants/general.md b/docs/constants/general.md
similarity index 100%
rename from python/docs/constants/general.md
rename to docs/constants/general.md
diff --git a/python/docs/constants/hand.md b/docs/constants/hand.md
similarity index 100%
rename from python/docs/constants/hand.md
rename to docs/constants/hand.md
diff --git a/python/docs/constants/item.md b/docs/constants/item.md
similarity index 100%
rename from python/docs/constants/item.md
rename to docs/constants/item.md
diff --git a/python/docs/constants/network.md b/docs/constants/network.md
similarity index 100%
rename from python/docs/constants/network.md
rename to docs/constants/network.md
diff --git a/python/docs/constants/npc.md b/docs/constants/npc.md
similarity index 100%
rename from python/docs/constants/npc.md
rename to docs/constants/npc.md
diff --git a/python/docs/constants/reliability.md b/docs/constants/reliability.md
similarity index 100%
rename from python/docs/constants/reliability.md
rename to docs/constants/reliability.md
diff --git a/python/docs/constants/skill-weapon.md b/docs/constants/skill-weapon.md
similarity index 100%
rename from python/docs/constants/skill-weapon.md
rename to docs/constants/skill-weapon.md
diff --git a/python/docs/constants/talent.md b/docs/constants/talent.md
similarity index 100%
rename from python/docs/constants/talent.md
rename to docs/constants/talent.md
diff --git a/python/docs/constants/weapon-mode.md b/docs/constants/weapon-mode.md
similarity index 100%
rename from python/docs/constants/weapon-mode.md
rename to docs/constants/weapon-mode.md
diff --git a/python/docs/constants/weather.md b/docs/constants/weather.md
similarity index 100%
rename from python/docs/constants/weather.md
rename to docs/constants/weather.md
diff --git a/python/docs/defaultEvents/anticheat/onPlayerUseCheat.md b/docs/defaultEvents/anticheat/onPlayerUseCheat.md
similarity index 80%
rename from python/docs/defaultEvents/anticheat/onPlayerUseCheat.md
rename to docs/defaultEvents/anticheat/onPlayerUseCheat.md
index 5735c60..8eb53d3 100644
--- a/python/docs/defaultEvents/anticheat/onPlayerUseCheat.md
+++ b/docs/defaultEvents/anticheat/onPlayerUseCheat.md
@@ -13,9 +13,9 @@ Original: [onPlayerUseCheat](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/
## Usage
```python
-import g2o
+import pyg2o
-@g2o.event('onPlayerUseCheat')
-def onCheat(**kwargs):
- print(f'Player {kwargs['playerid']} used forbidden cheat tool type {kwargs['type']}.')
+@pyg2o.event('onPlayerUseCheat')
+async def onCheat(playerid, type):
+ print(f'Player {playerid} used forbidden cheat tool type {type}.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/general/onBan.md b/docs/defaultEvents/general/onBan.md
similarity index 80%
rename from python/docs/defaultEvents/general/onBan.md
rename to docs/defaultEvents/general/onBan.md
index 203a546..9491ca1 100644
--- a/python/docs/defaultEvents/general/onBan.md
+++ b/docs/defaultEvents/general/onBan.md
@@ -18,13 +18,13 @@ Original: [onBan](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-refe
## Usage
```python
-import g2o
+import pyg2o as g2o
from datetime import datetime
@g2o.event('onBan')
-def onBan(**kwargs):
- print(f'Player {kwargs['name']} has been banned.')
- if ('timestamp' in kwargs):
- banExpires = datetime.fromtimestamp(kwargs['timestamp'])
+async def onBan(banInfo):
+ print(f'Player {banInfo['name']} has been banned.')
+ if ('timestamp' in banInfo):
+ banExpires = datetime.fromtimestamp(banInfo['timestamp'])
print(f'Ban expires at {banExpires}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/general/onExit.md b/docs/defaultEvents/general/onExit.md
similarity index 89%
rename from python/docs/defaultEvents/general/onExit.md
rename to docs/defaultEvents/general/onExit.md
index c0690c0..b3aa8fa 100644
--- a/python/docs/defaultEvents/general/onExit.md
+++ b/docs/defaultEvents/general/onExit.md
@@ -9,9 +9,9 @@ No parameters.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onExit')
-def onExitEvt(**kwargs):
+async def onExitEvt():
print('Bye')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/general/onInit.md b/docs/defaultEvents/general/onInit.md
similarity index 85%
rename from python/docs/defaultEvents/general/onInit.md
rename to docs/defaultEvents/general/onInit.md
index 1434dad..6c5e878 100644
--- a/python/docs/defaultEvents/general/onInit.md
+++ b/docs/defaultEvents/general/onInit.md
@@ -8,9 +8,9 @@ No parameters.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onInit')
-def onInitEventHandler(**kwargs):
+async def onInitEventHandler():
print('Called onInit event')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/general/onTick.md b/docs/defaultEvents/general/onTick.md
similarity index 87%
rename from python/docs/defaultEvents/general/onTick.md
rename to docs/defaultEvents/general/onTick.md
index f73a90a..5c0c7b7 100644
--- a/python/docs/defaultEvents/general/onTick.md
+++ b/docs/defaultEvents/general/onTick.md
@@ -8,9 +8,9 @@ No parameters.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onTick')
-def onTickEvt(**kwargs):
+async def onTickEvt():
print('Tock')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/general/onTime.md b/docs/defaultEvents/general/onTime.md
similarity index 78%
rename from python/docs/defaultEvents/general/onTime.md
rename to docs/defaultEvents/general/onTime.md
index 4f21a22..8e068ea 100644
--- a/python/docs/defaultEvents/general/onTime.md
+++ b/docs/defaultEvents/general/onTime.md
@@ -11,12 +11,9 @@ Original: [onExit](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-ref
## Usage
```python
-import g2o
+import pyg2o as g2o
-@g2o.event('onTick')
-def onTickEvt(**kwargs):
- day = kwargs['day']
- hour = kwargs['hour']
- mins = kwargs['min']
+@g2o.event('onTime')
+async def onTickEvt(day, hour, min):
print(f'Current time: Day {day}, Hour {hour}, Min {mins}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/general/onUnban.md b/docs/defaultEvents/general/onUnban.md
similarity index 88%
rename from python/docs/defaultEvents/general/onUnban.md
rename to docs/defaultEvents/general/onUnban.md
index 981cf16..7ecaecf 100644
--- a/python/docs/defaultEvents/general/onUnban.md
+++ b/docs/defaultEvents/general/onUnban.md
@@ -18,9 +18,9 @@ Original: [onExit](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-ref
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onUnban')
-def onUnban(**kwargs):
- print(f'Player {kwargs['name']} has been unbanned.')
+async def onUnban(banInfo):
+ print(f'Player {banInfo['name']} has been unbanned.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/npc/onNpcActionFinished.md b/docs/defaultEvents/npc/onNpcActionFinished.md
similarity index 75%
rename from python/docs/defaultEvents/npc/onNpcActionFinished.md
rename to docs/defaultEvents/npc/onNpcActionFinished.md
index 38abf55..9a68b75 100644
--- a/python/docs/defaultEvents/npc/onNpcActionFinished.md
+++ b/docs/defaultEvents/npc/onNpcActionFinished.md
@@ -13,9 +13,9 @@ Original: [onNpcActionFinished](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onNpcActionFinished')
-def onActionFinished(**kwargs):
- print(f'NPC {kwargs['npc_id']} finished action {kwargs['action_type']} with the result {kwargs['result']}.')
+async def onActionFinished(npc_id, action_type, action_id, result):
+ print(f'NPC {npc_id} finished action {action_type} with the result {result}.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/npc/onNpcActionSent.md b/docs/defaultEvents/npc/onNpcActionSent.md
similarity index 79%
rename from python/docs/defaultEvents/npc/onNpcActionSent.md
rename to docs/defaultEvents/npc/onNpcActionSent.md
index e7e328f..a845011 100644
--- a/python/docs/defaultEvents/npc/onNpcActionSent.md
+++ b/docs/defaultEvents/npc/onNpcActionSent.md
@@ -12,9 +12,9 @@ Original: [onNpcActionSent](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/s
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onNpcActionSent')
-def onActionSent(**kwargs):
- print(f'NPC {kwargs['npc_id']} changed host from {kwargs['previous_id']} to {kwargs['current_id']}.')
+async def onActionSent(npc_id, action_type, action_id):
+ print(f'NPC {npc_id} sent action {action_id}.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/npc/onNpcChangeHostPlayer.md b/docs/defaultEvents/npc/onNpcChangeHostPlayer.md
similarity index 81%
rename from python/docs/defaultEvents/npc/onNpcChangeHostPlayer.md
rename to docs/defaultEvents/npc/onNpcChangeHostPlayer.md
index 6e929e6..1a8bb0f 100644
--- a/python/docs/defaultEvents/npc/onNpcChangeHostPlayer.md
+++ b/docs/defaultEvents/npc/onNpcChangeHostPlayer.md
@@ -12,9 +12,9 @@ Original: [onNpcChangeHostPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onNpcChangeHostPlayer')
-def onChangeHostPlayer(**kwargs):
- print(f'NPC {kwargs['npc_id']} sent {kwargs['action_type']} to all players.')
+async def onChangeHostPlayer(npc_id, previous_id, current_id):
+ print(f'NPC {npc_id} changed host to {current_id}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/npc/onNpcCreated.md b/docs/defaultEvents/npc/onNpcCreated.md
similarity index 79%
rename from python/docs/defaultEvents/npc/onNpcCreated.md
rename to docs/defaultEvents/npc/onNpcCreated.md
index 9ecad00..00e1000 100644
--- a/python/docs/defaultEvents/npc/onNpcCreated.md
+++ b/docs/defaultEvents/npc/onNpcCreated.md
@@ -10,9 +10,9 @@ Original: [onNpcCreated](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/scri
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onNpcCreated')
-def onNpcCreate(**kwargs):
- print(f'NPC {kwargs['npc_id']} has been created.')
+async def onNpcCreate(npc_id):
+ print(f'NPC {npc_id} has been created.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/npc/onNpcDestroyed.md b/docs/defaultEvents/npc/onNpcDestroyed.md
similarity index 78%
rename from python/docs/defaultEvents/npc/onNpcDestroyed.md
rename to docs/defaultEvents/npc/onNpcDestroyed.md
index ba6c21d..ce3371e 100644
--- a/python/docs/defaultEvents/npc/onNpcDestroyed.md
+++ b/docs/defaultEvents/npc/onNpcDestroyed.md
@@ -10,9 +10,9 @@ Original: [onNpcDestroyed](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/sc
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onNpcDestroyed')
-def onNpcDestroy(**kwargs):
- print(f'NPC {kwargs['npc_id']} has been destroyed.')
+async def onNpcDestroy(npc_id):
+ print(f'NPC {npc_id} has been destroyed.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeColor.md b/docs/defaultEvents/player/onPlayerChangeColor.md
similarity index 70%
rename from python/docs/defaultEvents/player/onPlayerChangeColor.md
rename to docs/defaultEvents/player/onPlayerChangeColor.md
index 7017fc5..641838a 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeColor.md
+++ b/docs/defaultEvents/player/onPlayerChangeColor.md
@@ -12,14 +12,11 @@ Original: [onPlayerChangeColor](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeColor')
-def onChangeColor(**kwargs):
- # Slicing out playerid and converting from {r: num, g: num, b: num}
- # to (num, num, num)
- rgbColor = tuple(list(kwargs.values())[1:])
- # Formating rgb into hex color
+async def onChangeColor(playerid, r, g, b):
+ rgbColor = tuple(r, g, b)
hexColor = '#%02x%02x%02x' % rgbColor
- print(f'Player {kwargs['playerid']} changed his color to {hexColor}')
+ print(f'Player {playerid} changed his color to {hexColor}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeFocus.md b/docs/defaultEvents/player/onPlayerChangeFocus.md
similarity index 73%
rename from python/docs/defaultEvents/player/onPlayerChangeFocus.md
rename to docs/defaultEvents/player/onPlayerChangeFocus.md
index ef6dfbf..a9a5ac0 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeFocus.md
+++ b/docs/defaultEvents/player/onPlayerChangeFocus.md
@@ -11,13 +11,12 @@ Original: [onPlayerChangeFocus](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeFocus')
-def onChangeFocus(**kwargs):
- focusId = kwargs['newFocusId']
- if focusId != -1:
- print(f'Player {kwargs['playerid']} is looking at {focusId}')
+async def onChangeFocus(playerid, oldFocusId, newFocusId):
+ if newFocusId != -1:
+ print(f'Player {playerid} is looking at {newFocusId}')
else
- print(f'Player {kwargs['playerid']} is looking at... who?')
+ print(f'Player {playerid} is looking at... who?')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeHealth.md b/docs/defaultEvents/player/onPlayerChangeHealth.md
similarity index 60%
rename from python/docs/defaultEvents/player/onPlayerChangeHealth.md
rename to docs/defaultEvents/player/onPlayerChangeHealth.md
index 250bca1..f1796bb 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeHealth.md
+++ b/docs/defaultEvents/player/onPlayerChangeHealth.md
@@ -6,14 +6,14 @@ Original: [onPlayerChangeHealth](https://gothicmultiplayerteam.gitlab.io/docs/0.
## Parameters
* `dict` **kwargs**:
* `int` **playerid**: the id of the player whose health points gets changed.
- * `int` **oldHP**: the previous health points of the player.
- * `int` **newHP**: the new health points of the player.
+ * `int` **previous**: the previous health points of the player.
+ * `int` **current**: the new health points of the player.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeHealth')
-def onChangeHealth(**kwargs):
- print(f'Player {kwargs['playerid']} changed health: {kwargs['oldHP']} -> {kwargs['newHP']}')
+async def onChangeHealth(playerid, previous, current):
+ print(f'Player {playerid} changed health: {previous} -> {current}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeMana.md b/docs/defaultEvents/player/onPlayerChangeMana.md
similarity index 59%
rename from python/docs/defaultEvents/player/onPlayerChangeMana.md
rename to docs/defaultEvents/player/onPlayerChangeMana.md
index c53c01d..17ff417 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeMana.md
+++ b/docs/defaultEvents/player/onPlayerChangeMana.md
@@ -6,14 +6,14 @@ Original: [onPlayerChangeMana](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
## Parameters
* `dict` **kwargs**:
* `int` **playerid**: the id of the player mana points gets changed.
- * `int` **oldMP**: the previous mana points of the player.
- * `int` **newMP**: the new mana points of the player.
+ * `int` **previous**: the previous mana points of the player.
+ * `int` **current**: the new mana points of the player.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeMana')
-def onChangeMana(**kwargs):
- print(f'Player {kwargs['playerid']} changed mana: {kwargs['oldMP']} -> {kwargs['newMP']}')
+async def onChangeMana(playerid, previous, current):
+ print(f'Player {playerid} changed mana: {previous} -> {current}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeMaxHealth.md b/docs/defaultEvents/player/onPlayerChangeMaxHealth.md
similarity index 60%
rename from python/docs/defaultEvents/player/onPlayerChangeMaxHealth.md
rename to docs/defaultEvents/player/onPlayerChangeMaxHealth.md
index 33b8024..015b984 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeMaxHealth.md
+++ b/docs/defaultEvents/player/onPlayerChangeMaxHealth.md
@@ -6,14 +6,14 @@ Original: [onPlayerChangeMaxHealth](https://gothicmultiplayerteam.gitlab.io/docs
## Parameters
* `dict` **kwargs**:
* `int` **playerid**: the id of the player whose maxium health points gets changed.
- * `int` **oldMaxHP**: the previous maximum health points of the player.
- * `int` **newMaxHP**: the new maximum health points of the player.
+ * `int` **previous**: the previous maximum health points of the player.
+ * `int` **current**: the new maximum health points of the player.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeMaxHealth')
-def onChangeMaxHealth(**kwargs):
- print(f'Player {kwargs['playerid']} changed maximum health: {kwargs['oldMaxHP']} -> {kwargs['newMaxHP']}')
+async def onChangeMaxHealth(playerid, previous, current):
+ print(f'Player {playerid} changed maximum health: {previous} -> {current}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeMaxMana.md b/docs/defaultEvents/player/onPlayerChangeMaxMana.md
similarity index 60%
rename from python/docs/defaultEvents/player/onPlayerChangeMaxMana.md
rename to docs/defaultEvents/player/onPlayerChangeMaxMana.md
index e68ffc0..e807125 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeMaxMana.md
+++ b/docs/defaultEvents/player/onPlayerChangeMaxMana.md
@@ -6,14 +6,14 @@ Original: [onPlayerChangeMaxMana](https://gothicmultiplayerteam.gitlab.io/docs/0
## Parameters
* `dict` **kwargs**:
* `int` **playerid**: the id of the player maximum mana points gets changed.
- * `int` **oldMaxMP**: the previous maximum mana points of the player.
- * `int` **newMaxMP**: the new maximum mana points of the player.
+ * `int` **previous**: the previous maximum mana points of the player.
+ * `int` **current**: the new maximum mana points of the player.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeMaxMana')
-def onChangeMaxMana(**kwargs):
- print(f'Player {kwargs['playerid']} changed maximum mana: {kwargs['oldMaxMP']} -> {kwargs['newMaxMP']}')
+async def onChangeMaxMana(playerid, previous, current):
+ print(f'Player {playerid} changed maximum mana: {previous} -> {current}')
```
\ No newline at end of file
diff --git a/docs/defaultEvents/player/onPlayerChangeWeaponMode.md b/docs/defaultEvents/player/onPlayerChangeWeaponMode.md
new file mode 100644
index 0000000..f897c93
--- /dev/null
+++ b/docs/defaultEvents/player/onPlayerChangeWeaponMode.md
@@ -0,0 +1,19 @@
+# `event` onPlayerChangeWeaponMode
+This event is triggered when player changes the weapon mode.
+
+Original: [onPlayerChangeWeaponMode](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerChangeWeaponMode/)
+
+## Parameters
+* `dict` **kwargs**:
+ * `int` **playerid**: the id of the player which changes the weapon mode.
+ * `int` **previous**: the old weapon mode which was used by the player. For more information see [Weapon mode](../../constants/weapon-mode.md).
+ * `int` **current**: the new weapon mode in which player is currently using. For more information see [Weapon mode](../../constants/weapon-mode.md).
+
+## Usage
+```python
+import pyg2o as g2o
+
+@g2o.event('onPlayerChangeWeaponMode')
+async def onChangeWM(playerid, previous, current):
+ print(f'Player {playerid} changed wm: {previous} -> {current}')
+```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeWorld.md b/docs/defaultEvents/player/onPlayerChangeWorld.md
similarity index 81%
rename from python/docs/defaultEvents/player/onPlayerChangeWorld.md
rename to docs/defaultEvents/player/onPlayerChangeWorld.md
index 44c08b1..ca78f54 100644
--- a/python/docs/defaultEvents/player/onPlayerChangeWorld.md
+++ b/docs/defaultEvents/player/onPlayerChangeWorld.md
@@ -12,9 +12,9 @@ Original: [onPlayerChangeWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerChangeWorld')
-def onChangeWorld(**kwargs):
- print(f'Player {kwargs['playerid']} teleported to {kwargs['world']} at {kwargs['waypoint']}')
+async def onChangeWorld(playerid, world, waypoint):
+ print(f'Player {playerid} teleported to {world} at {waypoint}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerCommand.md b/docs/defaultEvents/player/onPlayerCommand.md
similarity index 79%
rename from python/docs/defaultEvents/player/onPlayerCommand.md
rename to docs/defaultEvents/player/onPlayerCommand.md
index c1977ff..8950aee 100644
--- a/python/docs/defaultEvents/player/onPlayerCommand.md
+++ b/docs/defaultEvents/player/onPlayerCommand.md
@@ -12,13 +12,13 @@ Original: [onPlayerCommand](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/s
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerCommand')
-def onCommand(**kwargs):
+async def onCommand(playerid, command, params):
# Spliting and formating params
- params = [eval(x) if not x.isalpha() else x for kwargs['params'].split()]
+ params = [eval(x) if not x.isalpha() else x for params.split()]
- if kwargs['command'] == 'add' and len(params) == 2:
+ if command == 'add' and len(params) == 2:
print('Sum is: ', params[0] + params[1]) # /add 5 10 -> output: Sum is 15
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerDamage.md b/docs/defaultEvents/player/onPlayerDamage.md
similarity index 83%
rename from python/docs/defaultEvents/player/onPlayerDamage.md
rename to docs/defaultEvents/player/onPlayerDamage.md
index 017cef0..9119e66 100644
--- a/python/docs/defaultEvents/player/onPlayerDamage.md
+++ b/docs/defaultEvents/player/onPlayerDamage.md
@@ -12,10 +12,9 @@ Original: [onPlayerDamage](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/sc
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerDamage')
-def onDamage(**kwargs):
- desc = kwargs['description']
- print(f'Ouch! Player {kwargs['playerid']} just received {desc.damage} damage.')
+async def onDamage(playerid, killerid, description):
+ print(f'Ouch! Player {playerid} just received {description.damage} damage.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerDead.md b/docs/defaultEvents/player/onPlayerDead.md
similarity index 83%
rename from python/docs/defaultEvents/player/onPlayerDead.md
rename to docs/defaultEvents/player/onPlayerDead.md
index 1805ddc..6ab1c04 100644
--- a/python/docs/defaultEvents/player/onPlayerDead.md
+++ b/docs/defaultEvents/player/onPlayerDead.md
@@ -10,9 +10,9 @@ Original: [onPlayerDead](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/scri
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerDead')
-def onDead(**kwargs):
- print(kwargs['playerid'], 'killed by', kwargs['killerid'])
+async def onDead(playerid, killerid):
+ print(playerid, 'killed by', killerid)
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerDisconnect.md b/docs/defaultEvents/player/onPlayerDisconnect.md
similarity index 83%
rename from python/docs/defaultEvents/player/onPlayerDisconnect.md
rename to docs/defaultEvents/player/onPlayerDisconnect.md
index 6591c4c..2cb50c3 100644
--- a/python/docs/defaultEvents/player/onPlayerDisconnect.md
+++ b/docs/defaultEvents/player/onPlayerDisconnect.md
@@ -10,9 +10,9 @@ Original: [onPlayerDisconnect](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerDisconnect')
-def onDC(**kwargs):
- print(f'Player {kwargs['playerid']} has left from the server')
+async def onDC(playerid, reason):
+ print(f'Player {playerid} has left from the server')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerDropItem.md b/docs/defaultEvents/player/onPlayerDropItem.md
similarity index 79%
rename from python/docs/defaultEvents/player/onPlayerDropItem.md
rename to docs/defaultEvents/player/onPlayerDropItem.md
index 578b622..b933634 100644
--- a/python/docs/defaultEvents/player/onPlayerDropItem.md
+++ b/docs/defaultEvents/player/onPlayerDropItem.md
@@ -11,10 +11,9 @@ Original: [onPlayerDropItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerDropItem')
-def onDropItem(**kwargs):
- item = itemm['itemGround']
- print(f'Player {kwargs['playerid']} dropped {item.instance} x{item.amount}')
+async def onDropItem(playerid, itemGround):
+ print(f'Player {playerid} dropped {itemGround.instance} x{itemGround.amount}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEnterWorld.md b/docs/defaultEvents/player/onPlayerEnterWorld.md
similarity index 81%
rename from python/docs/defaultEvents/player/onPlayerEnterWorld.md
rename to docs/defaultEvents/player/onPlayerEnterWorld.md
index 23c9c09..8e4a843 100644
--- a/python/docs/defaultEvents/player/onPlayerEnterWorld.md
+++ b/docs/defaultEvents/player/onPlayerEnterWorld.md
@@ -10,9 +10,9 @@ Original: [onPlayerEnterWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEnterWorld')
-def onEnterWorld(**kwargs):
- print(f'Player {kwargs['playerid']} entered world {kwargs['world']}')
+async def onEnterWorld(playerid, world):
+ print(f'Player {playerid} entered world {world}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipAmulet.md b/docs/defaultEvents/player/onPlayerEquipAmulet.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerEquipAmulet.md
rename to docs/defaultEvents/player/onPlayerEquipAmulet.md
index 62dff20..527c87c 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipAmulet.md
+++ b/docs/defaultEvents/player/onPlayerEquipAmulet.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipAmulet](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipAmulet')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipArmor.md b/docs/defaultEvents/player/onPlayerEquipArmor.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerEquipArmor.md
rename to docs/defaultEvents/player/onPlayerEquipArmor.md
index 6854e2a..29350cc 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipArmor.md
+++ b/docs/defaultEvents/player/onPlayerEquipArmor.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipArmor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipArmor')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipBelt.md b/docs/defaultEvents/player/onPlayerEquipBelt.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerEquipBelt.md
rename to docs/defaultEvents/player/onPlayerEquipBelt.md
index 469bf79..ca41ee8 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipBelt.md
+++ b/docs/defaultEvents/player/onPlayerEquipBelt.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipBelt](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipBelt')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipHandItem.md b/docs/defaultEvents/player/onPlayerEquipHandItem.md
similarity index 84%
rename from python/docs/defaultEvents/player/onPlayerEquipHandItem.md
rename to docs/defaultEvents/player/onPlayerEquipHandItem.md
index 04437f8..aefa5c0 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipHandItem.md
+++ b/docs/defaultEvents/player/onPlayerEquipHandItem.md
@@ -11,9 +11,9 @@ Original: [onPlayerEquipHandItem](https://gothicmultiplayerteam.gitlab.io/docs/0
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipHandItem')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} has {kwargs['instance']}, used hand with id {kwargs['hand']}')
+async def onEquip(playerid, hand, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipHelmet.md b/docs/defaultEvents/player/onPlayerEquipHelmet.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerEquipHelmet.md
rename to docs/defaultEvents/player/onPlayerEquipHelmet.md
index 6d11b31..5b16101 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipHelmet.md
+++ b/docs/defaultEvents/player/onPlayerEquipHelmet.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipHelmet](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipHelmet')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md b/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md
similarity index 83%
rename from python/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md
rename to docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md
index 41a7ecc..fe0e556 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md
+++ b/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipMeleeWeapon](https://gothicmultiplayerteam.gitlab.io/doc
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipMeleeWeapon')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md b/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md
similarity index 83%
rename from python/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md
rename to docs/defaultEvents/player/onPlayerEquipRangedWeapon.md
index 0315a9b..9b67d70 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md
+++ b/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipRangedWeapon](https://gothicmultiplayerteam.gitlab.io/do
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipRangedWeapon')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipRing.md b/docs/defaultEvents/player/onPlayerEquipRing.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerEquipRing.md
rename to docs/defaultEvents/player/onPlayerEquipRing.md
index 0fd08e6..cb91174 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipRing.md
+++ b/docs/defaultEvents/player/onPlayerEquipRing.md
@@ -11,9 +11,9 @@ Original: [onPlayerEquipRing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipRing')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} has {kwargs['instance']}, used hand with id {kwargs['hand']}')
+async def onEquip(playerid, hand, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipShield.md b/docs/defaultEvents/player/onPlayerEquipShield.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerEquipShield.md
rename to docs/defaultEvents/player/onPlayerEquipShield.md
index 2098ef0..bf6245f 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipShield.md
+++ b/docs/defaultEvents/player/onPlayerEquipShield.md
@@ -10,9 +10,9 @@ Original: [onPlayerEquipShield](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerEquipShield')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped {kwargs['instance']}')
+async def onEquip(playerid, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerEquipSpell.md b/docs/defaultEvents/player/onPlayerEquipSpell.md
similarity index 81%
rename from python/docs/defaultEvents/player/onPlayerEquipSpell.md
rename to docs/defaultEvents/player/onPlayerEquipSpell.md
index c4cc779..c90de19 100644
--- a/python/docs/defaultEvents/player/onPlayerEquipSpell.md
+++ b/docs/defaultEvents/player/onPlayerEquipSpell.md
@@ -11,9 +11,9 @@ Original: [onPlayerEquipSpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerSpell')
-def onEquip(**kwargs):
- print(f'Player {kwargs['playerid']} equipped spell {kwargs['instance']} at slot {kwargs['slotId']}')
+async def onEquip(playerid, slotId, instance):
+ print(f'Player {playerid} equipped {instance}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerJoin.md b/docs/defaultEvents/player/onPlayerJoin.md
similarity index 77%
rename from python/docs/defaultEvents/player/onPlayerJoin.md
rename to docs/defaultEvents/player/onPlayerJoin.md
index db1ff15..630702d 100644
--- a/python/docs/defaultEvents/player/onPlayerJoin.md
+++ b/docs/defaultEvents/player/onPlayerJoin.md
@@ -9,9 +9,9 @@ Original: [onPlayerJoin](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/scri
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerJoin')
-def onJoin(**kwargs):
- print(kwargs['playerid'], 'joined to the server.')
+async def onJoin(playerid):
+ print(pyg2o.getPlayerName(playerid), ' joined to the server.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerMessage.md b/docs/defaultEvents/player/onPlayerMessage.md
similarity index 79%
rename from python/docs/defaultEvents/player/onPlayerMessage.md
rename to docs/defaultEvents/player/onPlayerMessage.md
index a94cf0b..63a4792 100644
--- a/python/docs/defaultEvents/player/onPlayerMessage.md
+++ b/docs/defaultEvents/player/onPlayerMessage.md
@@ -10,9 +10,9 @@ Original: [onPlayerMessage](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/s
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerMessage')
-def onMessage(**kwargs):
- print(kwargs['playerid'], 'says', kwargs['message'])
+async def onMessage(playerid, message):
+ print(pyg2o.getPlayerName(playerid), ' says ', message)
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerMobInteract.md b/docs/defaultEvents/player/onPlayerMobInteract.md
similarity index 83%
rename from python/docs/defaultEvents/player/onPlayerMobInteract.md
rename to docs/defaultEvents/player/onPlayerMobInteract.md
index c8e28d1..c7cb3d7 100644
--- a/python/docs/defaultEvents/player/onPlayerMobInteract.md
+++ b/docs/defaultEvents/player/onPlayerMobInteract.md
@@ -10,10 +10,10 @@ Original: [onPlayerMobInteract](https://gothicmultiplayerteam.gitlab.io/docs/0.3
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerMobInteract')
-def onMobInteract(**kwargs):
- if kwargs['to'] == 1:
- print(kwargs['playerid'], 'started interaction with the MOB')
+async def onMobInteract(playerid, from, to):
+ if to == 1:
+ print(playerid, 'started interaction with the MOB')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerRespawn.md b/docs/defaultEvents/player/onPlayerRespawn.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerRespawn.md
rename to docs/defaultEvents/player/onPlayerRespawn.md
index a8f0656..8ad5c9d 100644
--- a/python/docs/defaultEvents/player/onPlayerRespawn.md
+++ b/docs/defaultEvents/player/onPlayerRespawn.md
@@ -9,9 +9,9 @@ Original: [onPlayerRespawn](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/s
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerRespawn')
-def onRespawn(**kwargs):
- print(kwargs['playerid'], 'respawned.')
+async def onRespawn(playerid):
+ print(playerid, 'respawned.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerShoot.md b/docs/defaultEvents/player/onPlayerShoot.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerShoot.md
rename to docs/defaultEvents/player/onPlayerShoot.md
index eac507c..6a78ca7 100644
--- a/python/docs/defaultEvents/player/onPlayerShoot.md
+++ b/docs/defaultEvents/player/onPlayerShoot.md
@@ -10,9 +10,9 @@ Original: [onPlayerShoot](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/scr
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerShoot')
-def onShoot(**kwargs):
- print(kwargs['playerid'], 'made a shot.')
+async def onShoot(playerid, munition):
+ print(playerid, 'made a shot.')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerSpellCast.md b/docs/defaultEvents/player/onPlayerSpellCast.md
similarity index 86%
rename from python/docs/defaultEvents/player/onPlayerSpellCast.md
rename to docs/defaultEvents/player/onPlayerSpellCast.md
index c39c5c0..8458d6f 100644
--- a/python/docs/defaultEvents/player/onPlayerSpellCast.md
+++ b/docs/defaultEvents/player/onPlayerSpellCast.md
@@ -15,9 +15,9 @@ Original: [onPlayerSpellCast](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerSpellCast')
-def onSpellCast(**kwargs):
- print(kwargs['player'], 'casted a spell', kwargs['instance'])
+async def onSpellCast(playerid, instance, spellLevel):
+ print(playerid, 'casted a spell', instance)
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerSpellSetup.md b/docs/defaultEvents/player/onPlayerSpellSetup.md
similarity index 80%
rename from python/docs/defaultEvents/player/onPlayerSpellSetup.md
rename to docs/defaultEvents/player/onPlayerSpellSetup.md
index 5afaccb..abb500b 100644
--- a/python/docs/defaultEvents/player/onPlayerSpellSetup.md
+++ b/docs/defaultEvents/player/onPlayerSpellSetup.md
@@ -10,9 +10,9 @@ Original: [onPlayerSpellSetup](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerSpellSetup')
-def onSpellSetup(**kwargs):
- print(kwargs['player'], 'setuped a spell', kwargs['instance'])
+async def onSpellSetup(playerid, instance):
+ print(playerid, 'setuped a spell', instance)
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerTakeItem.md b/docs/defaultEvents/player/onPlayerTakeItem.md
similarity index 85%
rename from python/docs/defaultEvents/player/onPlayerTakeItem.md
rename to docs/defaultEvents/player/onPlayerTakeItem.md
index 31acf84..cd6addb 100644
--- a/python/docs/defaultEvents/player/onPlayerTakeItem.md
+++ b/docs/defaultEvents/player/onPlayerTakeItem.md
@@ -14,10 +14,9 @@ Original: [onPlayerTakeItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerTakeItem')
-def onTakeItem(**kwargs):
- item = itemm['itemGround']
- print(f'Player {kwargs['playerid']} took {item.instance} x{item.amount}')
+async def onTakeItem(playerid, itemGround):
+ print(f'Player {playerid} took {itemGround.instance} x{itemGround.amount}')
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerTeleport.md b/docs/defaultEvents/player/onPlayerTeleport.md
similarity index 82%
rename from python/docs/defaultEvents/player/onPlayerTeleport.md
rename to docs/defaultEvents/player/onPlayerTeleport.md
index 3a7a91f..3ae38fe 100644
--- a/python/docs/defaultEvents/player/onPlayerTeleport.md
+++ b/docs/defaultEvents/player/onPlayerTeleport.md
@@ -10,9 +10,9 @@ Original: [onPlayerTeleport](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/
## Usage
```python
-import g2o
+import pyg2o as g2o
@g2o.event('onPlayerTeleport')
-def onTeleport(**kwargs):
- print(kwargs['player'], 'teleported to', kwargs['vobName'])
+async def onTeleport(playerid, vobName):
+ print(playerid, 'teleported to', vobName)
```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerToggleFaceAni.md b/docs/defaultEvents/player/onPlayerToggleFaceAni.md
similarity index 84%
rename from python/docs/defaultEvents/player/onPlayerToggleFaceAni.md
rename to docs/defaultEvents/player/onPlayerToggleFaceAni.md
index 702e1b9..51c472b 100644
--- a/python/docs/defaultEvents/player/onPlayerToggleFaceAni.md
+++ b/docs/defaultEvents/player/onPlayerToggleFaceAni.md
@@ -14,7 +14,7 @@ Original: [onPlayerToggleFaceAni](https://gothicmultiplayerteam.gitlab.io/docs/0
import g2o
@g2o.event('onPlayerToggleFaceAni')
-def onToggleFA(**kwargs):
- if kwargs['toggle']:
- print(kwargs['player'], 'started face ani',kwargs['aniName'])
+async def onToggleFA(playerid, aniName, toggle):
+ if toggle:
+ print(playerid, 'started face ani', aniName)
```
\ No newline at end of file
diff --git a/docs/functions/chat/sendMessageToAll.md b/docs/functions/chat/sendMessageToAll.md
new file mode 100644
index 0000000..7abba91
--- /dev/null
+++ b/docs/functions/chat/sendMessageToAll.md
@@ -0,0 +1,2 @@
+# `function` sendMessageToAll
+::: src.pyg2o.functions.chat.sendMessageToAll
\ No newline at end of file
diff --git a/docs/functions/chat/sendMessageToPlayer.md b/docs/functions/chat/sendMessageToPlayer.md
new file mode 100644
index 0000000..a685748
--- /dev/null
+++ b/docs/functions/chat/sendMessageToPlayer.md
@@ -0,0 +1,2 @@
+# `function` sendMessageToPlayer
+::: src.pyg2o.functions.chat.sendMessageToPlayer
\ No newline at end of file
diff --git a/docs/functions/chat/sendPlayerMessageToAll.md b/docs/functions/chat/sendPlayerMessageToAll.md
new file mode 100644
index 0000000..a5ae015
--- /dev/null
+++ b/docs/functions/chat/sendPlayerMessageToAll.md
@@ -0,0 +1,2 @@
+# `function` sendPlayerMessageToAll
+::: src.pyg2o.functions.chat.sendPlayerMessageToAll
\ No newline at end of file
diff --git a/docs/functions/chat/sendPlayerMessageToPlayer.md b/docs/functions/chat/sendPlayerMessageToPlayer.md
new file mode 100644
index 0000000..1c51460
--- /dev/null
+++ b/docs/functions/chat/sendPlayerMessageToPlayer.md
@@ -0,0 +1,2 @@
+# `function` sendPlayerMessageToPlayer
+::: src.pyg2o.functions.chat.sendPlayerMessageToPlayer
\ No newline at end of file
diff --git a/docs/functions/event/addEvent.md b/docs/functions/event/addEvent.md
new file mode 100644
index 0000000..2be33d0
--- /dev/null
+++ b/docs/functions/event/addEvent.md
@@ -0,0 +1,2 @@
+# `function` addEvent
+::: src.pyg2o.functions.event.addEvent
\ No newline at end of file
diff --git a/docs/functions/event/callEvent.md b/docs/functions/event/callEvent.md
new file mode 100644
index 0000000..ce90251
--- /dev/null
+++ b/docs/functions/event/callEvent.md
@@ -0,0 +1,2 @@
+# `function` callEvent
+::: src.pyg2o.functions.event.callEvent
\ No newline at end of file
diff --git a/docs/functions/event/event.md b/docs/functions/event/event.md
new file mode 100644
index 0000000..d2abff5
--- /dev/null
+++ b/docs/functions/event/event.md
@@ -0,0 +1,2 @@
+# `function` event
+::: src.pyg2o.functions.event.event
\ No newline at end of file
diff --git a/docs/functions/event/removeEvent.md b/docs/functions/event/removeEvent.md
new file mode 100644
index 0000000..2a23e87
--- /dev/null
+++ b/docs/functions/event/removeEvent.md
@@ -0,0 +1,2 @@
+# `function` removeEvent
+::: src.pyg2o.functions.event.removeEvent
\ No newline at end of file
diff --git a/docs/functions/event/removeEventHandler.md b/docs/functions/event/removeEventHandler.md
new file mode 100644
index 0000000..2af917a
--- /dev/null
+++ b/docs/functions/event/removeEventHandler.md
@@ -0,0 +1,2 @@
+# `function` removeEventHandler
+::: src.pyg2o.functions.event.removeEventHandler
\ No newline at end of file
diff --git a/docs/functions/event/toggleEvent.md b/docs/functions/event/toggleEvent.md
new file mode 100644
index 0000000..d734e0f
--- /dev/null
+++ b/docs/functions/event/toggleEvent.md
@@ -0,0 +1,2 @@
+# `function` toggleEvent
+::: src.pyg2o.functions.event.toggleEvent
\ No newline at end of file
diff --git a/docs/functions/game/exit.md b/docs/functions/game/exit.md
new file mode 100644
index 0000000..63eb8a8
--- /dev/null
+++ b/docs/functions/game/exit.md
@@ -0,0 +1,2 @@
+# `function` exit
+::: src.pyg2o.functions.game.exit
\ No newline at end of file
diff --git a/docs/functions/game/getDayLength.md b/docs/functions/game/getDayLength.md
new file mode 100644
index 0000000..00c8ad6
--- /dev/null
+++ b/docs/functions/game/getDayLength.md
@@ -0,0 +1,2 @@
+# `function` getDayLength
+::: src.pyg2o.functions.game.getDayLength
\ No newline at end of file
diff --git a/docs/functions/game/getHostname.md b/docs/functions/game/getHostname.md
new file mode 100644
index 0000000..260f6a4
--- /dev/null
+++ b/docs/functions/game/getHostname.md
@@ -0,0 +1,2 @@
+# `function` getHostname
+::: src.pyg2o.functions.game.getHostname
\ No newline at end of file
diff --git a/docs/functions/game/getMaxSlots.md b/docs/functions/game/getMaxSlots.md
new file mode 100644
index 0000000..b5c1b46
--- /dev/null
+++ b/docs/functions/game/getMaxSlots.md
@@ -0,0 +1,2 @@
+# `function` getMaxSlots
+::: src.pyg2o.functions.game.getMaxSlots
\ No newline at end of file
diff --git a/docs/functions/game/getPlayersCount.md b/docs/functions/game/getPlayersCount.md
new file mode 100644
index 0000000..a7e193b
--- /dev/null
+++ b/docs/functions/game/getPlayersCount.md
@@ -0,0 +1,2 @@
+# `function` getPlayersCount
+::: src.pyg2o.functions.game.getPlayersCount
\ No newline at end of file
diff --git a/docs/functions/game/getServerDescription.md b/docs/functions/game/getServerDescription.md
new file mode 100644
index 0000000..c2a91b7
--- /dev/null
+++ b/docs/functions/game/getServerDescription.md
@@ -0,0 +1,2 @@
+# `function` getServerDescription
+::: src.pyg2o.functions.game.getServerDescription
\ No newline at end of file
diff --git a/docs/functions/game/getServerWorld.md b/docs/functions/game/getServerWorld.md
new file mode 100644
index 0000000..20fcc7d
--- /dev/null
+++ b/docs/functions/game/getServerWorld.md
@@ -0,0 +1,2 @@
+# `function` getServerWorld
+::: src.pyg2o.functions.game.getServerWorld
\ No newline at end of file
diff --git a/docs/functions/game/getTime.md b/docs/functions/game/getTime.md
new file mode 100644
index 0000000..c4e13c6
--- /dev/null
+++ b/docs/functions/game/getTime.md
@@ -0,0 +1,2 @@
+# `function` getTime
+::: src.pyg2o.functions.game.getTime
\ No newline at end of file
diff --git a/docs/functions/game/serverLog.md b/docs/functions/game/serverLog.md
new file mode 100644
index 0000000..99a9903
--- /dev/null
+++ b/docs/functions/game/serverLog.md
@@ -0,0 +1,2 @@
+# `function` serverLog
+::: src.pyg2o.functions.game.serverLog
\ No newline at end of file
diff --git a/docs/functions/game/setDayLength.md b/docs/functions/game/setDayLength.md
new file mode 100644
index 0000000..18cc6a4
--- /dev/null
+++ b/docs/functions/game/setDayLength.md
@@ -0,0 +1,2 @@
+# `function` setDayLength
+::: src.pyg2o.functions.game.setDayLength
\ No newline at end of file
diff --git a/docs/functions/game/setServerDescription.md b/docs/functions/game/setServerDescription.md
new file mode 100644
index 0000000..4613d6f
--- /dev/null
+++ b/docs/functions/game/setServerDescription.md
@@ -0,0 +1,2 @@
+# `function` setServerDescription
+::: src.pyg2o.functions.game.setServerDescription
\ No newline at end of file
diff --git a/docs/functions/game/setServerWorld.md b/docs/functions/game/setServerWorld.md
new file mode 100644
index 0000000..60ecc11
--- /dev/null
+++ b/docs/functions/game/setServerWorld.md
@@ -0,0 +1,2 @@
+# `function` setServerWorld
+::: src.pyg2o.functions.game.setServerWorld
\ No newline at end of file
diff --git a/docs/functions/game/setTime.md b/docs/functions/game/setTime.md
new file mode 100644
index 0000000..0907d93
--- /dev/null
+++ b/docs/functions/game/setTime.md
@@ -0,0 +1,2 @@
+# `function` setTime
+::: src.pyg2o.functions.game.setTime
\ No newline at end of file
diff --git a/docs/functions/npc/clearNpcActions.md b/docs/functions/npc/clearNpcActions.md
new file mode 100644
index 0000000..4224d04
--- /dev/null
+++ b/docs/functions/npc/clearNpcActions.md
@@ -0,0 +1,2 @@
+# `function` clearNpcActions
+::: src.pyg2o.functions.npc.clearNpcActions
\ No newline at end of file
diff --git a/docs/functions/npc/createNpc.md b/docs/functions/npc/createNpc.md
new file mode 100644
index 0000000..eef6e58
--- /dev/null
+++ b/docs/functions/npc/createNpc.md
@@ -0,0 +1,2 @@
+# `function` createNpc
+::: src.pyg2o.functions.npc.createNpc
\ No newline at end of file
diff --git a/docs/functions/npc/destroyNpc.md b/docs/functions/npc/destroyNpc.md
new file mode 100644
index 0000000..105d618
--- /dev/null
+++ b/docs/functions/npc/destroyNpc.md
@@ -0,0 +1,2 @@
+# `function` destroyNpc
+::: src.pyg2o.functions.npc.destroyNpc
\ No newline at end of file
diff --git a/docs/functions/npc/getNpcAction.md b/docs/functions/npc/getNpcAction.md
new file mode 100644
index 0000000..3271f5b
--- /dev/null
+++ b/docs/functions/npc/getNpcAction.md
@@ -0,0 +1,2 @@
+# `function` getNpcAction
+::: src.pyg2o.functions.npc.getNpcAction
\ No newline at end of file
diff --git a/docs/functions/npc/getNpcActions.md b/docs/functions/npc/getNpcActions.md
new file mode 100644
index 0000000..81480ab
--- /dev/null
+++ b/docs/functions/npc/getNpcActions.md
@@ -0,0 +1,2 @@
+# `function` getNpcActions
+::: src.pyg2o.functions.npc.getNpcActions
\ No newline at end of file
diff --git a/docs/functions/npc/getNpcActionsCount.md b/docs/functions/npc/getNpcActionsCount.md
new file mode 100644
index 0000000..9f23287
--- /dev/null
+++ b/docs/functions/npc/getNpcActionsCount.md
@@ -0,0 +1,2 @@
+# `function` getNpcActionsCount
+::: src.pyg2o.functions.npc.getNpcActionsCount
\ No newline at end of file
diff --git a/docs/functions/npc/getNpcHostPlayer.md b/docs/functions/npc/getNpcHostPlayer.md
new file mode 100644
index 0000000..b4c5d84
--- /dev/null
+++ b/docs/functions/npc/getNpcHostPlayer.md
@@ -0,0 +1,2 @@
+# `function` getNpcHostPlayer
+::: src.pyg2o.functions.npc.getNpcHostPlayer
\ No newline at end of file
diff --git a/docs/functions/npc/getNpcLastActionId.md b/docs/functions/npc/getNpcLastActionId.md
new file mode 100644
index 0000000..0ab0cde
--- /dev/null
+++ b/docs/functions/npc/getNpcLastActionId.md
@@ -0,0 +1,2 @@
+# `function` getNpcLastActionId
+::: src.pyg2o.functions.npc.getNpcLastActionId
\ No newline at end of file
diff --git a/docs/functions/npc/isNpc.md b/docs/functions/npc/isNpc.md
new file mode 100644
index 0000000..34939e2
--- /dev/null
+++ b/docs/functions/npc/isNpc.md
@@ -0,0 +1,2 @@
+# `function` isNpc
+::: src.pyg2o.functions.npc.isNpc
\ No newline at end of file
diff --git a/docs/functions/npc/isNpcActionFinished.md b/docs/functions/npc/isNpcActionFinished.md
new file mode 100644
index 0000000..c8f43b9
--- /dev/null
+++ b/docs/functions/npc/isNpcActionFinished.md
@@ -0,0 +1,2 @@
+# `function` isNpcActionFinished
+::: src.pyg2o.functions.npc.isNpcActionFinished
\ No newline at end of file
diff --git a/docs/functions/npc/npcAttackMelee.md b/docs/functions/npc/npcAttackMelee.md
new file mode 100644
index 0000000..2cb52df
--- /dev/null
+++ b/docs/functions/npc/npcAttackMelee.md
@@ -0,0 +1,2 @@
+# `function` npcAttackMelee
+::: src.pyg2o.functions.npc.npcAttackMelee
\ No newline at end of file
diff --git a/docs/functions/npc/npcAttackRanged.md b/docs/functions/npc/npcAttackRanged.md
new file mode 100644
index 0000000..b3b751d
--- /dev/null
+++ b/docs/functions/npc/npcAttackRanged.md
@@ -0,0 +1,2 @@
+# `function` npcAttackRanged
+::: src.pyg2o.functions.npc.npcAttackRanged
\ No newline at end of file
diff --git a/docs/functions/npc/npcSpellCast.md b/docs/functions/npc/npcSpellCast.md
new file mode 100644
index 0000000..2944f58
--- /dev/null
+++ b/docs/functions/npc/npcSpellCast.md
@@ -0,0 +1,2 @@
+# `function` npcSpellCast
+::: src.pyg2o.functions.npc.npcSpellCast
\ No newline at end of file
diff --git a/docs/functions/npc/npcUseClosestMob.md b/docs/functions/npc/npcUseClosestMob.md
new file mode 100644
index 0000000..7bb175a
--- /dev/null
+++ b/docs/functions/npc/npcUseClosestMob.md
@@ -0,0 +1,2 @@
+# `function` npcUseClosestMob
+::: src.pyg2o.functions.npc.npcUseClosestMob
\ No newline at end of file
diff --git a/docs/functions/npc/setNpcHostPlayer.md b/docs/functions/npc/setNpcHostPlayer.md
new file mode 100644
index 0000000..038a3ed
--- /dev/null
+++ b/docs/functions/npc/setNpcHostPlayer.md
@@ -0,0 +1,2 @@
+# `function` setNpcHostPlayer
+::: src.pyg2o.functions.npc.setNpcHostPlayer
\ No newline at end of file
diff --git a/docs/functions/player/addBan.md b/docs/functions/player/addBan.md
new file mode 100644
index 0000000..47b8910
--- /dev/null
+++ b/docs/functions/player/addBan.md
@@ -0,0 +1,2 @@
+#`function` addBan
+::: src.pyg2o.functions.player.addBan
\ No newline at end of file
diff --git a/docs/functions/player/applyPlayerOverlay.md b/docs/functions/player/applyPlayerOverlay.md
new file mode 100644
index 0000000..48a6524
--- /dev/null
+++ b/docs/functions/player/applyPlayerOverlay.md
@@ -0,0 +1,2 @@
+#`function` applyPlayerOverlay
+::: src.pyg2o.functions.player.applyPlayerOverlay
\ No newline at end of file
diff --git a/docs/functions/player/ban.md b/docs/functions/player/ban.md
new file mode 100644
index 0000000..30aafa1
--- /dev/null
+++ b/docs/functions/player/ban.md
@@ -0,0 +1,2 @@
+#`function` ban
+::: src.pyg2o.functions.player.ban
\ No newline at end of file
diff --git a/docs/functions/player/drawWeapon.md b/docs/functions/player/drawWeapon.md
new file mode 100644
index 0000000..9b0cd5c
--- /dev/null
+++ b/docs/functions/player/drawWeapon.md
@@ -0,0 +1,2 @@
+#`function` drawWeapon
+::: src.pyg2o.functions.player.drawWeapon
\ No newline at end of file
diff --git a/docs/functions/player/equipItem.md b/docs/functions/player/equipItem.md
new file mode 100644
index 0000000..800a592
--- /dev/null
+++ b/docs/functions/player/equipItem.md
@@ -0,0 +1,2 @@
+#`function` equipItem
+::: src.pyg2o.functions.player.equipItem
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerAmulet.md b/docs/functions/player/getPlayerAmulet.md
new file mode 100644
index 0000000..701e7dd
--- /dev/null
+++ b/docs/functions/player/getPlayerAmulet.md
@@ -0,0 +1,2 @@
+#`function` getPlayerAmulet
+::: src.pyg2o.functions.player.getPlayerAmulet
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerAngle.md b/docs/functions/player/getPlayerAngle.md
new file mode 100644
index 0000000..97011eb
--- /dev/null
+++ b/docs/functions/player/getPlayerAngle.md
@@ -0,0 +1,2 @@
+#`function` getPlayerAngle
+::: src.pyg2o.functions.player.getPlayerAngle
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerAni.md b/docs/functions/player/getPlayerAni.md
new file mode 100644
index 0000000..2354d68
--- /dev/null
+++ b/docs/functions/player/getPlayerAni.md
@@ -0,0 +1,2 @@
+#`function` getPlayerAni
+::: src.pyg2o.functions.player.getPlayerAni
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerArmor.md b/docs/functions/player/getPlayerArmor.md
new file mode 100644
index 0000000..1e9de82
--- /dev/null
+++ b/docs/functions/player/getPlayerArmor.md
@@ -0,0 +1,2 @@
+#`function` getPlayerArmor
+::: src.pyg2o.functions.player.getPlayerArmor
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerAtVector.md b/docs/functions/player/getPlayerAtVector.md
new file mode 100644
index 0000000..3b6e191
--- /dev/null
+++ b/docs/functions/player/getPlayerAtVector.md
@@ -0,0 +1,2 @@
+#`function` getPlayerAtVector
+::: src.pyg2o.functions.player.getPlayerAtVector
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerBelt.md b/docs/functions/player/getPlayerBelt.md
new file mode 100644
index 0000000..76acbd1
--- /dev/null
+++ b/docs/functions/player/getPlayerBelt.md
@@ -0,0 +1,2 @@
+#`function` getPlayerBelt
+::: src.pyg2o.functions.player.getPlayerBelt
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerCameraPosition.md b/docs/functions/player/getPlayerCameraPosition.md
new file mode 100644
index 0000000..42e8632
--- /dev/null
+++ b/docs/functions/player/getPlayerCameraPosition.md
@@ -0,0 +1,2 @@
+#`function` getPlayerCameraPosition
+::: src.pyg2o.functions.player.getPlayerCameraPosition
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerCollision.md b/docs/functions/player/getPlayerCollision.md
new file mode 100644
index 0000000..6dd79a7
--- /dev/null
+++ b/docs/functions/player/getPlayerCollision.md
@@ -0,0 +1,2 @@
+#`function` getPlayerCollision
+::: src.pyg2o.functions.player.getPlayerCollision
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerColor.md b/docs/functions/player/getPlayerColor.md
new file mode 100644
index 0000000..d86b523
--- /dev/null
+++ b/docs/functions/player/getPlayerColor.md
@@ -0,0 +1,2 @@
+#`function` getPlayerColor
+::: src.pyg2o.functions.player.getPlayerColor
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerContext.md b/docs/functions/player/getPlayerContext.md
new file mode 100644
index 0000000..39a6d1c
--- /dev/null
+++ b/docs/functions/player/getPlayerContext.md
@@ -0,0 +1,2 @@
+#`function` getPlayerContext
+::: src.pyg2o.functions.player.getPlayerContext
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerDexterity.md b/docs/functions/player/getPlayerDexterity.md
new file mode 100644
index 0000000..40d9471
--- /dev/null
+++ b/docs/functions/player/getPlayerDexterity.md
@@ -0,0 +1,2 @@
+#`function` getPlayerDexterity
+::: src.pyg2o.functions.player.getPlayerDexterity
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerFaceAnis.md b/docs/functions/player/getPlayerFaceAnis.md
new file mode 100644
index 0000000..df0295b
--- /dev/null
+++ b/docs/functions/player/getPlayerFaceAnis.md
@@ -0,0 +1,2 @@
+#`function` getPlayerFaceAnis
+::: src.pyg2o.functions.player.getPlayerFaceAnis
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerFatness.md b/docs/functions/player/getPlayerFatness.md
new file mode 100644
index 0000000..6b2f95e
--- /dev/null
+++ b/docs/functions/player/getPlayerFatness.md
@@ -0,0 +1,2 @@
+#`function` getPlayerFatness
+::: src.pyg2o.functions.player.getPlayerFatness
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerFocus.md b/docs/functions/player/getPlayerFocus.md
new file mode 100644
index 0000000..27d572a
--- /dev/null
+++ b/docs/functions/player/getPlayerFocus.md
@@ -0,0 +1,2 @@
+#`function` getPlayerFocus
+::: src.pyg2o.functions.player.getPlayerFocus
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerHealth.md b/docs/functions/player/getPlayerHealth.md
new file mode 100644
index 0000000..340b6c0
--- /dev/null
+++ b/docs/functions/player/getPlayerHealth.md
@@ -0,0 +1,2 @@
+#`function` getPlayerHealth
+::: src.pyg2o.functions.player.getPlayerHealth
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerHelmet.md b/docs/functions/player/getPlayerHelmet.md
new file mode 100644
index 0000000..afcfd9e
--- /dev/null
+++ b/docs/functions/player/getPlayerHelmet.md
@@ -0,0 +1,2 @@
+#`function` getPlayerHelmet
+::: src.pyg2o.functions.player.getPlayerHelmet
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerIP.md b/docs/functions/player/getPlayerIP.md
new file mode 100644
index 0000000..9b7e7d8
--- /dev/null
+++ b/docs/functions/player/getPlayerIP.md
@@ -0,0 +1,2 @@
+#`function` getPlayerIP
+::: src.pyg2o.functions.player.getPlayerIP
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerInstance.md b/docs/functions/player/getPlayerInstance.md
new file mode 100644
index 0000000..a6a65ad
--- /dev/null
+++ b/docs/functions/player/getPlayerInstance.md
@@ -0,0 +1,2 @@
+#`function` getPlayerInstance
+::: src.pyg2o.functions.player.getPlayerInstance
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerInvisible.md b/docs/functions/player/getPlayerInvisible.md
new file mode 100644
index 0000000..6743e74
--- /dev/null
+++ b/docs/functions/player/getPlayerInvisible.md
@@ -0,0 +1,2 @@
+#`function` getPlayerInvisible
+::: src.pyg2o.functions.player.getPlayerInvisible
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerMacAddr.md b/docs/functions/player/getPlayerMacAddr.md
new file mode 100644
index 0000000..b7d5f40
--- /dev/null
+++ b/docs/functions/player/getPlayerMacAddr.md
@@ -0,0 +1,2 @@
+#`function` getPlayerMacAddr
+::: src.pyg2o.functions.player.getPlayerMacAddr
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerMana.md b/docs/functions/player/getPlayerMana.md
new file mode 100644
index 0000000..905d716
--- /dev/null
+++ b/docs/functions/player/getPlayerMana.md
@@ -0,0 +1,2 @@
+#`function` getPlayerMana
+::: src.pyg2o.functions.player.getPlayerMana
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerMaxHealth.md b/docs/functions/player/getPlayerMaxHealth.md
new file mode 100644
index 0000000..05bdae7
--- /dev/null
+++ b/docs/functions/player/getPlayerMaxHealth.md
@@ -0,0 +1,2 @@
+#`function` getPlayerMaxHealth
+::: src.pyg2o.functions.player.getPlayerMaxHealth
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerMaxMana.md b/docs/functions/player/getPlayerMaxMana.md
new file mode 100644
index 0000000..13626ad
--- /dev/null
+++ b/docs/functions/player/getPlayerMaxMana.md
@@ -0,0 +1,2 @@
+#`function` getPlayerMaxMana
+::: src.pyg2o.functions.player.getPlayerMaxMana
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerMeleeWeapon.md b/docs/functions/player/getPlayerMeleeWeapon.md
new file mode 100644
index 0000000..a8da63d
--- /dev/null
+++ b/docs/functions/player/getPlayerMeleeWeapon.md
@@ -0,0 +1,2 @@
+#`function` getPlayerMeleeWeapon
+::: src.pyg2o.functions.player.getPlayerMeleeWeapon
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerName.md b/docs/functions/player/getPlayerName.md
new file mode 100644
index 0000000..f02c11b
--- /dev/null
+++ b/docs/functions/player/getPlayerName.md
@@ -0,0 +1,2 @@
+#`function` getPlayerName
+::: src.pyg2o.functions.player.getPlayerName
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerPing.md b/docs/functions/player/getPlayerPing.md
new file mode 100644
index 0000000..fddcd4a
--- /dev/null
+++ b/docs/functions/player/getPlayerPing.md
@@ -0,0 +1,2 @@
+#`function` getPlayerPing
+::: src.pyg2o.functions.player.getPlayerPing
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerPosition.md b/docs/functions/player/getPlayerPosition.md
new file mode 100644
index 0000000..bc6fd3f
--- /dev/null
+++ b/docs/functions/player/getPlayerPosition.md
@@ -0,0 +1,2 @@
+#`function` getPlayerPosition
+::: src.pyg2o.functions.player.getPlayerPosition
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerRangedWeapon.md b/docs/functions/player/getPlayerRangedWeapon.md
new file mode 100644
index 0000000..f8657af
--- /dev/null
+++ b/docs/functions/player/getPlayerRangedWeapon.md
@@ -0,0 +1,2 @@
+#`function` getPlayerRangedWeapon
+::: src.pyg2o.functions.player.getPlayerRangedWeapon
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerRespawnTime.md b/docs/functions/player/getPlayerRespawnTime.md
new file mode 100644
index 0000000..701339a
--- /dev/null
+++ b/docs/functions/player/getPlayerRespawnTime.md
@@ -0,0 +1,2 @@
+#`function` getPlayerRespawnTime
+::: src.pyg2o.functions.player.getPlayerRespawnTime
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerRing.md b/docs/functions/player/getPlayerRing.md
new file mode 100644
index 0000000..5ada2c3
--- /dev/null
+++ b/docs/functions/player/getPlayerRing.md
@@ -0,0 +1,2 @@
+#`function` getPlayerRing
+::: src.pyg2o.functions.player.getPlayerRing
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerScale.md b/docs/functions/player/getPlayerScale.md
new file mode 100644
index 0000000..688cdde
--- /dev/null
+++ b/docs/functions/player/getPlayerScale.md
@@ -0,0 +1,2 @@
+#`function` getPlayerScale
+::: src.pyg2o.functions.player.getPlayerScale
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerSerial.md b/docs/functions/player/getPlayerSerial.md
new file mode 100644
index 0000000..70fe4cb
--- /dev/null
+++ b/docs/functions/player/getPlayerSerial.md
@@ -0,0 +1,2 @@
+#`function` getPlayerSerial
+::: src.pyg2o.functions.player.getPlayerSerial
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerShield.md b/docs/functions/player/getPlayerShield.md
new file mode 100644
index 0000000..2847a44
--- /dev/null
+++ b/docs/functions/player/getPlayerShield.md
@@ -0,0 +1,2 @@
+#`function` getPlayerShield
+::: src.pyg2o.functions.player.getPlayerShield
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerSkillWeapon.md b/docs/functions/player/getPlayerSkillWeapon.md
new file mode 100644
index 0000000..b2efb92
--- /dev/null
+++ b/docs/functions/player/getPlayerSkillWeapon.md
@@ -0,0 +1,2 @@
+#`function` getPlayerSkillWeapon
+::: src.pyg2o.functions.player.getPlayerSkillWeapon
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerSpell.md b/docs/functions/player/getPlayerSpell.md
new file mode 100644
index 0000000..48ff84d
--- /dev/null
+++ b/docs/functions/player/getPlayerSpell.md
@@ -0,0 +1,2 @@
+#`function` getPlayerSpell
+::: src.pyg2o.functions.player.getPlayerSpell
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerStrength.md b/docs/functions/player/getPlayerStrength.md
new file mode 100644
index 0000000..6de5b44
--- /dev/null
+++ b/docs/functions/player/getPlayerStrength.md
@@ -0,0 +1,2 @@
+#`function` getPlayerStrength
+::: src.pyg2o.functions.player.getPlayerStrength
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerTalent.md b/docs/functions/player/getPlayerTalent.md
new file mode 100644
index 0000000..2c2e056
--- /dev/null
+++ b/docs/functions/player/getPlayerTalent.md
@@ -0,0 +1,2 @@
+#`function` getPlayerTalent
+::: src.pyg2o.functions.player.getPlayerTalent
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerUID.md b/docs/functions/player/getPlayerUID.md
new file mode 100644
index 0000000..0684e17
--- /dev/null
+++ b/docs/functions/player/getPlayerUID.md
@@ -0,0 +1,2 @@
+#`function` getPlayerUID
+::: src.pyg2o.functions.player.getPlayerUID
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerVirtualWorld.md b/docs/functions/player/getPlayerVirtualWorld.md
new file mode 100644
index 0000000..9bf90d5
--- /dev/null
+++ b/docs/functions/player/getPlayerVirtualWorld.md
@@ -0,0 +1,2 @@
+#`function` getPlayerVirtualWorld
+::: src.pyg2o.functions.player.getPlayerVirtualWorld
\ No newline at end of file
diff --git a/python/docs/functions/player/unreadySpell.md b/docs/functions/player/getPlayerVisual.md
similarity index 50%
rename from python/docs/functions/player/unreadySpell.md
rename to docs/functions/player/getPlayerVisual.md
index af8a8aa..ef1f6f1 100644
--- a/python/docs/functions/player/unreadySpell.md
+++ b/docs/functions/player/getPlayerVisual.md
@@ -1,2 +1,2 @@
-#`function` unreadySpell
-::: g2o.functions.player.unreadySpell
\ No newline at end of file
+#`function` getPlayerVisual
+::: src.pyg2o.functions.player.getPlayerVisual
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerWeaponMode.md b/docs/functions/player/getPlayerWeaponMode.md
new file mode 100644
index 0000000..6db2404
--- /dev/null
+++ b/docs/functions/player/getPlayerWeaponMode.md
@@ -0,0 +1,2 @@
+#`function` getPlayerWeaponMode
+::: src.pyg2o.functions.player.getPlayerWeaponMode
\ No newline at end of file
diff --git a/docs/functions/player/getPlayerWorld.md b/docs/functions/player/getPlayerWorld.md
new file mode 100644
index 0000000..cf7b11b
--- /dev/null
+++ b/docs/functions/player/getPlayerWorld.md
@@ -0,0 +1,2 @@
+#`function` getPlayerWorld
+::: src.pyg2o.functions.player.getPlayerWorld
\ No newline at end of file
diff --git a/docs/functions/player/giveItem.md b/docs/functions/player/giveItem.md
new file mode 100644
index 0000000..4f84e28
--- /dev/null
+++ b/docs/functions/player/giveItem.md
@@ -0,0 +1,2 @@
+#`function` giveItem
+::: src.pyg2o.functions.player.giveItem
\ No newline at end of file
diff --git a/docs/functions/player/hitPlayer.md b/docs/functions/player/hitPlayer.md
new file mode 100644
index 0000000..ff92919
--- /dev/null
+++ b/docs/functions/player/hitPlayer.md
@@ -0,0 +1,2 @@
+#`function` hitPlayer
+::: src.pyg2o.functions.player.hitPlayer
\ No newline at end of file
diff --git a/docs/functions/player/isPlayerConnected.md b/docs/functions/player/isPlayerConnected.md
new file mode 100644
index 0000000..ac85b41
--- /dev/null
+++ b/docs/functions/player/isPlayerConnected.md
@@ -0,0 +1,2 @@
+#`function` isPlayerConnected
+::: src.pyg2o.functions.player.isPlayerConnected
\ No newline at end of file
diff --git a/docs/functions/player/isPlayerDead.md b/docs/functions/player/isPlayerDead.md
new file mode 100644
index 0000000..b3d2d0f
--- /dev/null
+++ b/docs/functions/player/isPlayerDead.md
@@ -0,0 +1,2 @@
+#`function` isPlayerDead
+::: src.pyg2o.functions.player.isPlayerDead
\ No newline at end of file
diff --git a/docs/functions/player/isPlayerSpawned.md b/docs/functions/player/isPlayerSpawned.md
new file mode 100644
index 0000000..4c90a52
--- /dev/null
+++ b/docs/functions/player/isPlayerSpawned.md
@@ -0,0 +1,2 @@
+#`function` isPlayerSpawned
+::: src.pyg2o.functions.player.isPlayerSpawned
\ No newline at end of file
diff --git a/docs/functions/player/isPlayerUnconscious.md b/docs/functions/player/isPlayerUnconscious.md
new file mode 100644
index 0000000..f39ded9
--- /dev/null
+++ b/docs/functions/player/isPlayerUnconscious.md
@@ -0,0 +1,2 @@
+#`function` isPlayerUnconscious
+::: src.pyg2o.functions.player.isPlayerUnconscious
\ No newline at end of file
diff --git a/docs/functions/player/kick.md b/docs/functions/player/kick.md
new file mode 100644
index 0000000..3e80c57
--- /dev/null
+++ b/docs/functions/player/kick.md
@@ -0,0 +1,2 @@
+#`function` kick
+::: src.pyg2o.functions.player.kick
\ No newline at end of file
diff --git a/docs/functions/player/playAni.md b/docs/functions/player/playAni.md
new file mode 100644
index 0000000..2fb4be1
--- /dev/null
+++ b/docs/functions/player/playAni.md
@@ -0,0 +1,2 @@
+#`function` playAni
+::: src.pyg2o.functions.player.playAni
\ No newline at end of file
diff --git a/docs/functions/player/playFaceAni.md b/docs/functions/player/playFaceAni.md
new file mode 100644
index 0000000..f4546fe
--- /dev/null
+++ b/docs/functions/player/playFaceAni.md
@@ -0,0 +1,2 @@
+#`function` playFaceAni
+::: src.pyg2o.functions.player.playFaceAni
\ No newline at end of file
diff --git a/docs/functions/player/readySpell.md b/docs/functions/player/readySpell.md
new file mode 100644
index 0000000..62fb8b1
--- /dev/null
+++ b/docs/functions/player/readySpell.md
@@ -0,0 +1,2 @@
+#`function` readySpell
+::: src.pyg2o.functions.player.readySpell
\ No newline at end of file
diff --git a/docs/functions/player/removeItem.md b/docs/functions/player/removeItem.md
new file mode 100644
index 0000000..ee1d942
--- /dev/null
+++ b/docs/functions/player/removeItem.md
@@ -0,0 +1,2 @@
+#`function` removeItem
+::: src.pyg2o.functions.player.removeItem
\ No newline at end of file
diff --git a/docs/functions/player/removePlayerOverlay.md b/docs/functions/player/removePlayerOverlay.md
new file mode 100644
index 0000000..d97725c
--- /dev/null
+++ b/docs/functions/player/removePlayerOverlay.md
@@ -0,0 +1,2 @@
+#`function` removePlayerOverlay
+::: src.pyg2o.functions.player.removePlayerOverlay
\ No newline at end of file
diff --git a/docs/functions/player/removeWeapon.md b/docs/functions/player/removeWeapon.md
new file mode 100644
index 0000000..ac89432
--- /dev/null
+++ b/docs/functions/player/removeWeapon.md
@@ -0,0 +1,2 @@
+#`function` removeWeapon
+::: src.pyg2o.functions.player.removeWeapon
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerAngle.md b/docs/functions/player/setPlayerAngle.md
new file mode 100644
index 0000000..0dcb0c7
--- /dev/null
+++ b/docs/functions/player/setPlayerAngle.md
@@ -0,0 +1,2 @@
+#`function` setPlayerAngle
+::: src.pyg2o.functions.player.setPlayerAngle
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerCollision.md b/docs/functions/player/setPlayerCollision.md
new file mode 100644
index 0000000..9de559b
--- /dev/null
+++ b/docs/functions/player/setPlayerCollision.md
@@ -0,0 +1,2 @@
+#`function` setPlayerCollision
+::: src.pyg2o.functions.player.setPlayerCollision
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerColor.md b/docs/functions/player/setPlayerColor.md
new file mode 100644
index 0000000..9dc9397
--- /dev/null
+++ b/docs/functions/player/setPlayerColor.md
@@ -0,0 +1,2 @@
+#`function` setPlayerColor
+::: src.pyg2o.functions.player.setPlayerColor
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerDexterity.md b/docs/functions/player/setPlayerDexterity.md
new file mode 100644
index 0000000..e838ead
--- /dev/null
+++ b/docs/functions/player/setPlayerDexterity.md
@@ -0,0 +1,2 @@
+#`function` setPlayerDexterity
+::: src.pyg2o.functions.player.setPlayerDexterity
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerFatness.md b/docs/functions/player/setPlayerFatness.md
new file mode 100644
index 0000000..edc0a41
--- /dev/null
+++ b/docs/functions/player/setPlayerFatness.md
@@ -0,0 +1,2 @@
+#`function` setPlayerFatness
+::: src.pyg2o.functions.player.setPlayerFatness
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerHealth.md b/docs/functions/player/setPlayerHealth.md
new file mode 100644
index 0000000..6641a8c
--- /dev/null
+++ b/docs/functions/player/setPlayerHealth.md
@@ -0,0 +1,2 @@
+#`function` setPlayerHealth
+::: src.pyg2o.functions.player.setPlayerHealth
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerInstance.md b/docs/functions/player/setPlayerInstance.md
new file mode 100644
index 0000000..9339968
--- /dev/null
+++ b/docs/functions/player/setPlayerInstance.md
@@ -0,0 +1,2 @@
+#`function` setPlayerInstance
+::: src.pyg2o.functions.player.setPlayerInstance
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerInvisible.md b/docs/functions/player/setPlayerInvisible.md
new file mode 100644
index 0000000..d9b4c70
--- /dev/null
+++ b/docs/functions/player/setPlayerInvisible.md
@@ -0,0 +1,2 @@
+#`function` setPlayerInvisible
+::: src.pyg2o.functions.player.setPlayerInvisible
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerMana.md b/docs/functions/player/setPlayerMana.md
new file mode 100644
index 0000000..8034911
--- /dev/null
+++ b/docs/functions/player/setPlayerMana.md
@@ -0,0 +1,2 @@
+#`function` setPlayerMana
+::: src.pyg2o.functions.player.setPlayerMana
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerMaxHealth.md b/docs/functions/player/setPlayerMaxHealth.md
new file mode 100644
index 0000000..0a6c7c8
--- /dev/null
+++ b/docs/functions/player/setPlayerMaxHealth.md
@@ -0,0 +1,2 @@
+#`function` setPlayerMaxHealth
+::: src.pyg2o.functions.player.setPlayerMaxHealth
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerMaxMana.md b/docs/functions/player/setPlayerMaxMana.md
new file mode 100644
index 0000000..c13bc48
--- /dev/null
+++ b/docs/functions/player/setPlayerMaxMana.md
@@ -0,0 +1,2 @@
+#`function` setPlayerMaxMana
+::: src.pyg2o.functions.player.setPlayerMaxMana
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerName.md b/docs/functions/player/setPlayerName.md
new file mode 100644
index 0000000..ca0279f
--- /dev/null
+++ b/docs/functions/player/setPlayerName.md
@@ -0,0 +1,2 @@
+#`function` setPlayerName
+::: src.pyg2o.functions.player.setPlayerName
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerRespawnTime.md b/docs/functions/player/setPlayerRespawnTime.md
new file mode 100644
index 0000000..940c484
--- /dev/null
+++ b/docs/functions/player/setPlayerRespawnTime.md
@@ -0,0 +1,2 @@
+#`function` setPlayerRespawnTime
+::: src.pyg2o.functions.player.setPlayerRespawnTime
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerScale.md b/docs/functions/player/setPlayerScale.md
new file mode 100644
index 0000000..faad1a3
--- /dev/null
+++ b/docs/functions/player/setPlayerScale.md
@@ -0,0 +1,2 @@
+#`function` setPlayerScale
+::: src.pyg2o.functions.player.setPlayerScale
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerSkillWeapon.md b/docs/functions/player/setPlayerSkillWeapon.md
new file mode 100644
index 0000000..ea04299
--- /dev/null
+++ b/docs/functions/player/setPlayerSkillWeapon.md
@@ -0,0 +1,2 @@
+#`function` setPlayerSkillWeapon
+::: src.pyg2o.functions.player.setPlayerSkillWeapon
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerStrength.md b/docs/functions/player/setPlayerStrength.md
new file mode 100644
index 0000000..63edfde
--- /dev/null
+++ b/docs/functions/player/setPlayerStrength.md
@@ -0,0 +1,2 @@
+#`function` setPlayerStrength
+::: src.pyg2o.functions.player.setPlayerStrength
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerTalent.md b/docs/functions/player/setPlayerTalent.md
new file mode 100644
index 0000000..79fce76
--- /dev/null
+++ b/docs/functions/player/setPlayerTalent.md
@@ -0,0 +1,2 @@
+#`function` setPlayerTalent
+::: src.pyg2o.functions.player.setPlayerTalent
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerVirtualWorld.md b/docs/functions/player/setPlayerVirtualWorld.md
new file mode 100644
index 0000000..3eb85b3
--- /dev/null
+++ b/docs/functions/player/setPlayerVirtualWorld.md
@@ -0,0 +1,2 @@
+#`function` setPlayerVirtualWorld
+::: src.pyg2o.functions.player.setPlayerVirtualWorld
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerVisual.md b/docs/functions/player/setPlayerVisual.md
new file mode 100644
index 0000000..332bb0d
--- /dev/null
+++ b/docs/functions/player/setPlayerVisual.md
@@ -0,0 +1,2 @@
+#`function` setPlayerVisual
+::: src.pyg2o.functions.player.setPlayerVisual
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerWeaponMode.md b/docs/functions/player/setPlayerWeaponMode.md
new file mode 100644
index 0000000..c71421e
--- /dev/null
+++ b/docs/functions/player/setPlayerWeaponMode.md
@@ -0,0 +1,2 @@
+#`function` setPlayerWeaponMode
+::: src.pyg2o.functions.player.setPlayerWeaponMode
\ No newline at end of file
diff --git a/docs/functions/player/setPlayerWorld.md b/docs/functions/player/setPlayerWorld.md
new file mode 100644
index 0000000..1ed2106
--- /dev/null
+++ b/docs/functions/player/setPlayerWorld.md
@@ -0,0 +1,2 @@
+#`function` setPlayerWorld
+::: src.pyg2o.functions.player.setPlayerWorld
\ No newline at end of file
diff --git a/docs/functions/player/spawnPlayer.md b/docs/functions/player/spawnPlayer.md
new file mode 100644
index 0000000..2b469f9
--- /dev/null
+++ b/docs/functions/player/spawnPlayer.md
@@ -0,0 +1,2 @@
+#`function` spawnPlayer
+::: src.pyg2o.functions.player.spawnPlayer
\ No newline at end of file
diff --git a/docs/functions/player/stopAni.md b/docs/functions/player/stopAni.md
new file mode 100644
index 0000000..972354a
--- /dev/null
+++ b/docs/functions/player/stopAni.md
@@ -0,0 +1,2 @@
+#`function` stopAni
+::: src.pyg2o.functions.player.stopAni
\ No newline at end of file
diff --git a/docs/functions/player/stopFaceAni.md b/docs/functions/player/stopFaceAni.md
new file mode 100644
index 0000000..bad90cd
--- /dev/null
+++ b/docs/functions/player/stopFaceAni.md
@@ -0,0 +1,2 @@
+#`function` stopFaceAni
+::: src.pyg2o.functions.player.stopFaceAni
\ No newline at end of file
diff --git a/docs/functions/player/unequipItem.md b/docs/functions/player/unequipItem.md
new file mode 100644
index 0000000..ad4b195
--- /dev/null
+++ b/docs/functions/player/unequipItem.md
@@ -0,0 +1,2 @@
+#`function` unequipItem
+::: src.pyg2o.functions.player.unequipItem
\ No newline at end of file
diff --git a/docs/functions/player/unreadySpell.md b/docs/functions/player/unreadySpell.md
new file mode 100644
index 0000000..02c13ab
--- /dev/null
+++ b/docs/functions/player/unreadySpell.md
@@ -0,0 +1,2 @@
+#`function` unreadySpell
+::: src.pyg2o.functions.player.unreadySpell
\ No newline at end of file
diff --git a/docs/functions/player/unspawnPlayer.md b/docs/functions/player/unspawnPlayer.md
new file mode 100644
index 0000000..3d8484d
--- /dev/null
+++ b/docs/functions/player/unspawnPlayer.md
@@ -0,0 +1,2 @@
+#`function` unspawnPlayer
+::: src.pyg2o.functions.player.unspawnPlayer
\ No newline at end of file
diff --git a/docs/functions/player/useItem.md b/docs/functions/player/useItem.md
new file mode 100644
index 0000000..d0eb9ab
--- /dev/null
+++ b/docs/functions/player/useItem.md
@@ -0,0 +1,2 @@
+#`function` useItem
+::: src.pyg2o.functions.player.useItem
\ No newline at end of file
diff --git a/docs/functions/player/useItemToState.md b/docs/functions/player/useItemToState.md
new file mode 100644
index 0000000..619bd9d
--- /dev/null
+++ b/docs/functions/player/useItemToState.md
@@ -0,0 +1,2 @@
+#`function` useItemToState
+::: src.pyg2o.functions.player.useItemToState
\ No newline at end of file
diff --git a/docs/functions/streamer/findNearbyPlayers.md b/docs/functions/streamer/findNearbyPlayers.md
new file mode 100644
index 0000000..9f93d59
--- /dev/null
+++ b/docs/functions/streamer/findNearbyPlayers.md
@@ -0,0 +1,2 @@
+#`function` findNearbyPlayers
+::: src.pyg2o.functions.streamer.findNearbyPlayers
\ No newline at end of file
diff --git a/docs/functions/streamer/getSpawnedPlayersForPlayer.md b/docs/functions/streamer/getSpawnedPlayersForPlayer.md
new file mode 100644
index 0000000..2e12592
--- /dev/null
+++ b/docs/functions/streamer/getSpawnedPlayersForPlayer.md
@@ -0,0 +1,2 @@
+#`function` getSpawnedPlayersForPlayer
+::: src.pyg2o.functions.streamer.getSpawnedPlayersForPlayer
\ No newline at end of file
diff --git a/docs/functions/streamer/getStreamedPlayersByPlayer.md b/docs/functions/streamer/getStreamedPlayersByPlayer.md
new file mode 100644
index 0000000..d30494d
--- /dev/null
+++ b/docs/functions/streamer/getStreamedPlayersByPlayer.md
@@ -0,0 +1,2 @@
+#`function` getStreamedPlayersByPlayer
+::: src.pyg2o.functions.streamer.getStreamedPlayersByPlayer
\ No newline at end of file
diff --git a/docs/functions/waypoint/getNearestWaypoint.md b/docs/functions/waypoint/getNearestWaypoint.md
new file mode 100644
index 0000000..0812790
--- /dev/null
+++ b/docs/functions/waypoint/getNearestWaypoint.md
@@ -0,0 +1,2 @@
+#`function` getNearestWaypoint
+::: src.pyg2o.functions.waypoint.getNearestWaypoint
\ No newline at end of file
diff --git a/docs/functions/waypoint/getWaypoint.md b/docs/functions/waypoint/getWaypoint.md
new file mode 100644
index 0000000..1a93388
--- /dev/null
+++ b/docs/functions/waypoint/getWaypoint.md
@@ -0,0 +1,2 @@
+#`function` getWaypoint
+::: src.pyg2o.functions.waypoint.getWaypoint
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..23c9316
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,45 @@
+## How to use
+1. Install [G2O WebSocket module](https://github.com/AURUMVORXX/G2O-WebSocket) to your server
+1. Download **include/** folder and import the Squirrel part of the library:
+```xml
+
+```
+2. Install python library to your application
+```
+pip install git+https://github.com/AURUMVORXX/PyG2O.git
+```
+3. Launch websocket client in your Squirrel scripts
+```
+// PyG2O_Start(url, reconnect, silent)
+// reconnect - auto reconnect if server stopped
+// silent - disable information prints
+
+// Start server before any events
+PyG2O_Start("ws://localhost:8080", true, false)
+
+addEventHandler("onInit"...
+```
+4. In your application, launch asyncio event loop and websocket server
+```python
+import pyg2o
+import asyncio
+
+srv = None
+
+async def main():
+ global srv
+ srv = pyg2o.PythonWebsocketServer(
+ host='localhost',
+ port=8080,
+ ping_interval=30,
+ silent=False,
+ whitelist=['::1'],
+ )
+ try:
+ await srv.start()
+ except asyncio.CancelledError:
+ await srv.stop()
+
+if __name__ == '__main__':
+ asyncio.run(main())
+```
\ No newline at end of file
diff --git a/python/docs/qna.md b/docs/qna.md
similarity index 100%
rename from python/docs/qna.md
rename to docs/qna.md
diff --git a/include/events.nut b/include/events.nut
new file mode 100644
index 0000000..24e8c6d
--- /dev/null
+++ b/include/events.nut
@@ -0,0 +1,626 @@
+
+addEventHandler("onPlayerUseCheat", function(playerid, type)
+{
+ local data = {
+ event = "onPlayerUseCheat",
+ args = {
+ playerid = playerid,
+ type = type
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onBan", function(banInfo)
+{
+ local data = {
+ event = "onBan",
+ args = {
+ ban = {
+ mac = "mac" in banInfo ? banInfo["mac"] : "-1",
+ ip = "ip" in banInfo ? banInfo["ip"] : "-1",
+ serial = "serial" in banInfo ? banInfo["serial"] : "-1",
+ name = "name" in banInfo ? banInfo["name"] : "-1",
+ timestamp = "timestamp" in banInfo ? banInfo["timestamp"] : -1
+ }
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onInit", function()
+{
+ local data = {
+ event = "onInit",
+ args = {}
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onExit", function()
+{
+ local data = {
+ event = "onExit",
+ args = {}
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onTick", function()
+{
+ local data = {
+ event = "onTick",
+ args = {}
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onTime", function(day, hour, min)
+{
+ local data = {
+ event = "onTime",
+ args = {
+ day = day,
+ hour = hour,
+ min = min,
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onUnban", function(banInfo)
+{
+ local data = {
+ event = "onUnban",
+ args = {
+ ban = {
+ mac = "mac" in banInfo ? banInfo["mac"] : "-1",
+ ip = "ip" in banInfo ? banInfo["ip"] : "-1",
+ serial = "serial" in banInfo ? banInfo["serial"] : "-1",
+ name = "name" in banInfo ? banInfo["name"] : "-1",
+ timestamp = "timestamp" in banInfo ? banInfo["timestamp"] : -1
+ }
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onNpcActionFinished", function(npc_id, action_type, action_id, result)
+{
+ local data = {
+ event = "onNpcActionFinished",
+ args = {
+ npc_id = npc_id,
+ action_type = action_type,
+ action_id = action_id,
+ result = result
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onNpcActionSent", function(npc_id, action_type, action_id)
+{
+ local data = {
+ event = "onNpcActionSent",
+ args = {
+ npc_id = npc_id,
+ action_type = action_type,
+ action_id = action_id,
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onNpcChangeHostPlayer", function(npc_id, current_id, previous_id)
+{
+ local data = {
+ event = "onNpcChangeHostPlayer",
+ args = {
+ npc_id = npc_id,
+ current_id = current_id,
+ previous_id = previous_id
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onNpcCreated", function(npc_id)
+{
+ local data = {
+ event = "onNpcCreated",
+ args = {
+ npc_id = npc_id
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onNpcDestroyed", function(npc_id)
+{
+ local data = {
+ event = "onNpcDestroyed",
+ args = {
+ npc_id = npc_id
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeColor", function(playerid, r, g, b)
+{
+ local data = {
+ event = "onPlayerChangeColor",
+ args = {
+ playerid = playerid,
+ r = r,
+ g = g,
+ b = b
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeFocus", function(playerid, oldFocusId, newFocusId)
+{
+ local data = {
+ event = "onPlayerChangeFocus",
+ args = {
+ playerid = playerid,
+ oldFocusId = oldFocusId,
+ newFocusId = newFocusId
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeHealth", function(playerid, previous, current)
+{
+ local data = {
+ event = "onPlayerChangeHealth",
+ args = {
+ playerid = playerid,
+ previous = previous,
+ current = current
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeMana", function(playerid, previous, current)
+{
+ local data = {
+ event = "onPlayerChangeMana",
+ args = {
+ playerid = playerid,
+ previous = previous,
+ current = current
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeMaxHealth", function(playerid, previous, current)
+{
+ local data = {
+ event = "onPlayerChangeMaxHealth",
+ args = {
+ playerid = playerid,
+ previous = previous,
+ current = current
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeMaxMana", function(playerid, previous, current)
+{
+ local data = {
+ event = "onPlayerChangeMaxMana",
+ args = {
+ playerid = playerid,
+ previous = previous,
+ current = current
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeWeaponMode", function(playerid, previous, current)
+{
+ local data = {
+ event = "onPlayerChangeWeaponMode",
+ args = {
+ playerid = playerid,
+ previous = previous,
+ current = current
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerChangeWorld", function(playerid, previous, current)
+{
+ local data = {
+ event = "onPlayerChangeWorld",
+ args = {
+ playerid = playerid,
+ previous = previous,
+ current = current
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerCommand", function(playerid, command, params)
+{
+ local data = {
+ event = "onPlayerCommand",
+ args = {
+ playerid = playerid,
+ command = command,
+ params = params
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerDamage", function(playerid, killerid, description)
+{
+ local data = {
+ event = "onPlayerDamage",
+ args = {
+ playerid = playerid,
+ killerid = killerid,
+ obj_DamageDescription = {
+ name = "desc",
+ data = _PyG2O_Serialize(description)
+ }
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerDead", function(playerid, killerid)
+{
+ local data = {
+ event = "onPlayerDead",
+ args = {
+ playerid = playerid,
+ killerid = killerid
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerDisconnect", function(playerid, reason)
+{
+ local data = {
+ event = "onPlayerDisconnect",
+ args = {
+ playerid = playerid,
+ reason = reason
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerDropItem", function(playerid, itemGround)
+{
+ local data = {
+ event = "onPlayerDropItem",
+ args = {
+ playerid = playerid,
+ obj_ItemGround = {
+ name = "itemGround",
+ data = _PyG2O_Serialize(itemGround)
+ }
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEnterWorld", function(playerid, world)
+{
+ local data = {
+ event = "onPlayerEnterWorld",
+ args = {
+ playerid = playerid,
+ world = world
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipAmulet", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipAmulet",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipArmor", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipArmor",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipBelt", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipBelt",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipHandItem", function(playerid, hand, instance)
+{
+ local data = {
+ event = "onPlayerEquipHandItem",
+ args = {
+ playerid = playerid,
+ hand = hand,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipHelmet", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipHelmet",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipMeleeWeapon", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipMeleeWeapon",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipRangedWeapon", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipRangedWeapon",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipRing", function(playerid, handId, instance)
+{
+ local data = {
+ event = "onPlayerEquipRing",
+ args = {
+ playerid = playerid,
+ handId = handId,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipShield", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerEquipShield",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerEquipSpell", function(playerid, slotId, instance)
+{
+ local data = {
+ event = "onPlayerEquipSpell",
+ args = {
+ playerid = playerid,
+ slotId = slotId,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerJoin", function(playerid)
+{
+ local data = {
+ event = "onPlayerJoin",
+ args = {
+ playerid = playerid
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerMessage", function(playerid, message)
+{
+ local data = {
+ event = "onPlayerMessage",
+ args = {
+ playerid = playerid,
+ message = message
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerMobInteract", function(playerid, from, to)
+{
+ local data = {
+ event = "onPlayerMobInteract",
+ args = {
+ playerid = playerid,
+ from = from,
+ to = to
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerRespawn", function(playerid)
+{
+ local data = {
+ event = "onPlayerRespawn",
+ args = {
+ playerid = playerid
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerShoot", function(playerid, munition)
+{
+ local data = {
+ event = "onPlayerShoot",
+ args = {
+ playerid = playerid,
+ munition = munition
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerSpellCast", function(playerid, instance, spellLevel)
+{
+ local data = {
+ event = "onPlayerSpellCast",
+ args = {
+ playerid = playerid,
+ instance = instance,
+ spellLevel = spellLevel
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerSpellSetup", function(playerid, instance)
+{
+ local data = {
+ event = "onPlayerSpellSetup",
+ args = {
+ playerid = playerid,
+ instance = instance
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerTakeItem", function(playerid, itemGround)
+{
+ local data = {
+ event = "onPlayerTakeItem",
+ args = {
+ playerid = playerid,
+ obj_ItemGround = {
+ name = "itemGround",
+ data = _PyG2O_Serialize(itemGround)
+ }
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerTeleport", function(playerid, vobName)
+{
+ local data = {
+ event = "onPlayerTeleport",
+ args = {
+ playerid = playerid,
+ vobName = vobName
+ }
+ }
+
+ _PyG2O_Send(data);
+});
+
+addEventHandler("onPlayerToggleFaceAni", function(playerid, aniName, toggle)
+{
+ local data = {
+ event = "onPlayerToggleFaceAni",
+ args = {
+ playerid = playerid,
+ aniName = aniName,
+ toggle = toggle
+ }
+ }
+
+ _PyG2O_Send(data);
+});
\ No newline at end of file
diff --git a/include/main.nut b/include/main.nut
new file mode 100644
index 0000000..d6178d9
--- /dev/null
+++ b/include/main.nut
@@ -0,0 +1,128 @@
+
+local _pyg2o_server_connection = -1;
+local _silent = false;
+local _url = -1
+local _reconnect = false;
+
+function PyG2O_Start(url, reconnect = false, silent = false)
+{
+ _silent = silent;
+ _url = url;
+ _reconnect = reconnect;
+
+ _pyg2o_server_connection = WebsocketClient();
+ _pyg2o_server_connection.silent = true;
+ _pyg2o_server_connection.setUrl("ws://localhost:8080");
+ _pyg2o_server_connection.start();
+
+ if (!_silent)
+ print("[PyG2O] Initializing connection on " + url)
+}
+
+function _PyG2O_Send(data)
+{
+ if (_pyg2o_server_connection == -1)
+ return;
+
+ _pyg2o_server_connection.send(JSON.dump_ansi(data));
+}
+
+function _PyG2O_InitializeConstants()
+{
+ local const_data = {
+ "type": "const_init",
+ "args": getconsttable()
+ };
+
+ _PyG2O_Send(const_data);
+}
+
+function _PyG2O_GetClassName(object)
+{
+ if (object instanceof DamageDescription)
+ return "DamageDescription";
+ else if (object instanceof ItemGround)
+ return "ItemGround";
+
+ return null;
+}
+
+function _PyG2O_Serialize(object)
+{
+ local cls = object.getclass();
+ local tab = {};
+
+ if (object instanceof DamageDescription)
+ {
+ tab["_flags"] <- object.flags;
+ tab["_damage"] <- object.damage;
+ tab["_item_instance"] <- object.item_instance;
+ tab["_distance"] <- object.distance;
+ tab["_spell_id"] <- object.spell_id;
+ tab["_spell_level"] <- object.spell_level;
+ tab["_node"] <- object.node;
+ }
+ else if (object instanceof ItemGround)
+ {
+ tab["_id"] <- object.id;
+ tab["_instance"] <- object.instance;
+ tab["_amount"] <- object.amount;
+ tab["_world"] <- object.world;
+ tab["_virtualWorld"] <- object.virtualWorld;
+ tab["_position"] <- object.getPosition();
+ tab["_rotation"] <- object.getRotation();
+ }
+
+ return tab;
+}
+
+addEventHandler("onWebsocketConnect", function(socket, url)
+{
+ if (socket != _pyg2o_server_connection)
+ return;
+
+ if (!_silent)
+ {
+ print("[PyG2O] Successfully connected to " + url);
+ _PyG2O_InitializeConstants();
+ }
+});
+
+addEventHandler("onWebsocketDisconnect", function(socket, url)
+{
+ if (socket != _pyg2o_server_connection || _reconnect)
+ return;
+
+ _pyg2o_server_connection = -1;
+});
+
+addEventHandler("onWebsocketMessage", function(socket, url, message)
+{
+ if (socket != _pyg2o_server_connection)
+ return;
+
+ local request = JSON.parse_ansi(message);
+ if ("uuid" in request)
+ {
+ local result = compilestring(request["args"])();
+ local className = _PyG2O_GetClassName(result);
+ if (className != null)
+ {
+ className = format("obj_%s", className)
+
+ request["args"] = {};
+ request["args"].rawset(className, {});
+ local objTab = request["args"].rawget(className);
+ objTab["name"] <- "result";
+ objTab["data"] <- _PyG2O_Serialize(result);
+ }
+ else
+ {
+ request["args"] =
+ {
+ "result": result
+ };
+ }
+ _pyg2o_server_connection.send(JSON.dump_ansi(request, 2));
+ }
+});
diff --git a/include/pyg2o.xml b/include/pyg2o.xml
new file mode 100644
index 0000000..37df48a
--- /dev/null
+++ b/include/pyg2o.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/python/mkdocs.yml b/mkdocs.yml
similarity index 98%
rename from python/mkdocs.yml
rename to mkdocs.yml
index f7cdc7f..91b53a6 100644
--- a/python/mkdocs.yml
+++ b/mkdocs.yml
@@ -22,8 +22,6 @@ nav:
- How to use: index.md
- Comparing with Squirrel: comparing.md
- QnA: qna.md
- - How To...:
- - ...debug?: howto/localdebug.md
- Classes:
- Game:
- Daedalus: classes/game/Daedalus.md
@@ -32,12 +30,8 @@ nav:
- Item:
- ItemGround: classes/item/ItemGround.md
- ItemsGround: classes/item/ItemsGround.md
- - Network:
- - Packet: classes/network/Packet.md
- Mds:
- Mds: classes/mds/Mds.md
- - Waypoint:
- - Way: classes/waypoint/Way.md
- Constants:
- AntiCheat: constants/anticheat.md
- Context: constants/context.md
@@ -62,8 +56,6 @@ nav:
- onTime: defaultEvents/general/onTime.md
- onBan: defaultEvents/general/onBan.md
- onUnban: defaultEvents/general/onUnban.md
- - Network:
- - onPacket: defaultEvents/network/onPacket.md
- Npc:
- onNpcActionFinished: defaultEvents/npc/onNpcActionFinished.md
- onNpcActionSent: defaultEvents/npc/onNpcActionSent.md
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..36e414f
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,15 @@
+[build-systems]
+requires = ["setuptools>=42", "websockets>=15"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "PyG2O"
+version = "2.0.0"
+description = "Python support for Gothic 2 Online"
+authors = [{name = "AURUMVORAX", email = "aurumvorax.enthroned@gmail.com"}]
+readme = "README.md"
+requires-python = ">=3.13"
+license = {text = "MIT"}
+
+[project.urls]
+Homepage = "https://github.com/AURUMVORXX/PyG2O"
\ No newline at end of file
diff --git a/python/docs/classes/game/Daedalus.md b/python/docs/classes/game/Daedalus.md
deleted file mode 100644
index 86cb0ed..0000000
--- a/python/docs/classes/game/Daedalus.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `static class` Daedalus
----
-::: g2o.classes.daedalus.Daedalus
\ No newline at end of file
diff --git a/python/docs/classes/game/DamageDescription.md b/python/docs/classes/game/DamageDescription.md
deleted file mode 100644
index 8cf1152..0000000
--- a/python/docs/classes/game/DamageDescription.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `class` DamageDescription
----
-::: g2o.classes.damage.DamageDescription
\ No newline at end of file
diff --git a/python/docs/classes/game/Sky.md b/python/docs/classes/game/Sky.md
deleted file mode 100644
index bb1769d..0000000
--- a/python/docs/classes/game/Sky.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `static class` Sky
----
-::: g2o.classes.sky.Sky
\ No newline at end of file
diff --git a/python/docs/classes/item/ItemGround.md b/python/docs/classes/item/ItemGround.md
deleted file mode 100644
index f2716ad..0000000
--- a/python/docs/classes/item/ItemGround.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `static class` ItemGround
----
-::: g2o.classes.items.ItemGround
\ No newline at end of file
diff --git a/python/docs/classes/item/ItemsGround.md b/python/docs/classes/item/ItemsGround.md
deleted file mode 100644
index 055f4cf..0000000
--- a/python/docs/classes/item/ItemsGround.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `static class` ItemsGround
----
-::: g2o.classes.items.ItemsGround
\ No newline at end of file
diff --git a/python/docs/classes/mds/Mds.md b/python/docs/classes/mds/Mds.md
deleted file mode 100644
index cd9306f..0000000
--- a/python/docs/classes/mds/Mds.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `static class` Mds
----
-::: g2o.classes.mds.Mds
\ No newline at end of file
diff --git a/python/docs/classes/network/Packet.md b/python/docs/classes/network/Packet.md
deleted file mode 100644
index 7eec82a..0000000
--- a/python/docs/classes/network/Packet.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `class` Packet
----
-::: g2o.classes.packets.Packet
\ No newline at end of file
diff --git a/python/docs/classes/waypoint/Way.md b/python/docs/classes/waypoint/Way.md
deleted file mode 100644
index f9573d2..0000000
--- a/python/docs/classes/waypoint/Way.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `class` Way
----
-::: g2o.classes.way.Way
\ No newline at end of file
diff --git a/python/docs/defaultEvents/network/onPacket.md b/python/docs/defaultEvents/network/onPacket.md
deleted file mode 100644
index c4219a0..0000000
--- a/python/docs/defaultEvents/network/onPacket.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# `event` onPacket
-This event is triggered when new packet arrives from the client.
-
-Original: [onPacket](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/network/onPacket/)
-
-## Parameters
-* `dict` **kwargs**:
- * `int` **playerid**: the id of the player who sent the packet.
- * `Packet` **data**: data sended over network from client side.
-
-## Usage
-```python
-import g2o
-
-@g2o.event('onPacket')
-def onPacketEvt(**kwargs):
- data = kwargs['data']
- message = data.readString()
-
- print(f'Got packet from {kwargs['playerid']} (bytes used {data.bytesUsed})')
- print(f'Packet says: {message}')
-```
\ No newline at end of file
diff --git a/python/docs/defaultEvents/player/onPlayerChangeWeaponMode.md b/python/docs/defaultEvents/player/onPlayerChangeWeaponMode.md
deleted file mode 100644
index 035fc07..0000000
--- a/python/docs/defaultEvents/player/onPlayerChangeWeaponMode.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# `event` onPlayerChangeWeaponMode
-This event is triggered when player changes the weapon mode.
-
-Original: [onPlayerChangeWeaponMode](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerChangeWeaponMode/)
-
-## Parameters
-* `dict` **kwargs**:
- * `int` **playerid**: the id of the player which changes the weapon mode.
- * `int` **oldWeaponMode**: the old weapon mode which was used by the player. For more information see [Weapon mode](../../constants/weapon-mode.md).
- * `int` **newWeaponMode**: the new weapon mode in which player is currently using. For more information see [Weapon mode](../../constants/weapon-mode.md).
-
-## Usage
-```python
-import g2o
-
-@g2o.event('onPlayerChangeWeaponMode')
-def onChangeWM(**kwargs):
- print(f'Player {kwargs['playerid']} changed wm: {kwargs['oldWeaponMode']} -> {kwargs['newWeaponMode']}')
-```
\ No newline at end of file
diff --git a/python/docs/functions/chat/sendMessageToAll.md b/python/docs/functions/chat/sendMessageToAll.md
deleted file mode 100644
index 2fe2f91..0000000
--- a/python/docs/functions/chat/sendMessageToAll.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` sendMessageToAll
-::: g2o.functions.chat.sendMessageToAll
\ No newline at end of file
diff --git a/python/docs/functions/chat/sendMessageToPlayer.md b/python/docs/functions/chat/sendMessageToPlayer.md
deleted file mode 100644
index a5bef73..0000000
--- a/python/docs/functions/chat/sendMessageToPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` sendMessageToPlayer
-::: g2o.functions.chat.sendMessageToPlayer
\ No newline at end of file
diff --git a/python/docs/functions/chat/sendPlayerMessageToAll.md b/python/docs/functions/chat/sendPlayerMessageToAll.md
deleted file mode 100644
index ea00374..0000000
--- a/python/docs/functions/chat/sendPlayerMessageToAll.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` sendPlayerMessageToAll
-::: g2o.functions.chat.sendPlayerMessageToAll
\ No newline at end of file
diff --git a/python/docs/functions/chat/sendPlayerMessageToPlayer.md b/python/docs/functions/chat/sendPlayerMessageToPlayer.md
deleted file mode 100644
index d694243..0000000
--- a/python/docs/functions/chat/sendPlayerMessageToPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` sendPlayerMessageToPlayer
-::: g2o.functions.chat.sendPlayerMessageToPlayer
\ No newline at end of file
diff --git a/python/docs/functions/event/addEvent.md b/python/docs/functions/event/addEvent.md
deleted file mode 100644
index af46255..0000000
--- a/python/docs/functions/event/addEvent.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` addEvent
-::: g2o.functions.event.addEvent
\ No newline at end of file
diff --git a/python/docs/functions/event/callEvent.md b/python/docs/functions/event/callEvent.md
deleted file mode 100644
index 67d5b71..0000000
--- a/python/docs/functions/event/callEvent.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` callEvent
-::: g2o.functions.event.callEvent
\ No newline at end of file
diff --git a/python/docs/functions/event/event.md b/python/docs/functions/event/event.md
deleted file mode 100644
index 572ab42..0000000
--- a/python/docs/functions/event/event.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` event
-::: g2o.functions.event.event
\ No newline at end of file
diff --git a/python/docs/functions/event/removeEvent.md b/python/docs/functions/event/removeEvent.md
deleted file mode 100644
index 63a4d69..0000000
--- a/python/docs/functions/event/removeEvent.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` removeEvent
-::: g2o.functions.event.removeEvent
\ No newline at end of file
diff --git a/python/docs/functions/event/removeEventHandler.md b/python/docs/functions/event/removeEventHandler.md
deleted file mode 100644
index f8bf97d..0000000
--- a/python/docs/functions/event/removeEventHandler.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` removeEventHandler
-::: g2o.functions.event.removeEventHandler
\ No newline at end of file
diff --git a/python/docs/functions/event/toggleEvent.md b/python/docs/functions/event/toggleEvent.md
deleted file mode 100644
index 64ce90c..0000000
--- a/python/docs/functions/event/toggleEvent.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` toggleEvent
-::: g2o.functions.event.toggleEvent
\ No newline at end of file
diff --git a/python/docs/functions/game/exit.md b/python/docs/functions/game/exit.md
deleted file mode 100644
index a5c79e0..0000000
--- a/python/docs/functions/game/exit.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` exit
-::: g2o.functions.game.exit
\ No newline at end of file
diff --git a/python/docs/functions/game/getDayLength.md b/python/docs/functions/game/getDayLength.md
deleted file mode 100644
index 26ed93b..0000000
--- a/python/docs/functions/game/getDayLength.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getDayLength
-::: g2o.functions.game.getDayLength
\ No newline at end of file
diff --git a/python/docs/functions/game/getHostname.md b/python/docs/functions/game/getHostname.md
deleted file mode 100644
index 37db951..0000000
--- a/python/docs/functions/game/getHostname.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getHostname
-::: g2o.functions.game.getHostname
\ No newline at end of file
diff --git a/python/docs/functions/game/getMaxSlots.md b/python/docs/functions/game/getMaxSlots.md
deleted file mode 100644
index b81f2c0..0000000
--- a/python/docs/functions/game/getMaxSlots.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getMaxSlots
-::: g2o.functions.game.getMaxSlots
\ No newline at end of file
diff --git a/python/docs/functions/game/getPlayersCount.md b/python/docs/functions/game/getPlayersCount.md
deleted file mode 100644
index 6541a41..0000000
--- a/python/docs/functions/game/getPlayersCount.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getPlayersCount
-::: g2o.functions.game.getPlayersCount
\ No newline at end of file
diff --git a/python/docs/functions/game/getServerDescription.md b/python/docs/functions/game/getServerDescription.md
deleted file mode 100644
index 3084222..0000000
--- a/python/docs/functions/game/getServerDescription.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getServerDescription
-::: g2o.functions.game.getServerDescription
\ No newline at end of file
diff --git a/python/docs/functions/game/getServerWorld.md b/python/docs/functions/game/getServerWorld.md
deleted file mode 100644
index bcf8cc7..0000000
--- a/python/docs/functions/game/getServerWorld.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getServerWorld
-::: g2o.functions.game.getServerWorld
\ No newline at end of file
diff --git a/python/docs/functions/game/getTime.md b/python/docs/functions/game/getTime.md
deleted file mode 100644
index 9795d93..0000000
--- a/python/docs/functions/game/getTime.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getTime
-::: g2o.functions.game.getTime
\ No newline at end of file
diff --git a/python/docs/functions/game/serverLog.md b/python/docs/functions/game/serverLog.md
deleted file mode 100644
index 3a6cb5a..0000000
--- a/python/docs/functions/game/serverLog.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` serverLog
-::: g2o.functions.game.serverLog
\ No newline at end of file
diff --git a/python/docs/functions/game/setDayLength.md b/python/docs/functions/game/setDayLength.md
deleted file mode 100644
index f8c8c13..0000000
--- a/python/docs/functions/game/setDayLength.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` setDayLength
-::: g2o.functions.game.setDayLength
\ No newline at end of file
diff --git a/python/docs/functions/game/setServerDescription.md b/python/docs/functions/game/setServerDescription.md
deleted file mode 100644
index e87d103..0000000
--- a/python/docs/functions/game/setServerDescription.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` setServerDescription
-::: g2o.functions.game.setServerDescription
\ No newline at end of file
diff --git a/python/docs/functions/game/setServerWorld.md b/python/docs/functions/game/setServerWorld.md
deleted file mode 100644
index aa39aea..0000000
--- a/python/docs/functions/game/setServerWorld.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` setServerWorld
-::: g2o.functions.game.setServerWorld
\ No newline at end of file
diff --git a/python/docs/functions/game/setTime.md b/python/docs/functions/game/setTime.md
deleted file mode 100644
index 746da62..0000000
--- a/python/docs/functions/game/setTime.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` setTime
-::: g2o.functions.game.setTime
\ No newline at end of file
diff --git a/python/docs/functions/npc/clearNpcActions.md b/python/docs/functions/npc/clearNpcActions.md
deleted file mode 100644
index 260b721..0000000
--- a/python/docs/functions/npc/clearNpcActions.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` clearNpcActions
-::: g2o.functions.npc.clearNpcActions
\ No newline at end of file
diff --git a/python/docs/functions/npc/createNpc.md b/python/docs/functions/npc/createNpc.md
deleted file mode 100644
index 9ca47f4..0000000
--- a/python/docs/functions/npc/createNpc.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` createNpc
-::: g2o.functions.npc.createNpc
\ No newline at end of file
diff --git a/python/docs/functions/npc/destroyNpc.md b/python/docs/functions/npc/destroyNpc.md
deleted file mode 100644
index 749a635..0000000
--- a/python/docs/functions/npc/destroyNpc.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` destroyNpc
-::: g2o.functions.npc.destroyNpc
\ No newline at end of file
diff --git a/python/docs/functions/npc/getNpcAction.md b/python/docs/functions/npc/getNpcAction.md
deleted file mode 100644
index a4eecbe..0000000
--- a/python/docs/functions/npc/getNpcAction.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getNpcAction
-::: g2o.functions.npc.getNpcAction
\ No newline at end of file
diff --git a/python/docs/functions/npc/getNpcActions.md b/python/docs/functions/npc/getNpcActions.md
deleted file mode 100644
index 87e4f57..0000000
--- a/python/docs/functions/npc/getNpcActions.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getNpcActions
-::: g2o.functions.npc.getNpcActions
\ No newline at end of file
diff --git a/python/docs/functions/npc/getNpcActionsCount.md b/python/docs/functions/npc/getNpcActionsCount.md
deleted file mode 100644
index a142724..0000000
--- a/python/docs/functions/npc/getNpcActionsCount.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getNpcActionsCount
-::: g2o.functions.npc.getNpcActionsCount
\ No newline at end of file
diff --git a/python/docs/functions/npc/getNpcHostPlayer.md b/python/docs/functions/npc/getNpcHostPlayer.md
deleted file mode 100644
index 3b05e65..0000000
--- a/python/docs/functions/npc/getNpcHostPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getNpcHostPlayer
-::: g2o.functions.npc.getNpcHostPlayer
\ No newline at end of file
diff --git a/python/docs/functions/npc/getNpcLastActionId.md b/python/docs/functions/npc/getNpcLastActionId.md
deleted file mode 100644
index cc8d304..0000000
--- a/python/docs/functions/npc/getNpcLastActionId.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` getNpcLastActionId
-::: g2o.functions.npc.getNpcLastActionId
\ No newline at end of file
diff --git a/python/docs/functions/npc/isNpc.md b/python/docs/functions/npc/isNpc.md
deleted file mode 100644
index 0f1a383..0000000
--- a/python/docs/functions/npc/isNpc.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` isNpc
-::: g2o.functions.npc.isNpc
\ No newline at end of file
diff --git a/python/docs/functions/npc/isNpcActionFinished.md b/python/docs/functions/npc/isNpcActionFinished.md
deleted file mode 100644
index 9af658e..0000000
--- a/python/docs/functions/npc/isNpcActionFinished.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` isNpcActionFinished
-::: g2o.functions.npc.isNpcActionFinished
\ No newline at end of file
diff --git a/python/docs/functions/npc/npcAttackMelee.md b/python/docs/functions/npc/npcAttackMelee.md
deleted file mode 100644
index 3c2037c..0000000
--- a/python/docs/functions/npc/npcAttackMelee.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` npcAttackMelee
-::: g2o.functions.npc.npcAttackMelee
\ No newline at end of file
diff --git a/python/docs/functions/npc/npcAttackRanged.md b/python/docs/functions/npc/npcAttackRanged.md
deleted file mode 100644
index de22ed0..0000000
--- a/python/docs/functions/npc/npcAttackRanged.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` npcAttackRanged
-::: g2o.functions.npc.npcAttackRanged
\ No newline at end of file
diff --git a/python/docs/functions/npc/npcSpellCast.md b/python/docs/functions/npc/npcSpellCast.md
deleted file mode 100644
index ff3a578..0000000
--- a/python/docs/functions/npc/npcSpellCast.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` npcSpellCast
-::: g2o.functions.npc.npcSpellCast
\ No newline at end of file
diff --git a/python/docs/functions/npc/npcUseClosestMob.md b/python/docs/functions/npc/npcUseClosestMob.md
deleted file mode 100644
index 8fed2db..0000000
--- a/python/docs/functions/npc/npcUseClosestMob.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` npcUseClosestMob
-::: g2o.functions.npc.npcUseClosestMob
\ No newline at end of file
diff --git a/python/docs/functions/npc/setNpcHostPlayer.md b/python/docs/functions/npc/setNpcHostPlayer.md
deleted file mode 100644
index 4ba8aa7..0000000
--- a/python/docs/functions/npc/setNpcHostPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# `function` setNpcHostPlayer
-::: g2o.functions.npc.setNpcHostPlayer
\ No newline at end of file
diff --git a/python/docs/functions/player/addBan.md b/python/docs/functions/player/addBan.md
deleted file mode 100644
index e8b588e..0000000
--- a/python/docs/functions/player/addBan.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` addBan
-::: g2o.functions.player.addBan
\ No newline at end of file
diff --git a/python/docs/functions/player/applyPlayerOverlay.md b/python/docs/functions/player/applyPlayerOverlay.md
deleted file mode 100644
index 3db1421..0000000
--- a/python/docs/functions/player/applyPlayerOverlay.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` applyPlayerOverlay
-::: g2o.functions.player.applyPlayerOverlay
\ No newline at end of file
diff --git a/python/docs/functions/player/ban.md b/python/docs/functions/player/ban.md
deleted file mode 100644
index 4cbdb94..0000000
--- a/python/docs/functions/player/ban.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` ban
-::: g2o.functions.player.ban
\ No newline at end of file
diff --git a/python/docs/functions/player/drawWeapon.md b/python/docs/functions/player/drawWeapon.md
deleted file mode 100644
index d4564c4..0000000
--- a/python/docs/functions/player/drawWeapon.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` drawWeapon
-::: g2o.functions.player.drawWeapon
\ No newline at end of file
diff --git a/python/docs/functions/player/equipItem.md b/python/docs/functions/player/equipItem.md
deleted file mode 100644
index e243166..0000000
--- a/python/docs/functions/player/equipItem.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` equipItem
-::: g2o.functions.player.equipItem
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerAmulet.md b/python/docs/functions/player/getPlayerAmulet.md
deleted file mode 100644
index 12a4a4e..0000000
--- a/python/docs/functions/player/getPlayerAmulet.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerAmulet
-::: g2o.functions.player.getPlayerAmulet
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerAngle.md b/python/docs/functions/player/getPlayerAngle.md
deleted file mode 100644
index d4dd1d0..0000000
--- a/python/docs/functions/player/getPlayerAngle.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerAngle
-::: g2o.functions.player.getPlayerAngle
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerAni.md b/python/docs/functions/player/getPlayerAni.md
deleted file mode 100644
index 36a0e42..0000000
--- a/python/docs/functions/player/getPlayerAni.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerAni
-::: g2o.functions.player.getPlayerAni
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerArmor.md b/python/docs/functions/player/getPlayerArmor.md
deleted file mode 100644
index 1dac6b1..0000000
--- a/python/docs/functions/player/getPlayerArmor.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerArmor
-::: g2o.functions.player.getPlayerArmor
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerAtVector.md b/python/docs/functions/player/getPlayerAtVector.md
deleted file mode 100644
index 73bbfd7..0000000
--- a/python/docs/functions/player/getPlayerAtVector.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerAtVector
-::: g2o.functions.player.getPlayerAtVector
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerBelt.md b/python/docs/functions/player/getPlayerBelt.md
deleted file mode 100644
index 9e1c5e7..0000000
--- a/python/docs/functions/player/getPlayerBelt.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerBelt
-::: g2o.functions.player.getPlayerBelt
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerCameraPosition.md b/python/docs/functions/player/getPlayerCameraPosition.md
deleted file mode 100644
index c71e714..0000000
--- a/python/docs/functions/player/getPlayerCameraPosition.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerCameraPosition
-::: g2o.functions.player.getPlayerCameraPosition
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerCollision.md b/python/docs/functions/player/getPlayerCollision.md
deleted file mode 100644
index cc22aef..0000000
--- a/python/docs/functions/player/getPlayerCollision.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerCollision
-::: g2o.functions.player.getPlayerCollision
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerColor.md b/python/docs/functions/player/getPlayerColor.md
deleted file mode 100644
index 6e80b3a..0000000
--- a/python/docs/functions/player/getPlayerColor.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerColor
-::: g2o.functions.player.getPlayerColor
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerContext.md b/python/docs/functions/player/getPlayerContext.md
deleted file mode 100644
index ba6c143..0000000
--- a/python/docs/functions/player/getPlayerContext.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerContext
-::: g2o.functions.player.getPlayerContext
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerDexterity.md b/python/docs/functions/player/getPlayerDexterity.md
deleted file mode 100644
index d42be22..0000000
--- a/python/docs/functions/player/getPlayerDexterity.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerDexterity
-::: g2o.functions.player.getPlayerDexterity
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerFaceAnis.md b/python/docs/functions/player/getPlayerFaceAnis.md
deleted file mode 100644
index 3aa2adf..0000000
--- a/python/docs/functions/player/getPlayerFaceAnis.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerFaceAnis
-::: g2o.functions.player.getPlayerFaceAnis
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerFatness.md b/python/docs/functions/player/getPlayerFatness.md
deleted file mode 100644
index 65e5722..0000000
--- a/python/docs/functions/player/getPlayerFatness.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerFatness
-::: g2o.functions.player.getPlayerFatness
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerFocus.md b/python/docs/functions/player/getPlayerFocus.md
deleted file mode 100644
index c42b479..0000000
--- a/python/docs/functions/player/getPlayerFocus.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerFocus
-::: g2o.functions.player.getPlayerFocus
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerHealth.md b/python/docs/functions/player/getPlayerHealth.md
deleted file mode 100644
index 2196ace..0000000
--- a/python/docs/functions/player/getPlayerHealth.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerHealth
-::: g2o.functions.player.getPlayerHealth
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerHelmet.md b/python/docs/functions/player/getPlayerHelmet.md
deleted file mode 100644
index 3fe611c..0000000
--- a/python/docs/functions/player/getPlayerHelmet.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerHelmet
-::: g2o.functions.player.getPlayerHelmet
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerIP.md b/python/docs/functions/player/getPlayerIP.md
deleted file mode 100644
index 39a3316..0000000
--- a/python/docs/functions/player/getPlayerIP.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerIP
-::: g2o.functions.player.getPlayerIP
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerInstance.md b/python/docs/functions/player/getPlayerInstance.md
deleted file mode 100644
index 38f7b08..0000000
--- a/python/docs/functions/player/getPlayerInstance.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerInstance
-::: g2o.functions.player.getPlayerInstance
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerInvisible.md b/python/docs/functions/player/getPlayerInvisible.md
deleted file mode 100644
index 7f8670d..0000000
--- a/python/docs/functions/player/getPlayerInvisible.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerInvisible
-::: g2o.functions.player.getPlayerInvisible
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerMacAddr.md b/python/docs/functions/player/getPlayerMacAddr.md
deleted file mode 100644
index 81218b5..0000000
--- a/python/docs/functions/player/getPlayerMacAddr.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerMacAddr
-::: g2o.functions.player.getPlayerMacAddr
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerMana.md b/python/docs/functions/player/getPlayerMana.md
deleted file mode 100644
index ebecf40..0000000
--- a/python/docs/functions/player/getPlayerMana.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerMana
-::: g2o.functions.player.getPlayerMana
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerMaxHealth.md b/python/docs/functions/player/getPlayerMaxHealth.md
deleted file mode 100644
index 3094e52..0000000
--- a/python/docs/functions/player/getPlayerMaxHealth.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerMaxHealth
-::: g2o.functions.player.getPlayerMaxHealth
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerMaxMana.md b/python/docs/functions/player/getPlayerMaxMana.md
deleted file mode 100644
index b711d6e..0000000
--- a/python/docs/functions/player/getPlayerMaxMana.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerMaxMana
-::: g2o.functions.player.getPlayerMaxMana
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerMeleeWeapon.md b/python/docs/functions/player/getPlayerMeleeWeapon.md
deleted file mode 100644
index e6c5c71..0000000
--- a/python/docs/functions/player/getPlayerMeleeWeapon.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerMeleeWeapon
-::: g2o.functions.player.getPlayerMeleeWeapon
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerName.md b/python/docs/functions/player/getPlayerName.md
deleted file mode 100644
index 90a499e..0000000
--- a/python/docs/functions/player/getPlayerName.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerName
-::: g2o.functions.player.getPlayerName
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerPing.md b/python/docs/functions/player/getPlayerPing.md
deleted file mode 100644
index b6f20da..0000000
--- a/python/docs/functions/player/getPlayerPing.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerPing
-::: g2o.functions.player.getPlayerPing
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerPosition.md b/python/docs/functions/player/getPlayerPosition.md
deleted file mode 100644
index bb0552f..0000000
--- a/python/docs/functions/player/getPlayerPosition.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerPosition
-::: g2o.functions.player.getPlayerPosition
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerRangedWeapon.md b/python/docs/functions/player/getPlayerRangedWeapon.md
deleted file mode 100644
index 8d468c5..0000000
--- a/python/docs/functions/player/getPlayerRangedWeapon.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerRangedWeapon
-::: g2o.functions.player.getPlayerRangedWeapon
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerRespawnTime.md b/python/docs/functions/player/getPlayerRespawnTime.md
deleted file mode 100644
index 392b55a..0000000
--- a/python/docs/functions/player/getPlayerRespawnTime.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerRespawnTime
-::: g2o.functions.player.getPlayerRespawnTime
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerRing.md b/python/docs/functions/player/getPlayerRing.md
deleted file mode 100644
index 9ca2f35..0000000
--- a/python/docs/functions/player/getPlayerRing.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerRing
-::: g2o.functions.player.getPlayerRing
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerScale.md b/python/docs/functions/player/getPlayerScale.md
deleted file mode 100644
index aaa2423..0000000
--- a/python/docs/functions/player/getPlayerScale.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerScale
-::: g2o.functions.player.getPlayerScale
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerSerial.md b/python/docs/functions/player/getPlayerSerial.md
deleted file mode 100644
index b589492..0000000
--- a/python/docs/functions/player/getPlayerSerial.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerSerial
-::: g2o.functions.player.getPlayerSerial
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerShield.md b/python/docs/functions/player/getPlayerShield.md
deleted file mode 100644
index b05ab9a..0000000
--- a/python/docs/functions/player/getPlayerShield.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerShield
-::: g2o.functions.player.getPlayerShield
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerSkillWeapon.md b/python/docs/functions/player/getPlayerSkillWeapon.md
deleted file mode 100644
index 96f13e3..0000000
--- a/python/docs/functions/player/getPlayerSkillWeapon.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerSkillWeapon
-::: g2o.functions.player.getPlayerSkillWeapon
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerSpell.md b/python/docs/functions/player/getPlayerSpell.md
deleted file mode 100644
index 3b550ca..0000000
--- a/python/docs/functions/player/getPlayerSpell.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerSpell
-::: g2o.functions.player.getPlayerSpell
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerStrength.md b/python/docs/functions/player/getPlayerStrength.md
deleted file mode 100644
index 6cb167f..0000000
--- a/python/docs/functions/player/getPlayerStrength.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerStrength
-::: g2o.functions.player.getPlayerStrength
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerTalent.md b/python/docs/functions/player/getPlayerTalent.md
deleted file mode 100644
index c2b977d..0000000
--- a/python/docs/functions/player/getPlayerTalent.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerTalent
-::: g2o.functions.player.getPlayerTalent
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerUID.md b/python/docs/functions/player/getPlayerUID.md
deleted file mode 100644
index 992e536..0000000
--- a/python/docs/functions/player/getPlayerUID.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerUID
-::: g2o.functions.player.getPlayerUID
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerVirtualWorld.md b/python/docs/functions/player/getPlayerVirtualWorld.md
deleted file mode 100644
index 2a83835..0000000
--- a/python/docs/functions/player/getPlayerVirtualWorld.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerVirtualWorld
-::: g2o.functions.player.getPlayerVirtualWorld
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerVisual.md b/python/docs/functions/player/getPlayerVisual.md
deleted file mode 100644
index 7aeabce..0000000
--- a/python/docs/functions/player/getPlayerVisual.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerVisual
-::: g2o.functions.player.getPlayerVisual
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerWeaponMode.md b/python/docs/functions/player/getPlayerWeaponMode.md
deleted file mode 100644
index 9978588..0000000
--- a/python/docs/functions/player/getPlayerWeaponMode.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerWeaponMode
-::: g2o.functions.player.getPlayerWeaponMode
\ No newline at end of file
diff --git a/python/docs/functions/player/getPlayerWorld.md b/python/docs/functions/player/getPlayerWorld.md
deleted file mode 100644
index 5d6450c..0000000
--- a/python/docs/functions/player/getPlayerWorld.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getPlayerWorld
-::: g2o.functions.player.getPlayerWorld
\ No newline at end of file
diff --git a/python/docs/functions/player/giveItem.md b/python/docs/functions/player/giveItem.md
deleted file mode 100644
index 4419f7d..0000000
--- a/python/docs/functions/player/giveItem.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` giveItem
-::: g2o.functions.player.giveItem
\ No newline at end of file
diff --git a/python/docs/functions/player/hitPlayer.md b/python/docs/functions/player/hitPlayer.md
deleted file mode 100644
index 251e1ad..0000000
--- a/python/docs/functions/player/hitPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` hitPlayer
-::: g2o.functions.player.hitPlayer
\ No newline at end of file
diff --git a/python/docs/functions/player/isPlayerConnected.md b/python/docs/functions/player/isPlayerConnected.md
deleted file mode 100644
index 2cd80fa..0000000
--- a/python/docs/functions/player/isPlayerConnected.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` isPlayerConnected
-::: g2o.functions.player.isPlayerConnected
\ No newline at end of file
diff --git a/python/docs/functions/player/isPlayerDead.md b/python/docs/functions/player/isPlayerDead.md
deleted file mode 100644
index 81a0577..0000000
--- a/python/docs/functions/player/isPlayerDead.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` isPlayerDead
-::: g2o.functions.player.isPlayerDead
\ No newline at end of file
diff --git a/python/docs/functions/player/isPlayerSpawned.md b/python/docs/functions/player/isPlayerSpawned.md
deleted file mode 100644
index d8255a7..0000000
--- a/python/docs/functions/player/isPlayerSpawned.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` isPlayerSpawned
-::: g2o.functions.player.isPlayerSpawned
\ No newline at end of file
diff --git a/python/docs/functions/player/isPlayerUnconscious.md b/python/docs/functions/player/isPlayerUnconscious.md
deleted file mode 100644
index c707ddc..0000000
--- a/python/docs/functions/player/isPlayerUnconscious.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` isPlayerUnconscious
-::: g2o.functions.player.isPlayerUnconscious
\ No newline at end of file
diff --git a/python/docs/functions/player/kick.md b/python/docs/functions/player/kick.md
deleted file mode 100644
index d0c6bc7..0000000
--- a/python/docs/functions/player/kick.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` kick
-::: g2o.functions.player.kick
\ No newline at end of file
diff --git a/python/docs/functions/player/playAni.md b/python/docs/functions/player/playAni.md
deleted file mode 100644
index 2d307de..0000000
--- a/python/docs/functions/player/playAni.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` playAni
-::: g2o.functions.player.playAni
\ No newline at end of file
diff --git a/python/docs/functions/player/playFaceAni.md b/python/docs/functions/player/playFaceAni.md
deleted file mode 100644
index 344f81f..0000000
--- a/python/docs/functions/player/playFaceAni.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` playFaceAni
-::: g2o.functions.player.playFaceAni
\ No newline at end of file
diff --git a/python/docs/functions/player/readySpell.md b/python/docs/functions/player/readySpell.md
deleted file mode 100644
index 9625532..0000000
--- a/python/docs/functions/player/readySpell.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` readySpell
-::: g2o.functions.player.readySpell
\ No newline at end of file
diff --git a/python/docs/functions/player/removeItem.md b/python/docs/functions/player/removeItem.md
deleted file mode 100644
index fe8ff65..0000000
--- a/python/docs/functions/player/removeItem.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` removeItem
-::: g2o.functions.player.removeItem
\ No newline at end of file
diff --git a/python/docs/functions/player/removePlayerOverlay.md b/python/docs/functions/player/removePlayerOverlay.md
deleted file mode 100644
index 4b4d934..0000000
--- a/python/docs/functions/player/removePlayerOverlay.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` removePlayerOverlay
-::: g2o.functions.player.removePlayerOverlay
\ No newline at end of file
diff --git a/python/docs/functions/player/removeWeapon.md b/python/docs/functions/player/removeWeapon.md
deleted file mode 100644
index 077e642..0000000
--- a/python/docs/functions/player/removeWeapon.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` removeWeapon
-::: g2o.functions.player.removeWeapon
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerAngle.md b/python/docs/functions/player/setPlayerAngle.md
deleted file mode 100644
index df389a3..0000000
--- a/python/docs/functions/player/setPlayerAngle.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerAngle
-::: g2o.functions.player.setPlayerAngle
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerCollision.md b/python/docs/functions/player/setPlayerCollision.md
deleted file mode 100644
index 51ae600..0000000
--- a/python/docs/functions/player/setPlayerCollision.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerCollision
-::: g2o.functions.player.setPlayerCollision
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerColor.md b/python/docs/functions/player/setPlayerColor.md
deleted file mode 100644
index eb3bf4b..0000000
--- a/python/docs/functions/player/setPlayerColor.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerColor
-::: g2o.functions.player.setPlayerColor
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerDexterity.md b/python/docs/functions/player/setPlayerDexterity.md
deleted file mode 100644
index 7881693..0000000
--- a/python/docs/functions/player/setPlayerDexterity.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerDexterity
-::: g2o.functions.player.setPlayerDexterity
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerFatness.md b/python/docs/functions/player/setPlayerFatness.md
deleted file mode 100644
index 85b8693..0000000
--- a/python/docs/functions/player/setPlayerFatness.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerFatness
-::: g2o.functions.player.setPlayerFatness
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerHealth.md b/python/docs/functions/player/setPlayerHealth.md
deleted file mode 100644
index de58fb3..0000000
--- a/python/docs/functions/player/setPlayerHealth.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerHealth
-::: g2o.functions.player.setPlayerHealth
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerInstance.md b/python/docs/functions/player/setPlayerInstance.md
deleted file mode 100644
index 6cb4168..0000000
--- a/python/docs/functions/player/setPlayerInstance.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerInstance
-::: g2o.functions.player.setPlayerInstance
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerInvisible.md b/python/docs/functions/player/setPlayerInvisible.md
deleted file mode 100644
index a2e08aa..0000000
--- a/python/docs/functions/player/setPlayerInvisible.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerInvisible
-::: g2o.functions.player.setPlayerInvisible
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerMana.md b/python/docs/functions/player/setPlayerMana.md
deleted file mode 100644
index c9d6985..0000000
--- a/python/docs/functions/player/setPlayerMana.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerMana
-::: g2o.functions.player.setPlayerMana
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerMaxHealth.md b/python/docs/functions/player/setPlayerMaxHealth.md
deleted file mode 100644
index 1344701..0000000
--- a/python/docs/functions/player/setPlayerMaxHealth.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerMaxHealth
-::: g2o.functions.player.setPlayerMaxHealth
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerMaxMana.md b/python/docs/functions/player/setPlayerMaxMana.md
deleted file mode 100644
index aeb55cb..0000000
--- a/python/docs/functions/player/setPlayerMaxMana.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerMaxMana
-::: g2o.functions.player.setPlayerMaxMana
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerName.md b/python/docs/functions/player/setPlayerName.md
deleted file mode 100644
index a3598a2..0000000
--- a/python/docs/functions/player/setPlayerName.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerName
-::: g2o.functions.player.setPlayerName
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerRespawnTime.md b/python/docs/functions/player/setPlayerRespawnTime.md
deleted file mode 100644
index 153e560..0000000
--- a/python/docs/functions/player/setPlayerRespawnTime.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerRespawnTime
-::: g2o.functions.player.setPlayerRespawnTime
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerScale.md b/python/docs/functions/player/setPlayerScale.md
deleted file mode 100644
index 0ad2ca2..0000000
--- a/python/docs/functions/player/setPlayerScale.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerScale
-::: g2o.functions.player.setPlayerScale
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerSkillWeapon.md b/python/docs/functions/player/setPlayerSkillWeapon.md
deleted file mode 100644
index 855f05b..0000000
--- a/python/docs/functions/player/setPlayerSkillWeapon.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerSkillWeapon
-::: g2o.functions.player.setPlayerSkillWeapon
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerStrength.md b/python/docs/functions/player/setPlayerStrength.md
deleted file mode 100644
index 2c22a05..0000000
--- a/python/docs/functions/player/setPlayerStrength.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerStrength
-::: g2o.functions.player.setPlayerStrength
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerTalent.md b/python/docs/functions/player/setPlayerTalent.md
deleted file mode 100644
index cb880f3..0000000
--- a/python/docs/functions/player/setPlayerTalent.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerTalent
-::: g2o.functions.player.setPlayerTalent
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerVirtualWorld.md b/python/docs/functions/player/setPlayerVirtualWorld.md
deleted file mode 100644
index 8f504d2..0000000
--- a/python/docs/functions/player/setPlayerVirtualWorld.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerVirtualWorld
-::: g2o.functions.player.setPlayerVirtualWorld
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerVisual.md b/python/docs/functions/player/setPlayerVisual.md
deleted file mode 100644
index 004b4b0..0000000
--- a/python/docs/functions/player/setPlayerVisual.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerVisual
-::: g2o.functions.player.setPlayerVisual
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerWeaponMode.md b/python/docs/functions/player/setPlayerWeaponMode.md
deleted file mode 100644
index 3deeb74..0000000
--- a/python/docs/functions/player/setPlayerWeaponMode.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerWeaponMode
-::: g2o.functions.player.setPlayerWeaponMode
\ No newline at end of file
diff --git a/python/docs/functions/player/setPlayerWorld.md b/python/docs/functions/player/setPlayerWorld.md
deleted file mode 100644
index 794c51b..0000000
--- a/python/docs/functions/player/setPlayerWorld.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` setPlayerWorld
-::: g2o.functions.player.setPlayerWorld
\ No newline at end of file
diff --git a/python/docs/functions/player/spawnPlayer.md b/python/docs/functions/player/spawnPlayer.md
deleted file mode 100644
index 2282583..0000000
--- a/python/docs/functions/player/spawnPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` spawnPlayer
-::: g2o.functions.player.spawnPlayer
\ No newline at end of file
diff --git a/python/docs/functions/player/stopAni.md b/python/docs/functions/player/stopAni.md
deleted file mode 100644
index e50be7c..0000000
--- a/python/docs/functions/player/stopAni.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` stopAni
-::: g2o.functions.player.stopAni
\ No newline at end of file
diff --git a/python/docs/functions/player/stopFaceAni.md b/python/docs/functions/player/stopFaceAni.md
deleted file mode 100644
index 9868f31..0000000
--- a/python/docs/functions/player/stopFaceAni.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` stopFaceAni
-::: g2o.functions.player.stopFaceAni
\ No newline at end of file
diff --git a/python/docs/functions/player/unequipItem.md b/python/docs/functions/player/unequipItem.md
deleted file mode 100644
index e3506c0..0000000
--- a/python/docs/functions/player/unequipItem.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` unequipItem
-::: g2o.functions.player.unequipItem
\ No newline at end of file
diff --git a/python/docs/functions/player/unspawnPlayer.md b/python/docs/functions/player/unspawnPlayer.md
deleted file mode 100644
index 33e0d9d..0000000
--- a/python/docs/functions/player/unspawnPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` unspawnPlayer
-::: g2o.functions.player.unspawnPlayer
\ No newline at end of file
diff --git a/python/docs/functions/player/useItem.md b/python/docs/functions/player/useItem.md
deleted file mode 100644
index 33fb460..0000000
--- a/python/docs/functions/player/useItem.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` useItem
-::: g2o.functions.player.useItem
\ No newline at end of file
diff --git a/python/docs/functions/player/useItemToState.md b/python/docs/functions/player/useItemToState.md
deleted file mode 100644
index 38b5762..0000000
--- a/python/docs/functions/player/useItemToState.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` useItemToState
-::: g2o.functions.player.useItemToState
\ No newline at end of file
diff --git a/python/docs/functions/streamer/findNearbyPlayers.md b/python/docs/functions/streamer/findNearbyPlayers.md
deleted file mode 100644
index c2fe294..0000000
--- a/python/docs/functions/streamer/findNearbyPlayers.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` findNearbyPlayers
-::: g2o.functions.streamer.findNearbyPlayers
\ No newline at end of file
diff --git a/python/docs/functions/streamer/getSpawnedPlayersForPlayer.md b/python/docs/functions/streamer/getSpawnedPlayersForPlayer.md
deleted file mode 100644
index 3d5301e..0000000
--- a/python/docs/functions/streamer/getSpawnedPlayersForPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getSpawnedPlayersForPlayer
-::: g2o.functions.streamer.getSpawnedPlayersForPlayer
\ No newline at end of file
diff --git a/python/docs/functions/streamer/getStreamedPlayersByPlayer.md b/python/docs/functions/streamer/getStreamedPlayersByPlayer.md
deleted file mode 100644
index 6532fd8..0000000
--- a/python/docs/functions/streamer/getStreamedPlayersByPlayer.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getStreamedPlayersByPlayer
-::: g2o.functions.streamer.getStreamedPlayersByPlayer
\ No newline at end of file
diff --git a/python/docs/functions/waypoint/getNearestWaypoint.md b/python/docs/functions/waypoint/getNearestWaypoint.md
deleted file mode 100644
index 210aa26..0000000
--- a/python/docs/functions/waypoint/getNearestWaypoint.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getNearestWaypoint
-::: g2o.functions.waypoint.getNearestWaypoint
\ No newline at end of file
diff --git a/python/docs/functions/waypoint/getWaypoint.md b/python/docs/functions/waypoint/getWaypoint.md
deleted file mode 100644
index 3245be3..0000000
--- a/python/docs/functions/waypoint/getWaypoint.md
+++ /dev/null
@@ -1,2 +0,0 @@
-#`function` getWaypoint
-::: g2o.functions.waypoint.getWaypoint
\ No newline at end of file
diff --git a/python/docs/howto/localdebug.md b/python/docs/howto/localdebug.md
deleted file mode 100644
index 1d547fe..0000000
--- a/python/docs/howto/localdebug.md
+++ /dev/null
@@ -1,47 +0,0 @@
-## Debug with VSCode
-
-1. Install **debugpy** module
-
- `pip install debugpy`
-
-2. Add to your code listening to the default `5678` port with debug adapter
-
- ```python
- import debugpy
- debugpy.listen(5678, in_process_debug_adapter=True)
- ```
-
-3. Launch your G2O Server
-
-4. In VSCode, go to your Python script, press **F5** and select **Attach using Process ID**
-
- 
-
-5. Find G2O Server process and select it
-
- 
-
-
-
-!!! warning
- Sometimes **debugpy** isn't terminating process even after server is closed. Keep an eye on process list while attaching, so you can terminate them manually.
-
-## Debug with PDB
-
-Python Debugger (PDB) is already implemented by default, so you can place breakpoints right away
-
-```python
-@g2o.event('onTime')
-def evtTime(**kwargs):
- a = 5
- b = 246
- c = a * b
-
- breakpoint()
-
- print(kwargs)
-```
-
-That way PDB interface will show up on breakpoint encounter, and you can use it [as usual](https://docs.python.org/3/library/pdb.html)
-
-
\ No newline at end of file
diff --git a/python/g2o/classes/sky.py b/python/g2o/classes/sky.py
deleted file mode 100644
index a018ac6..0000000
--- a/python/g2o/classes/sky.py
+++ /dev/null
@@ -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()
-
\ No newline at end of file
diff --git a/python/g2o/classes/way.py b/python/g2o/classes/way.py
deleted file mode 100644
index 733b8a9..0000000
--- a/python/g2o/classes/way.py
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/python/g2o/constants/__init__.py b/python/g2o/constants/__init__.py
deleted file mode 100644
index 7bbe048..0000000
--- a/python/g2o/constants/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-from .anticheat import *
-from .context import *
-from .damage import *
-from .general import *
-from .hand import *
-from .item import *
-from .network import *
-from .npc import *
-from .reliability import *
-from .skillweapon import *
-from .talent import *
-from .weaponmode import *
-from .weather import *
\ No newline at end of file
diff --git a/python/g2o/constants/anticheat.py b/python/g2o/constants/anticheat.py
deleted file mode 100644
index 65e35de..0000000
--- a/python/g2o/constants/anticheat.py
+++ /dev/null
@@ -1,3 +0,0 @@
-import sqg2oconst
-
-AC_SPEED_HACK = sqg2oconst.AC_SPEED_HACK
\ No newline at end of file
diff --git a/python/g2o/constants/context.py b/python/g2o/constants/context.py
deleted file mode 100644
index ea18b07..0000000
--- a/python/g2o/constants/context.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import sqg2oconst
-
-DAMAGE_CTX = sqg2oconst.DAMAGE_CTX
-EQUIPMENT_CTX = sqg2oconst.EQUIPMENT_CTX
\ No newline at end of file
diff --git a/python/g2o/constants/damage.py b/python/g2o/constants/damage.py
deleted file mode 100644
index f7e4317..0000000
--- a/python/g2o/constants/damage.py
+++ /dev/null
@@ -1,11 +0,0 @@
-import sqg2oconst
-
-DAMAGE_UNKNOWN = sqg2oconst.DAMAGE_UNKNOWN
-DAMAGE_BARRIER = sqg2oconst.DAMAGE_BARRIER
-DAMAGE_BLUNT = sqg2oconst.DAMAGE_BLUNT
-DAMAGE_EDGE = sqg2oconst.DAMAGE_EDGE
-DAMAGE_FIRE = sqg2oconst.DAMAGE_FIRE
-DAMAGE_FLY = sqg2oconst.DAMAGE_FLY
-DAMAGE_MAGIC = sqg2oconst.DAMAGE_MAGIC
-DAMAGE_POINT = sqg2oconst.DAMAGE_POINT
-DAMAGE_FALL = sqg2oconst.DAMAGE_FALL
\ No newline at end of file
diff --git a/python/g2o/constants/general.py b/python/g2o/constants/general.py
deleted file mode 100644
index b6f3c48..0000000
--- a/python/g2o/constants/general.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import sqg2oconst
-
-DEBUG_MODE = sqg2oconst.DEBUG_MODE
-CLIENT_SIDE = sqg2oconst.CLIENT_SIDE
-SERVER_SIDE = sqg2oconst.SERVER_SIDE
\ No newline at end of file
diff --git a/python/g2o/constants/hand.py b/python/g2o/constants/hand.py
deleted file mode 100644
index 38b2365..0000000
--- a/python/g2o/constants/hand.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import sqg2oconst
-
-HAND_LEFT = sqg2oconst.HAND_LEFT
-HAND_RIGHT = sqg2oconst.HAND_RIGHT
\ No newline at end of file
diff --git a/python/g2o/constants/item.py b/python/g2o/constants/item.py
deleted file mode 100644
index 5f901c1..0000000
--- a/python/g2o/constants/item.py
+++ /dev/null
@@ -1,38 +0,0 @@
-import sqg2oconst
-
-ITEM_CAT_NONE = sqg2oconst.ITEM_CAT_NONE
-ITEM_CAT_NF = sqg2oconst.ITEM_CAT_NF
-ITEM_CAT_FF = sqg2oconst.ITEM_CAT_FF
-ITEM_CAT_MUN = sqg2oconst.ITEM_CAT_MUN
-ITEM_CAT_ARMOR = sqg2oconst.ITEM_CAT_ARMOR
-ITEM_CAT_FOOD = sqg2oconst.ITEM_CAT_FOOD
-ITEM_CAT_DOCS = sqg2oconst.ITEM_CAT_DOCS
-ITEM_CAT_POTION = sqg2oconst.ITEM_CAT_POTION
-ITEM_CAT_LIGHT = sqg2oconst.ITEM_CAT_LIGHT
-ITEM_CAT_RUNE = sqg2oconst.ITEM_CAT_RUNE
-ITEM_CAT_MAGIC = sqg2oconst.ITEM_CAT_MAGIC
-ITEM_FLAG_DAG = sqg2oconst.ITEM_FLAG_DAG
-ITEM_FLAG_SWD = sqg2oconst.ITEM_FLAG_SWD
-ITEM_FLAG_AXE = sqg2oconst.ITEM_FLAG_AXE
-ITEM_FLAG_2HD_SWD = sqg2oconst.ITEM_FLAG_2HD_SWD
-ITEM_FLAG_2HD_AXE = sqg2oconst.ITEM_FLAG_2HD_AXE
-ITEM_FLAG_SHIELD = sqg2oconst.ITEM_FLAG_SHIELD
-ITEM_FLAG_BOW = sqg2oconst.ITEM_FLAG_BOW
-ITEM_FLAG_CROSSBOW = sqg2oconst.ITEM_FLAG_CROSSBOW
-ITEM_FLAG_RING = sqg2oconst.ITEM_FLAG_RING
-ITEM_FLAG_AMULET = sqg2oconst.ITEM_FLAG_AMULET
-ITEM_FLAG_BELT = sqg2oconst.ITEM_FLAG_BELT
-ITEM_FLAG_DROPPED = sqg2oconst.ITEM_FLAG_DROPPED
-ITEM_FLAG_MI = sqg2oconst.ITEM_FLAG_MI
-ITEM_FLAG_MULTI = sqg2oconst.ITEM_FLAG_MULTI
-ITEM_FLAG_NFOCUS = sqg2oconst.ITEM_FLAG_NFOCUS
-ITEM_FLAG_CREATEAMMO = sqg2oconst.ITEM_FLAG_CREATEAMMO
-ITEM_FLAG_NSPLIT = sqg2oconst.ITEM_FLAG_NSPLIT
-ITEM_FLAG_DRINK = sqg2oconst.ITEM_FLAG_DRINK
-ITEM_FLAG_TORCH = sqg2oconst.ITEM_FLAG_TORCH
-ITEM_FLAG_THROW = sqg2oconst.ITEM_FLAG_THROW
-ITEM_FLAG_ACTIVE = sqg2oconst.ITEM_FLAG_ACTIVE
-ITEM_WEAR_NO = sqg2oconst.ITEM_WEAR_NO
-ITEM_WEAR_TORSO = sqg2oconst.ITEM_WEAR_TORSO
-ITEM_WEAR_HEAD = sqg2oconst.ITEM_WEAR_HEAD
-ITEM_WEAR_LIGHT = sqg2oconst.ITEM_WEAR_LIGHT
diff --git a/python/g2o/constants/network.py b/python/g2o/constants/network.py
deleted file mode 100644
index 16a2eb5..0000000
--- a/python/g2o/constants/network.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import sqg2oconst
-
-DISCONNECTED = sqg2oconst.DISCONNECTED
-LOST_CONNECTION = sqg2oconst.LOST_CONNECTION
-HAS_CRASHED = sqg2oconst.HAS_CRASHED
\ No newline at end of file
diff --git a/python/g2o/constants/npc.py b/python/g2o/constants/npc.py
deleted file mode 100644
index a70b990..0000000
--- a/python/g2o/constants/npc.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import sqg2oconst
-
-ATTACK_RUN = sqg2oconst.ATTACK_RUN
-ATTACK_FORWARD = sqg2oconst.ATTACK_FORWARD
-ATTACK_LEFT = sqg2oconst.ATTACK_LEFT
-ATTACK_RIGHT = sqg2oconst.ATTACK_RIGHT
-ACTION_CLEAR_QUEUE = sqg2oconst.ACTION_CLEAR_QUEUE
-ACTION_APPLY_OVERLAY = sqg2oconst.ACTION_APPLY_OVERLAY
-ACTION_REMOVE_OVERLAY = sqg2oconst.ACTION_REMOVE_OVERLAY
-ACTION_PLAY_ANI = sqg2oconst.ACTION_PLAY_ANI
-ACTION_STOP_ANI = sqg2oconst.ACTION_STOP_ANI
-ACTION_EQUIP_ITEM = sqg2oconst.ACTION_EQUIP_ITEM
-ACTION_UNEQUIP_ITEM = sqg2oconst.ACTION_UNEQUIP_ITEM
-ACTION_WEAPON_MODE = sqg2oconst.ACTION_WEAPON_MODE
-ACTION_DRAW_WEAPON = sqg2oconst.ACTION_DRAW_WEAPON
-ACTION_REMOVE_WEAPON = sqg2oconst.ACTION_REMOVE_WEAPON
-ACTION_USE_ITEM = sqg2oconst.ACTION_USE_ITEM
-ACTION_USE_ITEM_TO_STATE = sqg2oconst.ACTION_USE_ITEM_TO_STATE
-ACTION_READY_SPELL = sqg2oconst.ACTION_READY_SPELL
-ACTION_UNREADY_SPELL = sqg2oconst.ACTION_UNREADY_SPELL
-ACTION_ATTACK_MELEE_WEAPON = sqg2oconst.ACTION_ATTACK_MELEE_WEAPON
-ACTION_ATTACK_RANGED_WEAPON = sqg2oconst.ACTION_ATTACK_RANGED_WEAPON
-ACTION_SPELL_CAST = sqg2oconst.ACTION_SPELL_CAST
-ACTION_USE_MOB_SCHEME = sqg2oconst.ACTION_USE_MOB_SCHEME
-ACTION_SHOOT_AT = sqg2oconst.ACTION_SHOOT_AT
-ACTION_START_AIM_AT = sqg2oconst.ACTION_START_AIM_AT
-ACTION_STOP_AIM_AT = sqg2oconst.ACTION_STOP_AIM_AT
-ACTION_SCRIPT = sqg2oconst.ACTION_SCRIPT
\ No newline at end of file
diff --git a/python/g2o/constants/reliability.py b/python/g2o/constants/reliability.py
deleted file mode 100644
index 40353b1..0000000
--- a/python/g2o/constants/reliability.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import sqg2oconst
-
-UNRELIABLE = sqg2oconst.UNRELIABLE
-UNRELIABLE_SEQUENCED = sqg2oconst.UNRELIABLE_SEQUENCED
-RELIABLE = sqg2oconst.RELIABLE
-RELIABLE_ORDERED = sqg2oconst.RELIABLE_ORDERED
-RELIABLE_SEQUENCED = sqg2oconst.RELIABLE_SEQUENCED
\ No newline at end of file
diff --git a/python/g2o/constants/skillweapon.py b/python/g2o/constants/skillweapon.py
deleted file mode 100644
index efcbad3..0000000
--- a/python/g2o/constants/skillweapon.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import sqg2oconst
-
-WEAPON_1H = sqg2oconst.WEAPON_1H
-WEAPON_2H = sqg2oconst.WEAPON_2H
-WEAPON_BOW = sqg2oconst.WEAPON_BOW
-WEAPON_CBOW = sqg2oconst.WEAPON_CBOW
\ No newline at end of file
diff --git a/python/g2o/constants/talent.py b/python/g2o/constants/talent.py
deleted file mode 100644
index fc8fbf4..0000000
--- a/python/g2o/constants/talent.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import sqg2oconst
-
-TALENT_1H = sqg2oconst.TALENT_1H
-TALENT_2H = sqg2oconst.TALENT_2H
-TALENT_BOW = sqg2oconst.TALENT_BOW
-TALENT_CROSSBOW = sqg2oconst.TALENT_CROSSBOW
-TALENT_PICK_LOCKS = sqg2oconst.TALENT_PICK_LOCKS
-TALENT_PICKPOCKET = sqg2oconst.TALENT_PICKPOCKET
-TALENT_MAGE = sqg2oconst.TALENT_MAGE
-TALENT_SNEAK = sqg2oconst.TALENT_SNEAK
-TALENT_REGENERATE = sqg2oconst.TALENT_REGENERATE
-TALENT_FIREMASTER = sqg2oconst.TALENT_FIREMASTER
-TALENT_ACROBATIC = sqg2oconst.TALENT_ACROBATIC
-TALENT_PICKPOCKET_UNUSED = sqg2oconst.TALENT_PICKPOCKET_UNUSED
-TALENT_SMITH = sqg2oconst.TALENT_SMITH
-TALENT_RUNES = sqg2oconst.TALENT_RUNES
-TALENT_ALCHEMY = sqg2oconst.TALENT_ALCHEMY
-TALENT_THROPHY = sqg2oconst.TALENT_THROPHY
-TALENT_A = sqg2oconst.TALENT_A
-TALENT_B = sqg2oconst.TALENT_B
-TALENT_C = sqg2oconst.TALENT_C
-TALENT_D = sqg2oconst.TALENT_D
-TALENT_E = sqg2oconst.TALENT_E
-TALENT_MAX = sqg2oconst.TALENT_MAX
\ No newline at end of file
diff --git a/python/g2o/constants/weaponmode.py b/python/g2o/constants/weaponmode.py
deleted file mode 100644
index 68633f9..0000000
--- a/python/g2o/constants/weaponmode.py
+++ /dev/null
@@ -1,11 +0,0 @@
-import sqg2oconst
-
-WEAPONMODE_NONE = sqg2oconst.WEAPONMODE_NONE
-WEAPONMODE_FIST = sqg2oconst.WEAPONMODE_FIST
-WEAPONMODE_DAG = sqg2oconst.WEAPONMODE_DAG
-WEAPONMODE_1HS = sqg2oconst.WEAPONMODE_1HS
-WEAPONMODE_2HS = sqg2oconst.WEAPONMODE_2HS
-WEAPONMODE_BOW = sqg2oconst.WEAPONMODE_BOW
-WEAPONMODE_CBOW = sqg2oconst.WEAPONMODE_CBOW
-WEAPONMODE_MAG = sqg2oconst.WEAPONMODE_MAG
-WEAPONMODE_MAX = sqg2oconst.WEAPONMODE_MAX
\ No newline at end of file
diff --git a/python/g2o/constants/weather.py b/python/g2o/constants/weather.py
deleted file mode 100644
index feedf42..0000000
--- a/python/g2o/constants/weather.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import sqg2oconst
-
-WEATHER_SNOW = sqg2oconst.WEATHER_SNOW
-WEATHER_RAIN = sqg2oconst.WEATHER_RAIN
\ No newline at end of file
diff --git a/ruff.toml b/ruff.toml
new file mode 100644
index 0000000..5b14ed6
--- /dev/null
+++ b/ruff.toml
@@ -0,0 +1,77 @@
+# Exclude a variety of commonly ignored directories.
+exclude = [
+ ".bzr",
+ ".direnv",
+ ".eggs",
+ ".git",
+ ".git-rewrite",
+ ".hg",
+ ".ipynb_checkpoints",
+ ".mypy_cache",
+ ".nox",
+ ".pants.d",
+ ".pyenv",
+ ".pytest_cache",
+ ".pytype",
+ ".ruff_cache",
+ ".svn",
+ ".tox",
+ ".venv",
+ ".vscode",
+ "__pypackages__",
+ "_build",
+ "buck-out",
+ "build",
+ "dist",
+ "node_modules",
+ "site-packages",
+ "venv",
+]
+
+# Same as Black.
+line-length = 88
+indent-width = 4
+
+# Assume Python 3.9
+target-version = "py39"
+
+[lint]
+# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
+# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
+# McCabe complexity (`C901`) by default.
+select = ["E4", "E7", "E9", "F"]
+ignore = []
+
+# Allow fix for all enabled rules (when `--fix`) is provided.
+fixable = ["ALL"]
+unfixable = []
+
+# Allow unused variables when underscore-prefixed.
+dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
+
+[format]
+# Like Black, use double quotes for strings.
+quote-style = "double"
+
+# Like Black, indent with spaces, rather than tabs.
+indent-style = "space"
+
+# Like Black, respect magic trailing commas.
+skip-magic-trailing-comma = false
+
+# Like Black, automatically detect the appropriate line ending.
+line-ending = "auto"
+
+# Enable auto-formatting of code examples in docstrings. Markdown,
+# reStructuredText code/literal blocks and doctests are all supported.
+#
+# This is currently disabled by default, but it is planned for this
+# to be opt-out in the future.
+docstring-code-format = false
+
+# Set the line length limit used when formatting code snippets in
+# docstrings.
+#
+# This only has an effect when the `docstring-code-format` setting is
+# enabled.
+docstring-code-line-length = "dynamic"
\ No newline at end of file
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
deleted file mode 100644
index 3558bf9..0000000
--- a/source/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-
-add_library(${PYG2O_MODULE_NAME} SHARED
- bind.cpp
-)
-
-add_subdirectory(dependencies)
-add_subdirectory(NoNut)
-add_subdirectory(classes)
-add_subdirectory(constants)
-add_subdirectory(events)
-add_subdirectory(functions)
-add_subdirectory(types)
-
-# pybind11 requires to declare all modules before interpretor initializes, so we have to load main.cpp last
-target_sources(${PYG2O_MODULE_NAME}
- PRIVATE
- main.cpp
-)
-
-if(DEFINED OUT_FILE_SUFFIX)
- set_target_properties(${PYG2O_MODULE_NAME}
- PROPERTIES
- PREFIX ""
- SUFFIX ".${OUT_FILE_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
-endif()
-
-# Use this code to auto copy module to your server folder for quick testing
-# Change paths to your actual paths
-
-# add_custom_command(TARGET ${PYG2O_MODULE_NAME} POST_BUILD
-# COMMAND ${CMAKE_COMMAND} -E copy
-# ${CMAKE_BINARY_DIR}/source/${PYG2O_MODULE_NAME}.${OUT_FILE_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}
-# C:\\server-windows-x64
-# COMMAND ${CMAKE_COMMAND} -E copy_directory
-# ${CMAKE_SOURCE_DIR}/python/g2o
-# C:\\server-windows-x64\\g2o)
\ No newline at end of file
diff --git a/source/NoNut/CMakeLists.txt b/source/NoNut/CMakeLists.txt
deleted file mode 100644
index d14b014..0000000
--- a/source/NoNut/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-
-target_sources(${PYG2O_MODULE_NAME}
- PRIVATE
- source/Array.cpp
- source/Class.cpp
- source/Constant.cpp
- source/CustomTypes.cpp
- source/StaticClass.cpp
-)
-
-target_include_directories(${PYG2O_MODULE_NAME}
- PRIVATE
- "include/"
-)
\ No newline at end of file
diff --git a/source/NoNut/LICENSE b/source/NoNut/LICENSE
deleted file mode 100644
index 9c6472f..0000000
--- a/source/NoNut/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Martis
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/source/NoNut/README.md b/source/NoNut/README.md
deleted file mode 100644
index d346c15..0000000
--- a/source/NoNut/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Modified version of a C++ wrapper for the Gothic 2 Online API
-Original: https://gitlab.com/g2o/modules/dependencies/nonut
\ No newline at end of file
diff --git a/source/NoNut/include/Array.h b/source/NoNut/include/Array.h
deleted file mode 100644
index ac4496c..0000000
--- a/source/NoNut/include/Array.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef NONUT_CORE_ARRAY_H
-#define NONUT_CORE_ARRAY_H
-#include "CommonHeader.h"
-
-#include "Utils.h"
-#include
-
-namespace nonut
-{
- class Array
- {
- public:
- explicit Array(SQObject object);
- ~Array();
-
- [[nodiscard]] size_t size() const;
-
- template
- T get(const String index)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- T result{};
- sq_pushobject(vm, object);
- sq_pushstring(vm, index.c_str(), index.length());
-
- if (SQ_FAILED(sq_get(vm, -2)))
- {
- sq_pop(vm, 1);
- return result;
- }
- if constexpr (std::is_same_v)
- {
- const SQChar* intermediateResult = nullptr;
- sq_getstring(vm, -1, &intermediateResult);
- result = intermediateResult;
- }
- else
- {
- sqGetValue(vm, -1, &result);
- }
-
- sq_pop(vm, 2);
- return result;
- }
-
- private:
- SQObject object;
- size_t cachedSize;
- };
-}
-#endif // NONUT_CORE_ARRAY_H
diff --git a/source/NoNut/include/Bind.h b/source/NoNut/include/Bind.h
deleted file mode 100644
index 3ab66d1..0000000
--- a/source/NoNut/include/Bind.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef NONUT_CORE_BIND_H
-#define NONUT_CORE_BIND_H
-
-#include "CommonHeader.h"
-#include
-
-namespace nonut
-{
- //TODO: Finish Bind and remove placeholder
-
- class Bind
- {
- public:
- static void registerFunction(String funcName, const SQFUNCTION func, size_t funcSize)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- const auto top = sq_gettop(vm);
- sq_pushroottable(vm);
- sq_pushstring(vm, funcName.c_str(), funcName.length());
- sq_newclosure(vm, func, 0); //create a new function
- sq_newslot(vm, -3, SQFalse);
- sq_settop(vm, top);
- }
-
- //template
- //static void Function(String functionName, F& function)
- //{
- //
- //}
- };
-}
-#endif // NONUT_CORE_BIND_H
diff --git a/source/NoNut/include/Class.h b/source/NoNut/include/Class.h
deleted file mode 100644
index 5a41b28..0000000
--- a/source/NoNut/include/Class.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef NONUT_CORE_CLASS_H
-#define NONUT_CORE_CLASS_H
-#include "CommonHeader.h"
-#include
-
-#include "Function.h"
-// ReSharper disable once CppUnusedIncludeDirective
-#include "Property.h"
-#include "Instance.h"
-
-#define METHOD_CTOR(methodName) methodName(#methodName, this->classObjectInstance, this->classObject)
-#define PROPERTY_CTOR(propertyName) propertyName(#propertyName, this->classObjectInstance)
-#define COPY_CTOR(type) type(const type& other) : type(other.getInstance()){} \
- type& operator=(const type& other) = delete
-
-namespace nonut
-{
- static constexpr auto CONSTRUCTOR_NAME = "constructor";
-
- class Class : public Instance
- {
- public:
- Class(const String& className, SQObject classObjectInstance = SQ_NULL);
- virtual ~Class();
-
- [[nodiscard]] SQObject getInstance() const override;
- bool isNull() const;
-
- protected:
- // Object holding information about class
- SQObject classObject{};
- // Class object instance
- SQObject classObjectInstance{};
-
- template
- void classCtor(Args ... args)
- {
- Function ctor(CONSTRUCTOR_NAME, classObjectInstance, classObject);
- ctor(std::forward(args)...);
- }
-
- bool bIsNull = false;
- };
-}
-#endif // NONUT_CORE_CLASS_H
diff --git a/source/NoNut/include/CommonHeader.h b/source/NoNut/include/CommonHeader.h
deleted file mode 100644
index 53a6e49..0000000
--- a/source/NoNut/include/CommonHeader.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef CORE_COMMONHEADER_H_
-#define CORE_COMMONHEADER_H_
-
-#include "sqrat.h"
-
-namespace nonut
-{
- using Int = SQInteger;
- using UInt = SQUnsignedInteger;
- using UInt32 = SQUnsignedInteger32;
- using Float = SQFloat;
- using Bool = SQBool;
- using String = std::string;
-
- constexpr SQObject SQ_NULL{ OT_NULL };
-}
-
-#endif // CORE_COMMONHEADER_H_
diff --git a/source/NoNut/include/Constant.h b/source/NoNut/include/Constant.h
deleted file mode 100644
index db10fc1..0000000
--- a/source/NoNut/include/Constant.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef NONUT_CORE_CONSTANT_H
-#define NONUT_CORE_CONSTANT_H
-#include "CommonHeader.h"
-#include
-
-namespace nonut
-{
- SQObject getConstTable();
-};
-#endif // NONUT_CORE_CONSTANT_H
diff --git a/source/NoNut/include/CustomTypes.h b/source/NoNut/include/CustomTypes.h
deleted file mode 100644
index 5756f05..0000000
--- a/source/NoNut/include/CustomTypes.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef NONUT_G2O_SHARED_CUSTOM_TYPES_H
-#define NONUT_G2O_SHARED_CUSTOM_TYPES_H
-
-#include
-#include
-#include "Utils.h"
-
-namespace py = pybind11;
-
-namespace nonut
-{
- struct GameTime : CustomType
- {
- void convert(SQObject object) override;
- Int day{};
- Int hour{};
- Int min{};
-
- auto toTuple()
- {
- return std::make_tuple(day, hour, min);
- }
- };
-
- struct Position2d : CustomType
- {
- void convert(SQObject object) override;
- Int x{};
- Int y{};
- auto toTuple()
- {
- return std::make_tuple(x, y);
- }
- };
-
- struct Position3d : CustomType
- {
- void convert(SQObject object) override;
- Float x{};
- Float y{};
- Float z{};
- auto toTuple()
- {
- return std::make_tuple(x, y, z);
- }
- };
-
- struct Size2d : CustomType
- {
- void convert(SQObject object) override;
- Int width{};
- Int height{};
- auto toTuple()
- {
- return std::make_tuple(width, height);
- }
- };
-
- struct Rect : CustomType
- {
- void convert(SQObject object) override;
- Int x;
- Int y;
- Int width;
- Int height;
- auto toTuple()
- {
- return std::make_tuple(x, y, width, height);
- }
- };
-
- struct UV : CustomType
- {
- void convert(SQObject object) override;
- Float x;
- Float y;
- Float width;
- Float height;
- auto toTuple()
- {
- return std::make_tuple(x, y, width, height);
- }
- };
-
- struct Resolution : CustomType
- {
- void convert(SQObject object) override;
- Int x{};
- Int y{};
- Int bpp{};
- auto toTuple()
- {
- return std::make_tuple(x, y, bpp);
- }
- };
-
- struct Item : CustomType
- {
- void convert(SQObject object) override;
- Int instance{};
- Int amount{};
- String name{};
- auto toTuple()
- {
- return std::make_tuple(instance, amount, name);
- }
- };
-
- struct Color : CustomType
- {
- void convert(SQObject object) override;
- Int r{};
- Int g{};
- Int b{};
- auto toTuple()
- {
- return std::make_tuple(r, g, b);
- }
- };
-
- struct BodyVisual : CustomType
- {
- void convert(SQObject object) override;
- String bodyModel{};
- Int bodyTxt{};
- String headModel{};
- Int headTxt{};
- auto toTuple()
- {
- return std::make_tuple(bodyModel, bodyTxt, headModel, headTxt);
- }
- };
-
- struct NetworkStats : CustomType
- {
- void convert(SQObject object) override;
- Int packetReceived{};
- Int packetlossTotal{};
- Int packetlossLastSecond{};
- Int messagesInResendBuffer{};
- Int messageInSendBuffer{};
- Int bytesInResendBuffer{};
- Int bytesInSendBuffer{};
- auto toTuple()
- {
- return std::make_tuple(
- packetReceived,
- packetlossTotal,
- packetlossLastSecond,
- messagesInResendBuffer,
- messageInSendBuffer,
- bytesInResendBuffer,
- bytesInSendBuffer);
- }
- };
-
- struct Position3dWithName : CustomType
- {
- void convert(SQObject object) override;
- String name{};
- Float x{};
- Float y{};
- Float z{};
- auto toTuple()
- {
- return std::make_tuple(name, x, y, z);
- }
- };
-
- struct SqDict : CustomType
- {
- void convert(SQObject object) override;
- py::dict data{};
- };
-
- struct SqList : CustomType
- {
- void convert(SQObject object) override;
- py::list data{};
- };
-}
-#endif // NONUT_G2O_SHARED_CUSTOM_TYPES_H
diff --git a/source/NoNut/include/Function.h b/source/NoNut/include/Function.h
deleted file mode 100644
index a40e5b2..0000000
--- a/source/NoNut/include/Function.h
+++ /dev/null
@@ -1,166 +0,0 @@
-#ifndef NONUT_CORE_FUNCTION_H
-#define NONUT_CORE_FUNCTION_H
-
-#include
-#include
-
-#include
-#include "Utils.h"
-
-#define FUNCTION_CTOR(function) function(#function)
-
-namespace nonut
-{
- class Class;
-
- template
- class Function
- {
- public:
- // Ctor for functions
- Function(const String& functionName, const SQObject env = getRootTable()) : envObj(env)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_pushobject(vm, envObj);
- sq_pushstring(vm, functionName.c_str(), functionName.length());
-
- // get the function from the root table
- if (SQ_FAILED(sq_get(vm, -2)))
- {
- sq_pop(vm, 1);
- throw;
- }
-
- // check the type
- if (const SQObjectType value_type = sq_gettype(vm, -1); value_type != OT_CLOSURE && value_type !=
- OT_NATIVECLOSURE)
- {
- sq_pop(vm, 2);
- throw;
- }
-
- // get function and add ref
- sq_getstackobj(vm, -1, &funcObj);
- sq_addref(vm, &funcObj);
-
- sq_pop(vm, 2);
- }
-
- // Ctor for class methods
- Function(const String& functionName, const SQObject classObjectInstance,
- const SQObject classObject) : envObj(classObjectInstance)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- isClassMethod = true; // Prevent release of the resources cause we don't own them
- sq_pushobject(vm, classObject);
- sq_pushstring(vm, functionName.c_str(), functionName.length());
-
- // get the function from the root table
- if (SQ_FAILED(sq_get(vm, -2)))
- {
- sq_pop(vm, 1);
- throw;
- }
-
- // check the type
- if (const SQObjectType value_type = sq_gettype(vm, -1); value_type != OT_CLOSURE && value_type !=
- OT_NATIVECLOSURE)
- {
- sq_pop(vm, 2);
- throw;
- }
-
- // get function and add ref
- sq_getstackobj(vm, -1, &funcObj);
- sq_addref(vm, &funcObj);
-
- sq_pop(vm, 2);
- }
-
- ~Function()
- {
- if (!isClassMethod)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_release(vm, &funcObj);
- sq_release(vm, &envObj);
- sq_resetobject(&funcObj);
- sq_resetobject(&envObj);
- }
- }
-
- ReturnType operator()(Args ... args)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- const auto top = sq_gettop(vm);
- sq_pushobject(vm, funcObj);
- sq_pushobject(vm, envObj);
- auto debug = sq_gettop(vm);
- (sqPushValue(vm, args), ...);
-
- if constexpr (std::is_same_v)
- {
- debug = sq_gettop(vm);
- auto returnCode = sq_call(vm, ARG_COUNT + 1, SQFalse, SQFalse); // TODO: HANDLE ERROR RETURN CODE
- sq_pop(vm, 2);
- sq_settop(vm, top);
- return void();
- }
- else
- {
- auto returnCode = sq_call(vm, ARG_COUNT + 1, SQTrue, SQFalse); // TODO: HANDLE ERROR RETURN CODE
-
- std::optional result;
-
- if constexpr (std::derived_from)
- {
- result = std::make_optional();
- auto intermediateResult = returnVar();
- result.value().convert(intermediateResult);
- sq_release(vm, &intermediateResult);
- sq_resetobject(&intermediateResult);
- }
- else if constexpr (std::derived_from)
- {
- auto intermediateResult = returnVar();
- //result = std::make_optional(ReturnType(intermediateResult));
- result.emplace(ReturnType(intermediateResult));
-
- sq_release(vm, &intermediateResult);
- sq_resetobject(&intermediateResult);
- }
- else
- {
- result = std::make_optional(returnVar());
- }
-
- sq_pop(vm, 2);
- sq_settop(vm, top);
- return result.value();
- }
- }
-
- [[nodiscard]] SQObject getObject() const
- {
- return funcObj;
- }
-
- private:
- SQObject funcObj{};
- SQObject envObj{};
- bool isClassMethod = false;
- static constexpr auto ARG_COUNT{sizeof...(Args)};
-
- static SQObject getRootTable()
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- SQObject rootTable{};
- sq_pushroottable(vm);
- sq_getstackobj(vm, -1, &rootTable);
- sq_addref(vm, &rootTable);
- sq_pop(vm, 1); // pop root table
- return rootTable;
- }
- };
-}
-#endif // NONUT_CORE_FUNCTION_H
diff --git a/source/NoNut/include/Instance.h b/source/NoNut/include/Instance.h
deleted file mode 100644
index fd68a80..0000000
--- a/source/NoNut/include/Instance.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef NONUT_CORE_INSTANCE_H
-#define NONUT_CORE_INSTANCE_H
-#include
-
-namespace nonut
-{
- class Instance
- {
- public:
- [[nodiscard]] virtual SQObject getInstance() const = 0;
- };
-}
-#endif //NONUT_CORE_INSTANCE_H
diff --git a/source/NoNut/include/Property.h b/source/NoNut/include/Property.h
deleted file mode 100644
index 6bd2d29..0000000
--- a/source/NoNut/include/Property.h
+++ /dev/null
@@ -1,135 +0,0 @@
-#ifndef NONUT_CORE_PROPERTY_H
-#define NONUT_CORE_PROPERTY_H
-
-#include
-
-#include
-#include "Utils.h"
-#include "Class.h"
-
-namespace nonut
-{
- template
- T getProperty(const SQObject& object, const String& name)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- const auto top = sq_gettop(vm);
-
- sq_pushobject(vm, object);
- sq_pushstring(vm, name.c_str(), name.length());
-
- if constexpr (std::derived_from)
- {
- SQObject intermediateResult{};
- if (SQ_SUCCEEDED(sq_get(vm, -2))) // pops property
- {
- sqGetValue(vm, -1, &intermediateResult);
- sq_pop(vm, 1); // pops result
- }
-
- sq_pop(vm, 1); // pops object
- sq_settop(vm, top);
- return T(intermediateResult);
- }
- else
- {
- T result{};
-
- if (SQ_SUCCEEDED(sq_get(vm, -2))) // pops property
- {
- sqGetValue(vm, -1, &result);
- sq_pop(vm, 1); // pops result
- }
-
- sq_pop(vm, 1); // pops object
- sq_settop(vm, top);
- return result;
- }
- }
-
- template <>
- inline bool getProperty(const SQObject& object, const String& name)
- {
- return getProperty(object, name);
- }
-
- template <>
- inline String getProperty(const SQObject& object, const String& name)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- const Int top = sq_gettop(vm);
- const SQChar* result{};
-
- sq_pushobject(vm, object);
- sq_pushstring(vm, name.c_str(), name.length());
-
- if (SQ_SUCCEEDED(sq_get(vm, -2))) // pops property
- {
- sq_getstring(vm, -1, &result);
- sq_pop(vm, 1); // pops result
- }
-
- sq_pop(vm, 1); // pops object
- sq_settop(vm, top);
- return result;
- }
-
-
- template
- void setProperty(SQObject& object, String& name, T value)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_pushobject(vm, object);
- sq_pushstring(vm, name.c_str(), name.length());
- if constexpr (std::derived_from)
- {
- sqPushValue(vm, value.getInstance());
- }
- else
- {
- sqPushValue(vm, value);
- }
-
-
- auto result = sq_set(vm, -3); // pops name and value
-
- sq_pop(vm, 1); // pops object
- }
-
- template
- class Property
- {
- public:
- Property(String propertyName, const SQObject object) : object(object),
- propertyName(std::move(propertyName))
- {
- }
-
- Property& operator=(const T& other) noexcept
- {
- set(other);
- return *this;
- }
-
- operator T()
- {
- return this->get();
- }
-
- [[nodiscard]] T get() const
- {
- return getProperty(object, propertyName);
- }
-
- void set(T value)
- {
- static_assert(!IsReadOnly, "Cannot set read-only property.");
- setProperty(object, propertyName, value);
- }
-
- private:
- SQObject object;
- String propertyName;
- };
-}
-#endif // NONUT_CORE_PROPERTY_H
diff --git a/source/NoNut/include/StaticClass.h b/source/NoNut/include/StaticClass.h
deleted file mode 100644
index 3df68a6..0000000
--- a/source/NoNut/include/StaticClass.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef NONUT_CORE_STATIC_CLASS_H
-#define NONUT_CORE_STATIC_CLASS_H
-
-#include "Function.h"
-#include "Property.h"
-
-#define METHOD_CTOR(methodName) methodName(#methodName, this->classObjectInstance, this->classObject)
-#define PROPERTY_CTOR(propertyName) propertyName(#propertyName, this->classObjectInstance)
-
-namespace nonut
-{
- class StaticClass
- {
- public:
- explicit StaticClass(const String& className);
- ~StaticClass();
-
- protected:
- // Object holding information about class
- SQObject classObject{};
- // Class object instance
- SQObject classObjectInstance{};
- };
-}
-#endif // NONUT_CORE_STATIC_CLASS_H
diff --git a/source/NoNut/include/StringHelpers.h b/source/NoNut/include/StringHelpers.h
deleted file mode 100644
index 27366c9..0000000
--- a/source/NoNut/include/StringHelpers.h
+++ /dev/null
@@ -1,347 +0,0 @@
-#ifndef NONUT_CORE_STRING_HELPERS_H
-#define NONUT_CORE_STRING_HELPERS_H
-#include
-#include
-
-namespace nonut
-{
- const std::unordered_map WINDOWS1250_UTF8_MAP
- {
- {'\x80', "\xe2\x82\xac"}, // euro sign
- {'\x82', "\xe2\x80\x9a"}, // lower quotation mark
- {'\x84', "\xe2\x80\x9e"}, // lower quotation marks
- {'\x85', "\xe2\x80\xa6"}, // ellipsis
- {'\x86', "\xe2\x80\xa0"}, // dagger
- {'\x87', "\xe2\x80\xa1"}, // double dagger
- {'\x89', "\xe2\x80\xb0"}, // per mille
- {'\x8a', "\xc5\xa0"}, // S with caron
- {'\x8b', "\xe2\x80\xb9"}, // left guillemet
- {'\x8c', "\xc5\x9a"}, // S with acute
- {'\x8d', "\xc5\xa4"}, // T with caron
- {'\x8e', "\xc5\xbd"}, // Z with caron
- {'\x8f', "\xc5\xb9"}, // Z with acute
-
- {'\x91', "\xe2\x80\x98"}, // upper quotation mark (opening)
- {'\x92', "\xe2\x80\x99"}, // upper quotation mark (closing)
- {'\x93', "\xe2\x80\x9c"}, // upper quotation marks (opening)
- {'\x94', "\xe2\x80\x9d"}, // upper quotation marks (closing)
- {'\x95', "\xe2\x80\xa2"}, // bullet sign
- {'\x96', "\xe2\x80\x93"}, // en dash
- {'\x97', "\xe2\x80\x94"}, // em dash
- {'\x99', "\xe2\x84\xa2"}, // trademark sign
- {'\x9a', "\xc5\xa1"}, // s with caron
- {'\x9b', "\xe2\x80\xba"}, // right guillemet
- {'\x9c', "\xc5\x9b"}, // s with acute
- {'\x9d', "\xc5\xa5"}, // t with caron
- {'\x9e', "\xc5\xbe"}, // z with caron
- {'\x9f', "\xc5\xba"}, // z with acute
-
- {'\xa0', "\x20"}, // NBSP
- {'\xa1', "\xcb\x87"}, // caron
- {'\xa2', "\xcb\x98"}, // breve
- {'\xa3', "\xc5\x81"}, // L with stroke
- {'\xa4', "\xc2\xa4"}, // currency sign
- {'\xa5', "\xc4\x84"}, // A with ogonek
- {'\xa6', "\xc2\xa6"}, // vertical bar
- {'\xa7', "\xc2\xa7"}, // section sign
- {'\xa8', "\xc2\xa8"}, // diaeresis
- {'\xa9', "\xc2\xa9"}, // copyright sign
- {'\xaa', "\xc5\x9e"}, // S-cedilla
- {'\xab', "\xc2\xab"}, // left guillemets
- {'\xac', "\xc2\xac"}, // negation
- {'\xad', "\xc2\xad"}, // soft hyphen
- {'\xae', "\xc2\xae"}, // registered trademark sign
- {'\xaf', "\xc5\xbb"}, // Z with dot above
-
- {'\xb0', "\xc2\xb0"}, // degree sign
- {'\xb1', "\xc2\xb1"}, // plus-minus sign
- {'\xb2', "\xcb\x9b"}, // ogonek
- {'\xb3', "\xc5\x82"}, // l with stroke
- {'\xb4', "\xc2\xb4"}, // acute accent
- {'\xb5', "\xc2\xb5"}, // Mu letter
- {'\xb6', "\xc2\xb6"}, // pilcrow
- {'\xb7', "\xc2\xb7"}, // middle dot
- {'\xb8', "\xc2\xb8"}, // cedilla
- {'\xb9', "\xc4\x85"}, // a with ogonek
- {'\xba', "\xc5\x9f"}, // s-cedilla
- {'\xbb', "\xc2\xbb"}, // right guillemets
- {'\xbc', "\xc4\xbd"}, // Lj-
- {'\xbd', "\xcb\x9d"}, // double acute accent
- {'\xbe', "\xc4\xbe"}, // lj-
- {'\xbf', "\xc5\xbc"}, // z with dot above
-
- {'\xc0', "\xc5\x94"}, // R with acute
- {'\xc1', "\xc3\x81"}, // A with acute
- {'\xc2', "\xc3\x82"}, // A-circumflex
- {'\xc3', "\xc4\x82"}, // A-breve
- {'\xc4', "\xc3\x84"}, // A with diaeresis
- {'\xc5', "\xc4\xb9"}, // L with acute
- {'\xc6', "\xc4\x86"}, // C with acute
- {'\xc7', "\xc3\x87"}, // C-cedilla
- {'\xc8', "\xc4\x8c"}, // C with caron
- {'\xc9', "\xc3\x89"}, // C with acute
- {'\xca', "\xc4\x98"}, // E with ogonek
- {'\xcb', "\xc3\x8b"}, // E with diaeresis
- {'\xcc', "\xc3\x8b"}, // E with caron
- {'\xcd', "\xc3\x8d"}, // I with acute
- {'\xce', "\xc3\x8e"}, // I-circumflex
- {'\xcf', "\xc4\x8e"}, // D with caron
-
- {'\xd0', "\xc4\x90"}, // crossed D
- {'\xd1', "\xc5\x83"}, // N with acute
- {'\xd2', "\xc5\x87"}, // N with caron
- {'\xd3', "\xc3\x93"}, // O with acute
- {'\xd4', "\xc3\x94"}, // O-circumflex
- {'\xd5', "\xc5\x90"}, // O with dobule accute
- {'\xd6', "\xc3\x96"}, // O with diaeresis
- {'\xd7', "\xc3\x97"}, // multiplication sign
- {'\xd8', "\xc5\x98"}, // R with caron
- {'\xd9', "\xc5\xae"}, // U with diacritic
- {'\xda', "\xc3\x9a"}, // U with acute
- {'\xdb', "\xc5\xb0"}, // U with double accent
- {'\xdc', "\xc3\x9c"}, // U with diaeresis
- {'\xdd', "\xc3\x9d"}, // Y with acute
- {'\xdf', "\xc5\xa2"}, // T-cedilla
-
- {'\xe0', "\xc5\x95"}, // r with acute
- {'\xe1', "\xc3\xa1"}, // a with acute
- {'\xe2', "\xc3\xa2"}, // a-circumflex
- {'\xe3', "\xc4\x83"}, // a-breve
- {'\xe4', "\xc3\xa4"}, // a with diaeresis
- {'\xe5', "\xc4\xba"}, // l with acute
- {'\xe6', "\xc4\x87"}, // c with acute
- {'\xe7', "\xc3\xa7"}, // c-cedilla
- {'\xe8', "\xc4\x8d"}, // c with caron
- {'\xe9', "\xc3\xa9"}, // c with acute
- {'\xea', "\xc4\x99"}, // e with ogonek
- {'\xeb', "\xc3\xab"}, // e with diaeresis
- {'\xec', "\xc4\x9b"}, // e with caron
- {'\xed', "\xc3\xad"}, // i with acute
- {'\xee', "\xc3\xae"}, // i-circumflex
- {'\xef', "\xc4\x8f"}, // d with caron
-
- {'\xf0', "\xc4\x91"}, // crossed d
- {'\xf1', "\xc5\x84"}, // n with acute
- {'\xf2', "\xc5\x88"}, // n with caron
- {'\xf3', "\xc3\xb3"}, // o with acute
- {'\xf4', "\xc3\xb4"}, // o-circumflex
- {'\xf5', "\xc5\x91"}, // o with double accent
- {'\xf6', "\xc3\xb6"}, // o with diaeresis
- {'\xf7', "\xc3\xb7"}, // division sign
- {'\xf8', "\xc5\x99"}, // r with caron
- {'\xf9', "\xc5\xaf"}, // u with diacritic
- {'\xfa', "\xc3\xba"}, // u with acute
- {'\xfb', "\xc5\xb1"}, // u with double accent
- {'\xfc', "\xc3\xbc"}, // u with diaeresis
- {'\xfd', "\xc3\xbd"}, // y with acute
- {'\xfe', "\xc5\xa3"}, // t-cedilla
- {'\xff', "\xcb\x99"}, // diactric dot
- };
-
- const std::unordered_map UTF8_WINDOWS1250_MAP
- {
- {"\xe2\x82\xac", '\x80'}, // euro sign
- {"\xe2\x80\x9a", '\x82'}, // lower quotation mark
- {"\xe2\x80\x9e", '\x84'}, // lower quotation marks
- {"\xe2\x80\xa6", '\x85'}, // ellipsis
- {"\xe2\x80\xa0", '\x86'}, // dagger
- {"\xe2\x80\xa1", '\x87'}, // double dagger
- {"\xe2\x80\xb0", '\x89'}, // per mille
- {"\xc5\xa0", '\x8a'}, // S with caron
- {"\xe2\x80\xb9", '\x8b'}, // left guillemet
- {"\xc5\x9a", '\x8c'}, // S with acute
- {"\xc5\xa4", '\x8d'}, // T with caron
- {"\xc5\xbd", '\x8e'}, // Z with caron
- {"\xc5\xb9", '\x8f'}, // Z with acute
-
- {"\xe2\x80\x98", '\x91'}, // upper quotation mark (opening)
- {"\xe2\x80\x99", '\x92'}, // upper quotation mark (closing)
- {"\xe2\x80\x9c", '\x93'}, // upper quotation marks (opening)
- {"\xe2\x80\x9d", '\x94'}, // upper quotation marks (closing)
- {"\xe2\x80\xa2", '\x95'}, // bullet sign
- {"\xe2\x80\x93", '\x96'}, // en dash
- {"\xe2\x80\x94", '\x97'}, // em dash
- {"\xe2\x84\xa2", '\x99'}, // trademark sign
- {"\xc5\xa1", '\x9a'}, // s with caron
- {"\xe2\x80\xba", '\x9b'}, // right guillemet
- {"\xc5\x9b", '\x9c'}, // s with acute
- {"\xc5\xa5", '\x9d'}, // t with caron
- {"\xc5\xbe", '\x9e'}, // z with caron
- {"\xc5\xba", '\x9f'}, // z with acute
-
- {"\x20", '\xa0'}, // NBSP
- {"\xcb\x87", '\xa1'}, // caron
- {"\xcb\x98", '\xa2'}, // breve
- {"\xc5\x81", '\xa3'}, // L with stroke
- {"\xc2\xa4", '\xa4'}, // currency sign
- {"\xc4\x84", '\xa5'}, // A with ogonek
- {"\xc2\xa6", '\xa6'}, // vertical bar
- {"\xc2\xa7", '\xa7'}, // section sign
- {"\xc2\xa8", '\xa8'}, // diaeresis
- {"\xc2\xa9", '\xa9'}, // copyright sign
- {"\xc5\x9e", '\xaa'}, // S-cedilla
- {"\xc2\xab", '\xab'}, // left guillemets
- {"\xc2\xac", '\xac'}, // negation
- {"\xc2\xad", '\xad'}, // soft hyphen
- {"\xc2\xae", '\xae'}, // registered trademark sign
- {"\xc5\xbb", '\xaf'}, // Z with dot above
-
- {"\xc2\xb0", '\xb0'}, // degree sign
- {"\xc2\xb1", '\xb1'}, // plus-minus sign
- {"\xcb\x9b", '\xb2'}, // ogonek
- {"\xc5\x82", '\xb3'}, // l with stroke
- {"\xc2\xb4", '\xb4'}, // acute accent
- {"\xc2\xb5", '\xb5'}, // Mu letter
- {"\xc2\xb6", '\xb6'}, // pilcrow
- {"\xc2\xb7", '\xb7'}, // middle dot
- {"\xc2\xb8", '\xb8'}, // cedilla
- {"\xc4\x85", '\xb9'}, // a with ogonek
- {"\xc5\x9f", '\xba'}, // s-cedilla
- {"\xc2\xbb", '\xbb'}, // right guillemets
- {"\xc4\xbd", '\xbc'}, // Lj-
- {"\xcb\x9d", '\xbd'}, // double acute accent
- {"\xc4\xbe", '\xbe'}, // lj-
- {"\xc5\xbc", '\xbf'}, // z with dot above
-
- {"\xc5\x94", '\xc0'}, // R with acute
- {"\xc3\x81", '\xc1'}, // A with acute
- {"\xc3\x82", '\xc2'}, // A-circumflex
- {"\xc4\x82", '\xc3'}, // A-breve
- {"\xc3\x84", '\xc4'}, // A with diaeresis
- {"\xc4\xb9", '\xc5'}, // L with acute
- {"\xc4\x86", '\xc6'}, // C with acute
- {"\xc3\x87", '\xc7'}, // C-cedilla
- {"\xc4\x8c", '\xc8'}, // C with caron
- {"\xc3\x89", '\xc9'}, // C with acute
- {"\xc4\x98", '\xca'}, // E with ogonek
- {"\xc3\x8b", '\xcb'}, // E with diaeresis
- {"\xc3\x8b", '\xcc'}, // E with caron
- {"\xc3\x8d", '\xcd'}, // I with acute
- {"\xc3\x8e", '\xce'}, // I-circumflex
- {"\xc4\x8e", '\xcf'}, // D with caron
-
- {"\xc4\x90", '\xd0'}, // crossed D
- {"\xc5\x83", '\xd1'}, // N with acute
- {"\xc5\x87", '\xd2'}, // N with caron
- {"\xc3\x93", '\xd3'}, // O with acute
- {"\xc3\x94", '\xd4'}, // O-circumflex
- {"\xc5\x90", '\xd5'}, // O with dobule accute
- {"\xc3\x96", '\xd6'}, // O with diaeresis
- {"\xc3\x97", '\xd7'}, // multiplication sign
- {"\xc5\x98", '\xd8'}, // R with caron
- {"\xc5\xae", '\xd9'}, // U with diacritic
- {"\xc3\x9a", '\xda'}, // U with acute
- {"\xc5\xb0", '\xdb'}, // U with double accent
- {"\xc3\x9c", '\xdc'}, // U with diaeresis
- {"\xc3\x9d", '\xdd'}, // Y with acute
- {"\xc5\xa2", '\xdf'}, // T-cedilla
-
- {"\xc5\x95", '\xe0'}, // r with acute
- {"\xc3\xa1", '\xe1'}, // a with acute
- {"\xc3\xa2", '\xe2'}, // a-circumflex
- {"\xc4\x83", '\xe3'}, // a-breve
- {"\xc3\xa4", '\xe4'}, // a with diaeresis
- {"\xc4\xba", '\xe5'}, // l with acute
- {"\xc4\x87", '\xe6'}, // c with acute
- {"\xc3\xa7", '\xe7'}, // c-cedilla
- {"\xc4\x8d", '\xe8'}, // c with caron
- {"\xc3\xa9", '\xe9'}, // c with acute
- {"\xc4\x99", '\xea'}, // e with ogonek
- {"\xc3\xab", '\xeb'}, // e with diaeresis
- {"\xc4\x9b", '\xec'}, // e with caron
- {"\xc3\xad", '\xed'}, // i with acute
- {"\xc3\xae", '\xee'}, // i-circumflex
- {"\xc4\x8f", '\xef'}, // d with caron
-
- {"\xc4\x91", '\xf0'}, // crossed d
- {"\xc5\x84", '\xf1'}, // n with acute
- {"\xc5\x88", '\xf2'}, // n with caron
- {"\xc3\xb3", '\xf3'}, // o with acute
- {"\xc3\xb4", '\xf4'}, // o-circumflex
- {"\xc5\x91", '\xf5'}, // o with double accent
- {"\xc3\xb6", '\xf6'}, // o with diaeresis
- {"\xc3\xb7", '\xf7'}, // division sign
- {"\xc5\x99", '\xf8'}, // r with caron
- {"\xc5\xaf", '\xf9'}, // u with diacritic
- {"\xc3\xba", '\xfa'}, // u with acute
- {"\xc5\xb1", '\xfb'}, // u with double accent
- {"\xc3\xbc", '\xfc'}, // u with diaeresis
- {"\xc3\xbd", '\xfd'}, // y with acute
- {"\xc5\xa3", '\xfe'}, // t-cedilla
- {"\xcb\x99", '\xff'}, // diactric dot
- };
-
- inline std::string win1250ToUTF8(const std::string& strRef)
- {
- std::string result;
- result.reserve(strRef.size() * 2);
-
- for (auto&& c : strRef)
- {
- if (WINDOWS1250_UTF8_MAP.contains(static_cast(c)))
- result += WINDOWS1250_UTF8_MAP.at(static_cast(c));
- else
- result += c;
- }
-
- return result;
- }
-
- inline std::string UTF8ToWin1250(const std::string& strRef)
- {
- std::string result;
- result.reserve(strRef.size());
- size_t charSize = 1;
-
- for (size_t i = 0; i < strRef.length(); ++i)
- {
- if (const int c = static_cast(strRef[i]); c >= 128)
- {
- if (c < 224)
- charSize = 2;
- else if (c < 240)
- charSize = 3;
- else if (c < 248)
- charSize = 4;
- else if (c == 252)
- charSize = 5;
- else
- charSize = 6;
- }
- // Update loop index according to UTF8 charSize;
- i += charSize - 1;
-
- if (charSize == 1)
- {
- result += strRef[i];
- continue;
- }
-
- if (i + charSize > strRef.length())
- {
- result += '?';
- return result;
- }
-
- String utfChar;
- utfChar.reserve(charSize);
-
- for (size_t j = 0; j < charSize; ++j)
- {
- utfChar += strRef[i + j];
- }
-
- if (UTF8_WINDOWS1250_MAP.contains(utfChar))
- {
- result += static_cast(UTF8_WINDOWS1250_MAP.at(utfChar));
- }
- else
- {
- result += '?';
- }
- }
-
- return result;
- }
-}
-#endif // NONUT_CORE_STRING_HELPERS_H
diff --git a/source/NoNut/include/Stringify.h b/source/NoNut/include/Stringify.h
deleted file mode 100644
index 9b4e3dc..0000000
--- a/source/NoNut/include/Stringify.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef NONUT_CORE_STRINGIFY_H
-#define NONUT_CORE_STRINGIFY_H
-
-#include "CommonHeader.h"
-#define QUOTIFY(arg) #arg
-#define STRINGIFY(arg) QUOTIFY(arg)
-
-namespace nonut
-{
- template
- class Stringify
- {
- public:
- virtual ~Stringify() = default;
-
- [[nodiscard]] virtual String toString() const
- {
- return STRINGIFY(T);
- }
- };
-}
-#endif //NONUT_CORE_STRINGIFY_H
diff --git a/source/NoNut/include/UserData.h b/source/NoNut/include/UserData.h
deleted file mode 100644
index 238c1bb..0000000
--- a/source/NoNut/include/UserData.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef NONUT_CORE_USER_DATA_H
-#define NONUT_CORE_USER_DATA_H
-
-#include
-
-namespace nonut
-{
- class UserData
- {
- public:
- SQUserPointer userPtr = nullptr;
- SQUserPointer tagPtr = nullptr;
- };
-}
-#endif //NONUT_CORE_INSTANCE_H
diff --git a/source/NoNut/include/Utils.h b/source/NoNut/include/Utils.h
deleted file mode 100644
index 504615f..0000000
--- a/source/NoNut/include/Utils.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef NONUT_CORE_UTILS_H
-#define NONUT_CORE_UTILS_H
-
-#include "Instance.h"
-#include "CommonHeader.h"
-
-namespace nonut
-{
- struct CustomType
- {
- virtual void convert(HSQOBJECT object) = 0;
- };
-
- template
- void sqGetValue(SQVM* vm, SQInteger idx, T outPtr)
- {
- static_assert(
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v,
- "Not supported return type");
-
- if constexpr (std::is_same_v)
- sq_getbool(vm, idx, outPtr);
- if constexpr (std::is_same_v)
- sq_getinteger(vm, idx, outPtr);
- if constexpr (std::is_same_v)
- sq_getfloat(vm, idx, outPtr);
- if constexpr (std::is_same_v)
- sq_getstring(vm, idx, outPtr);
- if constexpr (std::is_same_v)
- {
- sq_getstackobj(vm, idx, outPtr);
- sq_addref(vm, outPtr);
- }
- if constexpr (std::is_same_v)
- {
- sq_getuserpointer(vm, idx, outPtr);
- }
- }
-
- template
- void sqPushValue(SQVM* vm, T value)
- {
- static_assert(
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::derived_from,
- "Not supported return type");
-
- if constexpr (std::is_same_v)
- sq_pushbool(vm, value);
- if constexpr (std::is_same_v)
- sq_pushbool(vm, value);
- if constexpr (std::is_same_v)
- sq_pushinteger(vm, value);
- if constexpr (std::is_same_v)
- sq_pushfloat(vm, value);
- if constexpr (std::is_same_v)
- sq_pushstring(vm, value, -1);
- if constexpr (std::is_same_v)
- sq_pushobject(vm, value);
- if constexpr (std::is_same_v || std::is_same_v)
- sq_pushstring(vm, value.c_str(), value.length());
- if constexpr (std::is_same_v)
- sq_pushuserpointer(vm, value);
- if constexpr (std::derived_from)
- sq_pushobject(vm, value.getInstance());
- }
-
- template
- T returnVar()
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- static_assert(
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v ||
- std::is_same_v,
- "Not supported return type");
-
- T result{};
- sqGetValue(vm, -1, &result);
- sq_pop(vm, 1); // pops result
- return result;
- }
-
- template <>
- inline String returnVar()
- {
- const SQChar* result = "";
- sq_getstring(Sqrat::DefaultVM::Get(), -1, &result);
- sq_pop(Sqrat::DefaultVM::Get(), 1); // pops result
- return result;
- }
-}
-#endif // NONUT_CORE_UTILS_H
diff --git a/source/NoNut/source/Array.cpp b/source/NoNut/source/Array.cpp
deleted file mode 100644
index 7caa582..0000000
--- a/source/NoNut/source/Array.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "CommonHeader.h"
-#include "Array.h"
-
-namespace nonut
-{
- Array::Array(const SQObject object) : object(object), cachedSize(size())
- {
- }
-
- Array::~Array() = default;
-
- size_t Array::size() const
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_pushobject(vm, object);
- const auto result = sq_getsize(vm, -1);
- sq_pop(vm, 1);
- return static_cast(result);
- }
-}
diff --git a/source/NoNut/source/Class.cpp b/source/NoNut/source/Class.cpp
deleted file mode 100644
index b631bcb..0000000
--- a/source/NoNut/source/Class.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include "CommonHeader.h"
-#include "Class.h"
-
-namespace nonut
-{
- Class::Class(const String& className, const SQObject classObjectInstance)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- if (classObjectInstance._type == OT_NULL)
- {
- bIsNull = true;
- const auto top = sq_gettop(vm);
-
- sq_pushroottable(vm); //push root table
- sq_pushstring(vm, className.c_str(), className.length()); //push class name
-
- if (sq_get(vm, -2) == SQ_OK) //retrieve class
- {
- sq_getstackobj(vm, -1, &classObject);
- sq_addref(vm, &classObject);
- if (sq_createinstance(vm, -1) == SQ_OK) //create class instance
- {
- //1. Get object ptr
- sq_getstackobj(vm, -1, &this->classObjectInstance); //retrieve object
- sq_addref(vm, &this->classObjectInstance);
- //Add ref thanks to which object will not be immediately deleted
- sq_pop(vm, 1); // pop class instance
- }
- }
- sq_settop(vm, top); // TODO: FIX LEAK PROPERLY
- }
- else
- {
- this->classObjectInstance = classObjectInstance;
- const auto top = sq_gettop(vm);
- sq_addref(vm, &this->classObjectInstance);
-
- sq_pushroottable(vm); //push root table
- sq_pushstring(vm, className.c_str(), className.length()); //push class name
-
- if (sq_get(vm, -2) == SQ_OK) //retrieve class
- {
- sq_getstackobj(vm, -1, &classObject);
- sq_addref(vm, &classObject);
- }
-
- sq_settop(vm, top);
- }
- }
-
- Class::~Class()
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_release(vm, &classObject);
- sq_release(vm, &classObjectInstance);
- sq_resetobject(&classObject);
- sq_resetobject(&classObjectInstance);
- }
-
- SQObject Class::getInstance() const
- {
- return classObjectInstance;
- }
-
- bool Class::isNull() const
- {
- return bIsNull;
- }
-}
diff --git a/source/NoNut/source/Constant.cpp b/source/NoNut/source/Constant.cpp
deleted file mode 100644
index 75707b3..0000000
--- a/source/NoNut/source/Constant.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "Constant.h"
-
-namespace nonut
-{
- SQObject getConstTable()
- {
- SQObject obj;
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_pushconsttable(vm);
- sq_getstackobj(vm, -1, &obj);
- sq_pop(vm, 1); // No addref needed, since the consttable is always around
- return obj;
- }
-}
diff --git a/source/NoNut/source/CustomTypes.cpp b/source/NoNut/source/CustomTypes.cpp
deleted file mode 100644
index 1c34372..0000000
--- a/source/NoNut/source/CustomTypes.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-#include "CustomTypes.h"
-
-#include "Array.h"
-#include "Property.h"
-
-namespace nonut
-{
-#define GET_SLOT(slot, type) slot = arrayWrapper.get(#slot)
-
- void GameTime::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(day, Int);
- GET_SLOT(hour, Int);
- GET_SLOT(min, Int);
- }
-
- void Position2d::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(x, Int);
- GET_SLOT(y, Int);
- }
-
- void Position3d::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(x, Float);
- GET_SLOT(y, Float);
- GET_SLOT(z, Float);
- }
-
- void Size2d::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(width, Int);
- GET_SLOT(height, Int);
- }
-
- void Rect::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(x, Int);
- GET_SLOT(y, Int);
- GET_SLOT(width, Int);
- GET_SLOT(height, Int);
- }
-
- void UV::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(x, Float);
- GET_SLOT(y, Float);
- GET_SLOT(width, Float);
- GET_SLOT(height, Float);
- }
-
- void Resolution::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(x, Int);
- GET_SLOT(y, Int);
- GET_SLOT(bpp, Int);
- }
-
- void Item::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(instance, Int);
- GET_SLOT(amount, Int);
- GET_SLOT(name, String);
- }
-
- void Color::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(r, Int);
- GET_SLOT(g, Int);
- GET_SLOT(b, Int);
- }
-
- void BodyVisual::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(bodyModel, String);
- GET_SLOT(bodyTxt, Int);
- GET_SLOT(headModel, String);
- GET_SLOT(headTxt, Int);
- }
-
- void NetworkStats::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(packetReceived, Int);
- GET_SLOT(packetlossTotal, Int);
- GET_SLOT(packetlossLastSecond, Int);
- GET_SLOT(messagesInResendBuffer, Int);
- GET_SLOT(messageInSendBuffer, Int);
- GET_SLOT(bytesInResendBuffer, Int);
- GET_SLOT(bytesInSendBuffer, Int);
- }
-
- void Position3dWithName::convert(SQObject object)
- {
- Array arrayWrapper(object);
- GET_SLOT(name, String);
- GET_SLOT(x, Float);
- GET_SLOT(y, Float);
- GET_SLOT(z, Float);
- }
-
- void SqDict::convert(SQObject object)
- {
- Sqrat::Table tab = Sqrat::Table(object);
- Sqrat::Object::iterator tabIterator;
- int i = 0;
-
- while (tab.Next(tabIterator))
- {
- HSQOBJECT key = tabIterator.getKey();
- HSQOBJECT value = tabIterator.getValue();
-
- if (key._type != OT_STRING)
- continue;
-
- if (value._type == OT_STRING)
- data[sq_objtostring(&key)] = sq_objtostring(&value);
- else if (value._type == OT_INTEGER)
- data[sq_objtostring(&key)] = sq_objtointeger(&value);
- else if (value._type == OT_FLOAT)
- data[sq_objtostring(&key)] = sq_objtofloat(&value);
- else if (value._type == OT_TABLE)
- {
- SqDict result = SqDict();
- result.convert(value);
- data[sq_objtostring(&key)] = result.data;
- }
- else if (value._type == OT_ARRAY)
- {
- SqList result = SqList();
- result.convert(value);
- data[sq_objtostring(&key)] = result.data;
- }
- }
- }
-
- void SqList::convert(SQObject object)
- {
- Sqrat::Array tab = Sqrat::Array(object);
- Sqrat::Object::iterator arrIterator;
- int i = 0;
-
- while (tab.Next(arrIterator))
- {
- HSQOBJECT key = arrIterator.getKey();
- HSQOBJECT value = arrIterator.getValue();
-
- if (key._type != OT_INTEGER)
- continue;
-
- if (value._type == OT_STRING)
- data.insert(sq_objtointeger(&key), sq_objtofloat(&value));
- else if (value._type == OT_INTEGER)
- data.insert(sq_objtointeger(&key), sq_objtointeger(&value));
- else if (value._type == OT_FLOAT)
- data.insert(sq_objtointeger(&key), sq_objtofloat(&value));
- else if (value._type == OT_TABLE)
- {
- SqDict result = SqDict();
- result.convert(value);
- data.insert(sq_objtointeger(&key), result.data);
- }
- else if (value._type == OT_ARRAY)
- {
- SqList result = SqList();
- result.convert(value);
- data.insert(sq_objtointeger(&key), result.data);
- }
- }
- }
-}
diff --git a/source/NoNut/source/StaticClass.cpp b/source/NoNut/source/StaticClass.cpp
deleted file mode 100644
index e790a75..0000000
--- a/source/NoNut/source/StaticClass.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "StaticClass.h"
-
-namespace nonut
-{
- StaticClass::StaticClass(const String& className)
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- const auto top = sq_gettop(vm);
-
- sq_pushroottable(vm); //push root table
- sq_pushstring(vm, className.c_str(), className.length()); //push class instance name
-
- if (sq_get(vm, -2) == SQ_OK) //retrieve class instance
- {
- sq_getstackobj(vm, -1, &classObjectInstance);
- sq_addref(vm, &classObjectInstance);
- sq_getclass(vm, -1);
- sq_getstackobj(vm, -1, &classObject);
- sq_addref(vm, &classObject);
- }
- sq_settop(vm, top); // TODO: FIX LEAK PROPERLY
- }
-
- StaticClass::~StaticClass()
- {
- HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
- sq_release(vm, &classObject);
- sq_release(vm, &classObjectInstance);
- sq_resetobject(&classObject);
- sq_resetobject(&classObjectInstance);
- }
-}
diff --git a/source/classes/CMakeLists.txt b/source/classes/CMakeLists.txt
deleted file mode 100644
index 986c236..0000000
--- a/source/classes/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-target_sources(${PYG2O_MODULE_NAME}
- PRIVATE
- squirrel/Daedalus.cpp
- squirrel/DamageDescription.cpp
- squirrel/ItemGround.cpp
- squirrel/ItemsGround.cpp
- squirrel/Mds.cpp
- squirrel/Packet.cpp
- squirrel/Sky.cpp
- squirrel/Way.cpp
-)
-
-target_include_directories(${PYG2O_MODULE_NAME}
- PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}/
-)
\ No newline at end of file
diff --git a/source/classes/python/Daedalus.h b/source/classes/python/Daedalus.h
deleted file mode 100644
index 8b2d58a..0000000
--- a/source/classes/python/Daedalus.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _PYDAEDALUS_H_
-#define _PYDAEDALUS_H_
-
-#include
-#include "squirrel/Daedalus.h"
-
-namespace py = pybind11;
-
-class PyDaedalus
-{
-
-public:
-
- static nonut::Int index(nonut::String value) { return nonut::Daedalus::get()->index(value); }
- static py::dict symbol(nonut::String value) { return nonut::Daedalus::get()->symbol(value).data; }
- static py::dict instance(nonut::String value) { return nonut::Daedalus::get()->instance(value).data; }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/DamageDescription.h b/source/classes/python/DamageDescription.h
deleted file mode 100644
index 6050342..0000000
--- a/source/classes/python/DamageDescription.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _PYDAMAGEDESCRIPTION_H
-#define _PYDAMAGEDESCRIPTION_H
-
-#include "squirrel/DamageDescription.h"
-
-class PyDamageDescription
-{
-private:
- nonut::DamageDescription *sqobj;
-
-public:
- PyDamageDescription(SQObject obj) { if (obj._type == OT_NULL) throw py::type_error("Presented Squirrel Object doesn't exist (type: null)"); sqobj = new nonut::DamageDescription(obj); }
-
- nonut::Int getFlags() { return sqobj->flags; }
- nonut::Int getDamage() { return sqobj->damage; }
- nonut::String getItemInstance() { return sqobj->item_instance; }
- nonut::Int getDistance() { return sqobj->distance; }
- nonut::Int getSpellId() { return sqobj->spell_id; }
- nonut::Int getSpellLevel() { return sqobj->spell_level; }
- nonut::String getNode() { return sqobj->node; }
-
- void setFlags(nonut::Int value) { sqobj->flags = value; }
- void setDamage(nonut::Int value) { sqobj->damage = value; }
- void setDistance(nonut::Int value) { sqobj->distance = value; }
- void setSpellId(nonut::Int value) { sqobj->spell_id = value; }
- void setSpellLevel(nonut::Int value) { sqobj->spell_level = value; }
- void setNode(nonut::String value) { sqobj->node = value; }
-
- void del() { delete sqobj; }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/ItemGround.h b/source/classes/python/ItemGround.h
deleted file mode 100644
index b4c9325..0000000
--- a/source/classes/python/ItemGround.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _PY_ITEMGROUND_H_
-#define _PY_ITEMGROUND_H_
-
-#include
-#include "squirrel/ItemGround.h"
-
-namespace py = pybind11;
-
-class PyItemGround
-{
-private:
- nonut::ItemGround *sqobj;
-
-public:
- PyItemGround(SQObject obj) { if (obj._type == OT_NULL) throw py::type_error("Presented Squirrel Object doesn't exist (type: null)"); sqobj = new nonut::ItemGround(obj); }
- PyItemGround(nonut::ItemGround obj) { if (obj.isNull()) throw py::type_error("Presented ItemGround doesn't exist (type: null)"); sqobj = &obj; }
-
- py::tuple getPosition() { return py::make_tuple(sqobj->getPosition().toTuple()); }
- py::tuple getRotation() { return py::make_tuple(sqobj->getRotation().toTuple()); }
-
- nonut::Int getId() { return sqobj->id; }
- nonut::String getInstance() { return sqobj->instance; }
- nonut::Int getAmount() { return sqobj->amount; }
- nonut::String getWorld() { return sqobj->world; }
- nonut::Int getVirtualWorld() { return sqobj->virtualWorld; }
-
- void setVirtualWorld(nonut::Int value) { sqobj->virtualWorld = value; }
-
- void del() { delete sqobj; }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/ItemsGround.h b/source/classes/python/ItemsGround.h
deleted file mode 100644
index 7f97990..0000000
--- a/source/classes/python/ItemsGround.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _PYITEMSGROUND_H_
-#define _PYITEMSGROUND_H_
-
-#include "squirrel/ItemsGround.h"
-#include "squirrel/ItemGround.h"
-#include "Dictionary.h"
-
-class PyItemsGround
-{
-
-public:
-
- static PyItemGround getById(nonut::Int value) { return PyItemGround(nonut::ItemsGround::get()->getById(value)); }
- static nonut::Int create(py::dict value)
- {
- Sqrat::Table* pTable = PyDictionary::toSqObject(value);
- nonut::Int result = nonut::ItemsGround::get()->create(pTable->GetObject());
- delete pTable;
- return result;
- }
- static void destroy(nonut::Int value) { nonut::ItemsGround::get()->destroy(value); }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/Mds.h b/source/classes/python/Mds.h
deleted file mode 100644
index 4408536..0000000
--- a/source/classes/python/Mds.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _PYMDS_H
-#define _PYMDS_H
-
-#include
-#include "squirrel/Mds.h"
-namespace py = pybind11;
-
-class PyMds
-{
-
-public:
-
- static int id(std::string mdsName) { return nonut::Mds::get()->id(mdsName); }
- static std::string name(int mdsId) { return nonut::Mds::get()->name(mdsId); }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/Packet.h b/source/classes/python/Packet.h
deleted file mode 100644
index aec9487..0000000
--- a/source/classes/python/Packet.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _PYPACKET_H_
-#define _PYPACKET_H_
-
-#include "squirrel/Packet.h"
-
-class PyPacket
-{
-private:
- nonut::Packet *sqpacket;
-
-public:
- PyPacket() { sqpacket = new nonut::Packet(); };
- PyPacket(SQObject obj) { if (obj._type == OT_NULL) throw py::type_error("Presented Squirrel Object doesn't exist (type: null)"); sqpacket = new nonut::Packet(obj); }
-
- void reset() { sqpacket->reset(); }
- void send(nonut::Int id, nonut::Int value) { sqpacket->send(id, value); }
- void sendToAll(nonut::Int value) { sqpacket->sendToAll(value); };
-
- void writeInt8(nonut::Int value) { sqpacket->writeInt8(value); }
- void writeUInt8(nonut::Int value) { sqpacket->writeUInt8(value); }
- void writeInt16(nonut::Int value) { sqpacket->writeInt16(value); }
- void writeUInt16(nonut::Int value) { sqpacket->writeUInt16(value); }
- void writeInt32(nonut::Int value) { sqpacket->writeInt32(value); }
- void writeUInt32(nonut::Int value) { sqpacket->writeUInt32(value); }
-
- void writeBool(nonut::Bool value) { sqpacket->writeBool(value); }
- void writeFloat(nonut::Float value) { sqpacket->writeFloat(value); }
- void writeString(nonut::String value) { sqpacket->writeString(value); }
-
- nonut::Int readInt8() { return sqpacket->readInt8(); }
- nonut::Int readUInt8() { return sqpacket->readUInt8(); }
- nonut::Int readInt16() { return sqpacket->readInt16(); }
- nonut::Int readUInt16() { return sqpacket->readUInt16(); }
- nonut::Int readInt32() { return sqpacket->readInt32(); }
- nonut::Int readUInt32() { return sqpacket->readUInt32(); }
-
- nonut::Bool readBool() { return sqpacket->readBool(); }
- nonut::Float readFloat() { return sqpacket->readFloat(); }
- nonut::String readString() { return sqpacket->readString(); }
-
- nonut::Int getBitsUsed() { return sqpacket->bitsUsed; }
- nonut::Int getBytesUsed() { return sqpacket->bytesUsed; }
-
- void del() { delete sqpacket; }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/Sky.h b/source/classes/python/Sky.h
deleted file mode 100644
index 82fdaad..0000000
--- a/source/classes/python/Sky.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _PYSKY_H_
-#define _PYSKY_H_
-
-#include
-#include "squirrel/Sky.h"
-
-namespace py = pybind11;
-
-class PySky
-{
-
-public:
-
- static void setWeather(nonut::Int value) { nonut::Sky::get()->weather = value; }
- static nonut::Int getWeather() { return nonut::Sky::get()->weather; }
- static void setRaining(nonut::Bool value) { nonut::Sky::get()->raining = value; }
- static nonut::Bool getRaining() { return nonut::Sky::get()->raining; }
- static void setRenderLightning(nonut::Bool value) { nonut::Sky::get()->renderLightning = value; }
- static nonut::Bool getRenderLightning() { return nonut::Sky::get()->renderLightning; }
- static void setWindScale(nonut::Float value) { nonut::Sky::get()->windScale = value; }
- static nonut::Float getWindScale() { return nonut::Sky::get()->windScale; }
- static void setDontRain(nonut::Bool value) { nonut::Sky::get()->dontRain = value; }
- static nonut::Bool getDontRain() { return nonut::Sky::get()->dontRain; }
-
- static void setRainStartTime(nonut::Int h, nonut::Int m) { nonut::Sky::get()->setRainStartTime(h, m); }
- static void setRainStopTime(nonut::Int h, nonut::Int m) { nonut::Sky::get()->setRainStopTime(h, m); }
- static py::dict getRainStartTime() { return nonut::Sky::get()->getRainStartTime().data; }
- static py::dict getRainStopTime() { return nonut::Sky::get()->getRainStopTime().data; }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/python/Way.h b/source/classes/python/Way.h
deleted file mode 100644
index 427be81..0000000
--- a/source/classes/python/Way.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _PYWAY_H_
-#define _PYWAY_H_
-
-#include "squirrel/Way.h"
-
-class PyWay
-{
-private:
- nonut::Way *sqway;
-
-public:
- PyWay(std::string world, std::string start, std::string end) { sqway = new nonut::Way(world, start, end); };
- PyWay(SQObject obj) { if (obj._type == OT_NULL) throw py::type_error("Presented Squirrel Object doesn't exist (type: null)"); sqway = new nonut::Way(obj); }
-
- py::list getWaypoints() { return sqway->getWaypoints().data; }
- int getCountWaypoints() { return sqway->getCountWaypoints(); }
-
- std::string getStart() { return sqway->start; }
- std::string getEnd() { return sqway->end; }
-
- void del() { delete sqway; }
-};
-
-#endif
\ No newline at end of file
diff --git a/source/classes/squirrel/Daedalus.cpp b/source/classes/squirrel/Daedalus.cpp
deleted file mode 100644
index a75d0f6..0000000
--- a/source/classes/squirrel/Daedalus.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include
-#include "Daedalus.h"
-
-namespace nonut
-{
- Daedalus* Daedalus::get()
- {
- if (inst == nullptr)
- {
- inst = new Daedalus();
- }
- return inst;
- }
-
- Daedalus::Daedalus() :
- StaticClass("Daedalus"),
-
- METHOD_CTOR(index),
- METHOD_CTOR(symbol),
- METHOD_CTOR(instance)
- {
- }
-}
diff --git a/source/classes/squirrel/Daedalus.h b/source/classes/squirrel/Daedalus.h
deleted file mode 100644
index 45bab05..0000000
--- a/source/classes/squirrel/Daedalus.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _DAEDALUS_H_
-#define _DAEDALUS_H_
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class Daedalus : public StaticClass
- {
- public:
- static Daedalus* get();
-
- Function index;
- Function symbol;
- Function instance;
-
- private:
-
- static inline Daedalus* inst = nullptr;
-
- Daedalus();
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/DamageDescription.cpp b/source/classes/squirrel/DamageDescription.cpp
deleted file mode 100644
index 4c6cf7f..0000000
--- a/source/classes/squirrel/DamageDescription.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "CommonHeader.h"
-#include "DamageDescription.h"
-
-namespace nonut
-{
- DamageDescription::DamageDescription(SQObject object) :
- Class("DamageDescription", object),
-
- PROPERTY_CTOR(flags),
- PROPERTY_CTOR(damage),
- PROPERTY_CTOR(item_instance),
- PROPERTY_CTOR(distance),
- PROPERTY_CTOR(spell_id),
- PROPERTY_CTOR(spell_level),
- PROPERTY_CTOR(node)
- {
- }
-}
diff --git a/source/classes/squirrel/DamageDescription.h b/source/classes/squirrel/DamageDescription.h
deleted file mode 100644
index 763a02d..0000000
--- a/source/classes/squirrel/DamageDescription.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _DAMAGEDESCRIPTION_H_
-#define _DAMAGEDESCRIPTION_H_
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class DamageDescription : public Class
- {
- public:
- DamageDescription(SQObject object);
-
- Property flags;
- Property damage;
- Property item_instance;
- Property distance;
- Property spell_id;
- Property spell_level;
- Property node;
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/ItemGround.cpp b/source/classes/squirrel/ItemGround.cpp
deleted file mode 100644
index 5f8fcc9..0000000
--- a/source/classes/squirrel/ItemGround.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include
-#include "ItemGround.h"
-
-namespace nonut
-{
- ItemGround::ItemGround(SQObject object) :
- Class("ItemGround", object),
-
- METHOD_CTOR(getPosition),
- METHOD_CTOR(getRotation),
-
- PROPERTY_CTOR(id),
- PROPERTY_CTOR(instance),
- PROPERTY_CTOR(amount),
- PROPERTY_CTOR(world),
- PROPERTY_CTOR(virtualWorld)
- {
- }
-}
diff --git a/source/classes/squirrel/ItemGround.h b/source/classes/squirrel/ItemGround.h
deleted file mode 100644
index 1f4e406..0000000
--- a/source/classes/squirrel/ItemGround.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _ITEMGROUND_H
-#define _ITEMGROUND_H
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class ItemGround : public Class
- {
- public:
- ItemGround(SQObject object);
-
- Function getPosition;
- Function getRotation;
-
- // Properties
- Property id;
- Property instance;
- Property amount;
- Property world;
- Property virtualWorld;
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/ItemsGround.cpp b/source/classes/squirrel/ItemsGround.cpp
deleted file mode 100644
index d80f33e..0000000
--- a/source/classes/squirrel/ItemsGround.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include
-#include "ItemsGround.h"
-
-namespace nonut
-{
- ItemsGround* ItemsGround::get()
- {
- if (inst == nullptr)
- {
- inst = new ItemsGround();
- }
- return inst;
- }
-
- ItemsGround::ItemsGround() :
- StaticClass("ItemsGround"),
-
- METHOD_CTOR(getById),
- METHOD_CTOR(create),
- METHOD_CTOR(destroy)
- {
- }
-}
diff --git a/source/classes/squirrel/ItemsGround.h b/source/classes/squirrel/ItemsGround.h
deleted file mode 100644
index c8dd665..0000000
--- a/source/classes/squirrel/ItemsGround.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _ITEMSGROUND_H_
-#define _ITEMSGROUND_H_
-#include
-
-#include
-#include
-#include "ItemGround.h"
-#include
-namespace py = pybind11;
-
-namespace nonut
-{
- class ItemsGround : public StaticClass
- {
- public:
- static ItemsGround* get();
-
- Function getById;
- Function create;
- Function destroy;
-
- private:
-
- static inline ItemsGround* inst = nullptr;
-
- ItemsGround();
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/Mds.cpp b/source/classes/squirrel/Mds.cpp
deleted file mode 100644
index e409d64..0000000
--- a/source/classes/squirrel/Mds.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include
-#include "Mds.h"
-
-namespace nonut
-{
- Mds* Mds::get()
- {
- if (inst == nullptr)
- {
- inst = new Mds();
- }
- return inst;
- }
-
- Mds::Mds() :
- StaticClass("Mds"),
-
- METHOD_CTOR(id),
- METHOD_CTOR(name)
- {
- }
-}
diff --git a/source/classes/squirrel/Mds.h b/source/classes/squirrel/Mds.h
deleted file mode 100644
index 93fbb49..0000000
--- a/source/classes/squirrel/Mds.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _MDS_H
-#define _MDS_H
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class Mds : public StaticClass
- {
- public:
- static Mds* get();
-
- Function id;
- Function name;
-
- private:
-
- static inline Mds* inst = nullptr;
-
- Mds();
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/Packet.cpp b/source/classes/squirrel/Packet.cpp
deleted file mode 100644
index 3229606..0000000
--- a/source/classes/squirrel/Packet.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include
-#include "Packet.h"
-
-namespace nonut
-{
- Packet::Packet() :
- Class("Packet"),
- METHOD_CTOR(reset),
- METHOD_CTOR(send),
- METHOD_CTOR(sendToAll),
- METHOD_CTOR(writeBool),
- METHOD_CTOR(writeInt8),
- METHOD_CTOR(writeUInt8),
- METHOD_CTOR(writeInt16),
- METHOD_CTOR(writeUInt16),
- METHOD_CTOR(writeInt32),
- METHOD_CTOR(writeUInt32),
- METHOD_CTOR(writeFloat),
- METHOD_CTOR(writeString),
- METHOD_CTOR(readBool),
- METHOD_CTOR(readInt8),
- METHOD_CTOR(readUInt8),
- METHOD_CTOR(readInt16),
- METHOD_CTOR(readUInt16),
- METHOD_CTOR(readInt32),
- METHOD_CTOR(readUInt32),
- METHOD_CTOR(readFloat),
- METHOD_CTOR(readString),
-
- PROPERTY_CTOR(bitsUsed),
- PROPERTY_CTOR(bytesUsed)
- {
- classCtor();
- }
-
- Packet::Packet(SQObject object) :
- Class("Packet", object),
- METHOD_CTOR(reset),
- METHOD_CTOR(send),
- METHOD_CTOR(sendToAll),
- METHOD_CTOR(writeBool),
- METHOD_CTOR(writeInt8),
- METHOD_CTOR(writeUInt8),
- METHOD_CTOR(writeInt16),
- METHOD_CTOR(writeUInt16),
- METHOD_CTOR(writeInt32),
- METHOD_CTOR(writeUInt32),
- METHOD_CTOR(writeFloat),
- METHOD_CTOR(writeString),
- METHOD_CTOR(readBool),
- METHOD_CTOR(readInt8),
- METHOD_CTOR(readUInt8),
- METHOD_CTOR(readInt16),
- METHOD_CTOR(readUInt16),
- METHOD_CTOR(readInt32),
- METHOD_CTOR(readUInt32),
- METHOD_CTOR(readFloat),
- METHOD_CTOR(readString),
-
- PROPERTY_CTOR(bitsUsed),
- PROPERTY_CTOR(bytesUsed)
- {
- }
-}
diff --git a/source/classes/squirrel/Packet.h b/source/classes/squirrel/Packet.h
deleted file mode 100644
index 0cf0f74..0000000
--- a/source/classes/squirrel/Packet.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _PACKET_H_
-#define _PACKET_H_
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class Packet : public Class
- {
- public:
- Packet();
- explicit Packet(SQObject object);
-
- Function reset;
- Function send;
- Function sendToAll;
- Function writeBool;
- Function writeInt8;
- Function writeUInt8;
- Function writeInt16;
- Function writeUInt16;
- Function writeInt32;
- Function writeUInt32;
- Function writeFloat;
- Function writeString;
- Function readBool;
- Function readInt8;
- Function readUInt8;
- Function readInt16;
- Function readUInt16;
- Function readInt32;
- Function readUInt32;
- Function readFloat;
- Function readString;
-
- Property bitsUsed;
- Property bytesUsed;
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/Sky.cpp b/source/classes/squirrel/Sky.cpp
deleted file mode 100644
index 0729bea..0000000
--- a/source/classes/squirrel/Sky.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include
-#include "Sky.h"
-
-namespace nonut
-{
- Sky* Sky::get()
- {
- if (inst == nullptr)
- {
- inst = new Sky();
- }
- return inst;
- }
-
- Sky::Sky() :
- StaticClass("Sky"),
-
- PROPERTY_CTOR(weather),
- PROPERTY_CTOR(raining),
- PROPERTY_CTOR(renderLightning),
- PROPERTY_CTOR(windScale),
- PROPERTY_CTOR(dontRain),
-
- METHOD_CTOR(getRainStartTime),
- METHOD_CTOR(getRainStopTime),
- METHOD_CTOR(setRainStartTime),
- METHOD_CTOR(setRainStopTime)
- {
- }
-}
diff --git a/source/classes/squirrel/Sky.h b/source/classes/squirrel/Sky.h
deleted file mode 100644
index 542cfee..0000000
--- a/source/classes/squirrel/Sky.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _SKY_H_
-#define _SKY_H_
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class Sky : public StaticClass
- {
- public:
- static Sky* get();
-
- Function setRainStartTime;
- Function getRainStartTime;
- Function setRainStopTime;
- Function getRainStopTime;
-
- Property weather;
- Property raining;
- Property renderLightning;
- Property windScale;
- Property dontRain;
-
- private:
-
- static inline Sky* inst = nullptr;
-
- Sky();
- };
-}
-#endif
-
diff --git a/source/classes/squirrel/Way.cpp b/source/classes/squirrel/Way.cpp
deleted file mode 100644
index 8541a3e..0000000
--- a/source/classes/squirrel/Way.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include
-#include "Way.h"
-
-namespace nonut
-{
- Way::Way(String world, String startWp, String endWp) :
- Class("Way"),
- METHOD_CTOR(getWaypoints),
- METHOD_CTOR(getCountWaypoints),
-
- PROPERTY_CTOR(start),
- PROPERTY_CTOR(end)
- {
- classCtor(world, startWp, endWp);
- }
-
- Way::Way(SQObject object) :
- Class("Way", object),
- METHOD_CTOR(getWaypoints),
- METHOD_CTOR(getCountWaypoints),
-
- PROPERTY_CTOR(start),
- PROPERTY_CTOR(end)
- {
- }
-}
diff --git a/source/classes/squirrel/Way.h b/source/classes/squirrel/Way.h
deleted file mode 100644
index 1a790d8..0000000
--- a/source/classes/squirrel/Way.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _WAY_H
-#define _WAY_H
-#include
-
-#include
-#include
-
-namespace nonut
-{
- class Way : public Class
- {
- public:
- Way(String, String, String);
- explicit Way(SQObject object);
-
- Property start;
- Property end;
-
- Function getWaypoints;
- Function getCountWaypoints;
- };
-}
-#endif
-
diff --git a/source/constants/CMakeLists.txt b/source/constants/CMakeLists.txt
deleted file mode 100644
index 8272207..0000000
--- a/source/constants/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-
-target_sources(${PYG2O_MODULE_NAME}
- PRIVATE
- sqconstants.cpp
-)
-
-target_include_directories(${PYG2O_MODULE_NAME}
- PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}/
-)
\ No newline at end of file
diff --git a/source/constants/sqconstants.h b/source/constants/sqconstants.h
deleted file mode 100644
index 1a62b6d..0000000
--- a/source/constants/sqconstants.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _SQCONSTANTS_H_
-#define _SQCONSTANTS_H_
-
-void registerSquirrelConstants();
-
-#endif
\ No newline at end of file
diff --git a/source/dependencies/CMakeLists.txt b/source/dependencies/CMakeLists.txt
deleted file mode 100644
index 045efab..0000000
--- a/source/dependencies/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-add_subdirectory(sqapi)
-add_subdirectory(pybind11)
-
-target_link_libraries(${PYG2O_MODULE_NAME}
- PRIVATE
- sqapi
- pybind11::embed
-)
-
-target_compile_definitions(${PYG2O_MODULE_NAME}
- PRIVATE
- SCRAT_EXPORT
-)
\ No newline at end of file
diff --git a/source/events/CMakeLists.txt b/source/events/CMakeLists.txt
deleted file mode 100644
index abb9fc3..0000000
--- a/source/events/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-target_sources(${PYG2O_MODULE_NAME}
- PRIVATE
- sqevents.cpp
- sqevents_anticheat.cpp
- sqevents_general.cpp
- sqevents_network.cpp
- sqevents_npc.cpp
- sqevents_player.cpp
-)
-
-target_include_directories(${PYG2O_MODULE_NAME}
- PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}/
-)
\ No newline at end of file
diff --git a/source/events/sqevents.cpp b/source/events/sqevents.cpp
deleted file mode 100644
index f8f9632..0000000
--- a/source/events/sqevents.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#include
-#include
-#include "sqevents.h"
-
-namespace py = pybind11;
-using namespace pybind11::literals;
-
-extern py::module_ g2o;
-
-void addEventHandler(const char* eventName, SQFUNCTION closure, unsigned int priority = 9999)
-{
- using namespace SqModule;
-
- Sqrat::Function sq_addEventHandler = Sqrat::RootTable().GetFunction("addEventHandler");
-
- if (sq_addEventHandler.IsNull())
- return;
-
- HSQOBJECT closureHandle;
-
- sq_newclosure(vm, closure, 0);
- sq_getstackobj(vm, -1, &closureHandle);
-
- Sqrat::Function func(vm, Sqrat::RootTable().GetObject(), closureHandle);
- sq_addEventHandler(eventName, func, priority);
-
- sq_pop(vm, 1);
-}
-
-void callEvent(const char* eventName, py::dict kwargs)
-{
- try
- {
- bool result = g2o.attr("callEvent")(eventName, **kwargs).cast();
- if (result)
- {
- Sqrat::RootTable().GetFunction("cancelEvent").Execute();
- }
- }
- catch (py::error_already_set &e)
- {
- py::print(e.what());
- }
-}
-
-void registerSquirrelEvents()
-{
- addEventHandler("onInit", sq_onInit, 0);
- addEventHandler("onExit", sq_onExit, 0);
- addEventHandler("onTick", sq_onTick, 0);
- addEventHandler("onTime", sq_onTime, 0);
- addEventHandler("onBan", sq_onBan, 0);
- addEventHandler("onUnban", sq_onUnban, 0);
-
- addEventHandler("onPlayerChangeColor", sq_onPlayerChangeColor, 0);
- addEventHandler("onPlayerChangeFocus", sq_onPlayerChangeFocus, 0);
- addEventHandler("onPlayerChangeHealth", sq_onPlayerChangeHealth, 0);
- addEventHandler("onPlayerChangeMana", sq_onPlayerChangeMana, 0);
- addEventHandler("onPlayerChangeMaxHealth", sq_onPlayerChangeMaxHealth, 0);
- addEventHandler("onPlayerChangeMaxMana", sq_onPlayerChangeMaxMana, 0);
- addEventHandler("onPlayerChangeWeaponMode", sq_onPlayerChangeWeaponMode, 0);
- addEventHandler("onPlayerChangeWorld", sq_onPlayerChangeWorld, 0);
-
- addEventHandler("onPlayerCommand", sq_onPlayerCommand, 0);
- addEventHandler("onPlayerDamage", sq_onPlayerDamage, 0);
- addEventHandler("onPlayerDead", sq_onPlayerDead, 0);
- addEventHandler("onPlayerDisconnect", sq_onPlayerDisconnect, 0);
- addEventHandler("onPlayerDropItem", sq_onPlayerDropItem, 0);
- addEventHandler("onPlayerEnterWorld", sq_onPlayerEnterWorld, 0);
- addEventHandler("onPlayerJoin", sq_onPlayerJoin, 0);
- addEventHandler("onPlayerMessage", sq_onPlayerMessage, 0);
- addEventHandler("onPlayerMobInteract", sq_onPlayerMobInteract, 0);
- addEventHandler("onPlayerRespawn", sq_onPlayerRespawn, 0);
- addEventHandler("onPlayerShoot", sq_onPlayerShoot, 0);
- addEventHandler("onPlayerSpellCast", sq_onPlayerSpellCast, 0);
- addEventHandler("onPlayerSpellSetup", sq_onPlayerSpellSetup, 0);
- addEventHandler("onPlayerTakeItem", sq_onPlayerTakeItem, 0);
- addEventHandler("onPlayerTeleport", sq_onPlayerTeleport, 0);
- addEventHandler("onPlayerToggleFaceAni", sq_onPlayerToggleFaceAni, 0);
-
- addEventHandler("onPlayerEquipAmulet", sq_onPlayerEquipAmulet, 0);
- addEventHandler("onPlayerEquipArmor", sq_onPlayerEquipArmor, 0);
- addEventHandler("onPlayerEquipBelt", sq_onPlayerEquipBelt, 0);
- addEventHandler("onPlayerEquipHandItem", sq_onPlayerEquipHandItem, 0);
- addEventHandler("onPlayerEquipHelmet", sq_onPlayerEquipHelmet, 0);
- addEventHandler("onPlayerEquipMeleeWeapon", sq_onPlayerEquipMeleeWeapon, 0);
- addEventHandler("onPlayerEquipRangedWeapon", sq_onPlayerEquipRangedWeapon, 0);
- addEventHandler("onPlayerEquipRing", sq_onPlayerEquipRing, 0);
- addEventHandler("onPlayerEquipShield", sq_onPlayerEquipShield, 0);
- addEventHandler("onPlayerEquipSpell", sq_onPlayerEquipSpell, 0);
-
- addEventHandler("onPacket", sq_onPacket, 0);
-
- addEventHandler("onPlayerUseCheat", sq_onPlayerUseCheat, 0);
-
- addEventHandler("onNpcActionFinished", sq_onNpcActionFinished, 0);
- addEventHandler("onNpcActionSent", sq_onNpcActionSent, 0);
- addEventHandler("onNpcChangeHostPlayer", sq_onNpcChangeHostPlayer, 0);
- addEventHandler("onNpcCreated", sq_onNpcCreated, 0);
- addEventHandler("onNpcDestroyed", sq_onNpcDestroyed, 0);
-}
\ No newline at end of file
diff --git a/source/events/sqevents.h b/source/events/sqevents.h
deleted file mode 100644
index bd23f75..0000000
--- a/source/events/sqevents.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _SQEVENTS_H_
-#define _SQEVENTS_H
-
-namespace py = pybind11;
-using namespace pybind11::literals;
-
-void callEvent(const char*, py::dict);
-
-SQInteger sq_onInit(HSQUIRRELVM);
-SQInteger sq_onExit(HSQUIRRELVM);
-SQInteger sq_onTick(HSQUIRRELVM);
-SQInteger sq_onTime(HSQUIRRELVM);
-SQInteger sq_onBan(HSQUIRRELVM);
-SQInteger sq_onUnban(HSQUIRRELVM);
-
-SQInteger sq_onPlayerChangeColor(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeFocus(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeHealth(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeMana(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeMaxHealth(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeMaxMana(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeWeaponMode(HSQUIRRELVM);
-SQInteger sq_onPlayerChangeWorld(HSQUIRRELVM);
-SQInteger sq_onPlayerCommand(HSQUIRRELVM);
-SQInteger sq_onPlayerDamage(HSQUIRRELVM);
-SQInteger sq_onPlayerDead(HSQUIRRELVM);
-SQInteger sq_onPlayerDisconnect(HSQUIRRELVM);
-SQInteger sq_onPlayerDropItem(HSQUIRRELVM);
-SQInteger sq_onPlayerEnterWorld(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipAmulet(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipArmor(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipBelt(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipHandItem(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipHelmet(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipMeleeWeapon(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipRangedWeapon(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipRing(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipShield(HSQUIRRELVM);
-SQInteger sq_onPlayerEquipSpell(HSQUIRRELVM);
-SQInteger sq_onPlayerJoin(HSQUIRRELVM);
-SQInteger sq_onPlayerMessage(HSQUIRRELVM);
-SQInteger sq_onPlayerMobInteract(HSQUIRRELVM);
-SQInteger sq_onPlayerRespawn(HSQUIRRELVM);
-SQInteger sq_onPlayerShoot(HSQUIRRELVM);
-SQInteger sq_onPlayerSpellCast(HSQUIRRELVM);
-SQInteger sq_onPlayerSpellSetup(HSQUIRRELVM);
-SQInteger sq_onPlayerTakeItem(HSQUIRRELVM);
-SQInteger sq_onPlayerTeleport(HSQUIRRELVM);
-SQInteger sq_onPlayerToggleFaceAni(HSQUIRRELVM);
-
-SQInteger sq_onPacket(HSQUIRRELVM);
-
-SQInteger sq_onPlayerUseCheat(HSQUIRRELVM);
-
-SQInteger sq_onNpcActionFinished(HSQUIRRELVM);
-SQInteger sq_onNpcActionSent(HSQUIRRELVM);
-SQInteger sq_onNpcChangeHostPlayer(HSQUIRRELVM);
-SQInteger sq_onNpcCreated(HSQUIRRELVM);
-SQInteger sq_onNpcDestroyed(HSQUIRRELVM);
-
-void registerSquirrelEvents();
-
-#endif
\ No newline at end of file
diff --git a/source/events/sqevents_anticheat.cpp b/source/events/sqevents_anticheat.cpp
deleted file mode 100644
index 18323ba..0000000
--- a/source/events/sqevents_anticheat.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include
-#include
-#include
-#include "sqevents.h"
-
-SQInteger sq_onPlayerUseCheat(HSQUIRRELVM vm)
-{
- SQInteger playerid, type;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &type);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "type"_a=type);
- callEvent("onPlayerUseCheat", kwargs);
-
- return 0;
-}
\ No newline at end of file
diff --git a/source/events/sqevents_general.cpp b/source/events/sqevents_general.cpp
deleted file mode 100644
index 8e75b07..0000000
--- a/source/events/sqevents_general.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include
-#include
-#include
-#include
-#include "sqevents.h"
-
-namespace py = pybind11;
-using namespace pybind11::literals;
-
-extern py::module_ g2o;
-
-SQInteger sq_onInit(HSQUIRRELVM vm)
-{
- py::object result = g2o.attr("callEvent")("onInit");
- return 0;
-}
-
-SQInteger sq_onExit(HSQUIRRELVM vm)
-{
- py::object result = g2o.attr("callEvent")("onExit");
- return 0;
-}
-
-SQInteger sq_onTick(HSQUIRRELVM vm)
-{
- py::object result = g2o.attr("callEvent")("onTick");
- return 0;
-}
-
-SQInteger sq_onTime(HSQUIRRELVM vm)
-{
- SQInteger day, hour, min;
-
- nonut::sqGetValue(vm, 2, &day);
- nonut::sqGetValue(vm, 3, &hour);
- nonut::sqGetValue(vm, 4, &min);
-
- py::dict kwargs = py::dict("day"_a=day, "hour"_a=hour, "min"_a=min);
- callEvent("onTime", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onBan(HSQUIRRELVM vm)
-{
- HSQOBJECT obj;
- nonut::sqGetValue(vm, 2, &obj);
-
- nonut::SqDict dictData;
- dictData.convert(obj);
- callEvent("onBan", dictData.data);
-
- return 0;
-}
-
-SQInteger sq_onUnban(HSQUIRRELVM vm)
-{
- HSQOBJECT obj;
- nonut::sqGetValue(vm, 2, &obj);
-
- nonut::SqDict dictData;
- dictData.convert(obj);
- callEvent("onUnban", dictData.data);
-
- return 0;
-}
\ No newline at end of file
diff --git a/source/events/sqevents_network.cpp b/source/events/sqevents_network.cpp
deleted file mode 100644
index f6316c1..0000000
--- a/source/events/sqevents_network.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include
-#include
-#include
-#include "python/Packet.h"
-#include "sqevents.h"
-
-namespace py = pybind11;
-using namespace pybind11::literals;
-
-extern py::module_ g2o;
-
-SQInteger sq_onPacket(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- HSQOBJECT data;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &data);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "data"_a=PyPacket(data));
- callEvent("onPacket", kwargs);
-
- return 0;
-}
\ No newline at end of file
diff --git a/source/events/sqevents_npc.cpp b/source/events/sqevents_npc.cpp
deleted file mode 100644
index 1dad12e..0000000
--- a/source/events/sqevents_npc.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#include
-#include
-#include
-#include "sqevents.h"
-
-SQInteger sq_onNpcActionFinished(HSQUIRRELVM vm)
-{
- SQInteger npc_id, action_type, action_id;
- SQBool result;
-
- nonut::sqGetValue(vm, 2, &npc_id);
- nonut::sqGetValue(vm, 3, &action_type);
- nonut::sqGetValue(vm, 4, &action_id);
- nonut::sqGetValue(vm, 5, &result);
-
- py::dict kwargs = py::dict("npc_id"_a=npc_id, "action_type"_a=action_type, "action_id"_a=action_id, "result"_a=result);
- callEvent("onNpcActionFinished", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onNpcActionSent(HSQUIRRELVM vm)
-{
- SQInteger npc_id, action_type, action_id;
-
- nonut::sqGetValue(vm, 2, &npc_id);
- nonut::sqGetValue(vm, 3, &action_type);
- nonut::sqGetValue(vm, 4, &action_id);
-
- py::dict kwargs = py::dict("npc_id"_a=npc_id, "action_type"_a=action_type, "action_id"_a=action_id);
- callEvent("onNpcActionSent", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onNpcChangeHostPlayer(HSQUIRRELVM vm)
-{
- SQInteger npc_id, current_id, previous_id;
-
- nonut::sqGetValue(vm, 2, &npc_id);
- nonut::sqGetValue(vm, 3, ¤t_id);
- nonut::sqGetValue(vm, 4, &previous_id);
-
- py::dict kwargs = py::dict("npc_id"_a=npc_id, "current_id"_a=current_id, "previous_id"_a=previous_id);
- callEvent("onNpcChangeHostPlayer", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onNpcCreated(HSQUIRRELVM vm)
-{
- SQInteger npc_id;
-
- nonut::sqGetValue(vm, 2, &npc_id);
-
- py::dict kwargs = py::dict("npc_id"_a=npc_id);
- callEvent("onNpcCreated", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onNpcDestroyed(HSQUIRRELVM vm)
-{
- SQInteger npc_id;
-
- nonut::sqGetValue(vm, 2, &npc_id);
-
- py::dict kwargs = py::dict("npc_id"_a=npc_id);
- callEvent("onNpcDestroyed", kwargs);
-
- return 0;
-}
\ No newline at end of file
diff --git a/source/events/sqevents_player.cpp b/source/events/sqevents_player.cpp
deleted file mode 100644
index a0dc26e..0000000
--- a/source/events/sqevents_player.cpp
+++ /dev/null
@@ -1,512 +0,0 @@
-#include
-#include
-#include
-#include "python/DamageDescription.h"
-#include "python/ItemGround.h"
-#include "sqevents.h"
-
-namespace py = pybind11;
-using namespace pybind11::literals;
-
-extern py::module_ g2o;
-
-SQInteger sq_onPlayerChangeColor(HSQUIRRELVM vm)
-{
- SQInteger playerid, r, g, b;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &r);
- nonut::sqGetValue(vm, 4, &g);
- nonut::sqGetValue(vm, 5, &b);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "r"_a=r, "g"_a=g, "b"_a=b);
- callEvent("onPlayerChangeColor", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeFocus(HSQUIRRELVM vm)
-{
- SQInteger playerid, oldFocusId, newFocusId;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &oldFocusId);
- nonut::sqGetValue(vm, 4, &newFocusId);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "oldFocusId"_a=oldFocusId, "newFocusId"_a=newFocusId);
- callEvent("onPlayerChangeFocus", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeHealth(HSQUIRRELVM vm)
-{
- SQInteger playerid, oldHP, newHP;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &oldHP);
- nonut::sqGetValue(vm, 4, &newHP);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "oldHP"_a=oldHP, "newHP"_a=newHP);
- callEvent("onPlayerChangeHealth", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeMana(HSQUIRRELVM vm)
-{
- SQInteger playerid, oldMP, newMP;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &oldMP);
- nonut::sqGetValue(vm, 4, &newMP);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "oldMP"_a=oldMP, "newMP"_a=newMP);
- callEvent("onPlayerChangeMana", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeMaxHealth(HSQUIRRELVM vm)
-{
- SQInteger playerid, oldMaxHP, newMaxHP;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &oldMaxHP);
- nonut::sqGetValue(vm, 4, &newMaxHP);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "oldMaxHP"_a=oldMaxHP, "newMaxHP"_a=newMaxHP);
- callEvent("onPlayerChangeMaxHealth", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeMaxMana(HSQUIRRELVM vm)
-{
- SQInteger playerid, oldMaxMP, newMaxMP;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &oldMaxMP);
- nonut::sqGetValue(vm, 4, &newMaxMP);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "oldMaxMP"_a=oldMaxMP, "newMaxMP"_a=newMaxMP);
- callEvent("onPlayerChangeMaxMana", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeWeaponMode(HSQUIRRELVM vm)
-{
- SQInteger playerid, oldWeaponMode, newWeaponMode;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &oldWeaponMode);
- nonut::sqGetValue(vm, 4, &newWeaponMode);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "oldWeaponMode"_a=oldWeaponMode, "newWeaponMode"_a=newWeaponMode);
- callEvent("onPlayerChangeWeaponMode", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerChangeWorld(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* world = nullptr;
- const SQChar* waypoint = nullptr;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &world);
- nonut::sqGetValue(vm, 4, &waypoint);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "world"_a=world, "waypoint"_a=waypoint);
- callEvent("onPlayerChangeWorld", kwargs);
-
- return 0;
-}
-
-// -------------------------------------------------------
-
-SQInteger sq_onPlayerCommand(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* command;
- const SQChar* params;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &command);
- nonut::sqGetValue(vm, 4, ¶ms);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "command"_a=command, "params"_a=params);
- callEvent("onPlayerCommand", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerDamage(HSQUIRRELVM vm)
-{
- SQInteger playerid, killerid;
- HSQOBJECT sqobj;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &killerid);
- nonut::sqGetValue(vm, 4, &sqobj);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "killerid"_a=killerid, "description"_a=PyDamageDescription(sqobj));
- callEvent("onPlayerDamage", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerDead(HSQUIRRELVM vm)
-{
- SQInteger playerid, killerid;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &killerid);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "killerid"_a=killerid);
- callEvent("onPlayerDead", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerDisconnect(HSQUIRRELVM vm)
-{
- SQInteger playerid, reason;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &reason);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "reason"_a=reason);
- callEvent("onPlayerDisconnect", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerDropItem(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- HSQOBJECT sqobj;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &sqobj);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "itemGround"_a=PyItemGround(sqobj));
- callEvent("onPlayerDropItem", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEnterWorld(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* world;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &world);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "world"_a=world);
- callEvent("onPlayerEnterWorld", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerJoin(HSQUIRRELVM vm)
-{
- SQInteger playerid;
-
- nonut::sqGetValue(vm, 2, &playerid);
-
- py::dict kwargs = py::dict("playerid"_a=playerid);
- callEvent("onPlayerJoin", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerMessage(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* message;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &message);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "message"_a=message);
- callEvent("onPlayerMessage", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerMobInteract(HSQUIRRELVM vm)
-{
- SQInteger playerid, from, to;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &from);
- nonut::sqGetValue(vm, 3, &to);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "from"_a=from, "to"_a = to);
- callEvent("onPlayerMobInteract", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerRespawn(HSQUIRRELVM vm)
-{
- SQInteger playerid;
-
- nonut::sqGetValue(vm, 2, &playerid);
-
- py::dict kwargs = py::dict("playerid"_a=playerid);
- callEvent("onPlayerRespawn", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerShoot(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* munition;
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &munition);
-
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "munition"_a=munition);
- callEvent("onPlayerShoot", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerSpellCast(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance;
- SQInteger spellLevel;
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
- nonut::sqGetValue(vm, 4, &spellLevel);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance, "spellLevel"_a=spellLevel);
- callEvent("onPlayerSpellCast", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerSpellSetup(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance;
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerSpellSetup", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerTakeItem(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- HSQOBJECT sqobj;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &sqobj);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "itemGround"_a=PyItemGround(sqobj));
- callEvent("onPlayerTakeItem", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerTeleport(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* vobName;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &vobName);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "vobName"_a=vobName);
- callEvent("onPlayerTeleport", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerToggleFaceAni(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* aniName;
- SQBool toggle;
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &aniName);
- nonut::sqGetValue(vm, 4, &toggle);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "vobName"_a=aniName, "toggle"_a = toggle);
- callEvent("onPlayerToggleFaceAni", kwargs);
-
- return 0;
-}
-
-// -------------------------------------------------------
-
-SQInteger sq_onPlayerEquipAmulet(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipAmulet", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipArmor(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipArmor", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipBelt(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipBelt", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipHandItem(HSQUIRRELVM vm)
-{
- SQInteger playerid, hand;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &hand);
- if (sq_gettype(vm, 4) != OT_NULL)
- nonut::sqGetValue(vm, 4, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "hand"_a = hand, "instance"_a=instance);
- callEvent("onPlayerEquipHandItem", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipHelmet(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipHelmet", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipMeleeWeapon(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipMeleeWeapon", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipRangedWeapon(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipRangedWeapon", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipRing(HSQUIRRELVM vm)
-{
- SQInteger playerid, hand;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &hand);
- if (sq_gettype(vm, 4) != OT_NULL)
- nonut::sqGetValue(vm, 4, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "hand"_a = hand, "instance"_a=instance);
- callEvent("onPlayerEquipRing", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipShield(HSQUIRRELVM vm)
-{
- SQInteger playerid;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- if (sq_gettype(vm, 3) != OT_NULL)
- nonut::sqGetValue(vm, 3, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
- callEvent("onPlayerEquipShield", kwargs);
-
- return 0;
-}
-
-SQInteger sq_onPlayerEquipSpell(HSQUIRRELVM vm)
-{
- SQInteger playerid, slotId;
- const SQChar* instance = "";
-
- nonut::sqGetValue(vm, 2, &playerid);
- nonut::sqGetValue(vm, 3, &slotId);
- if (sq_gettype(vm, 4) != OT_NULL)
- nonut::sqGetValue(vm, 4, &instance);
-
- py::dict kwargs = py::dict("playerid"_a=playerid, "slotId"_a = slotId, "instance"_a=instance);
- callEvent("onPlayerEquipSpell", kwargs);
-
- return 0;
-}
\ No newline at end of file
diff --git a/source/functions/CMakeLists.txt b/source/functions/CMakeLists.txt
deleted file mode 100644
index 6c28ba2..0000000
--- a/source/functions/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-target_sources(${PYG2O_MODULE_NAME}
- PRIVATE
- python/functions.cpp
- squirrel/functions.cpp
-)
-
-target_include_directories(${PYG2O_MODULE_NAME}
- PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}/
-)
\ No newline at end of file
diff --git a/source/functions/python/functions.cpp b/source/functions/python/functions.cpp
deleted file mode 100644
index f2f5363..0000000
--- a/source/functions/python/functions.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-#include
-#include
-#include
-
-#include "python/functions.h"
-#include "squirrel/functions.h"
-#include "Dictionary.h"
-
-namespace py = pybind11;
-#define SERVERFUNC nonut::ServerFunctions::getInstance()
-
-std::string py_getHostname() { return SERVERFUNC->getHostname(); }
-int py_getMaxSlots() { return SERVERFUNC->getMaxSlots(); }
-int py_getPlayersCount() { return SERVERFUNC->getPlayersCount(); }
-
-float py_getDistance2d(float x1, float y1, float x2, float y2) { return SERVERFUNC->getDistance2d(x1, y1, x2, y2); }
-float py_getDistance3d(float x1, float y1, float z1, float x2, float y2, float z2) { return SERVERFUNC->getDistance3d(x1, y1, z1, x2, y2, z2); }
-float py_getVectorAngle(float x1, float y1, float x2, float y2) { return SERVERFUNC->getVectorAngle(x1, y1, x2, y2); }
-
-void py_sendMessageToAll(int r, int g, int b, std::string text) { return SERVERFUNC->sendMessageToAll(r, g, b, text); }
-void py_sendMessageToPlayer(int id, int r, int g, int b, std::string text) { return SERVERFUNC->sendMessageToPlayer(id, r, g, b, text); }
-void py_sendPlayerMessageToAll(int id, int r, int g, int b, std::string text) { return SERVERFUNC->sendPlayerMessageToAll(id, r, g, b, text); }
-void py_sendPlayerMessageToPlayer(int id, int to, int r, int g, int b, std::string text) { return SERVERFUNC->sendPlayerMessageToPlayer(id, to, r, g, b, text); }
-
-void py_exit(int code) { return SERVERFUNC->exit(code); }
-float py_getDayLength() { return SERVERFUNC->getDayLength(); }
-std::string py_getServerDescription() { return SERVERFUNC->getServerDescription(); }
-std::string py_getServerWorld() { return SERVERFUNC->getServerWorld(); }
-py::dict py_getTime() { return SERVERFUNC->getTime().data; }
-void py_serverLog(std::string text) { return SERVERFUNC->serverLog(text); }
-void py_setDayLength(float ms) { return SERVERFUNC->setDayLength(ms); }
-bool py_setServerDescription(std::string text) { return SERVERFUNC->setServerDescription(text); }
-void py_setServerWorld(std::string text) { return SERVERFUNC->setServerWorld(text); }
-void py_setTime(int h, int m, int d) { return SERVERFUNC->setTime(h, m, d); }
-
-void py_clearNpcActions(int npc_id) { return SERVERFUNC->clearNpcActions(npc_id); }
-int py_createNpc(std::string name, std::string instance) { return SERVERFUNC->createNpc(name, instance); }
-bool py_destroyNpc(int npc_id) { return SERVERFUNC->destroyNpc(npc_id); }
-py::dict py_getNpcAction(int npc_id, int index) { return SERVERFUNC->getNpcAction(npc_id, index).data; }
-// ??? py_getNpcActionType
-py::list py_getNpcActions(int npc_id) { return SERVERFUNC->getNpcActions(npc_id).data; }
-int py_getNpcActionsCount(int npc_id) { return SERVERFUNC->getNpcActionsCount(npc_id); }
-int py_getNpcHostPlayer(int npc_id) { return SERVERFUNC->getNpcHostPlayer(npc_id); }
-int py_getNpcLastActionId(int npc_id) { return SERVERFUNC->getNpcLastActionId(npc_id); }
-bool py_isNpc(int npc_id) { return SERVERFUNC->isNpc(npc_id); }
-bool py_isNpcActionFinished(int npc_id, int action_id) { return SERVERFUNC->isNpcActionFinished(npc_id, action_id); }
-void py_npcAttackMelee(int a_id, int e_id, int a_type, int combo) { return SERVERFUNC->npcAttackMelee(a_id, e_id, a_type, combo); }
-void py_npcAttackRanged(int a_id, int e_id) { return SERVERFUNC->npcAttackRanged(a_id, e_id); }
-void py_npcSpellCast(int a_id, int e_id) { return SERVERFUNC->npcSpellCast(a_id, e_id); }
-void py_npcUseClosestMob(int npc_id, std::string sceme, int target_state) { return SERVERFUNC->npcUseClosestMob(npc_id, sceme, target_state); }
-//??? py_pushNpcAction
-bool py_setNpcHostPlayer(int npc_id, int host_id) { return SERVERFUNC->setNpcHostPlayer(npc_id, host_id); }
-
-bool py_addBan(py::dict info)
-{
- Sqrat::Table* pTable = PyDictionary::toSqObject(info);
- nonut::Int result = SERVERFUNC->addBan(pTable->GetObject());
- delete pTable;
- return result;
-}
-bool py_applyPlayerOverlay(int id, int overlayId) { return SERVERFUNC->applyPlayerOverlay(id, overlayId); }
-void py_ban(int id, int minutes, std::string reason) { return SERVERFUNC->ban(id, minutes, reason); }
-void py_drawWeapon(int id, int weaponMode) { return SERVERFUNC->drawWeapon(id, weaponMode); }
-void py_equipItem(int id, std::string instance, int slotId) { return SERVERFUNC->equipItem(id, instance, slotId); }
-std::string py_getPlayerAmulet(int id) { return SERVERFUNC->getPlayerAmulet(id); }
-float py_getPlayerAngle(int id) { return SERVERFUNC->getPlayerAngle(id); }
-std::string py_getPlayerAni(int id) { return SERVERFUNC->getPlayerAni(id); }
-std::string py_getPlayerArmor(int id) { return SERVERFUNC->getPlayerArmor(id); }
-py::dict py_getPlayerAtVector(int id)
-{
- py::dict result;
- nonut::Position3d pos = SERVERFUNC->getPlayerAtVector(id);
-
- result["x"] = pos.x;
- result["y"] = pos.y;
- result["z"] = pos.z;
- return result;
-}
-std::string py_getPlayerBelt(int id) { return SERVERFUNC->getPlayerBelt(id); }
-py::dict py_getPlayerCameraPosition(int id)
-{
- py::dict result;
- nonut::Position3d pos = SERVERFUNC->getPlayerCameraPosition(id);
-
- result["x"] = pos.x;
- result["y"] = pos.y;
- result["z"] = pos.z;
- return result;
-}
-bool py_getPlayerCollision(int id) { return SERVERFUNC->getPlayerCollision(id); }
-py::dict py_getPlayerColor(int id)
-{
- py::dict result;
- nonut::Color color = SERVERFUNC->getPlayerColor(id);
-
- result["r"] = color.r;
- result["g"] = color.g;
- result["b"] = color.b;
- return result;
-}
-int py_getPlayerContext(int id, int type) { return SERVERFUNC->getPlayerContext(id, type); }
-int py_getPlayerDexterity(int id) { return SERVERFUNC->getPlayerDexterity(id); }
-py::list py_getPlayerFaceAnis(int id) { return SERVERFUNC->getPlayerFaceAnis(id).data; }
-float py_getPlayerFatness(int id) { return SERVERFUNC->getPlayerFatness(id); }
-int py_getPlayerFocus(int id) { return SERVERFUNC->getPlayerFocus(id); }
-int py_getPlayerHealth(int id) { return SERVERFUNC->getPlayerHealth(id); }
-std::string py_getPlayerHelmet(int id) { return SERVERFUNC->getPlayerHelmet(id); }
-std::string py_getPlayerIP(int id) { return SERVERFUNC->getPlayerIP(id); }
-std::string py_getPlayerInstance(int id) { return SERVERFUNC->getPlayerInstance(id); }
-std::string py_getPlayerMacAddr(int id) { return SERVERFUNC->getPlayerMacAddr(id); }
-int py_getPlayerMana(int id) { return SERVERFUNC->getPlayerMana(id); }
-int py_getPlayerMaxHealth(int id) { return SERVERFUNC->getPlayerMaxHealth(id); }
-int py_getPlayerMaxMana(int id) { return SERVERFUNC->getPlayerMaxMana(id); }
-std::string py_getPlayerMeleeWeapon(int id) { return SERVERFUNC->getPlayerMeleeWeapon(id); }
-std::string py_getPlayerName(int id) { return SERVERFUNC->getPlayerName(id); }
-int py_getPlayerPing(int id) { return SERVERFUNC->getPlayerPing(id); }
-py::dict py_getPlayerPosition(int id)
-{
- py::dict result;
-
- nonut::Position3d pos = SERVERFUNC->getPlayerPosition(id);
-
- result["x"] = pos.x;
- result["y"] = pos.y;
- result["z"] = pos.z;
- return result;
-}
-std::string py_getPlayerRangedWeapon(int id) { return SERVERFUNC->getPlayerRangedWeapon(id); }
-int py_getPlayerRespawnTime(int id) { return SERVERFUNC->getPlayerRespawnTime(id); }
-std::string py_getPlayerRing(int id, int handId) { return SERVERFUNC->getPlayerRing(id, handId); }
-py::dict py_getPlayerScale(int id) { return SERVERFUNC->getPlayerScale(id).data; }
-std::string py_getPlayerSerial(int id) { return SERVERFUNC->getPlayerSerial(id); }
-std::string py_getPlayerShield(int id) { return SERVERFUNC->getPlayerShield(id); }
-int py_getPlayerSkillWeapon(int id, int skillId) { return SERVERFUNC->getPlayerSkillWeapon(id, skillId); }
-std::string py_getPlayerSpell(int id, int slotId) { return SERVERFUNC->getPlayerSpell(id, slotId); }
-int py_getPlayerStrength(int id) { return SERVERFUNC->getPlayerStrength(id); }
-int py_getPlayerTalent(int id, int talentId) { return SERVERFUNC->getPlayerTalent(id, talentId); }
-std::string py_getPlayerUID(int id) { return SERVERFUNC->getPlayerUID(id); }
-int py_getPlayerVirtualWorld(int id) { return SERVERFUNC->getPlayerVirtualWorld(id); }
-py::dict py_getPlayerVisual(int id) { return SERVERFUNC->getPlayerVisual(id).data; }
-int py_getPlayerWeaponMode(int id) { return SERVERFUNC->getPlayerWeaponMode(id); }
-std::string py_getPlayerWorld(int id) { return SERVERFUNC->getPlayerWorld(id); }
-void py_giveItem(int id, std::string instance, int amount) { return SERVERFUNC->giveItem(id, instance, amount); }
-bool py_hitPlayer(int id, int targetid) { return SERVERFUNC->hitPlayer(id, targetid); }
-bool py_isPlayerConnected(int id) { return SERVERFUNC->isPlayerConnected(id); }
-bool py_isPlayerDead(int id) { return SERVERFUNC->isPlayerDead(id); }
-bool py_isPlayerUnconscious(int id) { return SERVERFUNC->isPlayerUnconscious(id); }
-void py_kick(int id, std::string reason) { return SERVERFUNC->kick(id, reason); }
-void py_playAni(int id, std::string aniName) { return SERVERFUNC->playAni(id, aniName); }
-void py_playFaceAni(int id, std::string aniName) { return SERVERFUNC->playFaceAni(id, aniName); }
-void py_readySpell(int id, int slotId, int manaInvested) { return SERVERFUNC->readySpell(id, slotId, manaInvested); }
-void py_removeItem(int id, std::string instance, int amount) { return SERVERFUNC->removeItem(id, instance, amount); }
-bool py_removePlayerOverlay(int id, int overlayId) { return SERVERFUNC->removePlayerOverlay(id, overlayId); }
-void py_removeWeapon(int id) { return SERVERFUNC->removeWeapon(id); }
-void py_respawnPlayer(int id) { return SERVERFUNC->respawnPlayer(id); }
-void py_setPlayerAngle(int id, float angle) { return SERVERFUNC->setPlayerAngle(id, angle); }
-void py_setPlayerCollision(int id, bool collision) { return SERVERFUNC->setPlayerCollision(id, collision); }
-void py_setPlayerColor(int id, int r, int g, int b) { return SERVERFUNC->setPlayerColor(id, r, g, b); }
-void py_setPlayerContext(int id, int type, int value) { return SERVERFUNC->setPlayerContext(id, type, value); }
-void py_setPlayerDexterity(int id, int dexterity) { return SERVERFUNC->setPlayerDexterity(id, dexterity); }
-void py_setPlayerFatness(int id, float fatness) { return SERVERFUNC->setPlayerFatness(id, fatness); }
-void py_setPlayerHealth(int id, int health) { return SERVERFUNC->setPlayerHealth(id, health); }
-void py_setPlayerInstance(int id, std::string instance) { return SERVERFUNC->setPlayerInstance(id, instance); }
-void py_setPlayerInvisible(int id, bool toggle) { return SERVERFUNC->setPlayerInvisible(id, toggle); }
-void py_setPlayerMana(int id, int mana) { return SERVERFUNC->setPlayerMana(id, mana); }
-void py_setPlayerMaxHealth(int id, int maxHealth) { return SERVERFUNC->setPlayerMaxHealth(id, maxHealth); }
-void py_setPlayerMaxMana(int id, int maxMana) { return SERVERFUNC->setPlayerMaxMana(id, maxMana); }
-void py_setPlayerName(int id, std::string name) { return SERVERFUNC->setPlayerName(id, name); }
-void py_setPlayerPosition(int id, float x, float y, float z) { return SERVERFUNC->setPlayerPosition(id, x, y, z); }
-void py_setPlayerRespawnTime(int id, int respawnTime) { return SERVERFUNC->setPlayerRespawnTime(id, respawnTime); }
-void py_setPlayerScale(int id, float x, float y, float z) { return SERVERFUNC->setPlayerScale(id, x, y, z); }
-void py_setPlayerSkillWeapon(int id, int skillId, int percentage) { return SERVERFUNC->setPlayerSkillWeapon(id, skillId, percentage); }
-void py_setPlayerStrength(int id, int strength) { return SERVERFUNC->setPlayerStrength(id, strength); }
-void py_setPlayerTalent(int id, int talentId, int talentValue) { return SERVERFUNC->setPlayerTalent(id, talentId, talentValue); }
-void py_setPlayerVirtualWorld(int id, int virtualWorld) { return SERVERFUNC->setPlayerVirtualWorld(id, virtualWorld); }
-void py_setPlayerVisual(int id, std::string bMdl, int bTxt, std::string hMdl, int hTxt) { return SERVERFUNC->setPlayerVisual(id, bMdl, bTxt, hMdl, hTxt); }
-void py_setPlayerWeaponMode(int id, int weaponMode) { return SERVERFUNC->setPlayerWeaponMode(id, weaponMode); }
-void py_setPlayerWorld(int id, std::string world, std::string startPointName) { return SERVERFUNC->setPlayerWorld(id, world, startPointName); }
-void py_spawnPlayer(int id) { return SERVERFUNC->spawnPlayer(id); }
-void py_stopAni(int id, std::string aniName) { return SERVERFUNC->stopAni(id, aniName); }
-void py_stopFaceAni(int id, std::string aniName) { return SERVERFUNC->stopFaceAni(id, aniName); }
-void py_unequipItem(int id, std::string instance) { return SERVERFUNC->unequipItem(id, instance); }
-void py_unreadySpell(int id) { return SERVERFUNC->unreadySpell(id); }
-void py_unspawnPlayer(int id) { return SERVERFUNC->unspawnPlayer(id); }
-void py_useItem(int id, std::string instance) { return SERVERFUNC->useItem(id, instance); }
-void py_useItemToState(int id, std::string instance, int state) { return SERVERFUNC->useItemToState(id, instance, state); }
-
-py::list py_findNearbyPlayers(py::dict position, int radius, std::string world, int vWorld)
-{
- Sqrat::Table* pTable = PyDictionary::toSqObject(position);
- py::list result = SERVERFUNC->findNearbyPlayers(pTable->GetObject(), radius, world, vWorld).data;
- delete pTable;
- return result;
-}
-py::list py_getSpawnedPlayersForPlayer(int id) { return SERVERFUNC->getSpawnedPlayersForPlayer(id).data; }
-py::list py_getStreamedPlayersByPlayer(int id) { return SERVERFUNC->getStreamedPlayersByPlayer(id).data; }
-py::dict py_getNearestWaypoint(std::string world, int x, int y, int z) { return SERVERFUNC->getNearestWaypoint(world, x, y, z).data; }
-py::dict py_getWaypoint(std::string world, std::string name) { return SERVERFUNC->getWaypoint(world, name).data; }
\ No newline at end of file
diff --git a/source/functions/python/functions.h b/source/functions/python/functions.h
deleted file mode 100644
index e2bfd8b..0000000
--- a/source/functions/python/functions.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#ifndef _PYFUNCTIONS_
-#define _PYFUNCTIONS_
-
-#include
-namespace py = pybind11;
-
-// Shared functions
-std::string py_getHostname();
-int py_getMaxSlots();
-int py_getPlayersCount();
-
-float py_getDistance2d(float, float, float, float);
-float py_getDistance3d(float, float, float, float, float, float);
-float py_getVectorAngle(float, float, float, float);
-
-void py_sendMessageToAll(int, int, int, std::string);
-void py_sendMessageToPlayer(int, int, int, int, std::string);
-void py_sendPlayerMessageToAll(int, int, int, int, std::string);
-void py_sendPlayerMessageToPlayer(int, int, int, int, int, std::string);
-
-void py_exit(int);
-float py_getDayLength();
-std::string py_getServerDescription();
-std::string py_getServerWorld();
-py::dict py_getTime();
-void py_serverLog(std::string);
-void py_setDayLength(float);
-bool py_setServerDescription(std::string);
-void py_setServerWorld(std::string);
-void py_setTime(int, int, int);
-
-void py_clearNpcActions(int);
-int py_createNpc(std::string, std::string);
-bool py_destroyNpc(int);
-py::dict py_getNpcAction(int, int);
-// ??? py_getNpcActionType
-py::list py_getNpcActions(int);
-int py_getNpcActionsCount(int);
-int py_getNpcHostPlayer(int);
-int py_getNpcLastActionId(int);
-bool py_isNpc(int);
-bool py_isNpcActionFinished(int, int);
-void py_npcAttackMelee(int, int, int, int);
-void py_npcAttackRanged(int, int);
-void py_npcSpellCast(int, int);
-void py_npcUseClosestMob(int, std::string, int);
-//??? py_pushNpcAction
-bool py_setNpcHostPlayer(int, int);
-
-bool py_addBan(py::dict);
-bool py_applyPlayerOverlay(int, int);
-void py_ban(int, int, std::string);
-void py_drawWeapon(int, int);
-void py_equipItem(int, std::string, int);
-std::string py_getPlayerAmulet(int);
-float py_getPlayerAngle(int);
-std::string py_getPlayerAni(int);
-std::string py_getPlayerArmor(int);
-py::dict py_getPlayerAtVector(int);
-std::string py_getPlayerBelt(int);
-py::dict py_getPlayerCameraPosition(int);
-bool py_getPlayerCollision(int);
-py::dict py_getPlayerColor(int);
-int py_getPlayerContext(int, int);
-int py_getPlayerDexterity(int);
-py::list py_getPlayerFaceAnis(int);
-float py_getPlayerFatness(int);
-int py_getPlayerFocus(int);
-int py_getPlayerHealth(int);
-std::string py_getPlayerHelmet(int);
-std::string py_getPlayerIP(int);
-std::string py_getPlayerInstance(int);
-std::string py_getPlayerMacAddr(int);
-int py_getPlayerMana(int);
-int py_getPlayerMaxHealth(int);
-int py_getPlayerMaxMana(int);
-std::string py_getPlayerMeleeWeapon(int);
-std::string py_getPlayerName(int);
-int py_getPlayerPing(int);
-py::dict py_getPlayerPosition(int);
-std::string py_getPlayerRangedWeapon(int);
-int py_getPlayerRespawnTime(int);
-std::string py_getPlayerRing(int, int);
-py::dict py_getPlayerScale(int);
-std::string py_getPlayerSerial(int);
-std::string py_getPlayerShield(int);
-int py_getPlayerSkillWeapon(int, int);
-std::string py_getPlayerSpell(int, int);
-int py_getPlayerStrength(int);
-int py_getPlayerTalent(int, int);
-std::string py_getPlayerUID(int);
-int py_getPlayerVirtualWorld(int);
-py::dict py_getPlayerVisual(int);
-int py_getPlayerWeaponMode(int);
-std::string py_getPlayerWorld(int);
-void py_giveItem(int, std::string, int);
-bool py_hitPlayer(int, int);
-bool py_isPlayerConnected(int);
-bool py_isPlayerDead(int);
-bool py_isPlayerUnconscious(int);
-void py_kick(int, std::string);
-void py_playAni(int, std::string);
-void py_playFaceAni(int, std::string);
-void py_readySpell(int, int, int);
-void py_removeItem(int, std::string, int);
-bool py_removePlayerOverlay(int, int);
-void py_removeWeapon(int);
-void py_respawnPlayer(int);
-void py_setPlayerAngle(int, float);
-void py_setPlayerCollision(int, bool);
-void py_setPlayerColor(int, int, int, int);
-void py_setPlayerContext(int, int, int);
-void py_setPlayerDexterity(int, int);
-void py_setPlayerFatness(int, float);
-void py_setPlayerHealth(int, int);
-void py_setPlayerInstance(int, std::string);
-void py_setPlayerInvisible(int, bool);
-void py_setPlayerMana(int, int);
-void py_setPlayerMaxHealth(int, int);
-void py_setPlayerMaxMana(int, int);
-void py_setPlayerName(int, std::string);
-void py_setPlayerPosition(int, float, float, float);
-void py_setPlayerRespawnTime(int, int);
-void py_setPlayerScale(int, float, float, float);
-void py_setPlayerSkillWeapon(int, int, int);
-void py_setPlayerStrength(int, int);
-void py_setPlayerTalent(int, int, int);
-void py_setPlayerVirtualWorld(int, int);
-void py_setPlayerVisual(int, std::string, int, std::string, int);
-void py_setPlayerWeaponMode(int, int);
-void py_setPlayerWorld(int, std::string, std::string);
-void py_spawnPlayer(int);
-void py_stopAni(int, std::string);
-void py_stopFaceAni(int, std::string);
-void py_unequipItem(int, std::string);
-void py_unreadySpell(int);
-void py_unspawnPlayer(int);
-void py_useItem(int, std::string);
-void py_useItemToState(int, std::string, int);
-
-py::list py_findNearbyPlayers(py::dict, int, std::string, int);
-py::list py_getSpawnedPlayersForPlayer(int);
-py::list py_getStreamedPlayersByPlayer(int);
-py::dict py_getNearestWaypoint(std::string, int, int, int);
-py::dict py_getWaypoint(std::string, std::string);
-
-#endif
\ No newline at end of file
diff --git a/source/functions/squirrel/functions.cpp b/source/functions/squirrel/functions.cpp
deleted file mode 100644
index a71e13b..0000000
--- a/source/functions/squirrel/functions.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-#include
-#include "squirrel/functions.h"
-
-namespace nonut
-{
- ServerFunctions::ServerFunctions() :
- FUNCTION_CTOR(getMaxSlots),
- FUNCTION_CTOR(getHostname),
- FUNCTION_CTOR(getPlayersCount),
-
- FUNCTION_CTOR(getDistance2d),
- FUNCTION_CTOR(getDistance3d),
- FUNCTION_CTOR(getVectorAngle),
-
- FUNCTION_CTOR(sendMessageToAll),
- FUNCTION_CTOR(sendMessageToPlayer),
- FUNCTION_CTOR(sendPlayerMessageToAll),
- FUNCTION_CTOR(sendPlayerMessageToPlayer),
-
- FUNCTION_CTOR(exit),
- FUNCTION_CTOR(getDayLength),
- FUNCTION_CTOR(getServerDescription),
- FUNCTION_CTOR(getServerWorld),
- FUNCTION_CTOR(getTime),
- FUNCTION_CTOR(serverLog),
- FUNCTION_CTOR(setDayLength),
- FUNCTION_CTOR(setServerDescription),
- FUNCTION_CTOR(setServerWorld),
- FUNCTION_CTOR(setTime),
-
- FUNCTION_CTOR(clearNpcActions),
- FUNCTION_CTOR(createNpc),
- FUNCTION_CTOR(destroyNpc),
- FUNCTION_CTOR(getNpcAction),
- //FUNCTION_CTOR(getNpcActionType),
- FUNCTION_CTOR(getNpcActions),
- FUNCTION_CTOR(getNpcActionsCount),
- FUNCTION_CTOR(getNpcHostPlayer),
- FUNCTION_CTOR(getNpcLastActionId),
- FUNCTION_CTOR(isNpc),
- FUNCTION_CTOR(isNpcActionFinished),
- FUNCTION_CTOR(npcAttackMelee),
- FUNCTION_CTOR(npcAttackRanged),
- FUNCTION_CTOR(npcSpellCast),
- FUNCTION_CTOR(npcUseClosestMob),
- //FUNCTION_CTOR(pushNpcAction),
- FUNCTION_CTOR(setNpcHostPlayer),
- FUNCTION_CTOR(addBan),
- FUNCTION_CTOR(applyPlayerOverlay),
- FUNCTION_CTOR(ban),
- FUNCTION_CTOR(drawWeapon),
- FUNCTION_CTOR(equipItem),
- FUNCTION_CTOR(getPlayerAmulet),
- FUNCTION_CTOR(getPlayerAngle),
- FUNCTION_CTOR(getPlayerAni),
- FUNCTION_CTOR(getPlayerArmor),
- FUNCTION_CTOR(getPlayerAtVector),
- FUNCTION_CTOR(getPlayerBelt),
- FUNCTION_CTOR(getPlayerCameraPosition),
- FUNCTION_CTOR(getPlayerCollision),
- FUNCTION_CTOR(getPlayerColor),
- FUNCTION_CTOR(getPlayerContext),
- FUNCTION_CTOR(getPlayerDexterity),
- FUNCTION_CTOR(getPlayerFaceAnis),
- FUNCTION_CTOR(getPlayerFatness),
- FUNCTION_CTOR(getPlayerFocus),
- FUNCTION_CTOR(getPlayerHealth),
- FUNCTION_CTOR(getPlayerHelmet),
- FUNCTION_CTOR(getPlayerIP),
- FUNCTION_CTOR(getPlayerInstance),
- FUNCTION_CTOR(getPlayerMacAddr),
- FUNCTION_CTOR(getPlayerMana),
- FUNCTION_CTOR(getPlayerMaxHealth),
- FUNCTION_CTOR(getPlayerMaxMana),
- FUNCTION_CTOR(getPlayerMeleeWeapon),
- FUNCTION_CTOR(getPlayerName),
- FUNCTION_CTOR(getPlayerPing),
- FUNCTION_CTOR(getPlayerPosition),
- FUNCTION_CTOR(getPlayerRangedWeapon),
- FUNCTION_CTOR(getPlayerRespawnTime),
- FUNCTION_CTOR(getPlayerRing),
- FUNCTION_CTOR(getPlayerScale),
- FUNCTION_CTOR(getPlayerSerial),
- FUNCTION_CTOR(getPlayerShield),
- FUNCTION_CTOR(getPlayerSkillWeapon),
- FUNCTION_CTOR(getPlayerSpell),
- FUNCTION_CTOR(getPlayerStrength),
- FUNCTION_CTOR(getPlayerTalent),
- FUNCTION_CTOR(getPlayerUID),
- FUNCTION_CTOR(getPlayerVirtualWorld),
- FUNCTION_CTOR(getPlayerVisual),
- FUNCTION_CTOR(getPlayerWeaponMode),
- FUNCTION_CTOR(getPlayerWorld),
- FUNCTION_CTOR(giveItem),
- FUNCTION_CTOR(hitPlayer),
- FUNCTION_CTOR(isPlayerConnected),
- FUNCTION_CTOR(isPlayerDead),
- FUNCTION_CTOR(isPlayerUnconscious),
- FUNCTION_CTOR(kick),
- FUNCTION_CTOR(playAni),
- FUNCTION_CTOR(playFaceAni),
- FUNCTION_CTOR(readySpell),
- FUNCTION_CTOR(removeItem),
- FUNCTION_CTOR(removePlayerOverlay),
- FUNCTION_CTOR(removeWeapon),
- FUNCTION_CTOR(respawnPlayer),
- FUNCTION_CTOR(setPlayerAngle),
- FUNCTION_CTOR(setPlayerCollision),
- FUNCTION_CTOR(setPlayerColor),
- FUNCTION_CTOR(setPlayerContext),
- FUNCTION_CTOR(setPlayerDexterity),
- FUNCTION_CTOR(setPlayerFatness),
- FUNCTION_CTOR(setPlayerHealth),
- FUNCTION_CTOR(setPlayerInstance),
- FUNCTION_CTOR(setPlayerInvisible),
- FUNCTION_CTOR(setPlayerMana),
- FUNCTION_CTOR(setPlayerMaxHealth),
- FUNCTION_CTOR(setPlayerMaxMana),
- FUNCTION_CTOR(setPlayerName),
- FUNCTION_CTOR(setPlayerPosition),
- FUNCTION_CTOR(setPlayerRespawnTime),
- FUNCTION_CTOR(setPlayerScale),
- FUNCTION_CTOR(setPlayerSkillWeapon),
- FUNCTION_CTOR(setPlayerStrength),
- FUNCTION_CTOR(setPlayerTalent),
- FUNCTION_CTOR(setPlayerVirtualWorld),
- FUNCTION_CTOR(setPlayerVisual),
- FUNCTION_CTOR(setPlayerWeaponMode),
- FUNCTION_CTOR(setPlayerWorld),
- FUNCTION_CTOR(spawnPlayer),
- FUNCTION_CTOR(stopAni),
- FUNCTION_CTOR(stopFaceAni),
- FUNCTION_CTOR(unequipItem),
- FUNCTION_CTOR(unreadySpell),
- FUNCTION_CTOR(unspawnPlayer),
- FUNCTION_CTOR(useItem),
- FUNCTION_CTOR(useItemToState),
-
- FUNCTION_CTOR(findNearbyPlayers),
- FUNCTION_CTOR(getSpawnedPlayersForPlayer),
- FUNCTION_CTOR(getStreamedPlayersByPlayer),
- FUNCTION_CTOR(getNearestWaypoint),
- FUNCTION_CTOR(getWaypoint)
- {}
-
- ServerFunctions* ServerFunctions::getInstance()
- {
- if (instance == nullptr)
- {
- instance = new ServerFunctions();
- }
- return instance;
- }
-
-}
\ No newline at end of file
diff --git a/source/functions/squirrel/functions.h b/source/functions/squirrel/functions.h
deleted file mode 100644
index c92d231..0000000
--- a/source/functions/squirrel/functions.h
+++ /dev/null
@@ -1,161 +0,0 @@
-#ifndef _SQFUNCTIONS_
-#define _SQFUNCTIONS_
-
-#include
-#include
-
-namespace nonut
-{
- class ServerFunctions
- {
- protected:
- ServerFunctions();
- static inline ServerFunctions* instance = nullptr;
- public:
- ServerFunctions(ServerFunctions& other) = delete;
- void operator=(const ServerFunctions&) = delete;
- static ServerFunctions* getInstance();
-
- Function getHostname;
- Function getMaxSlots;
- Function getPlayersCount;
-
- Function getDistance2d;
- Function getDistance3d;
- Function getVectorAngle;
-
- Function sendMessageToAll;
- Function sendMessageToPlayer;
- Function sendPlayerMessageToAll;
- Function sendPlayerMessageToPlayer;
-
- Function exit;
- Function getDayLength;
- Function getServerDescription;
- Function getServerWorld;
- Function getTime;
- Function serverLog;
- Function setDayLength;
- Function setServerDescription;
- Function setServerWorld;
- Function setTime;
-
- Function clearNpcActions;
- Function createNpc;
- Function destroyNpc;
- Function getNpcAction;
- //Function??> getNpcActionType;
- Function getNpcActions;
- Function getNpcActionsCount;
- Function getNpcHostPlayer;
- Function getNpcLastActionId;
- Function isNpc;
- Function isNpcActionFinished;
- Function npcAttackMelee;
- Function npcAttackRanged;
- Function npcSpellCast;
- Function npcUseClosestMob;
- //Function??> pushNpcAction;
- Function setNpcHostPlayer;
-
- Function addBan;
- Function applyPlayerOverlay;
- Function ban;
- Function drawWeapon;
- Function equipItem;
- Function getPlayerAmulet;
- Function