mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Restored Item.appears_underground and added location support to rst.
This commit is contained in:
parent
d98632aa50
commit
f8145b87e4
3 changed files with 16 additions and 10 deletions
|
@ -1,9 +1,9 @@
|
||||||
id,name
|
id,identifier,name
|
||||||
1,Has a count in the bag
|
1,countable,Has a count in the bag
|
||||||
2,Consumed when used
|
2,consumable,Consumed when used
|
||||||
3,Usable outside battle
|
3,usable_overworld,Usable outside battle
|
||||||
4,Usable in battle
|
4,usable_in_battle,Usable in battle
|
||||||
5,Can be held by a Pokémon
|
5,holdable,Can be held by a Pokémon
|
||||||
6,Works passively when held
|
6,holdable_passive,Works passively when held
|
||||||
7,Usable by a Pokémon when held
|
7,holdable_active,Usable by a Pokémon when held
|
||||||
8,Appears in Sinnoh Underground
|
8,underground,Appears in Sinnoh Underground
|
||||||
|
|
|
|
@ -120,6 +120,7 @@ def generic_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
||||||
|
|
||||||
roles.register_local_role('ability', generic_role)
|
roles.register_local_role('ability', generic_role)
|
||||||
roles.register_local_role('item', generic_role)
|
roles.register_local_role('item', generic_role)
|
||||||
|
roles.register_local_role('location', generic_role)
|
||||||
roles.register_local_role('move', generic_role)
|
roles.register_local_role('move', generic_role)
|
||||||
roles.register_local_role('type', generic_role)
|
roles.register_local_role('type', generic_role)
|
||||||
roles.register_local_role('pokemon', generic_role)
|
roles.register_local_role('pokemon', generic_role)
|
||||||
|
|
|
@ -201,7 +201,11 @@ class Item(TableBase):
|
||||||
cost = Column(Integer, nullable=False)
|
cost = Column(Integer, nullable=False)
|
||||||
fling_power = Column(Integer, nullable=True)
|
fling_power = Column(Integer, nullable=True)
|
||||||
fling_effect_id = Column(Integer, ForeignKey('item_fling_effects.id'), nullable=True)
|
fling_effect_id = Column(Integer, ForeignKey('item_fling_effects.id'), nullable=True)
|
||||||
effect = Column(Unicode(5120), nullable=False)
|
effect = Column(rst.RstTextColumn(5120), nullable=False)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def appears_underground(self):
|
||||||
|
return any(flag.identifier == u'underground' for flag in self.flags)
|
||||||
|
|
||||||
class ItemCategory(TableBase):
|
class ItemCategory(TableBase):
|
||||||
__tablename__ = 'item_categories'
|
__tablename__ = 'item_categories'
|
||||||
|
@ -212,6 +216,7 @@ class ItemCategory(TableBase):
|
||||||
class ItemFlag(TableBase):
|
class ItemFlag(TableBase):
|
||||||
__tablename__ = 'item_flags'
|
__tablename__ = 'item_flags'
|
||||||
id = Column(Integer, primary_key=True, nullable=False)
|
id = Column(Integer, primary_key=True, nullable=False)
|
||||||
|
identifier = Column(Unicode(24), nullable=False)
|
||||||
name = Column(Unicode(64), nullable=False)
|
name = Column(Unicode(64), nullable=False)
|
||||||
|
|
||||||
class ItemFlagMap(TableBase):
|
class ItemFlagMap(TableBase):
|
||||||
|
|
Loading…
Reference in a new issue