Updated to 1.2.0

This commit is contained in:
CrossJoy 2023-06-19 19:16:23 +08:00
parent 352f0524d9
commit 8c5a6b0340
2 changed files with 187 additions and 86 deletions

View file

@ -606,6 +606,7 @@
} }
], ],
"versions": { "versions": {
"1.2.0": null,
"1.1.0": { "1.1.0": {
"api_version": 7, "api_version": 7,
"commit_sha": "7ab4576", "commit_sha": "7ab4576",

View file

@ -1,4 +1,4 @@
"""Practice Tools Mod: V1.0 """Practice Tools Mod: V1.2
Made by Cross Joy""" Made by Cross Joy"""
# If anyone who want to help me on giving suggestion/ fix bugs/ creating PR, # If anyone who want to help me on giving suggestion/ fix bugs/ creating PR,
@ -11,7 +11,19 @@ Made by Cross Joy"""
# Some support will be much appreciated. :') # Some support will be much appreciated. :')
# Support link: https://www.buymeacoffee.com/CrossJoy # Support link: https://www.buymeacoffee.com/CrossJoy
# ----------------------------------------------------------------------------
# V1.2 update
# - Added New Bot: Bomber Lite and Brawler Lite.
# - Added New Setting: Epic Mode Toggle.
# - Added immunity to curse if invincible.
# - Fixed Power Up mini billboard will not removed after debuff.
# - Fixed Power Up landmine count will not removed after debuff.
# - Fixed the config (Bot Picker, Count, Radius and Power Up Picker) will set to default when exit the practice tab.
# V1.1 update
# - Fixed Charger Bot Pro bot spawn with shield.
# - Fixed selecting Bruiser bot is not working.
# - Added screen message when pressing spawn/clear/debuff button.
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Powerful and comprehensive tools for practice purpose. # Powerful and comprehensive tools for practice purpose.
@ -45,8 +57,7 @@ import random
import weakref import weakref
from enum import Enum from enum import Enum
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
import ba import ba, _ba
import _ba
import ba.internal import ba.internal
import bastd import bastd
from bastd.actor.powerupbox import PowerupBox from bastd.actor.powerupbox import PowerupBox
@ -56,7 +67,7 @@ from bastd.actor.spazbot import (SpazBotSet, SpazBot, BrawlerBot, TriggerBot,
BomberBotPro, BrawlerBotPro, TriggerBotPro, BomberBotPro, BrawlerBotPro, TriggerBotPro,
ChargerBotPro, BomberBotProShielded, ChargerBotPro, BomberBotProShielded,
BrawlerBotProShielded, TriggerBotProShielded, BrawlerBotProShielded, TriggerBotProShielded,
ChargerBotProShielded) ChargerBotProShielded, BomberBotLite, BrawlerBotLite)
from bastd.mainmenu import MainMenuSession from bastd.mainmenu import MainMenuSession
from bastd.ui.party import PartyWindow as OriginalPartyWindow from bastd.ui.party import PartyWindow as OriginalPartyWindow
from ba import app, Plugin from ba import app, Plugin
@ -93,14 +104,6 @@ try:
except: except:
ba.app.config["stopBots"] = False ba.app.config["stopBots"] = False
try:
if ba.app.config.get("stopBots") is None:
ba.app.config["stopBots"] = False
else:
ba.app.config.get("stopBots")
except:
ba.app.config["stopBots"] = False
try: try:
if ba.app.config.get("immortalDummy") is None: if ba.app.config.get("immortalDummy") is None:
ba.app.config["immortalDummy"] = False ba.app.config["immortalDummy"] = False
@ -182,7 +185,7 @@ def main(plugin: Plugin) -> None:
# ba_meta require api 7 # ba_meta require api 7
# ba_meta export plugin # ba_meta export plugin
class Practice(Plugin): class Practice(Plugin):
__version__ = '1.0' __version__ = '1.2'
def on_app_running(self) -> None: def on_app_running(self) -> None:
"""Plugin start point.""" """Plugin start point."""
@ -389,9 +392,10 @@ Spaz.super_curse = Spaz.curse
def new_cursed(self): def new_cursed(self):
if self.node.invincible:
return
self.super_curse() self.super_curse()
if ba.app.config.get("bombRadiusVisual"): if ba.app.config.get("bombRadiusVisual"):
ba.animate_array(self.curse_visualizer, 'size', 1, { ba.animate_array(self.curse_visualizer, 'size', 1, {
0.0: [0.0], 0.0: [0.0],
0.2: [3 * 2.2], 0.2: [3 * 2.2],
@ -423,7 +427,6 @@ Spaz.super_handlemessage = Spaz.handlemessage
def bot_handlemessage(self, msg: Any): def bot_handlemessage(self, msg: Any):
if isinstance(msg, ba.PowerupMessage): if isinstance(msg, ba.PowerupMessage):
if msg.poweruptype == 'health': if msg.poweruptype == 'health':
if ba.app.config.get("bombRadiusVisual"): if ba.app.config.get("bombRadiusVisual"):
@ -478,8 +481,8 @@ def bot_handlemessage(self, msg: Any):
elif ba.app.config.get('bombRadiusVisual'): elif ba.app.config.get('bombRadiusVisual'):
ba.animate_array(self.bot_radius, 'size', 1, { ba.animate_array(self.bot_radius, 'size', 1, {
0.0: [(self.hitpoints_max - self.hitpoints) * 0.0048], 0.0: [(self.hitpoints_max - self.hitpoints) * 0.0045],
0.25: [(self.hitpoints_max - self.hitpoints) * 0.0048] 0.25: [(self.hitpoints_max - self.hitpoints) * 0.0045]
}) })
ba.animate(self.bot_radius, 'opacity', { ba.animate(self.bot_radius, 'opacity', {
0.0: 0.00, 0.0: 0.00,
@ -487,8 +490,8 @@ def bot_handlemessage(self, msg: Any):
}) })
ba.animate_array(self.radius_visualizer_circle, 'size', 1, { ba.animate_array(self.radius_visualizer_circle, 'size', 1, {
0.0: [(self.hitpoints_max - self.hitpoints) * 0.0048], 0.0: [(self.hitpoints_max - self.hitpoints) * 0.0045],
0.25: [(self.hitpoints_max - self.hitpoints) * 0.0048] 0.25: [(self.hitpoints_max - self.hitpoints) * 0.0045]
}) })
ba.animate( ba.animate(
@ -557,7 +560,7 @@ class NewBotSet(SpazBotSet):
bot_list = [] bot_list = []
ba.print_exception('Error updating bot list: ' + ba.print_exception('Error updating bot list: ' +
str(self._bot_lists[ str(self._bot_lists[
self._bot_update_list])) self._bot_update_list]))
self._bot_update_list = (self._bot_update_list + self._bot_update_list = (self._bot_update_list +
1) % self._bot_list_count 1) % self._bot_list_count
@ -645,10 +648,11 @@ class DummyBotSet(NewBotSet):
except Exception: except Exception:
ba.print_exception('Error updating bot list: ' + ba.print_exception('Error updating bot list: ' +
str(self._bot_lists[ str(self._bot_lists[
self._bot_update_list])) self._bot_update_list]))
self._bot_update_list = (self._bot_update_list + self._bot_update_list = (self._bot_update_list +
1) % self._bot_list_count 1) % self._bot_list_count
except: except:
pass pass
@ -670,6 +674,10 @@ class DummyBot(SpazBot):
emit_type='fairydust') emit_type='fairydust')
class NewChargerBotPro(ChargerBotPro):
default_shields = False
# ------------------------------------------------------------------- # -------------------------------------------------------------------
class PracticeTab: class PracticeTab:
@ -687,13 +695,13 @@ class PracticeTab:
return window return window
def on_activate( def on_activate(
self, self,
parent_widget: ba.Widget, parent_widget: ba.Widget,
tab_button: ba.Widget, tab_button: ba.Widget,
region_width: float, region_width: float,
region_height: float, region_height: float,
scroll_widget: ba.Widget, scroll_widget: ba.Widget,
extra_x: float, extra_x: float,
) -> ba.Widget: ) -> ba.Widget:
"""Called when the tab becomes the active one. """Called when the tab becomes the active one.
@ -736,21 +744,22 @@ class BotsPracticeTab(PracticeTab):
def __init__(self, window: PracticeWindow, def __init__(self, window: PracticeWindow,
bot1=DummyBotSet(), bot2=NewBotSet()) -> None: bot1=DummyBotSet(), bot2=NewBotSet()) -> None:
super().__init__(window) super().__init__(window)
bot_index, count, radius = self.load_settings()
self._container: ba.Widget | None = None self._container: ba.Widget | None = None
self.count = 1 self.count = count
self.radius = 0 self.radius = radius
self.radius_array = (['Small', 'Medium', 'Big']) self.radius_array = (['Small', 'Medium', 'Big'])
self.parent_widget = None self.parent_widget = None
self.bot1 = bot1 self.bot1 = bot1
self.bot2 = bot2 self.bot2 = bot2
self.activity = _ba.get_foreground_host_activity() self.activity = _ba.get_foreground_host_activity()
self.image_array = ( self.image_array = (
['bonesIcon', 'neoSpazIcon', 'kronkIcon', ['bonesIcon', 'neoSpazIcon', 'kronkIcon', 'neoSpazIcon', 'kronkIcon',
'zoeIcon', 'ninjaIcon', 'melIcon', 'jackIcon', 'bunnyIcon', 'zoeIcon', 'ninjaIcon', 'melIcon', 'jackIcon', 'bunnyIcon',
'neoSpazIcon', 'kronkIcon', 'zoeIcon', 'ninjaIcon', 'neoSpazIcon', 'kronkIcon', 'zoeIcon', 'ninjaIcon',
'neoSpazIcon', 'kronkIcon', 'zoeIcon', 'ninjaIcon']) 'neoSpazIcon', 'kronkIcon', 'zoeIcon', 'ninjaIcon'])
self.bot_array_name = ( self.bot_array_name = (
['Dummy', 'Bomber', 'Bruiser', ['Dummy', 'Bomber Lite', 'Brawler Lite', 'Bomber', 'Brawler',
'Trigger', 'Charger', 'Sticky', 'Trigger', 'Charger', 'Sticky',
'Explodey', 'Bouncy', 'Pro Bomber', 'Explodey', 'Bouncy', 'Pro Bomber',
'Pro Brawler', 'Pro Trigger', 'Pro Charger', 'Pro Brawler', 'Pro Trigger', 'Pro Charger',
@ -761,22 +770,22 @@ class BotsPracticeTab(PracticeTab):
self.config = (['stopBots', 'immortalDummy']) self.config = (['stopBots', 'immortalDummy'])
self.bot_array = ( self.bot_array = (
[DummyBot, SpazBot, BrawlerBot, TriggerBot, [DummyBot, BomberBotLite, BrawlerBotLite, SpazBot, BrawlerBot, TriggerBot,
ChargerBot, StickyBot, ExplodeyBot, BouncyBot, ChargerBot, StickyBot, ExplodeyBot, BouncyBot,
BomberBotPro, BrawlerBotPro, TriggerBotPro, ChargerBotPro, BomberBotPro, BrawlerBotPro, TriggerBotPro, NewChargerBotPro,
BomberBotProShielded, BrawlerBotProShielded, BomberBotProShielded, BrawlerBotProShielded,
TriggerBotProShielded, ChargerBotProShielded]) TriggerBotProShielded, ChargerBotProShielded])
self._icon_index = self.bot_array_name.index('Dummy') self._icon_index = bot_index
def on_activate( def on_activate(
self, self,
parent_widget: ba.Widget, parent_widget: ba.Widget,
tab_button: ba.Widget, tab_button: ba.Widget,
region_width: float, region_width: float,
region_height: float, region_height: float,
scroll_widget: ba.Widget, scroll_widget: ba.Widget,
extra_x: float, extra_x: float,
) -> ba.Widget: ) -> ba.Widget:
b_size_2 = 100 b_size_2 = 100
@ -814,6 +823,8 @@ class BotsPracticeTab(PracticeTab):
text='Spawn Bot', text='Spawn Bot',
maxwidth=200) maxwidth=200)
tint1, tint2, color = self.check_color()
self._bot_button = bot = ba.buttonwidget( self._bot_button = bot = ba.buttonwidget(
parent=self._subcontainer, parent=self._subcontainer,
autoselect=True, autoselect=True,
@ -822,11 +833,11 @@ class BotsPracticeTab(PracticeTab):
on_activate_call=self._bot_window, on_activate_call=self._bot_window,
size=(b_size_2, b_size_2), size=(b_size_2, b_size_2),
label='', label='',
color=(1, 1, 1), color=color,
tint_texture=(ba.gettexture( tint_texture=(ba.gettexture(
self.image_array[self._icon_index] + 'ColorMask')), self.image_array[self._icon_index] + 'ColorMask')),
tint_color=(0.6, 0.6, 0.6), tint_color=tint1,
tint2_color=(0.1, 0.3, 0.1), tint2_color=tint2,
texture=ba.gettexture(self.image_array[self._icon_index]), texture=ba.gettexture(self.image_array[self._icon_index]),
mask_texture=mask_texture) mask_texture=mask_texture)
@ -1017,6 +1028,7 @@ class BotsPracticeTab(PracticeTab):
ba.textwidget(edit=self.count_text, ba.textwidget(edit=self.count_text,
text=str(self.count)) text=str(self.count))
self.save_settings()
def decrease_count(self): def decrease_count(self):
if self.count > 1: if self.count > 1:
@ -1024,6 +1036,7 @@ class BotsPracticeTab(PracticeTab):
ba.textwidget(edit=self.count_text, ba.textwidget(edit=self.count_text,
text=str(self.count)) text=str(self.count))
self.save_settings()
def increase_radius(self): def increase_radius(self):
if self.radius < 2: if self.radius < 2:
@ -1031,6 +1044,7 @@ class BotsPracticeTab(PracticeTab):
ba.textwidget(edit=self.radius_text, ba.textwidget(edit=self.radius_text,
text=self.radius_array[self.radius]) text=self.radius_array[self.radius])
self.save_settings()
def decrease_radius(self): def decrease_radius(self):
if self.radius > 0: if self.radius > 0:
@ -1038,13 +1052,18 @@ class BotsPracticeTab(PracticeTab):
ba.textwidget(edit=self.radius_text, ba.textwidget(edit=self.radius_text,
text=self.radius_array[self.radius]) text=self.radius_array[self.radius])
self.save_settings()
def clear_bot(self): def clear_bot(self):
ba.screenmessage('Cleared',
clients=[-1], transient=True, color=(1, 0.1, 0.1))
self.bot1.clear() self.bot1.clear()
self.bot2.clear() self.bot2.clear()
def do_spawn_bot(self, clid: int = -1) -> None: def do_spawn_bot(self, clid: int = -1) -> None:
with ba.Context(self.activity): with ba.Context(self.activity):
ba.screenmessage('Spawned',
clients=[-1], transient=True, color=(0.2, 1, 0.2))
for i in _ba.get_foreground_host_activity().players: for i in _ba.get_foreground_host_activity().players:
if i.sessionplayer.inputdevice.client_id == clid: if i.sessionplayer.inputdevice.client_id == clid:
if i.node: if i.node:
@ -1079,26 +1098,8 @@ class BotsPracticeTab(PracticeTab):
def _update_character(self, change: int = 0) -> None: def _update_character(self, change: int = 0) -> None:
if self._bot_button: if self._bot_button:
if self.bot_array_name[self._icon_index] in ( tint1, tint2, color = self.check_color()
'Pro Bomber', 'Pro Brawler',
'Pro Trigger', 'Pro Charger',
'S.Pro Bomber', 'S.Pro Brawler',
'S.Pro Trigger', 'S.Pro Charger'):
tint1 = (1.0, 0.2, 0.1)
tint2 = (0.6, 0.1, 0.05)
elif self.bot_array_name[self._icon_index] in 'Bouncy':
tint1 = (1, 1, 1)
tint2 = (1.0, 0.5, 0.5)
else:
tint1 = (0.6, 0.6, 0.6)
tint2 = (0.1, 0.3, 0.1)
if self.bot_array_name[self._icon_index] in (
'S.Pro Bomber', 'S.Pro Brawler',
'S.Pro Trigger', 'S.Pro Charger'):
color = (1.3, 1.2, 3.0)
else:
color = (1.0, 1.0, 1.0)
ba.buttonwidget( ba.buttonwidget(
edit=self._bot_button, edit=self._bot_button,
@ -1108,6 +1109,61 @@ class BotsPracticeTab(PracticeTab):
color=color, color=color,
tint_color=tint1, tint_color=tint1,
tint2_color=tint2) tint2_color=tint2)
self.save_settings()
def load_settings(self):
try:
if ba.app.config.get("botsSpawnSetting") is None:
ba.app.config["botsSpawnSetting"] = (0, 1, 0)
bot_index, count, radius = ba.app.config.get(
"botsSpawnSetting")
else:
bot_index, count, radius = ba.app.config.get(
"botsSpawnSetting")
print(ba.app.config.get("botsSpawnSetting"))
except:
ba.app.config["botsSpawnSetting"] = (0, 1, 0)
bot_index, count, radius = ba.app.config.get("botsSpawnSetting")
values = bot_index, count, radius
print("settings loaded")
return values
def save_settings(self):
ba.app.config["botsSpawnSetting"] = (self._icon_index, self.count,
self.radius)
print(ba.app.config.get("botsSpawnSetting"))
ba.app.config.commit()
print("settings saved")
def check_color(self):
if self.bot_array_name[self._icon_index] in (
'Pro Bomber', 'Pro Brawler',
'Pro Trigger', 'Pro Charger',
'S.Pro Bomber', 'S.Pro Brawler',
'S.Pro Trigger', 'S.Pro Charger'):
tint1 = (1.0, 0.2, 0.1)
tint2 = (0.6, 0.1, 0.05)
elif self.bot_array_name[self._icon_index] in 'Bouncy':
tint1 = (1, 1, 1)
tint2 = (1.0, 0.5, 0.5)
elif self.bot_array_name[self._icon_index] in ('Brawler Lite',
'Bomber Lite'):
tint1 = (1.2, 0.9, 0.2)
tint2 = (1.0, 0.5, 0.6)
else:
tint1 = (0.6, 0.6, 0.6)
tint2 = (0.1, 0.3, 0.1)
if self.bot_array_name[self._icon_index] in (
'S.Pro Bomber', 'S.Pro Brawler',
'S.Pro Trigger', 'S.Pro Charger'):
color = (1.3, 1.2, 3.0)
else:
color = (1.0, 1.0, 1.0)
colors = tint1, tint2, color
return colors
class PowerUpPracticeTab(PracticeTab): class PowerUpPracticeTab(PracticeTab):
@ -1133,19 +1189,19 @@ class PowerUpPracticeTab(PracticeTab):
['triple_bombs', 'curse', 'health', 'ice_bombs', ['triple_bombs', 'curse', 'health', 'ice_bombs',
'impact_bombs', 'land_mines', 'punch', 'impact_bombs', 'land_mines', 'punch',
'shield', 'sticky_bombs']) 'shield', 'sticky_bombs'])
self._icon_index = self.power_list_type_name.index('Tripple Bombs') self._icon_index = self.load_settings()
self.setting_name = (['Bomb Countdown', 'Bomb Radius Visualizer']) self.setting_name = (['Bomb Countdown', 'Bomb Radius Visualizer'])
self.config = (['bombCountdown', 'bombRadiusVisual']) self.config = (['bombCountdown', 'bombRadiusVisual'])
def on_activate( def on_activate(
self, self,
parent_widget: ba.Widget, parent_widget: ba.Widget,
tab_button: ba.Widget, tab_button: ba.Widget,
region_width: float, region_width: float,
region_height: float, region_height: float,
scroll_widget: ba.Widget, scroll_widget: ba.Widget,
extra_x: float, extra_x: float,
) -> ba.Widget: ) -> ba.Widget:
b_size_2 = 100 b_size_2 = 100
@ -1276,14 +1332,25 @@ class PowerUpPracticeTab(PracticeTab):
return self._subcontainer return self._subcontainer
def debuff(self): def debuff(self):
ba.screenmessage('Debuffed',
clients=[-1], transient=True, color=(1, 0.1, 0.1))
with ba.Context(_ba.get_foreground_host_activity()): with ba.Context(_ba.get_foreground_host_activity()):
for i in _ba.get_foreground_host_activity().players: for i in _ba.get_foreground_host_activity().players:
Spaz._gloves_wear_off(i.actor) Spaz._gloves_wear_off(i.actor)
Spaz._multi_bomb_wear_off(i.actor) Spaz._multi_bomb_wear_off(i.actor)
Spaz._bomb_wear_off(i.actor) Spaz._bomb_wear_off(i.actor)
i.actor.node.mini_billboard_1_end_time = 0
i.actor.node.mini_billboard_2_end_time = 0
i.actor.node.mini_billboard_3_end_time = 0
i.actor._multi_bomb_wear_off_flash_timer = None
i.actor._boxing_gloves_wear_off_flash_timer = None
i.actor._bomb_wear_off_flash_timer = None
Spaz.set_land_mine_count(i.actor, min(0, 0))
i.actor.shield_hitpoints = 1 i.actor.shield_hitpoints = 1
def get_powerup(self, clid: int = -1) -> None: def get_powerup(self, clid: int = -1) -> None:
ba.screenmessage('Spawned',
clients=[-1], transient=True, color=(0.2, 1, 0.2))
with ba.Context(_ba.get_foreground_host_activity()): with ba.Context(_ba.get_foreground_host_activity()):
for i in _ba.get_foreground_host_activity().players: for i in _ba.get_foreground_host_activity().players:
if i.sessionplayer.inputdevice.client_id == clid: if i.sessionplayer.inputdevice.client_id == clid:
@ -1294,7 +1361,8 @@ class PowerUpPracticeTab(PracticeTab):
i.node.position[1], i.node.position[1],
i.node.position[2] + z) i.node.position[2] + z)
PowerupBox(position=pos, PowerupBox(position=pos,
poweruptype=self.power_list_type poweruptype=
self.power_list_type
[self._icon_index]).autoretain() [self._icon_index]).autoretain()
def _power_window(self) -> None: def _power_window(self) -> None:
@ -1319,6 +1387,7 @@ class PowerUpPracticeTab(PracticeTab):
texture=(ba.gettexture('powerup' + texture=(ba.gettexture('powerup' +
self.power_list[ self.power_list[
self._icon_index]))) self._icon_index])))
self.save_settings()
def _check_value_change(self, setting: int, widget: ba.Widget, def _check_value_change(self, setting: int, widget: ba.Widget,
value: str) -> None: value: str) -> None:
@ -1338,6 +1407,28 @@ class PowerUpPracticeTab(PracticeTab):
else: else:
ba.app.config["bombRadiusVisual"] = False ba.app.config["bombRadiusVisual"] = False
def load_settings(self):
try:
if ba.app.config.get("powerSpawnSetting") is None:
ba.app.config["powerSpawnSetting"] = 0
power_index = ba.app.config.get("powerSpawnSetting")
else:
power_index = ba.app.config.get(
"powerSpawnSetting")
print(ba.app.config.get("powerSpawnSetting"))
except:
ba.app.config["powerSpawnSetting"] = 0
power_index = ba.app.config.get("powerSpawnSetting")
values = power_index
print("power settings loaded")
return values
def save_settings(self):
ba.app.config["powerSpawnSetting"] = self._icon_index
print(ba.app.config.get("powerSpawnSetting"))
ba.app.config.commit()
print("power settings saved")
class OthersPracticeTab(PracticeTab): class OthersPracticeTab(PracticeTab):
"""The about tab in the practice UI""" """The about tab in the practice UI"""
@ -1349,16 +1440,16 @@ class OthersPracticeTab(PracticeTab):
self.parent_widget = None self.parent_widget = None
self.activity = _ba.get_foreground_host_activity() self.activity = _ba.get_foreground_host_activity()
self.setting_name = (['Pause On Window', 'Invincible', 'Epic Mode']) self.setting_name = (['Pause On Window', 'Invincible', 'Epic Mode'])
self.config = (['pause', 'invincible', 'epic']) self.config = (['pause', 'invincible'])
def on_activate( def on_activate(
self, self,
parent_widget: ba.Widget, parent_widget: ba.Widget,
tab_button: ba.Widget, tab_button: ba.Widget,
region_width: float, region_width: float,
region_height: float, region_height: float,
scroll_widget: ba.Widget, scroll_widget: ba.Widget,
extra_x: float, extra_x: float,
) -> ba.Widget: ) -> ba.Widget:
spacing_v = 60 spacing_v = 60
spacing_h = -50 spacing_h = -50
@ -1403,7 +1494,11 @@ class OthersPracticeTab(PracticeTab):
color=(0.8, 0.8, 0.8), color=(0.8, 0.8, 0.8),
v_align='center', v_align='center',
maxwidth=200) maxwidth=200)
value = ba.app.config.get(self.config[i]) if name == 'Epic Mode':
activity = _ba.get_foreground_host_activity()
value = activity.globalsnode.slow_motion
else:
value = ba.app.config.get(self.config[i])
txt2 = ba.textwidget( txt2 = ba.textwidget(
parent=self._subcontainer, parent=self._subcontainer,
position=(self._sub_width * 0.8 - spacing_v / 2, position=(self._sub_width * 0.8 - spacing_v / 2,
@ -1546,7 +1641,7 @@ class PracticeWindow(ba.Window):
(self.TabID.BOTS, 'Bots') (self.TabID.BOTS, 'Bots')
] ]
if ba_internal.get_v1_account_misc_read_val( if ba_internal.get_v1_account_misc_read_val(
'enablePublicParties', True 'enablePublicParties', True
): ):
tabdefs.append( tabdefs.append(
( (
@ -1742,6 +1837,7 @@ org_begin = ba._activity.Activity.on_begin
def new_begin(self): def new_begin(self):
"""Runs when game is began.""" """Runs when game is began."""
org_begin(self)
_ba.set_party_icon_always_visible(True) _ba.set_party_icon_always_visible(True)
@ -1817,13 +1913,13 @@ class BotPicker(popup.PopupWindow):
mask_texture = ba.gettexture('characterIconMask') mask_texture = ba.gettexture('characterIconMask')
bot_list = (['bones', 'neoSpaz', 'kronk', 'zoe', bot_list = (['bones', 'neoSpaz', 'kronk', 'neoSpaz', 'kronk', 'zoe',
'ninja', 'mel', 'jack', 'bunny', 'ninja', 'mel', 'jack', 'bunny',
'neoSpaz', 'kronk', 'zoe', 'neoSpaz', 'kronk', 'zoe',
'ninja', 'ninja',
'neoSpaz', 'kronk', 'zoe', 'neoSpaz', 'kronk', 'zoe',
'ninja']) 'ninja'])
bot_list_type = (['Dummy', 'Bomber', 'Brawler', 'Trigger', bot_list_type = (['Dummy', 'Bomber Lite', 'Brawler Lite', 'Bomber', 'Brawler', 'Trigger',
'Charger', 'Sticky', 'Explodey', 'Bouncy', 'Charger', 'Sticky', 'Explodey', 'Bouncy',
'Pro Bomber', 'Pro Brawler', 'Pro Trigger', 'Pro Bomber', 'Pro Brawler', 'Pro Trigger',
'Pro Charger', 'S.Pro Bomber', 'S.Pro Brawler', 'Pro Charger', 'S.Pro Bomber', 'S.Pro Brawler',
@ -1842,6 +1938,10 @@ class BotPicker(popup.PopupWindow):
elif bot_list_type[index] in 'Bouncy': elif bot_list_type[index] in 'Bouncy':
tint1 = (1, 1, 1) tint1 = (1, 1, 1)
tint2 = (1.0, 0.5, 0.5) tint2 = (1.0, 0.5, 0.5)
elif bot_list_type[index] in ('Brawler Lite',
'Bomber Lite'):
tint1 = (1.2, 0.9, 0.2)
tint2 = (1.0, 0.5, 0.6)
else: else:
tint1 = (0.6, 0.6, 0.6) tint1 = (0.6, 0.6, 0.6)
tint2 = (0.1, 0.3, 0.1) tint2 = (0.1, 0.3, 0.1)
@ -2084,7 +2184,7 @@ class InfoWindow(popup.PopupWindow):
text = ('Practice Tools Mod\n' text = ('Practice Tools Mod\n'
'Made By Cross Joy\n' 'Made By Cross Joy\n'
'version 1.0\n' 'version 1.2\n'
'\n' '\n'
'Thx to\n' 'Thx to\n'
'Mikirog for the Bomb radius visualizer mod.\n' 'Mikirog for the Bomb radius visualizer mod.\n'