Expand description
Loads pack files and populates the SymbolRegistry.
Pack files use 2004scape’s id=name format (matching CompilerTypeInfo.load).
Constants are loaded from .constant files in the scripts directory.
Functions§
- collect_
all_ files - Recursively collect every file under
dirin a single traversal, inread_dirorder (each directory recursed as it is encountered). - load_
constant_ files - Load all
.constantfiles from the scripts directory, matching 2004scape’sloadDirExtFull(scripts_dir, '.constant', ...)behavior. - load_
dbtable_ configs - Scan
.dbtablefiles underscripts_dirand register each column as a compound entity IDtable:column→ packed int, mirroring 2004scape’s runescript lookup. - load_
dbtable_ pack - Load dbtable.pack as a
name → idmap. Used byload_dbtable_configs. - load_
engine_ command_ params - Parse the parameter types declared in an
engine.rs2file and populateregistry.command_param_types. Lines like:[command,sound_synth](synth $sound, int $loops, int $delay)are parsed to extract the ordered list of parameter types per command. - load_
game_ var_ types - Scan the game-var configs and refine the type of each matching game-var.
load_game_varsdefaults everything toType::Int; the real type comes from thetype=<typename>line in the config block. Only varp, varn, vars and varbit are registered from their file alone; the cache’s tables number the others, through their.pack. - load_
packs - Load all .pack files from
pack_dirintoregistry. - patch_
command_ return_ types - Patch return types for commands whose signatures are not in engine.rs2 but are known to return values in the Neptune compiler. Without this, statement-level calls to these commands will be missing POP_INT_DISCARD / POP_STRING_DISCARD.