mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
textonmap fix, leaderboard, auto night mode
This commit is contained in:
parent
5996acb8fc
commit
b96b3f399f
14 changed files with 534 additions and 76 deletions
|
|
@ -576,7 +576,7 @@ class ServerManagerApp:
|
|||
|
||||
print(f'{Clr.CYN}Launching server subprocess...{Clr.RST}', flush=True)
|
||||
binary_name = ('BallisticaCoreHeadless.exe'
|
||||
if os.name == 'nt' else './ballisticacore_headless')
|
||||
if os.name == 'nt' else './bombsquad_headless')
|
||||
assert self._ba_root_path is not None
|
||||
self._subprocess = None
|
||||
|
||||
|
|
|
|||
360
dist/ba_root/mods/CharacterChooser.py
vendored
Normal file
360
dist/ba_root/mods/CharacterChooser.py
vendored
Normal file
|
|
@ -0,0 +1,360 @@
|
|||
# ba_meta require api 6
|
||||
|
||||
'''
|
||||
Character Chooser by Mr.Smoothy
|
||||
|
||||
This plugin will let you choose your character from lobby.
|
||||
|
||||
Install this plugin on your Phone/PC or on Server
|
||||
|
||||
If installed on server :- this will also let players choose server specific custom characters . so no more sharing of character file with all players,
|
||||
just install this plugin on server ...and players can pick character from lobby .
|
||||
|
||||
Use:-
|
||||
> select your profile (focus on color and name)
|
||||
> press ready (punch)
|
||||
> now use UP/DOWN buttons to scroll character list
|
||||
> Press ready again (punch) to join the game
|
||||
> or press Bomb button to go back to profile choosing menu
|
||||
> END
|
||||
|
||||
Watch : https://www.youtube.com/watch?v=hNmv2l-NahE
|
||||
Join : https://discord.gg/ucyaesh
|
||||
Contact : discord mr.smoothy#5824
|
||||
|
||||
|
||||
Share this plugin with your server owner /admins to use it online
|
||||
|
||||
:)
|
||||
|
||||
'''
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import ba,_ba
|
||||
from bastd.actor.playerspaz import PlayerSpaz
|
||||
|
||||
|
||||
from ba._error import print_exception, print_error, NotFoundError
|
||||
from ba._gameutils import animate, animate_array
|
||||
from ba._language import Lstr
|
||||
from ba._generated.enums import SpecialChar, InputType
|
||||
from ba._profile import get_player_profile_colors
|
||||
if TYPE_CHECKING:
|
||||
from typing import Any, Type, List, Dict, Tuple, Union, Sequence, Optional
|
||||
import weakref
|
||||
import os,json
|
||||
from ba import _lobby
|
||||
from bastd.actor.spazappearance import *
|
||||
from ba._lobby import ChangeMessage
|
||||
from ba._lobby import PlayerReadyMessage
|
||||
|
||||
def __init__(self, vpos: float, sessionplayer: _ba.SessionPlayer,
|
||||
lobby: 'Lobby') -> None:
|
||||
self._deek_sound = _ba.getsound('deek')
|
||||
self._click_sound = _ba.getsound('click01')
|
||||
self._punchsound = _ba.getsound('punch01')
|
||||
self._swish_sound = _ba.getsound('punchSwish')
|
||||
self._errorsound = _ba.getsound('error')
|
||||
self._mask_texture = _ba.gettexture('characterIconMask')
|
||||
self._vpos = vpos
|
||||
self._lobby = weakref.ref(lobby)
|
||||
self._sessionplayer = sessionplayer
|
||||
self._inited = False
|
||||
self._dead = False
|
||||
self._text_node: Optional[ba.Node] = None
|
||||
self._profilename = ''
|
||||
self._profilenames: List[str] = []
|
||||
self._ready: bool = False
|
||||
self._character_names: List[str] = []
|
||||
self._last_change: Sequence[Union[float, int]] = (0, 0)
|
||||
self._profiles: Dict[str, Dict[str, Any]] = {}
|
||||
|
||||
app = _ba.app
|
||||
|
||||
self.bakwas_chars=["Lee","Todd McBurton","Zola","Butch","Witch","warrior","Middle-Man","Alien","OldLady","Gladiator","Wrestler","Gretel","Robot"]
|
||||
|
||||
# Load available player profiles either from the local config or
|
||||
# from the remote device.
|
||||
self.reload_profiles()
|
||||
for name in _ba.app.spaz_appearances:
|
||||
if name not in self._character_names and name not in self.bakwas_chars:
|
||||
self._character_names.append(name)
|
||||
# Note: this is just our local index out of available teams; *not*
|
||||
# the team-id!
|
||||
self._selected_team_index: int = self.lobby.next_add_team
|
||||
|
||||
# Store a persistent random character index and colors; we'll use this
|
||||
# for the '_random' profile. Let's use their input_device id to seed
|
||||
# it. This will give a persistent character for them between games
|
||||
# and will distribute characters nicely if everyone is random.
|
||||
self._random_color, self._random_highlight = (
|
||||
get_player_profile_colors(None))
|
||||
|
||||
# To calc our random character we pick a random one out of our
|
||||
# unlocked list and then locate that character's index in the full
|
||||
# list.
|
||||
char_index_offset = app.lobby_random_char_index_offset
|
||||
self._random_character_index = (
|
||||
(sessionplayer.inputdevice.id + char_index_offset) %
|
||||
len(self._character_names))
|
||||
|
||||
# Attempt to set an initial profile based on what was used previously
|
||||
# for this input-device, etc.
|
||||
self._profileindex = self._select_initial_profile()
|
||||
self._profilename = self._profilenames[self._profileindex]
|
||||
|
||||
self._text_node = _ba.newnode('text',
|
||||
delegate=self,
|
||||
attrs={
|
||||
'position': (-100, self._vpos),
|
||||
'maxwidth': 190,
|
||||
'shadow': 0.5,
|
||||
'vr_depth': -20,
|
||||
'h_align': 'left',
|
||||
'v_align': 'center',
|
||||
'v_attach': 'top'
|
||||
})
|
||||
animate(self._text_node, 'scale', {0: 0, 0.1: 1.0})
|
||||
self.icon = _ba.newnode('image',
|
||||
owner=self._text_node,
|
||||
attrs={
|
||||
'position': (-130, self._vpos + 20),
|
||||
'mask_texture': self._mask_texture,
|
||||
'vr_depth': -10,
|
||||
'attach': 'topCenter'
|
||||
})
|
||||
|
||||
animate_array(self.icon, 'scale', 2, {0: (0, 0), 0.1: (45, 45)})
|
||||
|
||||
# Set our initial name to '<choosing player>' in case anyone asks.
|
||||
self._sessionplayer.setname(
|
||||
Lstr(resource='choosingPlayerText').evaluate(), real=False)
|
||||
|
||||
# Init these to our rando but they should get switched to the
|
||||
# selected profile (if any) right after.
|
||||
self._character_index = self._random_character_index
|
||||
self._color = self._random_color
|
||||
self._highlight = self._random_highlight
|
||||
self.characterchooser=False
|
||||
self.update_from_profile()
|
||||
self.update_position()
|
||||
self._inited = True
|
||||
|
||||
self._set_ready(False)
|
||||
|
||||
|
||||
|
||||
|
||||
def _set_ready(self, ready: bool) -> None:
|
||||
|
||||
# pylint: disable=cyclic-import
|
||||
from bastd.ui.profile import browser as pbrowser
|
||||
from ba._general import Call
|
||||
profilename = self._profilenames[self._profileindex]
|
||||
|
||||
# Handle '_edit' as a special case.
|
||||
if profilename == '_edit' and ready:
|
||||
with _ba.Context('ui'):
|
||||
pbrowser.ProfileBrowserWindow(in_main_menu=False)
|
||||
|
||||
# Give their input-device UI ownership too
|
||||
# (prevent someone else from snatching it in crowded games)
|
||||
_ba.set_ui_input_device(self._sessionplayer.inputdevice)
|
||||
return
|
||||
|
||||
if ready==False:
|
||||
self._sessionplayer.assigninput(
|
||||
InputType.LEFT_PRESS,
|
||||
Call(self.handlemessage, ChangeMessage('team', -1)))
|
||||
self._sessionplayer.assigninput(
|
||||
InputType.RIGHT_PRESS,
|
||||
Call(self.handlemessage, ChangeMessage('team', 1)))
|
||||
self._sessionplayer.assigninput(
|
||||
InputType.BOMB_PRESS,
|
||||
Call(self.handlemessage, ChangeMessage('character', 1)))
|
||||
self._sessionplayer.assigninput(
|
||||
InputType.UP_PRESS,
|
||||
Call(self.handlemessage, ChangeMessage('profileindex', -1)))
|
||||
self._sessionplayer.assigninput(
|
||||
InputType.DOWN_PRESS,
|
||||
Call(self.handlemessage, ChangeMessage('profileindex', 1)))
|
||||
self._sessionplayer.assigninput(
|
||||
(InputType.JUMP_PRESS, InputType.PICK_UP_PRESS,
|
||||
InputType.PUNCH_PRESS),
|
||||
Call(self.handlemessage, ChangeMessage('ready', 1)))
|
||||
self._ready = False
|
||||
self._update_text()
|
||||
self._sessionplayer.setname('untitled', real=False)
|
||||
elif ready == True:
|
||||
self.characterchooser=True
|
||||
self._sessionplayer.assigninput(
|
||||
(InputType.LEFT_PRESS, InputType.RIGHT_PRESS,
|
||||
InputType.UP_PRESS, InputType.DOWN_PRESS,
|
||||
InputType.JUMP_PRESS, InputType.BOMB_PRESS,
|
||||
InputType.PICK_UP_PRESS), self._do_nothing)
|
||||
self._sessionplayer.assigninput(
|
||||
(InputType.UP_PRESS),Call(self.handlemessage,ChangeMessage('characterchooser',-1)))
|
||||
self._sessionplayer.assigninput(
|
||||
(InputType.DOWN_PRESS),Call(self.handlemessage,ChangeMessage('characterchooser',1)))
|
||||
self._sessionplayer.assigninput(
|
||||
(InputType.BOMB_PRESS),Call(self.handlemessage,ChangeMessage('ready',0)))
|
||||
|
||||
self._sessionplayer.assigninput(
|
||||
(InputType.JUMP_PRESS,InputType.PICK_UP_PRESS, InputType.PUNCH_PRESS),
|
||||
Call(self.handlemessage, ChangeMessage('ready', 2)))
|
||||
|
||||
# Store the last profile picked by this input for reuse.
|
||||
input_device = self._sessionplayer.inputdevice
|
||||
name = input_device.name
|
||||
unique_id = input_device.unique_identifier
|
||||
device_profiles = _ba.app.config.setdefault(
|
||||
'Default Player Profiles', {})
|
||||
|
||||
# Make an exception if we have no custom profiles and are set
|
||||
# to random; in that case we'll want to start picking up custom
|
||||
# profiles if/when one is made so keep our setting cleared.
|
||||
special = ('_random', '_edit', '__account__')
|
||||
have_custom_profiles = any(p not in special
|
||||
for p in self._profiles)
|
||||
|
||||
profilekey = name + ' ' + unique_id
|
||||
if profilename == '_random' and not have_custom_profiles:
|
||||
if profilekey in device_profiles:
|
||||
del device_profiles[profilekey]
|
||||
else:
|
||||
device_profiles[profilekey] = profilename
|
||||
_ba.app.config.commit()
|
||||
|
||||
# Set this player's short and full name.
|
||||
self._sessionplayer.setname(self._getname(),
|
||||
self._getname(full=True),
|
||||
real=True)
|
||||
self._ready = True
|
||||
self._update_text()
|
||||
else:
|
||||
|
||||
|
||||
|
||||
# Inform the session that this player is ready.
|
||||
_ba.getsession().handlemessage(PlayerReadyMessage(self))
|
||||
|
||||
|
||||
def handlemessage(self, msg: Any) -> Any:
|
||||
"""Standard generic message handler."""
|
||||
|
||||
if isinstance(msg, ChangeMessage):
|
||||
self._handle_repeat_message_attack()
|
||||
|
||||
# If we've been removed from the lobby, ignore this stuff.
|
||||
if self._dead:
|
||||
print_error('chooser got ChangeMessage after dying')
|
||||
return
|
||||
|
||||
if not self._text_node:
|
||||
print_error('got ChangeMessage after nodes died')
|
||||
return
|
||||
if msg.what=='characterchooser':
|
||||
_ba.playsound(self._click_sound)
|
||||
# update our index in our local list of characters
|
||||
self._character_index = ((self._character_index + msg.value) %
|
||||
len(self._character_names))
|
||||
self._update_text()
|
||||
self._update_icon()
|
||||
|
||||
if msg.what == 'team':
|
||||
sessionteams = self.lobby.sessionteams
|
||||
if len(sessionteams) > 1:
|
||||
_ba.playsound(self._swish_sound)
|
||||
self._selected_team_index = (
|
||||
(self._selected_team_index + msg.value) %
|
||||
len(sessionteams))
|
||||
self._update_text()
|
||||
self.update_position()
|
||||
self._update_icon()
|
||||
|
||||
elif msg.what == 'profileindex':
|
||||
if len(self._profilenames) == 1:
|
||||
|
||||
# This should be pretty hard to hit now with
|
||||
# automatic local accounts.
|
||||
_ba.playsound(_ba.getsound('error'))
|
||||
else:
|
||||
|
||||
# Pick the next player profile and assign our name
|
||||
# and character based on that.
|
||||
_ba.playsound(self._deek_sound)
|
||||
self._profileindex = ((self._profileindex + msg.value) %
|
||||
len(self._profilenames))
|
||||
self.update_from_profile()
|
||||
|
||||
elif msg.what == 'character':
|
||||
_ba.playsound(self._click_sound)
|
||||
self.characterchooser=True
|
||||
# update our index in our local list of characters
|
||||
self._character_index = ((self._character_index + msg.value) %
|
||||
len(self._character_names))
|
||||
self._update_text()
|
||||
self._update_icon()
|
||||
|
||||
elif msg.what == 'ready':
|
||||
self._handle_ready_msg(msg.value)
|
||||
|
||||
def _update_text(self) -> None:
|
||||
assert self._text_node is not None
|
||||
if self._ready:
|
||||
|
||||
# Once we're ready, we've saved the name, so lets ask the system
|
||||
# for it so we get appended numbers and stuff.
|
||||
text = Lstr(value=self._sessionplayer.getname(full=True))
|
||||
if self.characterchooser:
|
||||
text = Lstr(value='${A}\n${B}',
|
||||
subs=[('${A}', text),
|
||||
('${B}', Lstr(value=""+self._character_names[self._character_index]))])
|
||||
self._text_node.scale=0.8
|
||||
else:
|
||||
text = Lstr(value='${A} (${B})',
|
||||
subs=[('${A}', text),
|
||||
('${B}', Lstr(resource='readyText'))])
|
||||
else:
|
||||
text = Lstr(value=self._getname(full=True))
|
||||
self._text_node.scale=1.0
|
||||
|
||||
can_switch_teams = len(self.lobby.sessionteams) > 1
|
||||
|
||||
# Flash as we're coming in.
|
||||
fin_color = _ba.safecolor(self.get_color()) + (1, )
|
||||
if not self._inited:
|
||||
animate_array(self._text_node, 'color', 4, {
|
||||
0.15: fin_color,
|
||||
0.25: (2, 2, 2, 1),
|
||||
0.35: fin_color
|
||||
})
|
||||
else:
|
||||
|
||||
# Blend if we're in teams mode; switch instantly otherwise.
|
||||
if can_switch_teams:
|
||||
animate_array(self._text_node, 'color', 4, {
|
||||
0: self._text_node.color,
|
||||
0.1: fin_color
|
||||
})
|
||||
else:
|
||||
self._text_node.color = fin_color
|
||||
|
||||
self._text_node.text = text
|
||||
|
||||
# ba_meta export plugin
|
||||
class HeySmoothy(ba.Plugin):
|
||||
|
||||
def __init__(self):
|
||||
_lobby.Chooser.__init__=__init__
|
||||
_lobby.Chooser._set_ready=_set_ready
|
||||
|
||||
_lobby.Chooser._update_text=_update_text
|
||||
_lobby.Chooser.handlemessage=handlemessage
|
||||
|
||||
|
||||
|
||||
33
dist/ba_root/mods/custom_hooks.py
vendored
33
dist/ba_root/mods/custom_hooks.py
vendored
|
|
@ -4,6 +4,13 @@ import _ba
|
|||
from chatHandle import handlechat
|
||||
import setting
|
||||
from tools import servercheck
|
||||
import _thread
|
||||
from stats import mystats
|
||||
from datetime import datetime
|
||||
from ba import _activity
|
||||
|
||||
settings = setting.get_settings_data()
|
||||
|
||||
def filter_chat_message(msg, client_id):
|
||||
|
||||
return handlechat.filter_chat_message(msg, client_id)
|
||||
|
|
@ -33,11 +40,13 @@ def playerspaz_init(player):
|
|||
def bootstraping():
|
||||
|
||||
#_ba.disconnect_client=new_disconnect
|
||||
settings = setting.get_settings_data()
|
||||
|
||||
_ba.set_server_device_name(settings["HostDeviceName"])
|
||||
_ba.set_server_name(settings["HostName"])
|
||||
_ba.set_transparent_kickvote(settings["ShowKickVoteStarterName"])
|
||||
_ba.set_kickvote_msg_type(settings["KickVoteMsgType"])
|
||||
_thread.start_new_thread(mystats.refreshStats,())
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -45,3 +54,25 @@ def new_disconnect(clid,duration=120):
|
|||
print("new new_disconnect")
|
||||
_ba.ban_client(clid,duration)
|
||||
|
||||
org_begin=ba._activity.Activity.on_begin
|
||||
|
||||
def new_begin(self):
|
||||
org_begin(self)
|
||||
night_mode()
|
||||
|
||||
|
||||
|
||||
ba._activity.Activity.on_begin=new_begin
|
||||
|
||||
|
||||
def night_mode():
|
||||
|
||||
if(settings['autoNightMode']['enable']):
|
||||
|
||||
start=datetime.strptime(settings['autoNightMode']['startTime'],"%H:%M")
|
||||
end=datetime.strptime(settings['autoNightMode']['endTime'],"%H:%M")
|
||||
now=datetime.now()
|
||||
|
||||
if now.time() > start.time() or now.time() < end.time():
|
||||
activity = _ba.get_foreground_host_activity()
|
||||
activity.globalsnode.tint = (0.5, 0.7, 1.0)
|
||||
9
dist/ba_root/mods/setting.json
vendored
9
dist/ba_root/mods/setting.json
vendored
|
|
@ -15,19 +15,24 @@
|
|||
|
||||
"textonmap": {
|
||||
"top watermark": "Welcome to server \n ip 192.168.0.1",
|
||||
"bottom left watermark": "Search Hey Smoothy on Youtube",
|
||||
"bottom left watermark": "Owner : <owner-name> \nEditor : <bablu>\nScripts : BCS1.3.2",
|
||||
"center highlights": [
|
||||
"message 1",
|
||||
"message 2",
|
||||
"message 3"
|
||||
]
|
||||
},
|
||||
"autoNightMode":{
|
||||
"enable":true,
|
||||
"startTime":"18:30",
|
||||
"endTime":"06:00"
|
||||
},
|
||||
"HostDeviceName":"v1.3.1",
|
||||
"HostName":"BCS",
|
||||
"ShowKickVoteStarterName":true,
|
||||
"KickVoteMsgType":"chat",
|
||||
"minAgeToChatInHours":78,
|
||||
"minAgeToJoinInHours":48,
|
||||
"minAgeToJoinInHours":24,
|
||||
"maxWarnCount":2,
|
||||
"WarnCooldownMinutes":30,
|
||||
"enabletags": true,
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
26
dist/ba_root/mods/stats/mystats.py
vendored
26
dist/ba_root/mods/stats/mystats.py
vendored
|
|
@ -5,6 +5,7 @@ mystats module for BombSquad version 1.5.29
|
|||
Provides functionality for dumping player stats to disk between rounds.
|
||||
"""
|
||||
ranks=[]
|
||||
top3Name=[]
|
||||
import threading,json,os,urllib.request,ba,_ba,setting
|
||||
from ba._activity import Activity
|
||||
from ba._music import setmusic, MusicType
|
||||
|
|
@ -15,7 +16,7 @@ from typing import Any, Dict, Optional
|
|||
from ba._lobby import JoinInfo
|
||||
from ba import _activitytypes as ba_actypes
|
||||
from ba._activitytypes import *
|
||||
|
||||
import urllib.request
|
||||
#variables
|
||||
our_settings = setting.get_settings_data()
|
||||
# where our stats file and pretty html output will go
|
||||
|
|
@ -136,11 +137,14 @@ def refreshStats():
|
|||
</table>
|
||||
</body>
|
||||
</html>''')
|
||||
|
||||
|
||||
f.close()
|
||||
global ranks
|
||||
ranks=_ranks
|
||||
|
||||
dump_stats(pStats)
|
||||
updateTop3Names(toppersIDs[0:3])
|
||||
|
||||
from playersData import pdata
|
||||
pdata.update_toppers(toppersIDs)
|
||||
|
|
@ -245,3 +249,23 @@ def getRank(acc_id):
|
|||
refreshStats()
|
||||
if acc_id in ranks:
|
||||
return ranks.index(acc_id)+1
|
||||
|
||||
|
||||
|
||||
def updateTop3Names(ids):
|
||||
global top3Name
|
||||
names=[]
|
||||
for id in ids:
|
||||
url="http://bombsquadgame.com/bsAccountInfo?buildNumber=20258&accountID="+id
|
||||
data=urllib.request.urlopen(url)
|
||||
if data is not None:
|
||||
try:
|
||||
name=json.loads(data.read())["profileDisplayString"]
|
||||
except ValueError:
|
||||
names.append("???")
|
||||
else:
|
||||
names.append(name)
|
||||
top3Name=names
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
56
dist/ba_root/mods/stats/stats.json
vendored
56
dist/ba_root/mods/stats/stats.json
vendored
|
|
@ -132,7 +132,7 @@
|
|||
"aid": "pb-IF4gVU0BCg=="
|
||||
},
|
||||
"pb-IF4FVXkZDQ==": {
|
||||
"rank": 26,
|
||||
"rank": 27,
|
||||
"name": "\ue020lllBOLTlll",
|
||||
"scores": 151,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
"aid": "pb-IF42VUpaDg=="
|
||||
},
|
||||
"pb-IF4iVUNSIw==": {
|
||||
"rank": 47,
|
||||
"rank": 48,
|
||||
"name": "default",
|
||||
"scores": 56,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -168,7 +168,7 @@
|
|||
"aid": "pb-IF4iVUNSIw=="
|
||||
},
|
||||
"pb-IF4PVGcSJw==": {
|
||||
"rank": 41,
|
||||
"rank": 42,
|
||||
"name": "\ue030Android29104233",
|
||||
"scores": 84,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
"aid": "pb-IF4PVGcSJw=="
|
||||
},
|
||||
"pb-IF4eVVMkMw==": {
|
||||
"rank": 29,
|
||||
"rank": 30,
|
||||
"name": "\ue030Android52887552",
|
||||
"scores": 101,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -252,7 +252,7 @@
|
|||
"aid": "pb-IF4AVXAmPA=="
|
||||
},
|
||||
"pb-IF4AVVEPNw==": {
|
||||
"rank": 30,
|
||||
"rank": 31,
|
||||
"name": "\ue020StealthyFelicity14",
|
||||
"scores": 96,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -288,7 +288,7 @@
|
|||
"aid": "pb-IF4DVEkPEg=="
|
||||
},
|
||||
"pb-IF4TVVNeMg==": {
|
||||
"rank": 45,
|
||||
"rank": 46,
|
||||
"name": "\ue030Android52880740",
|
||||
"scores": 61,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -312,7 +312,7 @@
|
|||
"aid": "pb-IF4yVUcgBg=="
|
||||
},
|
||||
"pb-IF4IVUUJMg==": {
|
||||
"rank": 39,
|
||||
"rank": 40,
|
||||
"name": "\ue030Android51464300",
|
||||
"scores": 90,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -348,7 +348,7 @@
|
|||
"aid": "pb-IF48NmQO"
|
||||
},
|
||||
"pb-IF4UVUQaAw==": {
|
||||
"rank": 40,
|
||||
"rank": 41,
|
||||
"name": "\ue020LikelyTour25",
|
||||
"scores": 85,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -420,7 +420,7 @@
|
|||
"aid": "pb-IF4SVW9dEg=="
|
||||
},
|
||||
"pb-IF4SVVMtDg==": {
|
||||
"rank": 37,
|
||||
"rank": 38,
|
||||
"name": "\ue020OrtigozaRafa2000",
|
||||
"scores": 92,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -432,7 +432,7 @@
|
|||
"aid": "pb-IF4SVVMtDg=="
|
||||
},
|
||||
"pb-IF4cVVMhKg==": {
|
||||
"rank": 28,
|
||||
"rank": 29,
|
||||
"name": "\ue020jonyteoba100",
|
||||
"scores": 106,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -456,7 +456,7 @@
|
|||
"aid": "pb-IF4gVRlbXQ=="
|
||||
},
|
||||
"pb-IF4dVVAMUg==": {
|
||||
"rank": 38,
|
||||
"rank": 39,
|
||||
"name": "\ue030Android52657984",
|
||||
"scores": 91,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -480,7 +480,7 @@
|
|||
"aid": "pb-JiNJVxFfUEFDWFtCFEdXVl1FF0FaTllC"
|
||||
},
|
||||
"pb-IF40VU4TAQ==": {
|
||||
"rank": 35,
|
||||
"rank": 36,
|
||||
"name": "default",
|
||||
"scores": 96,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -516,7 +516,7 @@
|
|||
"aid": "pb-IF5RVUkZKg=="
|
||||
},
|
||||
"pb-IF5VVVEnVQ==": {
|
||||
"rank": 46,
|
||||
"rank": 47,
|
||||
"name": "\ue030Android52446817",
|
||||
"scores": 59,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -528,7 +528,7 @@
|
|||
"aid": "pb-IF5VVVEnVQ=="
|
||||
},
|
||||
"pb-JiNJARBaVUpHWl1BGUBVVFZAEkZeR1FE": {
|
||||
"rank": 32,
|
||||
"rank": 33,
|
||||
"name": "\ue020CreepyJourney52261",
|
||||
"scores": 96,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -540,7 +540,7 @@
|
|||
"aid": "pb-JiNJARBaVUpHWl1BGUBVVFZAEkZeR1FE"
|
||||
},
|
||||
"pb-IF5QVVZTAA==": {
|
||||
"rank": 44,
|
||||
"rank": 45,
|
||||
"name": "default",
|
||||
"scores": 64,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -552,7 +552,7 @@
|
|||
"aid": "pb-IF5QVVZTAA=="
|
||||
},
|
||||
"pb-IF5dVU0tPw==": {
|
||||
"rank": 36,
|
||||
"rank": 37,
|
||||
"name": "\ue030Android52110513",
|
||||
"scores": 93,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -588,7 +588,7 @@
|
|||
"aid": "pb-IF4sVRU8IA=="
|
||||
},
|
||||
"pb-IF4zVUYjPA==": {
|
||||
"rank": 25,
|
||||
"rank": 26,
|
||||
"name": "\ue030Android51693156",
|
||||
"scores": 152,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -600,7 +600,7 @@
|
|||
"aid": "pb-IF4zVUYjPA=="
|
||||
},
|
||||
"pb-IF4PVVJSNg==": {
|
||||
"rank": 34,
|
||||
"rank": 35,
|
||||
"name": "default",
|
||||
"scores": 96,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -612,7 +612,7 @@
|
|||
"aid": "pb-IF4PVVJSNg=="
|
||||
},
|
||||
"pb-IF4qVVMuIA==": {
|
||||
"rank": 31,
|
||||
"rank": 32,
|
||||
"name": "\ue020TacitAnthropology26",
|
||||
"scores": 96,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -648,7 +648,7 @@
|
|||
"aid": "pb-IF4-VWItPA=="
|
||||
},
|
||||
"pb-IF5VVxI5Fg==": {
|
||||
"rank": 43,
|
||||
"rank": 44,
|
||||
"name": "\ue020JinaYumnam1234",
|
||||
"scores": 76,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -672,7 +672,7 @@
|
|||
"aid": "pb-IF4lVUskVg=="
|
||||
},
|
||||
"pb-IF4vVVAiKw==": {
|
||||
"rank": 33,
|
||||
"rank": 34,
|
||||
"name": "default",
|
||||
"scores": 96,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -696,7 +696,7 @@
|
|||
"aid": "pb-IF5RVU0vKg=="
|
||||
},
|
||||
"pb-IF4JVWseCg==": {
|
||||
"rank": 42,
|
||||
"rank": 43,
|
||||
"name": "\ue020CapillaryJaguar7",
|
||||
"scores": 77,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -804,7 +804,7 @@
|
|||
"aid": "pb-IF5cVEMNNA=="
|
||||
},
|
||||
"pb-IF4PVEEnBA==": {
|
||||
"rank": 27,
|
||||
"rank": 28,
|
||||
"name": "\ue020Deadly\u30c4TusKeR",
|
||||
"scores": 128,
|
||||
"total_damage": 0.0,
|
||||
|
|
@ -840,15 +840,15 @@
|
|||
"aid": "pb-IF43VVJSAg=="
|
||||
},
|
||||
"pb-IF5XUm9eAg==": {
|
||||
"rank": 48,
|
||||
"rank": 25,
|
||||
"name": "\ue030PC402015",
|
||||
"scores": 56,
|
||||
"scores": 152,
|
||||
"total_damage": 0.0,
|
||||
"kills": 0,
|
||||
"deaths": 0,
|
||||
"games": 4,
|
||||
"deaths": 10,
|
||||
"games": 21,
|
||||
"kd": 0.0,
|
||||
"avg_score": 14.0,
|
||||
"avg_score": 7.238,
|
||||
"aid": "pb-IF5XUm9eAg=="
|
||||
}
|
||||
}
|
||||
68
dist/ba_root/mods/stats/stats_page.html
vendored
68
dist/ba_root/mods/stats/stats_page.html
vendored
|
|
@ -211,6 +211,14 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>25</td>
|
||||
<td style="text-align:center">PC402015</td>
|
||||
<td>152</td>
|
||||
<td>0</td>
|
||||
<td>10</td>
|
||||
<td>21</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>26</td>
|
||||
<td style="text-align:center">Android51693156</td>
|
||||
<td>152</td>
|
||||
<td>0</td>
|
||||
|
|
@ -218,7 +226,7 @@
|
|||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>26</td>
|
||||
<td>27</td>
|
||||
<td style="text-align:center">lllBOLTlll</td>
|
||||
<td>151</td>
|
||||
<td>9</td>
|
||||
|
|
@ -226,7 +234,7 @@
|
|||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>27</td>
|
||||
<td>28</td>
|
||||
<td style="text-align:center">DeadlyツTusKeR</td>
|
||||
<td>128</td>
|
||||
<td>3</td>
|
||||
|
|
@ -234,7 +242,7 @@
|
|||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28</td>
|
||||
<td>29</td>
|
||||
<td style="text-align:center">jonyteoba100</td>
|
||||
<td>106</td>
|
||||
<td>2</td>
|
||||
|
|
@ -242,7 +250,7 @@
|
|||
<td>4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>29</td>
|
||||
<td>30</td>
|
||||
<td style="text-align:center">Android52887552</td>
|
||||
<td>101</td>
|
||||
<td>0</td>
|
||||
|
|
@ -250,7 +258,7 @@
|
|||
<td>6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td style="text-align:center">StealthyFelicity14</td>
|
||||
<td>96</td>
|
||||
<td>0</td>
|
||||
|
|
@ -258,24 +266,16 @@
|
|||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td style="text-align:center">TacitAnthropology26</td>
|
||||
<td>96</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>32</td>
|
||||
<td style="text-align:center">CreepyJourney52261</td>
|
||||
<td>96</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>33</td>
|
||||
<td style="text-align:center">default</td>
|
||||
<td style="text-align:center">CreepyJourney52261</td>
|
||||
<td>96</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
|
|
@ -299,6 +299,14 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>36</td>
|
||||
<td style="text-align:center">default</td>
|
||||
<td>96</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>37</td>
|
||||
<td style="text-align:center">Android52110513</td>
|
||||
<td>93</td>
|
||||
<td>0</td>
|
||||
|
|
@ -306,7 +314,7 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>37</td>
|
||||
<td>38</td>
|
||||
<td style="text-align:center">OrtigozaRafa2000</td>
|
||||
<td>92</td>
|
||||
<td>4</td>
|
||||
|
|
@ -314,7 +322,7 @@
|
|||
<td>4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>38</td>
|
||||
<td>39</td>
|
||||
<td style="text-align:center">Android52657984</td>
|
||||
<td>91</td>
|
||||
<td>0</td>
|
||||
|
|
@ -322,7 +330,7 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>39</td>
|
||||
<td>40</td>
|
||||
<td style="text-align:center">Android51464300</td>
|
||||
<td>90</td>
|
||||
<td>0</td>
|
||||
|
|
@ -330,7 +338,7 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>40</td>
|
||||
<td>41</td>
|
||||
<td style="text-align:center">LikelyTour25</td>
|
||||
<td>85</td>
|
||||
<td>11</td>
|
||||
|
|
@ -338,7 +346,7 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>41</td>
|
||||
<td>42</td>
|
||||
<td style="text-align:center">Android29104233</td>
|
||||
<td>84</td>
|
||||
<td>7</td>
|
||||
|
|
@ -346,7 +354,7 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>42</td>
|
||||
<td>43</td>
|
||||
<td style="text-align:center">CapillaryJaguar7</td>
|
||||
<td>77</td>
|
||||
<td>7</td>
|
||||
|
|
@ -354,7 +362,7 @@
|
|||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>43</td>
|
||||
<td>44</td>
|
||||
<td style="text-align:center">JinaYumnam1234</td>
|
||||
<td>76</td>
|
||||
<td>0</td>
|
||||
|
|
@ -362,7 +370,7 @@
|
|||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>44</td>
|
||||
<td>45</td>
|
||||
<td style="text-align:center">default</td>
|
||||
<td>64</td>
|
||||
<td>0</td>
|
||||
|
|
@ -370,7 +378,7 @@
|
|||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>45</td>
|
||||
<td>46</td>
|
||||
<td style="text-align:center">Android52880740</td>
|
||||
<td>61</td>
|
||||
<td>0</td>
|
||||
|
|
@ -378,7 +386,7 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>46</td>
|
||||
<td>47</td>
|
||||
<td style="text-align:center">Android52446817</td>
|
||||
<td>59</td>
|
||||
<td>2</td>
|
||||
|
|
@ -386,21 +394,13 @@
|
|||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>47</td>
|
||||
<td>48</td>
|
||||
<td style="text-align:center">default</td>
|
||||
<td>56</td>
|
||||
<td>2</td>
|
||||
<td>5</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>48</td>
|
||||
<td style="text-align:center">PC402015</td>
|
||||
<td>56</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>49</td>
|
||||
<td style="text-align:center">Android52893090</td>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
6
dist/ba_root/mods/tools/servercheck.py
vendored
6
dist/ba_root/mods/tools/servercheck.py
vendored
|
|
@ -68,7 +68,9 @@ class checkserver(object):
|
|||
|
||||
newPlayers.append(ros['account_id'])
|
||||
if ros['account_id'] not in self.players and ros['client_id'] !=-1:
|
||||
print(ros['account_id'])
|
||||
|
||||
if ros['account_id'] != None:
|
||||
|
||||
LoadProfile(ros['account_id']).start()
|
||||
|
||||
self.players=newPlayers
|
||||
|
|
@ -190,7 +192,7 @@ class LoadProfile(threading.Thread):
|
|||
def __init__(self,pb_id):
|
||||
threading.Thread.__init__(self)
|
||||
self.pbid=pb_id
|
||||
print("thread obj")
|
||||
|
||||
|
||||
def run(self):
|
||||
player_data=pdata.get_info(self.pbid)
|
||||
|
|
|
|||
48
dist/ba_root/mods/tools/textonmap.py
vendored
48
dist/ba_root/mods/tools/textonmap.py
vendored
|
|
@ -5,19 +5,29 @@
|
|||
from ba._generated.enums import TimeType
|
||||
import ba, _ba
|
||||
import setting
|
||||
|
||||
from stats import mystats
|
||||
from datetime import datetime
|
||||
class textonmap:
|
||||
|
||||
def __init__(self):
|
||||
|
||||
data = setting.get_settings_data()['textonmap']
|
||||
setti=setting.get_settings_data()
|
||||
data = setti['textonmap']
|
||||
left = data['bottom left watermark']
|
||||
top = data['top watermark']
|
||||
|
||||
nextMap=_ba.get_foreground_host_session().get_next_game_description().evaluate()
|
||||
|
||||
self.index = 0
|
||||
self.highlights = data['center highlights']
|
||||
self.left_watermark(left)
|
||||
self.top_message(top)
|
||||
self.nextGame(nextMap)
|
||||
self.leaderBoard()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
self.timer = ba.timer(8, ba.Call(self.highlights_), repeat=True)
|
||||
|
||||
def highlights_(self):
|
||||
|
|
@ -42,10 +52,24 @@ class textonmap:
|
|||
'flatness': 1.0,
|
||||
'h_align': 'left',
|
||||
'v_attach':'bottom',
|
||||
'scale':1,
|
||||
'position':(-480,20),
|
||||
'color':(1,1,1)
|
||||
'h_attach':'left',
|
||||
'scale':0.7,
|
||||
'position':(25,67),
|
||||
'color':(0.7,0.7,0.7)
|
||||
})
|
||||
def nextGame(self,text):
|
||||
node = _ba.newnode('text',
|
||||
attrs={
|
||||
'text':"Next : "+text,
|
||||
'flatness':1.0,
|
||||
'h_align':'right',
|
||||
'v_attach':'bottom',
|
||||
'h_attach':'right',
|
||||
'scale':0.7,
|
||||
'position':(-25,18),
|
||||
'color':(0.5,0.5,0.5)
|
||||
})
|
||||
|
||||
|
||||
def top_message(self, text):
|
||||
node = _ba.newnode('text',
|
||||
|
|
@ -58,3 +82,15 @@ class textonmap:
|
|||
'position':(0,138),
|
||||
'color':(1,1,1)
|
||||
})
|
||||
|
||||
def leaderBoard(self):
|
||||
if len(mystats.top3Name) >2:
|
||||
|
||||
self.ss1=ba.newnode('image',attrs={'scale':(300,30),'texture':ba.gettexture('bar'),'position':(0,-80),'attach':'topRight','opacity':0.5,'color':(0.7,0.1,0)})
|
||||
self.ss1a=ba.newnode('text',attrs={'text':"#1 "+mystats.top3Name[0][:10]+"...",'flatness':1.0,'h_align':'left','h_attach':'right','v_attach':'top','v_align':'center','position':(-140,-80),'scale':0.7,'color':(0.7,0.4,0.3)})
|
||||
|
||||
self.ss1=ba.newnode('image',attrs={'scale':(300,30),'texture':ba.gettexture('bar'),'position':(0,-115),'attach':'topRight','opacity':0.5,'color':(0.6,0.6,0.6)})
|
||||
self.ss1a=ba.newnode('text',attrs={'text':"#2 "+mystats.top3Name[1][:10]+"...",'flatness':1.0,'h_align':'left','h_attach':'right','v_attach':'top','v_align':'center','position':(-140,-115),'scale':0.7,'color':(0.8,0.8,0.8)})
|
||||
|
||||
self.ss1=ba.newnode('image',attrs={'scale':(300,30),'texture':ba.gettexture('bar'),'position':(0,-150),'attach':'topRight','opacity':0.5,'color':(0.1,0.3,0.1)})
|
||||
self.ss1a=ba.newnode('text',attrs={'text':"#3 "+mystats.top3Name[2][:10]+"...",'flatness':1.0,'h_align':'left','h_attach':'right','v_attach':'top','v_align':'center','position':(-140,-150),'scale':0.7,'color':(0.2,0.6,0.2)})
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue