-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from generated.formats.ovl_base.compounds.MemStruct import MemStruct | ||
from generated.formats.trackedridecar.imports import name_type_map | ||
|
||
|
||
class Row(MemStruct): | ||
|
||
__name__ = 'Row' | ||
|
||
|
||
def __init__(self, context, arg=0, template=None, set_default=True): | ||
super().__init__(context, arg, template, set_default=False) | ||
|
||
# Offset of the row to create station gates | ||
self.offset = name_type_map['Float'](self.context, 0, None) | ||
self.u_0 = name_type_map['Uint'].from_value(0) | ||
self.seats_count = name_type_map['Uint64'](self.context, 0, None) | ||
self.seats = name_type_map['ArrayPointer'](self.context, self.seats_count, name_type_map['Seat']) | ||
if set_default: | ||
self.set_defaults() | ||
|
||
@classmethod | ||
def _get_attribute_list(cls): | ||
yield from super()._get_attribute_list() | ||
yield 'offset', name_type_map['Float'], (0, None), (False, None), (None, None) | ||
yield 'u_0', name_type_map['Uint'], (0, None), (True, 0), (None, None) | ||
yield 'seats', name_type_map['ArrayPointer'], (None, name_type_map['Seat']), (False, None), (None, None) | ||
yield 'seats_count', name_type_map['Uint64'], (0, None), (False, None), (None, None) | ||
|
||
@classmethod | ||
def _get_filtered_attribute_list(cls, instance, include_abstract=True): | ||
yield from super()._get_filtered_attribute_list(instance, include_abstract) | ||
yield 'offset', name_type_map['Float'], (0, None), (False, None) | ||
yield 'u_0', name_type_map['Uint'], (0, None), (True, 0) | ||
yield 'seats', name_type_map['ArrayPointer'], (instance.seats_count, name_type_map['Seat']), (False, None) | ||
yield 'seats_count', name_type_map['Uint64'], (0, None), (False, None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
generated/formats/trackedridecar/compounds/TrackedRideCarSub.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters