[ci] auto-format

This commit is contained in:
BanEvanderNou 2024-05-16 16:07:23 +00:00 committed by github-actions[bot]
parent 74dcb0316a
commit ab8d685e1a
5 changed files with 2115 additions and 1511 deletions

View file

@ -1,24 +1,34 @@
# ba_meta require api 8 # ba_meta require api 8
import bascenev1 as bs import bascenev1 as bs
from babase import Plugin as v from babase import Plugin as v
from bauiv1 import buttonwidget as z,gettexture as x from bauiv1 import buttonwidget as z, gettexture as x
from bauiv1lib.mainmenu import MainMenuWindow as m from bauiv1lib.mainmenu import MainMenuWindow as m
m.i=m.p=0;k=bs.connect_to_party m.i = m.p = 0
def j(address,port=43210,print_progress=False): k = bs.connect_to_party
try:bs.disconnect_from_host()
except:pass
m.i=address;m.p=port;k(m.i,m.p,print_progress) def j(address, port=43210, print_progress=False):
try:
bs.disconnect_from_host()
except:
pass
m.i = address
m.p = port
k(m.i, m.p, print_progress)
def R(s): def R(s):
def w(t,*f,**g): def w(t, *f, **g):
z(parent=t._root_widget,size=(23,26),icon=x('replayIcon'), z(parent=t._root_widget, size=(23, 26), icon=x('replayIcon'),
on_activate_call=bs.Call(j,m.i,m.p)) on_activate_call=bs.Call(j, m.i, m.p))
return s(t,*f,**g) return s(t, *f, **g)
return w return w
# ba_meta export plugin # ba_meta export plugin
class byBordd(v): class byBordd(v):
def __init__(s): def __init__(s):
m._refresh_in_game=R(m._refresh_in_game) m._refresh_in_game = R(m._refresh_in_game)
bs.connect_to_party=j bs.connect_to_party = j

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,7 @@ lmao = [
"%, $ entirely" "%, $ entirely"
] ]
class SorryPW(bauiv1lib.party.PartyWindow): class SorryPW(bauiv1lib.party.PartyWindow):
def __init__(s, *args, **kwargs): def __init__(s, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@ -33,7 +34,7 @@ class SorryPW(bauiv1lib.party.PartyWindow):
s._btn = bui.buttonwidget( s._btn = bui.buttonwidget(
parent=s._root_widget, parent=s._root_widget,
size=(50, 35), size=(50, 35),
scale = 0.7, scale=0.7,
label='Sorry', label='Sorry',
button_type='square', button_type='square',
position=(s._width - 60, s._height - 83), position=(s._width - 60, s._height - 83),
@ -41,16 +42,27 @@ class SorryPW(bauiv1lib.party.PartyWindow):
) )
def _ok(s, a): def _ok(s, a):
if s._btn.exists(): bui.buttonwidget(edit=s._btn, label=str((s._delay - a) / 10) if a != s._delay else 'Sorry'); s._a = a if s._btn.exists():
else: return bui.buttonwidget(edit=s._btn, label=str((s._delay - a) / 10)
def _apologize(s): if a != s._delay else 'Sorry')
if s._a != s._delay: push("Too fast!"); return s._a = a
else: else:
bs.chatmessage(random.choice(lmao).replace('%', random.choice(sory)).replace('$', random.choice(cash))) return
for i in range(10,s._delay+1): bs.apptimer((i-10)/10, bs.Call(s._ok,i))
def _apologize(s):
if s._a != s._delay:
push("Too fast!")
return
else:
bs.chatmessage(random.choice(lmao).replace(
'%', random.choice(sory)).replace('$', random.choice(cash)))
for i in range(10, s._delay+1):
bs.apptimer((i-10)/10, bs.Call(s._ok, i))
# ba_meta require api 8 # ba_meta require api 8
# ba_meta export plugin # ba_meta export plugin
class byBordd(babase.Plugin): class byBordd(babase.Plugin):
def __init__(s): def __init__(s):
bauiv1lib.party.PartyWindow = SorryPW bauiv1lib.party.PartyWindow = SorryPW

View file

@ -4,14 +4,22 @@ from bascenev1 import broadcastmessage as push, get_foreground_host_activity as
# ba_meta require api 8 # ba_meta require api 8
# ba_meta export plugin # ba_meta export plugin
class byBordd(p): class byBordd(p):
def ear(s): def ear(s):
a = gcm() a = gcm()
if a and s.la != a[-1]: if a and s.la != a[-1]:
if app.config.resolve('Chat Muted'): push(a[-1], (1, 1, 1), True, s.con) if app.config.resolve('Chat Muted'):
push(a[-1], (1, 1, 1), True, s.con)
s.la = a[-1] s.la = a[-1]
z(0.1, s.ear) z(0.1, s.ear)
def get(s): def get(s):
with ga().context: s.con=x("upButton") with ga().context:
s.la = None; s.ear() s.con = x("upButton")
s.la = None
s.ear()
z(0.2, byBordd().get) z(0.2, byBordd().get)

View file

@ -4,10 +4,13 @@ import bauiv1lib.party
from bauiv1lib.popup import PopupWindow from bauiv1lib.popup import PopupWindow
from bascenev1 import get_chat_messages as gcm, screenmessage as push from bascenev1 import get_chat_messages as gcm, screenmessage as push
class VeryPW(bauiv1lib.party.PartyWindow): class VeryPW(bauiv1lib.party.PartyWindow):
def __init__(s, *args, **kwargs): def __init__(s, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
s._n = 0; s._o = ""; s._f = True s._n = 0
s._o = ""
s._f = True
for i in range(2): for i in range(2):
bui.buttonwidget( bui.buttonwidget(
parent=s._root_widget, parent=s._root_widget,
@ -17,20 +20,29 @@ class VeryPW(bauiv1lib.party.PartyWindow):
position=(-15, 70 - (i * 40)), position=(-15, 70 - (i * 40)),
on_activate_call=(s._d if i else s._p) on_activate_call=(s._d if i else s._p)
) )
def _c(s, t=""): bui.textwidget(edit=s._text_field, text=t) def _c(s, t=""): bui.textwidget(edit=s._text_field, text=t)
def _d(s): s._p(1) def _d(s): s._p(1)
def _p(s, i=0): def _p(s, i=0):
if s._f: if s._f:
s._o = bui.textwidget(query=s._text_field) s._o = bui.textwidget(query=s._text_field)
s._f = False; s._n = -1 s._f = False
s._n = -1
s._n = s._n + (1 if i else -1) s._n = s._n + (1 if i else -1)
s._w1 = gcm() s._w1 = gcm()
try: s._c((s._w1+[s._o])[s._n].split(": ", 1)[1]) try:
s._c((s._w1+[s._o])[s._n].split(": ", 1)[1])
except IndexError: except IndexError:
if not s._w1: push("Empty chat"); s._n = 0; return if not s._w1:
s._n = -1; s._c(s._o) push("Empty chat")
s._n = 0
return
s._n = -1
s._c(s._o)
for msg in s._chat_texts_haxx: msg.delete() for msg in s._chat_texts_haxx:
msg.delete()
for z in range(len(s._w1)): for z in range(len(s._w1)):
txt = bui.textwidget(parent=s._columnwidget, txt = bui.textwidget(parent=s._columnwidget,
text=s._w1[z], text=s._w1[z],
@ -38,7 +50,8 @@ class VeryPW(bauiv1lib.party.PartyWindow):
v_align='center', v_align='center',
size=(900, 13), size=(900, 13),
scale=0.55, scale=0.55,
color=(1, 1, 1) if z != (s._n if s._n > - 1 else s._n + len(s._w1) + 1) else (0, 0.7, 0), color=(1, 1, 1) if z != (s._n if s._n > -
1 else s._n + len(s._w1) + 1) else (0, 0.7, 0),
position=(-0.6, 0), position=(-0.6, 0),
selectable=True, selectable=True,
autoselect=True, autoselect=True,
@ -55,7 +68,8 @@ class VeryPW(bauiv1lib.party.PartyWindow):
# ba_meta require api 8 # ba_meta require api 8
# ba_meta export plugin # ba_meta export plugin
class byBordd(ba.Plugin): class byBordd(ba.Plugin):
def __init__(s): def __init__(s):
bauiv1lib.party.PartyWindow = VeryPW bauiv1lib.party.PartyWindow = VeryPW