🧐 Add ranged weapons and patches
This commit is contained in:
parent
1705624d0d
commit
f895e100d2
48 changed files with 40 additions and 4 deletions
|
@ -18,11 +18,12 @@ db.generate_mapping()
|
|||
def weapon(name):
|
||||
with db_session:
|
||||
query = select(w for w in Melee if w.name == name)
|
||||
if query.count() > 0:
|
||||
weapon = query.first()
|
||||
else:
|
||||
if query.count() == 0:
|
||||
query = select(w for w in Shield if w.name == name)
|
||||
weapon = query.first()
|
||||
if query.count() == 0:
|
||||
query = select(w for w in Ranged if w.name == name)
|
||||
weapon = query.first()
|
||||
if weapon.mechanism:
|
||||
mechanism, _ = re.subn(
|
||||
r"{(.*?)@(.*?)}", r"<span class='\2'>\1</span>", weapon.mechanism
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue