Skip to content

Commit 6f3430f

Browse files
committed
✨ Also show missing items in the middle.
1 parent 3673bbe commit 6f3430f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

py/max_item_id.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
import fixtures
22

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}")
3+
item_ids = {int(it.id) for it in fixtures.load_items()}
4+
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

Comments
 (0)