diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-05-04 21:05:59 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-05-04 21:05:59 -0500 |
commit | 4852179683952828f88dd46e7246d2422971c9e2 (patch) | |
tree | 119b4435ddd1ce79ec9af2ead651cd1330a10a39 /crystal.py | |
parent | 837d10d9c07a023e9ed8f1a246b2184faaf262f8 (diff) |
use inspect to gather members for text_command_classes
original-commit-id: f5e5c110d1301745c4137e4c8c3fe66155a330d2
Diffstat (limited to 'crystal.py')
-rw-r--r-- | crystal.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2174,7 +2174,6 @@ class WriteCurrentDay(TextCommand): id = 0x15 macro_name = "current_day" size = 1 - class TextJump(TextCommand): "16 = 3byte pointer to new text follows. Structure: [16][2byte pointer][bank]" id = 0x16 @@ -2184,6 +2183,11 @@ class TextJump(TextCommand): 0: {"name": "text", "class": TextPointerLabelAfterBankParam}, } +text_command_classes = inspect.getmembers(sys.modules[__name__], \ + lambda obj: inspect.isclass(obj) and \ + issubclass(obj, TextCommand) and \ + obj != TextCommand) + #byte: [name, [param1 name, param1 type], [param2 name, param2 type], ...] #0x9E: ["verbosegiveitem", ["item", ItemLabelByte], ["quantity", SingleByteParam]], pksv_crystal_more = { |