feat: Added new module-specific functions

+ Added exception handling inside python scripts
+ Changed some G2O functions to accept python objects as arguments
This commit is contained in:
AURUMVORXX
2025-03-30 16:30:54 +03:00
parent c093bd2f81
commit a00e601a14
12 changed files with 485 additions and 26 deletions

View File

@@ -1,6 +1,13 @@
## Changelog
- Creating new embedded modules changed for using existing ones (needed for proper launch under venv; reverse compatible change)
- Entry point module now will be added to ``sys.path`` on the server launch
- Server will now throw an exception if entry point module doesn't exist
- Fix for ``Packet.sendToAll`` had incorrect argument list
- All event functions, called events and some other functions now have built-in exception handler
- Added new function: ``set_default_logger`` for redirect all built-in exception messages to your custom logger
- Added new decorator: ``handle_exception`` for convinient exception handling
- Changed function ``setTime``: now all arguments are optional, so you can partially change time, and you can pass negative values to subtract them from current time.
- Changed function ``getDistance2d``: now accepts old variant ``(x1, y1, x2, y2)`` OR ``({x: value1, y: value1}, {x: value2, y: value2})``
- Changed function ``getDistance3d``: now accepts old variant ``(x1, y1, z1, x2, y2, z2)`` OR ``({x: value1, y: value1, z: value1}, {x: value2, y: value2, z: value2})``
- Changed function ``getVectorAngle``: now accepts old variant ``(x1, y1, z1, x2, y2, z2)`` OR ``({x: value1, y: value1, z: value1}, {x: value2, y: value2, z: value2})``
- Changed function ``setPlayerPosition``: now accepts old variant ``(playerid, x, y, z)`` OR ``(playerid, {x: value, y: value, z: value})``
- Changed function ``setPlayerScale``: now accepts old variant ``(playerid, x, y, z)`` OR ``(playerid, {x: value, y: value, z: value})``
- Added function ``setPlayerAttributes`` (module-specific function)
- Added function ``setPlayerTalents`` (module-specific function)