2024-01-24 14:17:05 +03:00
|
|
|
# Ported by brostos to api 8
|
|
|
|
|
# Tool used to make porting easier.(https://github.com/bombsquad-community/baport)
|
|
|
|
|
"""Only Night."""
|
|
|
|
|
|
2025-01-15 03:15:53 +05:30
|
|
|
# ba_meta require api 9
|
2024-01-24 14:17:05 +03:00
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
|
|
|
|
|
import babase
|
|
|
|
|
import bascenev1 as bs
|
|
|
|
|
from bascenev1._gameactivity import GameActivity
|
|
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2025-06-24 00:55:09 +05:30
|
|
|
# ba_meta export babase.Plugin
|
2024-01-24 14:17:05 +03:00
|
|
|
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
|