Probe raw save selection context
This commit is contained in:
parent
bd9e1421a1
commit
40c0e94ad5
9 changed files with 581 additions and 137 deletions
|
|
@ -98,6 +98,12 @@ def locomotive_cost_label(locomotive_id: int) -> str:
|
|||
return f"Lower-Band Locomotive Cost Slot {locomotive_id}"
|
||||
|
||||
|
||||
def cargo_price_label(descriptor_id: int, binding: dict[str, object] | None) -> str:
|
||||
if binding is not None:
|
||||
return f"{binding['cargo_name']} Price"
|
||||
return f"Named Cargo Price Slot {descriptor_id - 105}"
|
||||
|
||||
|
||||
def load_cargo_bindings(raw_table_path: Path) -> dict[int, dict[str, object]]:
|
||||
bindings_path = raw_table_path.parent / "event-effects-cargo-bindings.json"
|
||||
if not bindings_path.exists():
|
||||
|
|
@ -152,6 +158,11 @@ def classify(
|
|||
executable_in_runtime = True
|
||||
elif 106 <= descriptor_id <= 176:
|
||||
parameter_family = "cargo_price_scalar"
|
||||
binding = cargo_bindings.get(descriptor_id)
|
||||
label = cargo_price_label(descriptor_id, binding)
|
||||
if binding is not None:
|
||||
runtime_status = "executable"
|
||||
executable_in_runtime = True
|
||||
elif 177 <= descriptor_id <= 179:
|
||||
parameter_family = "cargo_production_scalar"
|
||||
runtime_status = "executable"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue