trainerbase 3.16.1__tar.gz → 3.16.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trainerbase-3.16.1 → trainerbase-3.16.3}/PKG-INFO +3 -3
- {trainerbase-3.16.1 → trainerbase-3.16.3}/pyproject.toml +4 -4
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/teleport.py +6 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/main.py +2 -2
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/process.py +3 -14
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/scriptengine.py +4 -1
- {trainerbase-3.16.1 → trainerbase-3.16.3}/LICENSE +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/README.md +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/__init__.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/codeinjection.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/common/__init__.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/common/abc.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/common/helpers.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/common/rainbow.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/common/teleport.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/config.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gameobject.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/injections.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/misc.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/objects.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/rainbow.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/gui/types.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/memory.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/speedhack.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase/tts.py +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase_vendor/FASM.EXE +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase_vendor/speedhack32.dll +0 -0
- {trainerbase-3.16.1 → trainerbase-3.16.3}/trainerbase_vendor/speedhack64.dll +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: trainerbase
|
|
3
|
-
Version: 3.16.
|
|
3
|
+
Version: 3.16.3
|
|
4
4
|
Summary: Framework for creating game trainers/mods
|
|
5
5
|
Home-page: https://gitlab.com/python-trainers/trainer-base
|
|
6
6
|
License: MIT
|
|
@@ -12,10 +12,10 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Requires-Dist: dearpygui (>=1.11.1,<2.0.0)
|
|
14
14
|
Requires-Dist: keyboard (>=0.13.5,<0.14.0)
|
|
15
|
-
Requires-Dist: psutil (>=
|
|
15
|
+
Requires-Dist: psutil (>=6.0.0,<7.0.0)
|
|
16
16
|
Requires-Dist: pyinjector (>=1.3.0,<2.0.0)
|
|
17
17
|
Requires-Dist: pymem (>=1.13.1,<2.0.0)
|
|
18
|
-
Requires-Dist: pyttsx3 (>=2.
|
|
18
|
+
Requires-Dist: pyttsx3 (>=2.91,<3.0)
|
|
19
19
|
Project-URL: Repository, https://gitlab.com/python-trainers/trainer-base
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "trainerbase"
|
|
3
|
-
version = "3.16.
|
|
3
|
+
version = "3.16.3"
|
|
4
4
|
description = "Framework for creating game trainers/mods"
|
|
5
5
|
authors = ["v01d <v01d@v01d.ru>", "doomayka <zd@doomayka.ru>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -17,7 +17,7 @@ include = [
|
|
|
17
17
|
]
|
|
18
18
|
|
|
19
19
|
[tool.poetry.group.dev.dependencies]
|
|
20
|
-
ruff = "^0.
|
|
20
|
+
ruff = "^0.5.7"
|
|
21
21
|
|
|
22
22
|
[tool.ruff]
|
|
23
23
|
src = ["trainerbase"]
|
|
@@ -51,9 +51,9 @@ python = "^3.12"
|
|
|
51
51
|
pymem = "^1.13.1"
|
|
52
52
|
dearpygui = "^1.11.1"
|
|
53
53
|
keyboard = "^0.13.5"
|
|
54
|
-
pyttsx3 = "^2.
|
|
54
|
+
pyttsx3 = "^2.91"
|
|
55
55
|
pyinjector = "^1.3.0"
|
|
56
|
-
psutil = "^
|
|
56
|
+
psutil = "^6.0.0"
|
|
57
57
|
|
|
58
58
|
[build-system]
|
|
59
59
|
requires = ["poetry-core"]
|
|
@@ -5,6 +5,7 @@ from typing import override
|
|
|
5
5
|
from dearpygui import dearpygui as dpg
|
|
6
6
|
from keyboard import add_hotkey
|
|
7
7
|
|
|
8
|
+
from trainerbase.common.helpers import suppress_memory_exceptions
|
|
8
9
|
from trainerbase.common.teleport import Teleport
|
|
9
10
|
from trainerbase.gui.helpers import add_components
|
|
10
11
|
from trainerbase.gui.objects import GameObjectUI
|
|
@@ -48,26 +49,31 @@ class TeleportUI(AbstractUIComponent):
|
|
|
48
49
|
|
|
49
50
|
dpg.add_button(label="Clip Coords", callback=self.on_clip_coords)
|
|
50
51
|
|
|
52
|
+
@suppress_memory_exceptions
|
|
51
53
|
def on_clip_coords(self):
|
|
52
54
|
dpg.set_clipboard_text(repr(self.tp.get_coords()))
|
|
53
55
|
|
|
56
|
+
@suppress_memory_exceptions
|
|
54
57
|
def on_hotkey_save_position_press(self, key: Hashable):
|
|
55
58
|
self.tp.save_position(key)
|
|
56
59
|
|
|
57
60
|
if self.tts_on_hotkey:
|
|
58
61
|
say("Position saved")
|
|
59
62
|
|
|
63
|
+
@suppress_memory_exceptions
|
|
60
64
|
def on_hotkey_set_saved_position_press(self, key: Hashable):
|
|
61
65
|
is_position_restored = self.tp.restore_saved_position(key)
|
|
62
66
|
|
|
63
67
|
if self.tts_on_hotkey:
|
|
64
68
|
say("Position restored" if is_position_restored else "Save position at first")
|
|
65
69
|
|
|
70
|
+
@suppress_memory_exceptions
|
|
66
71
|
def on_hotkey_dash_press(self):
|
|
67
72
|
self.tp.dash()
|
|
68
73
|
if self.tts_on_hotkey:
|
|
69
74
|
say("Dash!")
|
|
70
75
|
|
|
76
|
+
@suppress_memory_exceptions
|
|
71
77
|
def on_goto_label(self):
|
|
72
78
|
self.tp.goto(dpg.get_value(self.DPG_TAG_TELEPORT_LABELS))
|
|
73
79
|
|
|
@@ -7,7 +7,7 @@ from trainerbase.codeinjection import safely_eject_all_code_injections
|
|
|
7
7
|
from trainerbase.common.rainbow import gradient_updater
|
|
8
8
|
from trainerbase.gameobject import update_frozen_objects
|
|
9
9
|
from trainerbase.gui.objects import update_displayed_objects
|
|
10
|
-
from trainerbase.process import
|
|
10
|
+
from trainerbase.process import shutdown_if_process_exited
|
|
11
11
|
from trainerbase.scriptengine import (
|
|
12
12
|
Script,
|
|
13
13
|
process_healthcheck_script_engine,
|
|
@@ -52,7 +52,7 @@ def run( # pylint: disable=too-complex
|
|
|
52
52
|
|
|
53
53
|
system_script_engine.register_script(Script(update_frozen_objects, enabled=True))
|
|
54
54
|
system_script_engine.register_script(Script(update_displayed_objects, enabled=True))
|
|
55
|
-
process_healthcheck_script_engine.register_script(Script(
|
|
55
|
+
process_healthcheck_script_engine.register_script(Script(shutdown_if_process_exited, enabled=True))
|
|
56
56
|
rainbow_script_engine.register_script(Script(gradient_updater, enabled=True))
|
|
57
57
|
|
|
58
58
|
try:
|
|
@@ -6,8 +6,6 @@ from typing import cast
|
|
|
6
6
|
from psutil import pid_exists
|
|
7
7
|
from pymem import Pymem
|
|
8
8
|
from pymem.exception import ProcessNotFound
|
|
9
|
-
from win32api import MessageBox
|
|
10
|
-
from win32con import MB_ICONERROR, MB_OK
|
|
11
9
|
|
|
12
10
|
from trainerbase.config import pymem_config
|
|
13
11
|
|
|
@@ -38,18 +36,9 @@ def attach_to_process() -> Pymem:
|
|
|
38
36
|
force_exit(0)
|
|
39
37
|
|
|
40
38
|
|
|
41
|
-
def
|
|
42
|
-
if pid_exists(cast(int, _pm.process_id)):
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
MessageBox(
|
|
46
|
-
None,
|
|
47
|
-
"Shut down trainer?",
|
|
48
|
-
"Process Exited!",
|
|
49
|
-
MB_ICONERROR | MB_OK,
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
force_exit(0)
|
|
39
|
+
def shutdown_if_process_exited():
|
|
40
|
+
if not pid_exists(cast(int, _pm.process_id)):
|
|
41
|
+
force_exit(0)
|
|
53
42
|
|
|
54
43
|
|
|
55
44
|
_pm = attach_to_process()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from collections.abc import Callable
|
|
2
|
+
from contextlib import suppress
|
|
2
3
|
from sys import stderr
|
|
3
4
|
from threading import Thread
|
|
4
5
|
from time import sleep
|
|
@@ -34,7 +35,9 @@ class ScriptEngine:
|
|
|
34
35
|
|
|
35
36
|
def stop(self):
|
|
36
37
|
self.should_run = False
|
|
37
|
-
|
|
38
|
+
|
|
39
|
+
with suppress(RuntimeError):
|
|
40
|
+
self.thread.join()
|
|
38
41
|
|
|
39
42
|
def script_loop(self):
|
|
40
43
|
while self.should_run:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|