re: generalize the two capture tools beyond weapons
idxd_tokens took the sub-record type list as an argument already but still hard-filtered entries to those declaring a `Weapon_*` id, so it could not be pointed at another schema. Filter on the requested type names instead -- it now splits `EnumUnit` (Generic/Maneuver/Shield/Explosion/Frame/Turret/...) too. gmem: honour $GMEM_FILE. `cp --sparse=always /dev/shm/xenia_memory_* snap.bin` takes ~2 s and reads identically, which matters because a running Canary pegs every core under lavapipe and makes repeated live reads stall unpredictably. Groundwork for the craft (UNIT) stats. Not a finding yet: in menus only the player craft's *name* is resident -- the flight-model object is not instantiated until a mission loads, so that needs an in-mission snapshot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,13 @@ fn main() {
|
||||
let Ok(bytes) = pak.read(entry) else { continue };
|
||||
let Ok(obj) = IdxdObject::parse(&bytes) else { continue };
|
||||
let toks = obj.tokens();
|
||||
if !toks.iter().any(|t| t.starts_with("Weapon_")) {
|
||||
// Only entries that actually declare one of the requested sub-record
|
||||
// types (the pool-start heuristic can prefix one stray byte, so match a
|
||||
// short suffix rather than equality -- same rule as the splitter below).
|
||||
if !toks
|
||||
.iter()
|
||||
.any(|t| types.iter().any(|ty| t == ty || (t.ends_with(ty.as_str()) && t.len() <= ty.len() + 2)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user