We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3673bbe commit 6f3430fCopy full SHA for 6f3430f
py/max_item_id.py
@@ -1,4 +1,11 @@
1
import fixtures
2
3
-max_id = max(int(it.id) for it in fixtures.load_items())
4
-print(f"https://farmrpg.com/index.php#!/item.php?id={max_id+1}")
+item_ids = {int(it.id) for it in fixtures.load_items()}
+max_id = max(item_ids)
5
+
6
+# Start at 11 because 1-10 were never used.
7
+for i in range(11, max_id + 1):
8
+ if i not in item_ids:
9
+ print(f"Missing: https://farmrpg.com/index.php#!/item.php?id={i}")
10
11
+print(f"New: https://farmrpg.com/index.php#!/item.php?id={max_id+1}")
0 commit comments