summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--gui.py17
2 files changed, 14 insertions, 6 deletions
diff --git a/README b/README
index ffad25c..57da257 100644
--- a/README
+++ b/README
@@ -7,6 +7,5 @@ move mouse = move
left click, space = split
right click, w = eject some mass
r = respawn
-s = lock input
-b = lock bot input
+s = lock input. cycles through: user lock -> user and bot lock -> bot lock -> no lock
esc = quit
diff --git a/gui.py b/gui.py
index 8e3fb84..fdc587b 100644
--- a/gui.py
+++ b/gui.py
@@ -221,7 +221,7 @@ def draw_frame():
for cell in c.player.own_cells:
total_mass += cell.mass
- pygame.display.set_caption("Agar.io: " + str(c.player.nick) + " - " + str(int(total_mass)) + " Total Mass - " + str(int(clock.get_fps())) + (" FPS - INPUT LOCKED" if not input else " FPS") + (" - BOT INPUT LOCKED" if not bot_input else ""))
+ pygame.display.set_caption("Agar.io: " + str(c.player.nick) + " - " + str(int(total_mass)) + " Total Mass - " + str(int(clock.get_fps())) + (" FPS - USER INPUT LOCKED" if not input else " FPS") + (" - BOT INPUT LOCKED" if not bot_input else ""))
events = pygame.event.get()
for event in events:
@@ -234,9 +234,18 @@ def draw_frame():
pygame.display.quit()
if event.type == KEYDOWN:
if event.key == K_s:
- input = not input
- if event.key == K_b:
- bot_input = not bot_input
+ if not input and bot_input:
+ input = False
+ bot_input = False
+ elif not input and not bot_input:
+ input = True
+ bot_input = False
+ elif input and not bot_input:
+ input = True
+ bot_input = True
+ else:
+ input = False
+ bot_input = True
if event.key == K_ESCAPE:
pygame.quit()
if event.key == K_r: