Port the AVA2 switchbot window and switchbot module

PythonSwitchbot + PythonNetworkStreamPhaseGameSwitchbot from AVA2 (CG/GC 171,
SWITCHBOT window 7, SLOT_TYPE_SWITCHBOT), uiswitchbot.py verbatim in
SwitchbotScript.inc plus its ENABLE_SWITCHBOT glue (tooltip, mouse/inventory
drag-back, interface/game hooks, zh strings, server switchbot_* messages).
Entry is the minimap 洗练 button; F9 stays with auto-hunt. The client version
timestamp is now "mt20261016" so the server enables the switchbot.
50348/50349 no longer open the window. Adds docs/AVA2-PARITY-PLAN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-16 20:26:06 +09:00
co-authored by Claude Opus 5.5
parent e70a6abf7a
commit fc98e6e2b4
21 changed files with 2941 additions and 577 deletions
+5 -1
View File
@@ -32,6 +32,8 @@ DESC={'ITEM_METIN':'可镶嵌到武器的空孔中。','ITEM_MATERIAL':'制作
# covers vnum..vnum+4).
SASH_EFFECTS=('d:/ymir work/effect/etc/buff/buff_item6.mse','d:/ymir work/effect/etc/buff/buff_item7.mse',
'd:/ymir work/pc/common/effect/armor/acc_01.mse')
# Switchbot window (AVA2-PARITY-PLAN 阶段 1, client mt_switchbot = AVA2 uiswitchbot.py): its buttons and ui.ThinBoardCircle's frame.
SWITCHBOT_UI=('d:/ymir work/ui/switchbot/','d:/ymir work/ui/pattern/thinboardcircle/')
SASH_LOCALE={'locale/en/ui/acce/acce_combine.tga':'locale/zh/ui/acce/acce_combine.tga',
'locale/en/ui/acce/acce_absorb.tga':'locale/zh/ui/acce/acce_absorb.tga'}
# Per-subtype descriptions (override DESC).
@@ -207,7 +209,9 @@ def prepare(ava,proto_reader,locale,output,tool,packer,wrap=lambda text:text):
if not target.exists():shutil.copy2(files[q],target);copied+=1
mount_files=[q for q in files for _,d in MOUNT_MOBS.values() if q.startswith('d:/ymir work/npc_mount/%s/'%d)]
if len({q.split('/')[3] for q in mount_files})!=len(MOUNT_MOBS):raise SystemExit('missing AVA2 mount models')
for q in shape_models()+effect_files(files)+mount_files:
switchbot_files=[q for q in files if q.startswith(SWITCHBOT_UI)]
if len(switchbot_files)<len(SWITCHBOT_UI)*8:raise SystemExit('missing AVA2 switchbot UI images')
for q in shape_models()+effect_files(files)+mount_files+switchbot_files:
if q not in files:raise SystemExit('missing AVA2 asset %s'%q)
target=assets/q;target.parent.mkdir(parents=True,exist_ok=True)
if not target.exists():shutil.copy2(files[q],target);copied+=1