forked from bombsquad-community/plugin-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonly_night.py
50 lines (41 loc) · 1.24 KB
/
only_night.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Ported by brostos to api 8
# Tool used to make porting easier.(https://github.com/bombsquad-community/baport)
"""Only Night."""
# ba_meta require api 8
from __future__ import annotations
from typing import TYPE_CHECKING
import babase
import bascenev1 as bs
from bascenev1._gameactivity import GameActivity
if TYPE_CHECKING:
pass
# ba_meta export plugin
class OnlyNight(babase.Plugin):
GameActivity.old_on_transition_in = GameActivity.on_transition_in
def new_on_transition_in(self) -> None:
self.old_on_transition_in()
gnode = bs.getactivity().globalsnode
if self.map.getname() in [
"Monkey Face",
"Rampage",
"Roundabout",
"Step Right Up",
"Tip Top",
"Zigzag",
"The Pad",
]:
gnode.tint = (0.4, 0.4, 0.4)
elif self.map.getname() in [
"Big G",
"Bridgit",
"Courtyard",
"Crag Castle",
"Doom Shroom",
"Football Stadium",
"Happy Thoughts",
"Hockey Stadium",
]:
gnode.tint = (0.5, 0.5, 0.5)
else:
gnode.tint = (0.3, 0.3, 0.3)
GameActivity.on_transition_in = new_on_transition_in