trainerbase 4.1.4__tar.gz → 4.2.0__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.
Files changed (39) hide show
  1. {trainerbase-4.1.4 → trainerbase-4.2.0}/.gitignore +1 -1
  2. {trainerbase-4.1.4 → trainerbase-4.2.0}/PKG-INFO +4 -1
  3. {trainerbase-4.1.4 → trainerbase-4.2.0}/pyproject.toml +8 -2
  4. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/rainbow.py +1 -1
  5. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/teleport.py +2 -2
  6. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/config.py +1 -2
  7. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gameobject.py +1 -1
  8. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/memory.py +3 -1
  9. {trainerbase-4.1.4 → trainerbase-4.2.0}/LICENSE +0 -0
  10. {trainerbase-4.1.4 → trainerbase-4.2.0}/README.md +0 -0
  11. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/__init__.py +0 -0
  12. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/abc.py +0 -0
  13. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/codeinjection.py +0 -0
  14. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/__init__.py +0 -0
  15. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/abc.py +0 -0
  16. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/helpers.py +0 -0
  17. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/keyboard.py +0 -0
  18. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/common/tapper.py +0 -0
  19. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/__init__.py +0 -0
  20. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/helpers.py +0 -0
  21. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/injections.py +0 -0
  22. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/misc.py +0 -0
  23. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/objects.py +0 -0
  24. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/rainbow.py +0 -0
  25. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/scripts.py +0 -0
  26. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/speedhack.py +0 -0
  27. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/tapper.py +0 -0
  28. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/teleport.py +0 -0
  29. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/gui/types.py +0 -0
  30. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/logger.py +0 -0
  31. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/main.py +0 -0
  32. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/process.py +0 -0
  33. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/py.typed +0 -0
  34. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/scriptengine.py +0 -0
  35. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/speedhack.py +0 -0
  36. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase/tts.py +0 -0
  37. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase_vendor/FASM.EXE +0 -0
  38. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase_vendor/speedhack32.dll +0 -0
  39. {trainerbase-4.1.4 → trainerbase-4.2.0}/trainerbase_vendor/speedhack64.dll +0 -0
@@ -93,7 +93,7 @@ ipython_config.py
93
93
  # pyenv
94
94
  # For a library or package, you might want to ignore these files since the code is
95
95
  # intended to run in multiple environments; otherwise, check them in:
96
- # .python-version
96
+ .python-version
97
97
 
98
98
  # pipenv
99
99
  # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -1,12 +1,15 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: trainerbase
3
- Version: 4.1.4
3
+ Version: 4.2.0
4
4
  Summary: Framework for creating game trainers/mods
5
5
  Project-URL: Homepage, https://gitlab.com/python-trainers/
6
6
  Project-URL: Repository, https://gitlab.com/python-trainers/trainer-base
7
7
  Author-email: v01d <v01d@v01d.ru>, doomayka <zd@doomayka.ru>
8
8
  License-Expression: MIT
9
9
  License-File: LICENSE
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: Implementation :: CPython
10
13
  Requires-Python: >=3.13
11
14
  Requires-Dist: dearpygui>=2.0.0
12
15
  Requires-Dist: keyboard>=0.13.5
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "trainerbase"
3
- version = "4.1.4"
3
+ version = "4.2.0"
4
4
  description = "Framework for creating game trainers/mods"
5
5
  license = "MIT"
6
6
  authors = [
@@ -19,6 +19,12 @@ dependencies = [
19
19
  "pyttsx3>=2.98",
20
20
  ]
21
21
 
22
+ classifiers = [
23
+ "Programming Language :: Python :: Implementation :: CPython",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ ]
27
+
22
28
  [project.urls]
23
29
  Homepage = "https://gitlab.com/python-trainers/"
24
30
  Repository = "https://gitlab.com/python-trainers/trainer-base"
@@ -68,5 +74,5 @@ build-backend = "hatchling.build"
68
74
 
69
75
  [dependency-groups]
70
76
  dev = [
71
- "ruff>=0.7.2",
77
+ "ruff>=0.7.3",
72
78
  ]
@@ -26,7 +26,7 @@ class GradientUpdater(AbstractBaseScript):
26
26
  if self.tags is None or self.colors is None:
27
27
  raise RuntimeError("Call setup(...)")
28
28
 
29
- for tag, color in zip(self.tags, self.get_colors(len(self.tags))):
29
+ for tag, color in zip(self.tags, self.get_colors(len(self.tags)), strict=False):
30
30
  dpg.configure_item(tag, color=color)
31
31
 
32
32
  def setup(
@@ -35,12 +35,12 @@ class Vector3:
35
35
  return self.__apply_binary_function(other, add)
36
36
 
37
37
  def __apply_binary_function(self, other, function) -> Self:
38
- if isinstance(other, (float, int)):
38
+ if isinstance(other, float | int):
39
39
  other = repeat(other, 3)
40
40
  elif not isinstance(other, self.__class__):
41
41
  raise TypeError(f"Can't apply function {function}. Wrong type: {type(other)}")
42
42
 
43
- return self.__class__(*starmap(function, zip(self, other)))
43
+ return self.__class__(*starmap(function, zip(self, other, strict=False)))
44
44
 
45
45
  @classmethod
46
46
  def from_coords(cls, x1, y1, z1, x2, y2, z2) -> Self:
@@ -1,7 +1,6 @@
1
1
  from pathlib import Path
2
- from typing import Final
3
-
4
2
  from tomllib import load as load_toml
3
+ from typing import Final
5
4
 
6
5
 
7
6
  CONFIG_FILE: Final[Path] = Path("./trainerbase.toml")
@@ -69,7 +69,7 @@ class GameObject[PymemType, TrainerBaseType](AbstractReadableObject[TrainerBaseT
69
69
  if self.value_range is None:
70
70
  return True
71
71
 
72
- if not isinstance(value, (int, float)):
72
+ if not isinstance(value, int | float):
73
73
  raise TypeError(f"Unable to validate range for non-numeric value: {value} (type: {type(value)})")
74
74
 
75
75
  min_value, max_value = self.value_range
@@ -46,6 +46,7 @@ class AOBScan(AbstractAddress):
46
46
  should_cache: bool = True,
47
47
  should_escape: bool = True,
48
48
  any_byte_marker: str = "??",
49
+ check_memory_protection: bool = True,
49
50
  ):
50
51
  self._should_cache = should_cache
51
52
  self._saved_scan_result: int | None = None
@@ -60,6 +61,7 @@ class AOBScan(AbstractAddress):
60
61
  self.add = add
61
62
  self.module_name = module_name
62
63
  self.multiple_result_index = multiple_result_index
64
+ self.check_memory_protection = check_memory_protection
63
65
 
64
66
  def __add__(self, extra_add: int) -> Self:
65
67
  new_add = self.add + extra_add
@@ -82,7 +84,7 @@ class AOBScan(AbstractAddress):
82
84
 
83
85
  find_aob = partial(pattern_scan_module, pm.process_handle, module, return_multiple=return_multiple)
84
86
 
85
- scan_result: list[int] | int | None = find_aob(self.aob, check_memory_protection=False)
87
+ scan_result: list[int] | int | None = find_aob(self.aob, check_memory_protection=self.check_memory_protection)
86
88
 
87
89
  if not scan_result:
88
90
  raise ValueError(f"AOB not found: {self.aob}")
File without changes
File without changes