feat: add MMGame backend and frontend source code

This commit is contained in:
gmh01
2026-08-01 21:30:23 +08:00
parent 26ce0dd600
commit c176c04aab
42 changed files with 3606 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import json
import os
_data_path = os.path.join(os.path.dirname(__file__), 'sample_data.json')
with open(_data_path, 'r', encoding='utf-8') as f:
SCRIPTS = json.load(f)
BUILTIN_SCRIPTS = SCRIPTS
def get_script_by_id(script_id: str) -> dict | None:
for s in SCRIPTS:
if s.get("id") == script_id:
return s
return None
def get_script_by_title(title: str) -> dict | None:
for s in SCRIPTS:
if s["title"] == title:
return s
return None