trainerbase 2.8.0__tar.gz → 2.8.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TrainerBase
3
- Version: 2.8.0
3
+ Version: 2.8.2
4
4
  Summary: Template/Framework to create game trainers
5
5
  License: MIT
6
6
  Author-email: v01d <v01d@v01d.ru>,doomayka <zd@doomayka.ru>
@@ -18,7 +18,7 @@ dev = [
18
18
 
19
19
  [project]
20
20
  name = "TrainerBase"
21
- version = "2.8.0"
21
+ version = "2.8.2"
22
22
  description = "Template/Framework to create game trainers"
23
23
  authors = [
24
24
  { name = "v01d", email = "v01d@v01d.ru" },
@@ -108,9 +108,7 @@ def compile_asm(code: Code) -> bytes:
108
108
 
109
109
 
110
110
  def goto(address: int) -> str:
111
- return (
112
- f"""
111
+ return f"""
113
112
  push {address}
114
113
  ret
115
114
  """
116
- )
@@ -54,6 +54,7 @@ def add_script_to_gui(
54
54
  script.enabled = dpg.get_value(script.dpg_tag)
55
55
 
56
56
  if hotkey is not None:
57
+
57
58
  def on_hotkey_press():
58
59
  dpg.set_value(script.dpg_tag, not dpg.get_value(script.dpg_tag))
59
60
  on_script_state_change()
@@ -87,6 +88,7 @@ def add_gameobject_to_gui(
87
88
  gameobject.frozen = new_value
88
89
 
89
90
  if hotkey is not None:
91
+
90
92
  def on_hotkey_press():
91
93
  dpg.set_value(gameobject.dpg_tag_frozen, not dpg.get_value(gameobject.dpg_tag_frozen))
92
94
  on_frozen_state_change()
@@ -95,10 +97,9 @@ def add_gameobject_to_gui(
95
97
 
96
98
  label = f"[{hotkey}] {label}"
97
99
 
98
-
99
100
  with dpg.group(horizontal=True):
100
- dpg.add_text(label)
101
101
  dpg.add_checkbox(tag=gameobject.dpg_tag_frozen, callback=on_frozen_state_change)
102
+ dpg.add_text(label)
102
103
  dpg.add_input_text(width=220, tag=gameobject.dpg_tag_getter, readonly=True)
103
104
  dpg.add_input_text(width=220, tag=gameobject.dpg_tag_setter, hint="Set value here")
104
105
  dpg.add_button(label="Set", callback=on_value_set)
@@ -116,6 +117,7 @@ def add_codeinjection_to_gui(
116
117
  injection.eject()
117
118
 
118
119
  if hotkey is not None:
120
+
119
121
  def on_hotkey_press():
120
122
  dpg.set_value(injection.dpg_tag, not dpg.get_value(injection.dpg_tag))
121
123
  on_codeinjection_state_change()
@@ -161,8 +163,9 @@ def add_teleport_to_gui(tp: Teleport, hotkey_save_position: str = None, hotkey_s
161
163
  add_gameobject_to_gui(tp.player_z, "Z", before_set=float)
162
164
 
163
165
  labels = sorted(tp.labels.keys())
164
- with dpg.group(horizontal=True):
165
- dpg.add_button(label="Go To", callback=on_goto_label)
166
- dpg.add_combo(label="Labels", tag=tag_teleport_labels, items=labels, default_value=labels[0])
166
+ if labels:
167
+ with dpg.group(horizontal=True):
168
+ dpg.add_button(label="Go To", callback=on_goto_label)
169
+ dpg.add_combo(label="Labels", tag=tag_teleport_labels, items=labels, default_value=labels[0])
167
170
 
168
171
  dpg.add_button(label="Clip Coords", callback=on_clip_coords)
File without changes
File without changes
File without changes