forked from bombsquad-community/plugin-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrejoin.py
34 lines (26 loc) · 752 Bytes
/
rejoin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ba_meta require api 8
import bascenev1 as bs
from babase import Plugin as v
from bauiv1 import buttonwidget as z, gettexture as x
from bauiv1lib.mainmenu import MainMenuWindow as m
m.i = m.p = 0
k = bs.connect_to_party
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 w(t, *f, **g):
z(parent=t._root_widget, size=(23, 26), icon=x('replayIcon'),
on_activate_call=bs.Call(j, m.i, m.p))
return s(t, *f, **g)
return w
# ba_meta export plugin
class byBordd(v):
def __init__(s):
m._refresh_in_game = R(m._refresh_in_game)
bs.connect_to_party = j