mirror of
https://github.com/Freaku17/BombSquad-Mods-byFreaku
synced 2025-11-13 12:05:58 +00:00
Update icons_keyboard.py for 1.7.37+ (API 9)
• Additional code which was added for compatibility between different versions of API 8 was removed; • Removed PLUGIN functionality (not required anymore) • Use default `# ba_meta export` class • No longer imports the whole babase module, only the necessary one's
This commit is contained in:
parent
5e531ef747
commit
8d46d713bb
1 changed files with 6 additions and 12 deletions
|
|
@ -7,13 +7,13 @@
|
||||||
# Tap bottom-left bomb button to cycle through different icons
|
# Tap bottom-left bomb button to cycle through different icons
|
||||||
|
|
||||||
|
|
||||||
# ba_meta require api 8
|
# ba_meta require api 9
|
||||||
|
|
||||||
import bauiv1
|
import bauiv1
|
||||||
import babase
|
from babase import SpecialChar
|
||||||
from babase import charstr
|
from babase import charstr
|
||||||
|
|
||||||
list_of_icons = [i for i in babase.SpecialChar]
|
list_of_icons = [i for i in SpecialChar]
|
||||||
list_of_icons = [charstr(i) for i in list_of_icons]
|
list_of_icons = [charstr(i) for i in list_of_icons]
|
||||||
list_of_icons.reverse()
|
list_of_icons.reverse()
|
||||||
|
|
||||||
|
|
@ -21,7 +21,8 @@ for i in range(26 - (len(list_of_icons) % 26)):
|
||||||
list_of_icons.append('')
|
list_of_icons.append('')
|
||||||
|
|
||||||
|
|
||||||
class IconKeyboard(babase.Keyboard if hasattr(babase, 'Keyboard') else bauiv1.Keyboard):
|
# ba_meta export bauiv1.Keyboard
|
||||||
|
class IconKeyboard(bauiv1.Keyboard):
|
||||||
"""Keyboard go brrrrrrr"""
|
"""Keyboard go brrrrrrr"""
|
||||||
name = 'Icons by \ue048Freaku'
|
name = 'Icons by \ue048Freaku'
|
||||||
chars = [(list_of_icons[0:10]),
|
chars = [(list_of_icons[0:10]),
|
||||||
|
|
@ -32,10 +33,3 @@ class IconKeyboard(babase.Keyboard if hasattr(babase, 'Keyboard') else bauiv1.Ke
|
||||||
f'icon{i//26+1}': tuple(list_of_icons[i:i+26])
|
f'icon{i//26+1}': tuple(list_of_icons[i:i+26])
|
||||||
for i in range(26, len(list_of_icons), 26)
|
for i in range(26, len(list_of_icons), 26)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# ba_meta export plugin
|
|
||||||
class byFreaku(babase.Plugin):
|
|
||||||
def __init__(self):
|
|
||||||
babase.app.meta.scanresults.exports['babase.Keyboard' if hasattr(
|
|
||||||
babase, 'Keyboard') else 'bauiv1.Keyboard'].append(__name__+'.IconKeyboard')
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue