Skip to content

Commit

Permalink
(Aegis) add cargo list in economy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Oct 14, 2023
1 parent c5475d6 commit b499884
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions industry/docgen/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ def gen_economy_doc(all_economies, string_manager):
accepts = ", ".join(cargolink(x) for x in flow.accepts)
produces = ", ".join(cargolink(x) for x in flow.produces)
print(f"| {industrylink(industry.name)} | {accepts} | {produces} |", file=f)

# Cargos
print(
"""
# Cargos
| Cargo | Class | Capacity Multiplier | Weight |
|-------|-------|---------------------|--------|""",
file=f,
)
for cargo in economy.cargos:
from .cargo import cargo_class

cargo_path = cargo.label.decode()
cargo_name = get_translation(string_manager["STR_CARGO_" + cargo_path], 0x7F)
print(
f"| {cargo_name} | {cargo_class(cargo.cargo_class)} | {cargo.capacity_multiplier / 0x100} | {cargo.weight / 16} |",
file=f,
)

# Links: presets & variations
print(
"""
# Presets
Expand Down

0 comments on commit b499884

Please sign in to comment.