Skip to content

Commit

Permalink
(Aegis) fix docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Oct 21, 2023
1 parent d93b472 commit 25ec100
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions industry/lib/cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __init__(self, id, label, cargo_class, capacity_multiplier=0x100, weight=16,
},
)
self.label = label
self.cargo_class = cargo_class

def get_sprites(self, g):
s = g.strings
Expand All @@ -28,6 +29,14 @@ def get_sprites(self, g):
self._props["label"] = struct.unpack("<I", self.label)[0]
return super().get_sprites(g)

@property
def capacity_multiplier(self):
return self._props["capacity_mult"]

@property
def weight(self):
return self._props["weight"]

@property
def translated_id(self):
return cargo_table.index(self.label)
Expand Down

0 comments on commit 25ec100

Please sign in to comment.