2 Комити 90791bab75 ... dd300f7e5d

Аутор SHA1 Порука Датум
  Richard Köhl dd300f7e5d only show two digits after komma пре 1 година
  Richard Köhl 6f6d78af41 fix tap if x is tuple пре 1 година
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      dungeon.py

+ 4 - 1
dungeon.py

@@ -81,7 +81,10 @@ def tap(name, x, y=None):
         sleep = 1
         sleep = 1
 
 
     sleep += random.uniform(0, 0.2)
     sleep += random.uniform(0, 0.2)
-    text = f"- {name} (pause for {sleep}s)"
+    text = f"- {name} (pause for {sleep:.2f}s)"
+
+    if y is None and isinstance(x, tuple):
+        x, y, *_ = x
 
 
     tap_helper(x + random.randint(-3, 3), y + random.randint(-3, 3), text)
     tap_helper(x + random.randint(-3, 3), y + random.randint(-3, 3), text)
     time.sleep(sleep)
     time.sleep(sleep)