port 2D step 2: 40250 item_proto/mob_proto through CLZO and pack://locale/<lang>/
proto.cpp reads the 40250 MIPX/MMPT tables with the ported CLZO/TEA (156-byte TItemTable, 255-byte SMobTable), replacing the m2dev XChaCha20 236/335 reader. Names follow CItemData::GetName / GetMonsterName (szLocaleName, cp1252). GDScript callers load AssetRoot.locale_file() = pack://locale/en/<name>, which makes the EterPack chain runtime-reachable; port-map entries for the functions a coverage run hit move to PORTED/ADAPTED. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -355,11 +355,9 @@ func _rebuild_model() -> void:
|
||||
if _proto == null and ClassDB.class_exists("Metin2Proto"):
|
||||
_proto = ClassDB.instantiate("Metin2Proto")
|
||||
add_child(_proto)
|
||||
for lang in ["en", "common"]:
|
||||
var ip := _assets.path_join("locale/locale/%s/item_proto" % lang)
|
||||
if FileAccess.file_exists(ip):
|
||||
_proto.call("load_item_proto", ip)
|
||||
break
|
||||
var ip := AssetRoot.locale_file("item_proto")
|
||||
if ip != "":
|
||||
_proto.call("load_item_proto", ip)
|
||||
var equip := EquipModel.new()
|
||||
pv.add_child(equip)
|
||||
equip.setup_remote(null, func() -> Node: return pv, _assets, job,
|
||||
|
||||
Reference in New Issue
Block a user