feat: add MeshPort overlay networking, item actions window, and AVA2 client enhancements

- add MeshPort peer-to-peer overlay networking SDK, C++ integration, and Python bindings
- add item actions quick use/split/delete/lock overlay window (mt_item_actions)
- add shop name range and NPC name visibility settings to system display options
- support battlepass ticket activation and month validation in mt_battlepass
- support boss tracking teleport destination button in mt_bosses
- support asynchronous account registration cancellation and pending login cancellation
- update AVA2 item conversion for attr lock scrolls and battlepass tickets
- update .gitignore for local build outputs and caches
This commit is contained in:
shen
2026-10-16 01:29:57 -07:00
parent f266072f67
commit 507e687867
556 changed files with 213111 additions and 43 deletions
+25 -3
View File
@@ -4,7 +4,7 @@ Only types/subtypes/flags the 40250 server understands survive; items of AVA2-on
new rings, mounts, sashes, costume enchants, talisman bonus items, new skill books) become plain ITEM_NONE
items until those systems are ported. Usage: see build_zh_locale.build_ava2_items and --help.
"""
import argparse,json,re,shutil,subprocess
import argparse,json,re,shutil,subprocess,tarfile
from pathlib import Path
HERE=Path(__file__).resolve().parent
RANGES=((54001,54027,'时装强化石'),(54028,54078,'发型强化石'),(54079,54123,'武器外观强化石'),
@@ -38,13 +38,15 @@ def names():
v,n=line.split('\t');result[int(v)]=n
for lo,hi,n in RANGES:
for v in range(lo,hi+1):result[v]=n
result.update({50348:'属性锁定符',50349:'属性解锁符'})
for month in range(1,13):result[25149+month]='%d月战令票'%month
return result
def convert(cols,E,imported):
"""AVA2 item_proto.txt row (str columns) -> (server row columns, client numeric fields, kept?)."""
c=[x.strip() for x in cols[:33]]
t,st=c[2],c[3]
kept=t in KEEP_TYPES or (t,st) in KEEP_SUBTYPES
kept=t in KEEP_TYPES or (t,st) in KEEP_SUBTYPES or (int(c[0]) in (50348,50349) and (t,st)==('ITEM_USE','USE_CHANGE_ATTRIBUTE'))
anti=tokens(c[5]);flags=tokens(c[6])
if 'ITEM_STACKABLE' in anti:anti.remove('ITEM_STACKABLE');flags.append('ITEM_STACKABLE')
anti=[a for a in dict.fromkeys(anti) if a in E['anti']];flags=[f for f in dict.fromkeys(flags) if f in E['flag']]
@@ -86,9 +88,26 @@ def prepare(ava,proto_reader,locale,output,tool,packer,wrap=lambda text:text):
E=enums(proto_reader);zh=names();wanted=set(zh)
db=ava/'2. Backup SF+SRC and SQL/home/srv1/db';pack_maker=ava/'1. Client DEV/pack_maker'
rows={}
for line in (db/'item_proto.txt').read_bytes().splitlines():
proto=db/'item_proto.txt'
if proto.is_file():raw=proto.read_bytes()
else:
# The checked-out reference normally contains the original archive,
# not somebody else's AVA2/TEST extraction directory.
with tarfile.open(ava/'2. Backup SF+SRC and SQL/FILES+SRC.tgz','r:gz') as source:
member=source.extractfile('home/srv1/db/item_proto.txt')
if member is None:raise ValueError('AVA2 archive has no item_proto.txt')
raw=member.read()
for line in raw.splitlines():
cols=line.split(b'\t')
if cols[0].strip().isdigit() and int(cols[0]) in wanted:rows[int(cols[0])]=[x.decode('latin1') for x in cols]
# The archived server DB omits the lock materials even though its gameplay
# code registers them. AVA2's client DumpProto ships their actual definitions.
if not {50348,50349}<=rows.keys():
dump=ava/'3. Source BIN/Tools/DumpProto/Release/item_proto.txt'
if not dump.is_file():dump=ava.parent/'3. Source BIN/Tools/DumpProto/Release/item_proto.txt'
for line in dump.read_bytes().splitlines():
cols=line.split(b'\t')
if cols[0] in (b'50348',b'50349'):rows[int(cols[0])]=[x.decode('latin1') for x in cols]
assert rows.keys()==wanted,sorted(wanted-rows.keys())
listrows={}
for line in (pack_maker/'locale/locale/es/item_list.txt').read_bytes().splitlines():
@@ -128,6 +147,9 @@ def prepare(ava,proto_reader,locale,output,tool,packer,wrap=lambda text:text):
else:
t=rows[v][2].strip()
desc=DESC.get(t,'') if v in report['kept'] else LOCKED
if v==50348:desc='装备有5条普通属性时,可锁定其中一条;最多锁定2组。每次消耗1张。'
elif v==50349:desc='解除装备上的属性锁定,每次消耗1张。'
elif 25150<=v<=25161:desc='仅限对应月份激活战令,确认后消耗;激活后开始累计任务进度。'
result.append(('%d\t%s\t%s'%(v,zh[v],wrap(desc) if desc else '')).encode('gbk'))
(target/filename).write_bytes(b'\n'.join(result)+b'\n')
subprocess.run([str(packer),str(output/'ava2items'),str(assets),''],check=True)