trainerbase 4.0.3__tar.gz → 4.0.4__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 (37) hide show
  1. {trainerbase-4.0.3 → trainerbase-4.0.4}/PKG-INFO +1 -1
  2. {trainerbase-4.0.3 → trainerbase-4.0.4}/pyproject.toml +1 -1
  3. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/tapper.py +11 -8
  4. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/logger.py +4 -4
  5. {trainerbase-4.0.3 → trainerbase-4.0.4}/LICENSE +0 -0
  6. {trainerbase-4.0.3 → trainerbase-4.0.4}/README.md +0 -0
  7. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/__init__.py +0 -0
  8. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/abc.py +0 -0
  9. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/codeinjection.py +0 -0
  10. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/__init__.py +0 -0
  11. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/abc.py +0 -0
  12. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/helpers.py +0 -0
  13. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/keyboard.py +0 -0
  14. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/rainbow.py +0 -0
  15. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/tapper.py +0 -0
  16. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/common/teleport.py +0 -0
  17. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/config.py +0 -0
  18. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gameobject.py +0 -0
  19. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/__init__.py +0 -0
  20. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/helpers.py +0 -0
  21. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/injections.py +0 -0
  22. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/misc.py +0 -0
  23. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/objects.py +0 -0
  24. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/rainbow.py +0 -0
  25. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/scripts.py +0 -0
  26. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/speedhack.py +0 -0
  27. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/teleport.py +0 -0
  28. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/gui/types.py +0 -0
  29. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/main.py +0 -0
  30. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/memory.py +0 -0
  31. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/process.py +0 -0
  32. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/scriptengine.py +0 -0
  33. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/speedhack.py +0 -0
  34. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase/tts.py +0 -0
  35. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase_vendor/FASM.EXE +0 -0
  36. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase_vendor/speedhack32.dll +0 -0
  37. {trainerbase-4.0.3 → trainerbase-4.0.4}/trainerbase_vendor/speedhack64.dll +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trainerbase
3
- Version: 4.0.3
3
+ Version: 4.0.4
4
4
  Summary: Framework for creating game trainers/mods
5
5
  Home-page: https://gitlab.com/python-trainers/trainer-base
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "trainerbase"
3
- version = "4.0.3"
3
+ version = "4.0.4"
4
4
  description = "Framework for creating game trainers/mods"
5
5
  authors = ["v01d <v01d@v01d.ru>", "doomayka <zd@doomayka.ru>"]
6
6
  license = "MIT"
@@ -1,4 +1,5 @@
1
1
  from typing import override
2
+ from uuid import uuid4
2
3
 
3
4
  from dearpygui import dearpygui as dpg
4
5
 
@@ -10,8 +11,8 @@ from trainerbase.gui.types import AbstractUIComponent
10
11
 
11
12
 
12
13
  class TapperUI(AbstractUIComponent):
13
- DPG_TAG_TAPPER_DELAY_INPUT = "tag_tapper_delay_input"
14
- DPG_TAG_TAPPER_PRESET_INPUT = "tag_tapper_preset_input"
14
+ DPG_TAG_TAPPER_DELAY_INPUT_PREFIX = "tag_tapper_delay_input"
15
+ DPG_TAG_TAPPER_PRESET_INPUT_PREFIX = "tag_tapper_preset_input"
15
16
 
16
17
  PRESETS: tuple[float, ...] = (0.05, 0.15, 0.25, 0.3, 0.5, 0.7, 1, 2, 5, 10)
17
18
 
@@ -29,6 +30,8 @@ class TapperUI(AbstractUIComponent):
29
30
  self.default_delay = tapper.delay
30
31
 
31
32
  self.key = key
33
+ self.dpg_tag_tapper_delay_input = f"{self.DPG_TAG_TAPPER_DELAY_INPUT_PREFIX}_{uuid4()}"
34
+ self.dpg_tag_tapper_preset_input = f"{self.DPG_TAG_TAPPER_PRESET_INPUT_PREFIX}_{uuid4()}"
32
35
 
33
36
  @override
34
37
  def add_to_ui(self) -> None:
@@ -38,7 +41,7 @@ class TapperUI(AbstractUIComponent):
38
41
  )
39
42
 
40
43
  dpg.add_input_double(
41
- tag=self.DPG_TAG_TAPPER_DELAY_INPUT,
44
+ tag=self.dpg_tag_tapper_delay_input,
42
45
  label="Tapper Delay",
43
46
  min_value=0.0,
44
47
  max_value=60.0,
@@ -49,7 +52,7 @@ class TapperUI(AbstractUIComponent):
49
52
  )
50
53
 
51
54
  dpg.add_slider_int(
52
- tag=self.DPG_TAG_TAPPER_PRESET_INPUT,
55
+ tag=self.dpg_tag_tapper_preset_input,
53
56
  label="Preset",
54
57
  min_value=0,
55
58
  max_value=len(self.PRESETS) - 1,
@@ -59,15 +62,15 @@ class TapperUI(AbstractUIComponent):
59
62
  )
60
63
 
61
64
  def on_preset_change(self):
62
- new_delay = self.PRESETS[dpg.get_value(self.DPG_TAG_TAPPER_PRESET_INPUT)]
65
+ new_delay = self.PRESETS[dpg.get_value(self.dpg_tag_tapper_preset_input)]
63
66
  self.tapper.delay = new_delay
64
- dpg.set_value(self.DPG_TAG_TAPPER_DELAY_INPUT, new_delay)
67
+ dpg.set_value(self.dpg_tag_tapper_delay_input, new_delay)
65
68
 
66
69
  def on_delay_change(self):
67
- new_delay = dpg.get_value(self.DPG_TAG_TAPPER_DELAY_INPUT)
70
+ new_delay = dpg.get_value(self.dpg_tag_tapper_delay_input)
68
71
  closest_preset_index = self.get_closest_preset_index(new_delay)
69
72
  self.tapper.delay = new_delay
70
- dpg.set_value(self.DPG_TAG_TAPPER_PRESET_INPUT, closest_preset_index)
73
+ dpg.set_value(self.dpg_tag_tapper_preset_input, closest_preset_index)
71
74
 
72
75
  def get_closest_preset_index(self, delay: float) -> int:
73
76
  closest_preset = min(self.PRESETS, key=lambda preset: abs(preset - delay))
@@ -26,9 +26,9 @@ if logging_config is None:
26
26
  "handlers": ["console"],
27
27
  },
28
28
  }
29
- display_no_logger_config_warning = True
29
+ using_default_config = True
30
30
  else:
31
- display_no_logger_config_warning = False
31
+ using_default_config = False
32
32
 
33
33
 
34
34
  dictConfig(logging_config)
@@ -36,5 +36,5 @@ getLogger("comtypes").setLevel(ERROR)
36
36
 
37
37
  logger = getLogger("TrainerBase")
38
38
 
39
- if display_no_logger_config_warning:
40
- logger.warning(f"No logging config in {CONFIG_FILE}! Use updated trainer template.")
39
+ if using_default_config:
40
+ logger.debug(f"No logging config in {CONFIG_FILE}! Using default one.")
File without changes
File without changes