mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Merge pull request #280 from BanEvanderNou/main
added sandbox, updown, topmsg, rejoin and sorry plugins
This commit is contained in:
commit
35486753ce
6 changed files with 6236 additions and 0 deletions
|
|
@ -3,6 +3,101 @@
|
|||
"description": "Utilities",
|
||||
"plugins_base_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/utilities",
|
||||
"plugins": {
|
||||
"sandbox": {
|
||||
"description": "Spawn, control and bots, change music, add teams, spawn objects, change game values in real time, and much more!",
|
||||
"external_url": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "BrotherBoard",
|
||||
"email": "thehero2012008@gmail.com",
|
||||
"discord": "BrotherBoard"
|
||||
}
|
||||
],
|
||||
"versions": {
|
||||
"1.2.0": {
|
||||
"api_version": 8,
|
||||
"commit_sha": "333416f",
|
||||
"released_on": "20-05-2024",
|
||||
"md5sum": "ce6e2acb7dca2d41df1d5b5dcb0064a1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updown": {
|
||||
"description": "Adds UP and DOWN buttons in party window to recall messages in chat.",
|
||||
"external_url": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "BrotherBoard",
|
||||
"email": "thehero2012008@gmail.com",
|
||||
"discord": "BrotherBoard"
|
||||
}
|
||||
],
|
||||
"versions": {
|
||||
"1.0.0": {
|
||||
"api_version": 8,
|
||||
"commit_sha": "333416f",
|
||||
"released_on": "20-05-2024",
|
||||
"md5sum": "7c597ef8cf7966a056eb5b34c01678eb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rejoin": {
|
||||
"description": "Adds a button in pause menu, which rejoins current server once clicked! if didn't work, just click again and again. if still, then party is full.",
|
||||
"external_url": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "BrotherBoard",
|
||||
"email": "thehero2012008@gmail.com",
|
||||
"discord": "BrotherBoard"
|
||||
}
|
||||
],
|
||||
"versions": {
|
||||
"2.0.0": {
|
||||
"api_version": 8,
|
||||
"commit_sha": "333416f",
|
||||
"released_on": "20-05-2024",
|
||||
"md5sum": "a34da341e7f2055a1f57f5262fa07c79"
|
||||
}
|
||||
}
|
||||
},
|
||||
"topmsg": {
|
||||
"description": "When chat is muted, see new chat messages on top right! (like kill logs)",
|
||||
"external_url": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "BrotherBoard",
|
||||
"email": "thehero2012008@gmail.com",
|
||||
"discord": "BrotherBoard"
|
||||
}
|
||||
],
|
||||
"versions": {
|
||||
"1.0.0": {
|
||||
"api_version": 8,
|
||||
"commit_sha": "333416f",
|
||||
"released_on": "20-05-2024",
|
||||
"md5sum": "74a592e8204e81872752a4a6eff6701e"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sorry": {
|
||||
"description": "Send a random sorry to chat, preventing revenge attempts from teammates you kill by mistake.",
|
||||
"external_url": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "BrotherBoard",
|
||||
"email": "thehero2012008@gmail.com",
|
||||
"discord": "BrotherBoard"
|
||||
}
|
||||
],
|
||||
"versions": {
|
||||
"2.0.0": {
|
||||
"api_version": 8,
|
||||
"commit_sha": "333416f",
|
||||
"released_on": "20-05-2024",
|
||||
"md5sum": "58fd9fbfc6fbff9f617b5a1763fc6aab"
|
||||
}
|
||||
}
|
||||
},
|
||||
"translate": {
|
||||
"description": "Translate yours/others chat. Just click on the message to translate them. Open Plugin Settings/Double click 'Trans' button to open translation settings. Compatible with other PW mods (like advanced_party_window)",
|
||||
"external_url": "https://github.com/bombsquad-community/plugin-manager/assets/92618708/5860e44d-0b70-4a3f-a651-208a4452ea38",
|
||||
|
|
|
|||
34
plugins/utilities/rejoin.py
Normal file
34
plugins/utilities/rejoin.py
Normal file
|
|
@ -0,0 +1,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
|
||||
5939
plugins/utilities/sandbox.py
Normal file
5939
plugins/utilities/sandbox.py
Normal file
File diff suppressed because it is too large
Load diff
68
plugins/utilities/sorry.py
Normal file
68
plugins/utilities/sorry.py
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
import babase
|
||||
import bauiv1 as bui
|
||||
import bauiv1lib.party
|
||||
import random
|
||||
import bascenev1 as bs
|
||||
from bascenev1 import screenmessage as push
|
||||
|
||||
# "%" random from sory
|
||||
# "$" random from cash
|
||||
sory = ["Sorry", "Sry", "Sryyy", "Sorryy"]
|
||||
cash = ["My bad", "My fault", "My mistake", "My apologize"]
|
||||
lmao = [
|
||||
"Oops %",
|
||||
"% didn't mean to",
|
||||
"%, that happens",
|
||||
"$, apologies!",
|
||||
"Ah I slipped, very %",
|
||||
"$, didn't mean to.",
|
||||
"Ah, % about that",
|
||||
"A- I did that $",
|
||||
"%, didn't mean to.",
|
||||
"$, forgive the slip",
|
||||
"%, didn't mean to mess up",
|
||||
"Ah % $",
|
||||
"$, forgive the error",
|
||||
"%, $ entirely"
|
||||
]
|
||||
|
||||
|
||||
class SorryPW(bauiv1lib.party.PartyWindow):
|
||||
def __init__(s, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
s._delay = s._a = 50 # 5 seconds
|
||||
s._btn = bui.buttonwidget(
|
||||
parent=s._root_widget,
|
||||
size=(50, 35),
|
||||
scale=0.7,
|
||||
label='Sorry',
|
||||
button_type='square',
|
||||
position=(s._width - 60, s._height - 83),
|
||||
on_activate_call=s._apologize
|
||||
)
|
||||
|
||||
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
|
||||
else:
|
||||
return
|
||||
|
||||
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 export plugin
|
||||
|
||||
|
||||
class byBordd(babase.Plugin):
|
||||
def __init__(s):
|
||||
bauiv1lib.party.PartyWindow = SorryPW
|
||||
25
plugins/utilities/topmsg.py
Normal file
25
plugins/utilities/topmsg.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from babase import app, Plugin as p
|
||||
from bascenev1 import gettexture as x, apptimer as z
|
||||
from bascenev1 import broadcastmessage as push, get_foreground_host_activity as ga, get_chat_messages as gcm
|
||||
|
||||
# ba_meta require api 8
|
||||
# ba_meta export plugin
|
||||
|
||||
|
||||
class byBordd(p):
|
||||
def ear(s):
|
||||
a = gcm()
|
||||
if a and s.la != a[-1]:
|
||||
if app.config.resolve('Chat Muted'):
|
||||
push(a[-1], (1, 1, 1), True, s.con)
|
||||
s.la = a[-1]
|
||||
z(0.1, s.ear)
|
||||
|
||||
def get(s):
|
||||
with ga().context:
|
||||
s.con = x("upButton")
|
||||
s.la = None
|
||||
s.ear()
|
||||
|
||||
|
||||
z(0.2, byBordd().get)
|
||||
75
plugins/utilities/updown.py
Normal file
75
plugins/utilities/updown.py
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
import babase as ba
|
||||
import bauiv1 as bui
|
||||
import bauiv1lib.party
|
||||
from bauiv1lib.popup import PopupWindow
|
||||
from bascenev1 import get_chat_messages as gcm, screenmessage as push
|
||||
|
||||
|
||||
class VeryPW(bauiv1lib.party.PartyWindow):
|
||||
def __init__(s, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
s._n = 0
|
||||
s._o = ""
|
||||
s._f = True
|
||||
for i in range(2):
|
||||
bui.buttonwidget(
|
||||
parent=s._root_widget,
|
||||
size=(30, 30),
|
||||
label=ba.charstr(ba.SpecialChar.DOWN_ARROW if i else ba.SpecialChar.UP_ARROW),
|
||||
button_type='square',
|
||||
position=(-15, 70 - (i * 40)),
|
||||
on_activate_call=(s._d if i else s._p)
|
||||
)
|
||||
|
||||
def _c(s, t=""): bui.textwidget(edit=s._text_field, text=t)
|
||||
def _d(s): s._p(1)
|
||||
|
||||
def _p(s, i=0):
|
||||
if s._f:
|
||||
s._o = bui.textwidget(query=s._text_field)
|
||||
s._f = False
|
||||
s._n = -1
|
||||
s._n = s._n + (1 if i else -1)
|
||||
s._w1 = gcm()
|
||||
try:
|
||||
s._c((s._w1+[s._o])[s._n].split(": ", 1)[1])
|
||||
except IndexError:
|
||||
if not s._w1:
|
||||
push("Empty chat")
|
||||
s._n = 0
|
||||
return
|
||||
s._n = -1
|
||||
s._c(s._o)
|
||||
|
||||
for msg in s._chat_texts_haxx:
|
||||
msg.delete()
|
||||
for z in range(len(s._w1)):
|
||||
txt = bui.textwidget(parent=s._columnwidget,
|
||||
text=s._w1[z],
|
||||
h_align='left',
|
||||
v_align='center',
|
||||
size=(900, 13),
|
||||
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),
|
||||
position=(-0.6, 0),
|
||||
selectable=True,
|
||||
autoselect=True,
|
||||
click_activate=True,
|
||||
maxwidth=s._scroll_width * 0.94,
|
||||
shadow=0.3,
|
||||
flatness=1.0)
|
||||
bui.textwidget(edit=txt,
|
||||
on_activate_call=ba.Call(
|
||||
s._on_chat_press,
|
||||
s._w1[z], txt))
|
||||
s._chat_texts_haxx.append(txt)
|
||||
bui.containerwidget(edit=s._columnwidget, visible_child=txt)
|
||||
|
||||
# ba_meta require api 8
|
||||
# ba_meta export plugin
|
||||
|
||||
|
||||
class byBordd(ba.Plugin):
|
||||
def __init__(s):
|
||||
bauiv1lib.party.PartyWindow = VeryPW
|
||||
Loading…
Add table
Add a link
Reference in a new issue