mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
[ci] apply-plugin-metadata-and-formatting
This commit is contained in:
parent
1ff3e6f790
commit
658677f057
1 changed files with 19 additions and 17 deletions
|
|
@ -1,11 +1,13 @@
|
|||
#======================== works only if you are host or plugin works on the server created On '2026/02/06'
|
||||
#========================
|
||||
# ======================== works only if you are host or plugin works on the server created On '2026/02/06'
|
||||
# ========================
|
||||
|
||||
# ba_meta require api 9
|
||||
import bascenev1 as bs
|
||||
import babase
|
||||
|
||||
# ba_meta export babase.Plugin
|
||||
|
||||
|
||||
class ByDrap(bs.Plugin):
|
||||
def __init__(self):
|
||||
self.container = None
|
||||
|
|
@ -22,7 +24,7 @@ class ByDrap(bs.Plugin):
|
|||
|
||||
def _update_list(self):
|
||||
activity = bs.get_foreground_host_activity()
|
||||
|
||||
|
||||
if activity is None:
|
||||
if self.container:
|
||||
self.container.delete()
|
||||
|
|
@ -33,7 +35,7 @@ class ByDrap(bs.Plugin):
|
|||
for p in activity.players:
|
||||
name = p.getname(full=True)
|
||||
player_names.append(f" • {name}")
|
||||
|
||||
|
||||
header = "┏━━━━ Players ━━━━┓\n\n"
|
||||
footer = "\n\n┗━━━━━━━━━━━━━━━┛"
|
||||
players_str = "\n".join(player_names) if player_names else " Wait for players..."
|
||||
|
|
@ -42,18 +44,18 @@ class ByDrap(bs.Plugin):
|
|||
with activity.context:
|
||||
if self.container is None or not self.container.exists():
|
||||
self.container = bs.newnode('text',
|
||||
attrs={
|
||||
'text': final_text,
|
||||
'scale': 0.7,
|
||||
'color': (0.5, 1.0, 0.5),
|
||||
'h_attach': 'right',
|
||||
'v_attach': 'top',
|
||||
'h_align': 'left',
|
||||
'v_align': 'top',
|
||||
'position': (-220, -100),
|
||||
'flatness': 0.0,
|
||||
'shadow': 1.0,
|
||||
'res_scale': 1.5
|
||||
})
|
||||
attrs={
|
||||
'text': final_text,
|
||||
'scale': 0.7,
|
||||
'color': (0.5, 1.0, 0.5),
|
||||
'h_attach': 'right',
|
||||
'v_attach': 'top',
|
||||
'h_align': 'left',
|
||||
'v_align': 'top',
|
||||
'position': (-220, -100),
|
||||
'flatness': 0.0,
|
||||
'shadow': 1.0,
|
||||
'res_scale': 1.5
|
||||
})
|
||||
else:
|
||||
self.container.text = final_text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue