fixed # 适配AstrBot

This commit is contained in:
2026-10-23 19:12:16 +08:00
parent d0c1741940
commit 685cff9293
49 changed files with 1557 additions and 165 deletions
+2 -1
View File
@@ -26,12 +26,13 @@ class FarmRenderer:
def __init__(
self, font_path, asset_cache_bytes=32 * 1024 * 1024,
result_cache_bytes=8 * 1024 * 1024,
bundle_path=None,
):
self.font_path = Path(font_path).resolve()
if not self.font_path.is_file():
raise ValueError("Configure an existing Chinese font path")
font(self.font_path, 16)
self.assets = Assets(asset_cache_bytes)
self.assets = Assets(asset_cache_bytes, bundle_path=bundle_path)
self.results = ByteLRU(result_cache_bytes)
def scene(self, identity, snapshot, now):