[ci] apply-plugin-metadata-and-formatting

This commit is contained in:
DrapBS 2026-02-07 16:26:10 +00:00 committed by github-actions[bot]
parent 1ff3e6f790
commit 658677f057

View file

@ -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 # ba_meta require api 9
import bascenev1 as bs import bascenev1 as bs
import babase import babase
# ba_meta export babase.Plugin # ba_meta export babase.Plugin
class ByDrap(bs.Plugin): class ByDrap(bs.Plugin):
def __init__(self): def __init__(self):
self.container = None self.container = None
@ -22,7 +24,7 @@ class ByDrap(bs.Plugin):
def _update_list(self): def _update_list(self):
activity = bs.get_foreground_host_activity() activity = bs.get_foreground_host_activity()
if activity is None: if activity is None:
if self.container: if self.container:
self.container.delete() self.container.delete()
@ -33,7 +35,7 @@ class ByDrap(bs.Plugin):
for p in activity.players: for p in activity.players:
name = p.getname(full=True) name = p.getname(full=True)
player_names.append(f"{name}") player_names.append(f"{name}")
header = "┏━━━━ Players  ━━━━┓\n\n" header = "┏━━━━ Players  ━━━━┓\n\n"
footer = "\n\n┗━━━━━━━━━━━━━━━┛" footer = "\n\n┗━━━━━━━━━━━━━━━┛"
players_str = "\n".join(player_names) if player_names else " Wait for players..." players_str = "\n".join(player_names) if player_names else " Wait for players..."
@ -42,18 +44,18 @@ class ByDrap(bs.Plugin):
with activity.context: with activity.context:
if self.container is None or not self.container.exists(): if self.container is None or not self.container.exists():
self.container = bs.newnode('text', self.container = bs.newnode('text',
attrs={ attrs={
'text': final_text, 'text': final_text,
'scale': 0.7, 'scale': 0.7,
'color': (0.5, 1.0, 0.5), 'color': (0.5, 1.0, 0.5),
'h_attach': 'right', 'h_attach': 'right',
'v_attach': 'top', 'v_attach': 'top',
'h_align': 'left', 'h_align': 'left',
'v_align': 'top', 'v_align': 'top',
'position': (-220, -100), 'position': (-220, -100),
'flatness': 0.0, 'flatness': 0.0,
'shadow': 1.0, 'shadow': 1.0,
'res_scale': 1.5 'res_scale': 1.5
}) })
else: else:
self.container.text = final_text self.container.text = final_text