mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
[ci] auto-format
This commit is contained in:
parent
ede95e386e
commit
da3bb374b3
1 changed files with 221 additions and 212 deletions
|
|
@ -15,9 +15,11 @@ from time import sleep
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Any, Sequence, Callable, List, Dict, Tuple, Optional, Union
|
from typing import Any, Sequence, Callable, List, Dict, Tuple, Optional, Union
|
||||||
|
|
||||||
|
|
||||||
def Print(arg1, arg2="", arg3=""):
|
def Print(arg1, arg2="", arg3=""):
|
||||||
ba.screenmessage(str(arg1)+str(arg2)+str(arg3))
|
ba.screenmessage(str(arg1)+str(arg2)+str(arg3))
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open("moodlightSettings.txt", "r") as mltxt:
|
with open("moodlightSettings.txt", "r") as mltxt:
|
||||||
global Ldefault, Udefault
|
global Ldefault, Udefault
|
||||||
|
|
@ -30,6 +32,7 @@ except:
|
||||||
mltxt.write("15 \n 20")
|
mltxt.write("15 \n 20")
|
||||||
Ldefault, Udefault = 15, 20
|
Ldefault, Udefault = 15, 20
|
||||||
|
|
||||||
|
|
||||||
class SettingWindow(ba.Window):
|
class SettingWindow(ba.Window):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.draw_ui()
|
self.draw_ui()
|
||||||
|
|
@ -38,7 +41,8 @@ class SettingWindow(ba.Window):
|
||||||
global Ldefault, Udefault
|
global Ldefault, Udefault
|
||||||
try:
|
try:
|
||||||
if Udefault >= 29 and self.selected == "upper":
|
if Udefault >= 29 and self.selected == "upper":
|
||||||
ba.textwidget(edit=self.warn_text,text="Careful!You risk get blind beyond this point")
|
ba.textwidget(edit=self.warn_text,
|
||||||
|
text="Careful!You risk get blind beyond this point")
|
||||||
elif self.selected == "lower" and Ldefault >= -20 or self.selected == "upper" and Udefault <= 30:
|
elif self.selected == "lower" and Ldefault >= -20 or self.selected == "upper" and Udefault <= 30:
|
||||||
ba.textwidget(edit=self.warn_text, text="")
|
ba.textwidget(edit=self.warn_text, text="")
|
||||||
if self.selected == "lower":
|
if self.selected == "lower":
|
||||||
|
|
@ -54,7 +58,8 @@ class SettingWindow(ba.Window):
|
||||||
global Ldefault, Udefault
|
global Ldefault, Udefault
|
||||||
try:
|
try:
|
||||||
if Ldefault <= -19 and self.selected == "lower":
|
if Ldefault <= -19 and self.selected == "lower":
|
||||||
ba.textwidget(edit=self.warn_text,text="DON'T BE AFRAID OF DARK,IT'S A PLACE WHERE YOU CAN HIDE")
|
ba.textwidget(edit=self.warn_text,
|
||||||
|
text="DON'T BE AFRAID OF DARK,IT'S A PLACE WHERE YOU CAN HIDE")
|
||||||
elif (self.selected == "upper" and Udefault <= 30) or (self.selected == "lower" and Ldefault >= -20):
|
elif (self.selected == "upper" and Udefault <= 30) or (self.selected == "lower" and Ldefault >= -20):
|
||||||
ba.textwidget(edit=self.warn_text, text="")
|
ba.textwidget(edit=self.warn_text, text="")
|
||||||
if self.selected == "lower":
|
if self.selected == "lower":
|
||||||
|
|
@ -198,6 +203,8 @@ class SettingWindow(ba.Window):
|
||||||
ba.containerwidget(edit=self._root_widget, transition="out_right",)
|
ba.containerwidget(edit=self._root_widget, transition="out_right",)
|
||||||
|
|
||||||
# ba_meta export plugin
|
# ba_meta export plugin
|
||||||
|
|
||||||
|
|
||||||
class moodlight(ba.Plugin):
|
class moodlight(ba.Plugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
@ -230,12 +237,14 @@ class moodlight(ba.Plugin):
|
||||||
def _new_init(self, vr_overlay_offset: Optional[Sequence[float]] = None) -> None:
|
def _new_init(self, vr_overlay_offset: Optional[Sequence[float]] = None) -> None:
|
||||||
self._old_init(vr_overlay_offset)
|
self._old_init(vr_overlay_offset)
|
||||||
in_game = not isinstance(_ba.get_foreground_host_session(), mainmenu.MainMenuSession)
|
in_game = not isinstance(_ba.get_foreground_host_session(), mainmenu.MainMenuSession)
|
||||||
if not in_game: return
|
if not in_game:
|
||||||
|
return
|
||||||
|
|
||||||
gnode = _ba.getactivity().globalsnode
|
gnode = _ba.getactivity().globalsnode
|
||||||
|
|
||||||
def changetint():
|
def changetint():
|
||||||
Range=(random.randrange(Ldefault,Udefault)/10, random.randrange(Ldefault,Udefault)/10, random.randrange(Ldefault,Udefault)/10)
|
Range = (random.randrange(Ldefault, Udefault)/10, random.randrange(Ldefault,
|
||||||
|
Udefault)/10, random.randrange(Ldefault, Udefault)/10)
|
||||||
ba.animate_array(gnode, 'tint', 3, {
|
ba.animate_array(gnode, 'tint', 3, {
|
||||||
0.0: gnode.tint,
|
0.0: gnode.tint,
|
||||||
1.0: Range
|
1.0: Range
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue