Skip to content
Snippets Groups Projects
Unverified Commit 149f47f2 authored by Zac's avatar Zac Committed by GitHub
Browse files

Update to v3.1.5 - Fixed same-symbol index glitch

parent 5d87b1ca
No related branches found
No related tags found
No related merge requests found
# coding: utf8
# =================================================== # # =================================================== #
# Trash Guy Script # # Trash Guy Script #
# 🗑️(> ^_^)> # # (> ^_^)> #
# Made by Zac (t.me/Zacci) # # Made by Zac (t.me/Zacci) #
# Version 3.1.4-pi # # Version 3.1.5-pi #
# Donate: # # Donate: #
# 1CoRm4mKCUPs5XQnFVSVQ4xGMAp29pyYzC # # 1CoRm4mKCUPs5XQnFVSVQ4xGMAp29pyYzC #
# =================================================== # # =================================================== #
...@@ -26,7 +25,8 @@ import sys ...@@ -26,7 +25,8 @@ import sys
def main(): def main():
"""Example usage of TrashGuy class.""" """Example usage of TrashGuy class."""
input_default = '🍓 🍅 🍊 🍋'.split() # input_default = '🍓 🍅 🍊 🍋'.split()
input_default = ['\U0001F353', '\U0001F345', '\U0001F34A', '\U0001F34B']
user_input = sys.argv[1:] user_input = sys.argv[1:]
if not user_input: if not user_input:
...@@ -100,7 +100,7 @@ class TrashGuy: ...@@ -100,7 +100,7 @@ class TrashGuy:
# Loop over the canvas to animate the trash guy going right while holding the item. # Loop over the canvas to animate the trash guy going right while holding the item.
for index in range(len(r_canvas)): for index in range(len(r_canvas)):
# Trash guy hits the item he wants to pickup # Trash guy hits the item he wants to pickup
if r_canvas[index] == sym_space or r_canvas[index] == item: if r_canvas[index] == sym_space or -index == last_item_index:
try: try:
if r_canvas[index - 1] == sym_trash: if r_canvas[index - 1] == sym_trash:
# Looking left on the very final frame of the animation # Looking left on the very final frame of the animation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment