You have unlocked the GC4MAX expansion!
+Please report bugs/missing tracks to Discord: #AnTcfgss, or QQ 3421587952.
++ This server has version {fmax_ver}. +
Update log:
+{log}
+
diff --git a/7001.py b/7001.py
index 987a89e..d63c517 100644
--- a/7001.py
+++ b/7001.py
@@ -3,13 +3,14 @@ from config import Config
import os
import sqlite3
import binascii
-import bcrypt
+from passlib.hash import bcrypt
import re
from datetime import datetime
import xml.etree.ElementTree as ET
from Crypto.Cipher import AES
import urllib.parse
import json
+import requests
try:
with open("song_list.json", 'r', encoding="utf-8") as file:
@@ -83,6 +84,49 @@ title_lists = {
3: god_titles,
}
+fmax_res = []
+fmax_ver = 0
+
+def get_4max_version_string():
+ url = "https://studio.code.org/v3/sources/3-aKHy16Y5XaAPXQHI95RnFOKlyYT2O95ia2HN2jKIs/main.json"
+ global fmax_ver
+ try:
+ with open("./files/4max_ver.txt", 'r') as file:
+ fmax_ver = file.read().strip()
+ except Exception as e:
+ print(f"An unexpected error occurred when loading files/4max_ver.txt: {e}")
+
+ def fetch():
+ global fmax_res
+ try:
+ response = requests.get(url)
+ if 200 <= response.status_code <= 207:
+ try:
+ fmax_res = json.loads(json.loads(response.text)['source'])
+ except (json.JSONDecodeError, KeyError):
+ fmax_res = 500
+ else:
+ fmax_res = response.status_code
+ except requests.RequestException:
+ fmax_res = 400
+
+ fetch()
+
+if (os.path.isfile('./files/dlc_4max.html')):
+ get_4max_version_string()
+
+def parse_res(res):
+ parsed_data = []
+ if isinstance(res, int):
+ return "Failed to fetch version info: Error " + str(res)
+
+ for item in res:
+ if item.get("isOpen"):
+ version = item.get("version", "Unknown Version")
+ changelog = "
".join(item.get("changeLog", {}).get("en", []))
+ parsed_data.append(f"Version: {version}
Changelog:
{changelog}
+ You have unlocked the GC4MAX expansion!
+Please report bugs/missing tracks to Discord: #AnTcfgss, or QQ 3421587952.
+Update log:
+{log}
+
Experience the arcade with the GC4MAX expansion! This DLC unlocks 320+ exclusive songs for your 2OS experience.
+Note that these songs don't have mobile difficulties. A short placeholder is used, and GCoin reward is not available for playing them. You must clear the Normal difficulty to unlock AC content.
+Due to technical limitations, Extra level charts cannot be ported as of now. After purchasing, you will have access to support information and update logs.
+Item not found.
" - if (cnt_type == "1" and cnt_id == -1): + if (cnt_type == "1" and cnt_id < 0): source_html = f"files/dlc_4max.html" else: source_html = f"files/web_shop_detail.html" @@ -1144,6 +1230,10 @@ def ranking_detail(): button_labels.extend(["AC-Easy", "AC-Normal", "AC-Hard"]) button_modes.extend([11, 12, 13]) + if song_id > 615: + button_modes = [x for x in button_modes if x not in [1, 2, 3]] + button_labels = [x for x in button_labels if x not in ["Easy", "Normal", "Hard"]] + row_start = '' row_content = [] @@ -1394,7 +1484,7 @@ def status(): query = "SELECT * FROM daily_reward WHERE device_id = ?" cursor.execute(query, (device_id,)) user_data = cursor.fetchone() - user_name = user_data[1] + user_name = "Guest(" + user_data[1][-6:] + ")" query = "SELECT username FROM user WHERE device_id = ?" cursor.execute(query, (user_data[1],))