Skip to content

Commit 0643b91

Browse files
authored
Update gamebro-gui.py
Fixed #4
1 parent 7b8ed84 commit 0643b91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gamebro-gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ def newsprite(data: dict[Any, Any] = None):
253253
wait_for_keypress("Invalid JSON structure.")
254254
return
255255
name = data["name"]
256-
if data is not None and any(s['name'] == name or data[name] for s in sprites):
257-
wait_for_keypress("Sprite name exists!" if data is None else "Sprite already exists!")
256+
if data is not None and any(s['name'] == name for s in sprites):
257+
wait_for_keypress("Sprite already exists!")
258258
return
259259
if is_int(name) or name in ["Sprite", "SpriteGroup", *banned_kwords] or name.startswith("Sprite_") or name.startswith("Group_"):
260260
wait_for_keypress("Invalid sprite name!")

0 commit comments

Comments
 (0)