fix(roadmap): credit a base method the emulator has on the object's own type
A script call ANIMO^GETNAME is served by AnimoVariable's own GETNAME, so it no longer counts toward the missing base `*` GETNAME. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
60a2c65e1f
commit
f71cd9a90f
+5
-2
@@ -43,7 +43,8 @@ def usage_index(usage: dict, types: dict) -> tuple[dict, dict, dict]:
|
||||
|
||||
kind is method / event / field / object. Within a title the build with the most places
|
||||
counts, so several releases of one game are one title; places then add up across titles.
|
||||
A method of the base runner resolves to `*`; a call whose target object is unknown counts
|
||||
A method of the base runner resolves to `*`, unless the emulator has it on the object's own
|
||||
type (then that type serves the call); a call whose target object is unknown counts
|
||||
for the scope that has the method when exactly one does (or `*`). Returns the index, the
|
||||
direct usage the original's known API does not explain (keyed by the script's type name),
|
||||
and the number of builds and titles counted.
|
||||
@@ -52,6 +53,7 @@ def usage_index(usage: dict, types: dict) -> tuple[dict, dict, dict]:
|
||||
known = {name: {"method": {m["name"] for m in t["methods"] if m["original"]},
|
||||
"event": {e["name"] for e in t.get("events", [])},
|
||||
"field": {f["name"] for f in t.get("fields", [])}} for name, t in types.items()}
|
||||
emulated = {name: {m["name"] for m in t["methods"] if m["status"] != "missing"} for name, t in types.items()}
|
||||
base = known.get("*", {}).get("method", set())
|
||||
owners = defaultdict(set)
|
||||
for scope, names in known.items():
|
||||
@@ -67,7 +69,8 @@ def usage_index(usage: dict, types: dict) -> tuple[dict, dict, dict]:
|
||||
if scope in HIDDEN:
|
||||
continue
|
||||
for name, count in names.items():
|
||||
if scope and name in known[scope][kind]:
|
||||
if scope and (name in known[scope][kind] or # a base method the emulator has on this type
|
||||
kind == "method" and name in base and name in emulated[scope]):
|
||||
places[(scope, kind, name)] += count
|
||||
elif kind == "method" and name in base:
|
||||
places[("*", kind, name)] += count
|
||||
|
||||
Reference in New Issue
Block a user