trainerbase 4.9.1__tar.gz → 4.9.2__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-4.9.1 → trainerbase-4.9.2}/PKG-INFO +17 -17
- {trainerbase-4.9.1 → trainerbase-4.9.2}/README.md +16 -16
- {trainerbase-4.9.1 → trainerbase-4.9.2}/pyproject.toml +19 -8
- {trainerbase-4.9.1 → trainerbase-4.9.2}/pyproject.toml.orig +11 -10
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/injections.py +2 -2
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/main.py +12 -5
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/__init__.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/abc.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/codeinjection.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/__init__.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/abc.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/helpers.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/rainbow.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/tapper.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/common/teleport.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/config.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gameobject.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/misc.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/objects.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/rainbow.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/tapper.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/teleport.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/gui/types.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/logger.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/memory.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/process.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/py.typed +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/scriptengine.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/speedhack.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/tts.py +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/vendor/FASM.EXE +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/vendor/big_logo.png +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/vendor/speedhack32.dll +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/vendor/speedhack64.dll +0 -0
- {trainerbase-4.9.1 → trainerbase-4.9.2}/trainerbase/vendor/trainerbase.ico +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trainerbase
|
|
3
|
-
Version: 4.9.
|
|
3
|
+
Version: 4.9.2
|
|
4
4
|
Summary: Framework for creating game trainers/mods
|
|
5
5
|
Author: v01d, doomayka
|
|
6
6
|
Author-email: v01d <v01d@v01d.ru>, doomayka <doomaykaka@gmail.com>
|
|
@@ -20,19 +20,19 @@ Project-URL: Homepage, https://gitlab.com/python-trainers/
|
|
|
20
20
|
Project-URL: Repository, https://gitlab.com/python-trainers/trainer-base
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
|
|
23
|
-
# Trainer Base
|
|
24
|
-
|
|
25
|
-
[](https://badge.fury.io/py/TrainerBase)
|
|
26
|
-
[](https://pepy.tech/project/trainerbase)
|
|
27
|
-
|
|
28
|
-

|
|
29
|
-
|
|
30
|
-
## To create project from template using cookiecutter
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
cookiecutter https://gitlab.com/v01d-gl/basic-project-template.git --checkout trainerbase
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Examples
|
|
37
|
-
|
|
38
|
-
[Python Trainers](https://gitlab.com/python-trainers)
|
|
23
|
+
# Trainer Base
|
|
24
|
+
|
|
25
|
+
[](https://badge.fury.io/py/TrainerBase)
|
|
26
|
+
[](https://pepy.tech/project/trainerbase)
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
## To create project from template using cookiecutter
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cookiecutter https://gitlab.com/v01d-gl/basic-project-template.git --checkout trainerbase
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
[Python Trainers](https://gitlab.com/python-trainers)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# Trainer Base
|
|
2
|
-
|
|
3
|
-
[](https://badge.fury.io/py/TrainerBase)
|
|
4
|
-
[](https://pepy.tech/project/trainerbase)
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
## To create project from template using cookiecutter
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
cookiecutter https://gitlab.com/v01d-gl/basic-project-template.git --checkout trainerbase
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Examples
|
|
15
|
-
|
|
16
|
-
[Python Trainers](https://gitlab.com/python-trainers)
|
|
1
|
+
# Trainer Base
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/TrainerBase)
|
|
4
|
+
[](https://pepy.tech/project/trainerbase)
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
## To create project from template using cookiecutter
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
cookiecutter https://gitlab.com/v01d-gl/basic-project-template.git --checkout trainerbase
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
|
|
16
|
+
[Python Trainers](https://gitlab.com/python-trainers)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "trainerbase"
|
|
3
|
-
version = "4.9.
|
|
3
|
+
version = "4.9.2"
|
|
4
4
|
description = "Framework for creating game trainers/mods"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
requires-python = ">=3.14"
|
|
@@ -32,6 +32,21 @@ email = "doomaykaka@gmail.com"
|
|
|
32
32
|
Homepage = "https://gitlab.com/python-trainers/"
|
|
33
33
|
Repository = "https://gitlab.com/python-trainers/trainer-base"
|
|
34
34
|
|
|
35
|
+
[[tool.poe.tasks.lint]]
|
|
36
|
+
cmd = "ruff format ."
|
|
37
|
+
|
|
38
|
+
[[tool.poe.tasks.lint]]
|
|
39
|
+
cmd = "ruff check --fix ."
|
|
40
|
+
|
|
41
|
+
[[tool.poe.tasks.lint]]
|
|
42
|
+
cmd = "basedpyright"
|
|
43
|
+
|
|
44
|
+
[[tool.poe.tasks.build]]
|
|
45
|
+
script = "poethepoet.scripts:rm('dist')"
|
|
46
|
+
|
|
47
|
+
[[tool.poe.tasks.build]]
|
|
48
|
+
cmd = "uv build"
|
|
49
|
+
|
|
35
50
|
[tool.ruff]
|
|
36
51
|
src = ["trainerbase"]
|
|
37
52
|
line-length = 120
|
|
@@ -72,21 +87,17 @@ typeCheckingMode = "standard"
|
|
|
72
87
|
pythonPlatform = "All"
|
|
73
88
|
pythonVersion = "3.14"
|
|
74
89
|
|
|
75
|
-
[[tool.basedpyright.executionEnvironments]]
|
|
76
|
-
root = "."
|
|
77
|
-
extraPaths = ["src"]
|
|
78
|
-
|
|
79
90
|
[tool.uv.build-backend]
|
|
80
91
|
module-name = "trainerbase"
|
|
81
92
|
module-root = ""
|
|
82
93
|
|
|
83
94
|
[build-system]
|
|
84
|
-
requires = ["uv_build>=0.
|
|
95
|
+
requires = ["uv_build>=0.13.6,<1.0.0"]
|
|
85
96
|
build-backend = "uv_build"
|
|
86
97
|
|
|
87
98
|
[dependency-groups]
|
|
88
99
|
dev = [
|
|
89
100
|
"basedpyright>=1.40.2",
|
|
90
|
-
"
|
|
91
|
-
"ruff>=0.17.
|
|
101
|
+
"poethepoet>=0.49.0",
|
|
102
|
+
"ruff>=0.17.3",
|
|
92
103
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "trainerbase"
|
|
3
|
-
version = "4.9.
|
|
3
|
+
version = "4.9.2"
|
|
4
4
|
description = "Framework for creating game trainers/mods"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
authors = [
|
|
@@ -29,6 +29,14 @@ classifiers = [
|
|
|
29
29
|
Homepage = "https://gitlab.com/python-trainers/"
|
|
30
30
|
Repository = "https://gitlab.com/python-trainers/trainer-base"
|
|
31
31
|
|
|
32
|
+
[tool.poe.tasks]
|
|
33
|
+
lint = [
|
|
34
|
+
{ cmd = "ruff format ." },
|
|
35
|
+
{ cmd = "ruff check --fix ." },
|
|
36
|
+
{ cmd = "basedpyright" },
|
|
37
|
+
]
|
|
38
|
+
build = [{ script = "poethepoet.scripts:rm('dist')" }, { cmd = "uv build" }]
|
|
39
|
+
|
|
32
40
|
[tool.ruff]
|
|
33
41
|
src = ["trainerbase"]
|
|
34
42
|
line-length = 120
|
|
@@ -68,21 +76,14 @@ include = ["trainerbase"]
|
|
|
68
76
|
typeCheckingMode = "standard"
|
|
69
77
|
pythonPlatform = "All"
|
|
70
78
|
pythonVersion = "3.14"
|
|
71
|
-
executionEnvironments = [
|
|
72
|
-
{ root = ".", extraPaths = ["src"] }
|
|
73
|
-
]
|
|
74
79
|
|
|
75
80
|
[tool.uv.build-backend]
|
|
76
81
|
module-name = "trainerbase"
|
|
77
82
|
module-root = ""
|
|
78
83
|
|
|
79
84
|
[build-system]
|
|
80
|
-
requires = ["uv_build>=0.
|
|
85
|
+
requires = ["uv_build>=0.13.6,<1.0.0"]
|
|
81
86
|
build-backend = "uv_build"
|
|
82
87
|
|
|
83
88
|
[dependency-groups]
|
|
84
|
-
dev = [
|
|
85
|
-
"basedpyright>=1.40.2",
|
|
86
|
-
"invoke>=3.0.3",
|
|
87
|
-
"ruff>=0.17.1",
|
|
88
|
-
]
|
|
89
|
+
dev = ["basedpyright>=1.40.2", "poethepoet>=0.49.0", "ruff>=0.17.3"]
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from traceback import print_exc
|
|
2
1
|
from typing import override
|
|
3
2
|
from uuid import uuid4
|
|
4
3
|
|
|
@@ -8,6 +7,7 @@ from pymem.exception import MemoryReadError, MemoryWriteError
|
|
|
8
7
|
|
|
9
8
|
from trainerbase.codeinjection import AbstractCodeInjection
|
|
10
9
|
from trainerbase.gui.types import AbstractUIComponent
|
|
10
|
+
from trainerbase.logger import logger
|
|
11
11
|
from trainerbase.tts import say
|
|
12
12
|
|
|
13
13
|
|
|
@@ -44,7 +44,7 @@ class CodeInjectionUI(AbstractUIComponent):
|
|
|
44
44
|
change_codeinjection_state()
|
|
45
45
|
except MemoryReadError, MemoryWriteError, ValueError:
|
|
46
46
|
dpg.set_value(self.dpg_tag, not dpg.get_value(self.dpg_tag))
|
|
47
|
-
|
|
47
|
+
logger.exception("Failed to change code injection state: %s", self.pure_label)
|
|
48
48
|
|
|
49
49
|
def on_hotkey_press(self):
|
|
50
50
|
dpg.set_value(self.dpg_tag, not dpg.get_value(self.dpg_tag))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from collections.abc import Callable
|
|
2
2
|
from os import _exit as force_exit
|
|
3
|
-
from
|
|
3
|
+
from signal import SIG_IGN, SIGBREAK, SIGINT, SIGTERM, default_int_handler, signal
|
|
4
4
|
from typing import NoReturn
|
|
5
5
|
|
|
6
6
|
from trainerbase.codeinjection import safely_eject_all_code_injections
|
|
@@ -28,6 +28,11 @@ def run(
|
|
|
28
28
|
on_shutdown_hook: Callback | None = None,
|
|
29
29
|
) -> NoReturn:
|
|
30
30
|
def on_shutdown() -> NoReturn:
|
|
31
|
+
# Poe repeats console signals while waiting for cleanup to finish.
|
|
32
|
+
signal(SIGINT, SIG_IGN)
|
|
33
|
+
signal(SIGTERM, SIG_IGN)
|
|
34
|
+
signal(SIGBREAK, SIG_IGN)
|
|
35
|
+
|
|
31
36
|
logger.info("Shutting down...")
|
|
32
37
|
|
|
33
38
|
logger.debug("Ejecting Code Injections.")
|
|
@@ -60,10 +65,12 @@ def run(
|
|
|
60
65
|
try:
|
|
61
66
|
on_gui_initialized_hook()
|
|
62
67
|
except Exception:
|
|
63
|
-
logger.
|
|
64
|
-
print_exc()
|
|
68
|
+
logger.exception("Exception occurred while calling on_gui_initialized_hook.")
|
|
65
69
|
on_shutdown()
|
|
66
70
|
|
|
71
|
+
signal(SIGTERM, default_int_handler)
|
|
72
|
+
signal(SIGBREAK, default_int_handler)
|
|
73
|
+
|
|
67
74
|
logger.info("Starting...")
|
|
68
75
|
logger.debug("Registering core scripts")
|
|
69
76
|
system_script_engine.simple_script(update_frozen_objects, enabled=True)
|
|
@@ -77,8 +84,8 @@ def run(
|
|
|
77
84
|
try:
|
|
78
85
|
run_gui(on_gui_initialized, on_shutdown)
|
|
79
86
|
except Exception:
|
|
80
|
-
|
|
87
|
+
logger.exception("Exception occurred while running GUI.")
|
|
81
88
|
except KeyboardInterrupt:
|
|
82
|
-
logger.info("
|
|
89
|
+
logger.info("Shutdown requested (KeyboardInterrupt)")
|
|
83
90
|
|
|
84
91
|
on_shutdown()
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|