diff options
author | Sanky <gsanky@gmail.com> | 2013-02-02 23:13:32 +0100 |
---|---|---|
committer | Sanky <gsanky@gmail.com> | 2013-02-02 23:20:50 +0100 |
commit | 4089cf486d83d78fddaab98316952e1bbeaafd47 (patch) | |
tree | f2721b81775a3e450e1a301a4679c9d6159c22b3 /item_constants.py | |
parent | 43546fd07ac588be694c697873a642c5a2cc8c1d (diff) | |
parent | 1e893fae740cd9f82ead9adcb6f5c1ccb1c6090b (diff) |
Merge https://github.com/kanzure/pokecrystal
Conflicts:
constants.asm
extras/crystal.py
main.asm
original-commit-id: 7df002c3e20f1b728b1d29a877c3731d4867f502
Diffstat (limited to 'item_constants.py')
-rw-r--r-- | item_constants.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/item_constants.py b/item_constants.py index d60dfb1..a050637 100644 --- a/item_constants.py +++ b/item_constants.py @@ -1,4 +1,7 @@ -item_constants = {1: 'MASTER_BALL', +# -*- coding: utf-8 -*- + +item_constants = { +1: 'MASTER_BALL', 2: 'ULTRA_BALL', 3: 'BRIGHTPOWDER', 4: 'GREAT_BALL', @@ -219,4 +222,20 @@ item_constants = {1: 'MASTER_BALL', 246: 'HM_04', 247: 'HM_05', 248: 'HM_06', -249: 'HM_07'} +249: 'HM_07', +} + +def find_item_label_by_id(id): + if id in item_constants.keys(): + return item_constants[id] + else: return None + +def generate_item_constants(): + """make a list of items to put in constants.asm""" + output = "" + for (id, item) in item_constants.items(): + val = ("$%.2x"%id).upper() + while len(item)<13: item+= " " + output += item + " EQU " + val + "\n" + return output + |