mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
1.4
This commit is contained in:
parent
1356e42baa
commit
37fa5429dc
21 changed files with 225 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python3.9
|
||||
|
||||
# Released under the MIT License. See LICENSE for details.
|
||||
#
|
||||
"""BallisticaCore server manager."""
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ max_party_size: 6
|
|||
# playlist editor in the regular version of the game.
|
||||
# This will give you a numeric code you can enter here to host that
|
||||
# playlist.
|
||||
playlist_code: 12345
|
||||
playlist_code: 345700
|
||||
|
||||
# Alternately, you can embed playlist data here instead of using codes.
|
||||
# Make sure to set session_type to the correct type for the data here.
|
||||
|
|
|
|||
4
dist/ba_root/mods/changelogs.json
vendored
4
dist/ba_root/mods/changelogs.json
vendored
|
|
@ -14,6 +14,10 @@
|
|||
"64":{
|
||||
"log":"Custom afk(idle player) remover added",
|
||||
"time":"9 Jan 2022"
|
||||
},
|
||||
"65":{
|
||||
"log":"/speed command,fireflies,3 new games,team chat,custom tag color for role,end command fix",
|
||||
"time":"30 Jan 2021"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -99,3 +99,20 @@ def Command(msg, clientid):
|
|||
return msg
|
||||
return None
|
||||
|
||||
|
||||
def QuickAccess(msg,client_id):
|
||||
if msg.startswith(","):
|
||||
acid=""
|
||||
teamid=0
|
||||
for i in _ba.get_foreground_host_session().sessionplayers:
|
||||
if i.inputdevice.client_id==client_id:
|
||||
teamid=i.sessionteam.id
|
||||
|
||||
for i in _ba.get_foreground_host_session().sessionplayers:
|
||||
if teamid==i.sessionteam.id and i.inputdevice.client_id!=client_id:
|
||||
_ba.screenmessage(i.getname(True)+":"+msg[1:],clients=[i.inputdevice.client_id],color=(0.3,0.6,0.3))
|
||||
|
||||
return None;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
from .Handlers import handlemsg, handlemsg_all
|
||||
import ba, _ba
|
||||
from tools import corelib
|
||||
|
||||
|
||||
Commands = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'spaz']
|
||||
Commands = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'spaz','speed']
|
||||
CommandAliases = ['inv', 'hl', 'creep', 'celeb']
|
||||
|
||||
|
||||
|
|
@ -22,7 +22,10 @@ def ExcelCommand(command, arguments, clientid, accountid):
|
|||
None
|
||||
"""
|
||||
|
||||
if command == 'fly':
|
||||
if command=='speed':
|
||||
speed(arguments)
|
||||
|
||||
elif command == 'fly':
|
||||
fly(arguments)
|
||||
|
||||
elif command in ['inv', 'invisible']:
|
||||
|
|
@ -41,12 +44,19 @@ def ExcelCommand(command, arguments, clientid, accountid):
|
|||
spaz(arguments)
|
||||
|
||||
|
||||
def speed(arguments):
|
||||
if arguments ==[] or arguments==['']:
|
||||
return
|
||||
else:
|
||||
corelib.set_speed(float(arguments[0]))
|
||||
|
||||
|
||||
def fly(arguments):
|
||||
|
||||
if arguments == [] or arguments == ['']:
|
||||
return
|
||||
|
||||
|
||||
elif arguments[0] == 'all':
|
||||
|
||||
activity = _ba.get_foreground_host_activity()
|
||||
|
|
|
|||
|
|
@ -124,7 +124,9 @@ def kick(arguments):
|
|||
def end(arguments):
|
||||
|
||||
if arguments == [] or arguments == ['']:
|
||||
|
||||
try:
|
||||
with _ba.Context(_ba.get_foreground_host_activity()):
|
||||
_ba.get_foreground_host_activity().end_game()
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
2
dist/ba_root/mods/chatHandle/handlechat.py
vendored
2
dist/ba_root/mods/chatHandle/handlechat.py
vendored
|
|
@ -35,6 +35,8 @@ def filter_chat_message(msg, client_id):
|
|||
if msg.startswith("/"):
|
||||
return Main.Command(msg, client_id)
|
||||
|
||||
if msg.startswith(",") and settings["allowTeamChat"]:
|
||||
return Main.QuickAccess(msg,client_id)
|
||||
|
||||
Logger.log(acid+" | "+displaystring+"|"+currentname+"| " +msg,"chat")
|
||||
|
||||
|
|
|
|||
25
dist/ba_root/mods/custom_hooks.py
vendored
25
dist/ba_root/mods/custom_hooks.py
vendored
|
|
@ -20,10 +20,13 @@ from tools import TeamBalancer
|
|||
from bastd.activity.coopscore import CoopScoreScreen
|
||||
from ba import _hooks
|
||||
from tools import Logger
|
||||
|
||||
|
||||
from playersData import pdata
|
||||
|
||||
from tools import afk_check
|
||||
# from bastd.activity.multiteamvictory import
|
||||
# from tools import fireflies
|
||||
from tools import fireflies
|
||||
settings = setting.get_settings_data()
|
||||
|
||||
def filter_chat_message(msg, client_id):
|
||||
|
|
@ -64,12 +67,10 @@ def bootstraping():
|
|||
_ba.set_kickvote_msg_type(settings["KickVoteMsgType"])
|
||||
_thread.start_new_thread(mystats.refreshStats,())
|
||||
if settings["elPatronPowerups"]["enable"]:
|
||||
from plugins import elPatronPowerups
|
||||
from tools import elPatronPowerups
|
||||
elPatronPowerups.enable()
|
||||
if settings["mikirogQuickTurn"]["enable"]:
|
||||
from plugins import wavedash
|
||||
if settings["characterChooser"]["enable"]:
|
||||
from plugins import CharacterChooser
|
||||
from tools import wavedash
|
||||
|
||||
if settings["whitelist"]:
|
||||
pdata.loadWhitelist()
|
||||
|
|
@ -81,6 +82,7 @@ def bootstraping():
|
|||
discordbot.liveChat=settings["discordbot"]["liveChat"]
|
||||
discordbot.BsDataThread()
|
||||
discordbot.init()
|
||||
importgames()
|
||||
|
||||
|
||||
|
||||
|
|
@ -128,8 +130,8 @@ def night_mode():
|
|||
|
||||
activity.globalsnode.tint = (0.5, 0.7, 1.0)
|
||||
|
||||
# if settings['autoNightMode']['fireflies']:
|
||||
# fireflies.factory()
|
||||
if settings['autoNightMode']['fireflies']:
|
||||
fireflies.factory(settings['autoNightMode']["fireflies_random_color"])
|
||||
|
||||
|
||||
|
||||
|
|
@ -160,3 +162,12 @@ _hooks.on_kicked=on_kicked
|
|||
|
||||
def on_kick_vote_end():
|
||||
Logger.log("Kick vote End")
|
||||
|
||||
|
||||
|
||||
|
||||
def importgames():
|
||||
from games import SquidRace
|
||||
from games import StumbleRace
|
||||
from games import SubwayRun
|
||||
from maps import InTheAir
|
||||
BIN
dist/ba_root/mods/games/SquidRace.so
vendored
Normal file
BIN
dist/ba_root/mods/games/SquidRace.so
vendored
Normal file
Binary file not shown.
BIN
dist/ba_root/mods/games/StumbleRace.so
vendored
Normal file
BIN
dist/ba_root/mods/games/StumbleRace.so
vendored
Normal file
Binary file not shown.
BIN
dist/ba_root/mods/games/SubwayRun.so
vendored
Normal file
BIN
dist/ba_root/mods/games/SubwayRun.so
vendored
Normal file
Binary file not shown.
BIN
dist/ba_root/mods/maps/InTheAir.so
vendored
Normal file
BIN
dist/ba_root/mods/maps/InTheAir.so
vendored
Normal file
Binary file not shown.
10
dist/ba_root/mods/setting.json
vendored
10
dist/ba_root/mods/setting.json
vendored
|
|
@ -25,7 +25,8 @@
|
|||
"enable":true,
|
||||
"startTime":"18:30",
|
||||
"endTime":"06:00",
|
||||
"fireflies":true
|
||||
"fireflies":true,
|
||||
"fireflies_random_color":false
|
||||
},
|
||||
"playlists":{
|
||||
"default":12345,
|
||||
|
|
@ -38,7 +39,6 @@
|
|||
"enable":false,
|
||||
"minPlayerToExitCoop":0
|
||||
},
|
||||
|
||||
"mikirogQuickTurn":{
|
||||
"enable":true
|
||||
},
|
||||
|
|
@ -60,9 +60,6 @@
|
|||
"Ice Man": 1,"Tank Shield": 1, "Impairment Bombs": 2,
|
||||
"Fire Bombs": 3, "Fly Bombs": 3}
|
||||
},
|
||||
"characterChooser": {
|
||||
"enable": true
|
||||
},
|
||||
"discordbot":{
|
||||
"enable":false,
|
||||
"token":"<secret-token-here>",
|
||||
|
|
@ -76,9 +73,10 @@
|
|||
"kick_idle_from_lobby":true,
|
||||
"lobby_idle_time_in_secs":10
|
||||
},
|
||||
"allowTeamChat":true,
|
||||
"sameCharacterForTeam":false,
|
||||
"newResultBoard":true,
|
||||
"HostDeviceName":"v1.3.2",
|
||||
"HostDeviceName":"v1.4",
|
||||
"HostName":"BCS",
|
||||
"ShowKickVoteStarterName":true,
|
||||
"KickVoteMsgType":"chat",
|
||||
|
|
|
|||
7
dist/ba_root/mods/spazmod/tag.py
vendored
7
dist/ba_root/mods/spazmod/tag.py
vendored
|
|
@ -16,9 +16,10 @@ def addtag(node,player):
|
|||
|
||||
if role in p_roles:
|
||||
tag=roles[role]['tag']
|
||||
col=roles[role]['tagcolor']
|
||||
break;
|
||||
if tag:
|
||||
Tag(node,tag)
|
||||
Tag(node,tag,col)
|
||||
|
||||
from stats import mystats
|
||||
def addrank(node,player):
|
||||
|
|
@ -37,7 +38,7 @@ def addhp(node):
|
|||
if hp: t = ba.Timer(100,ba.Call(showHP),repeat = True, timetype=ba.TimeType.SIM, timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
|
||||
class Tag(object):
|
||||
def __init__(self,owner=None,tag="somthing"):
|
||||
def __init__(self,owner=None,tag="somthing",col=(1,1,1)):
|
||||
self.node=owner
|
||||
mnode = ba.newnode('math',
|
||||
owner=self.node,
|
||||
|
|
@ -72,7 +73,7 @@ class Tag(object):
|
|||
'in_world': True,
|
||||
'shadow': 1.0,
|
||||
'flatness': 1.0,
|
||||
'color': (1,0.6,0.7),
|
||||
'color': tuple(col),
|
||||
'scale': 0.01,
|
||||
'h_align': 'center'
|
||||
})
|
||||
|
|
|
|||
10
dist/ba_root/mods/stats/stats.json
vendored
10
dist/ba_root/mods/stats/stats.json
vendored
|
|
@ -842,13 +842,13 @@
|
|||
"pb-IF5XUm9eAg==": {
|
||||
"rank": 1,
|
||||
"name": "\ue030PC402015",
|
||||
"scores": 2105,
|
||||
"scores": 2167,
|
||||
"total_damage": 0.0,
|
||||
"kills": 8,
|
||||
"deaths": 172,
|
||||
"games": 134,
|
||||
"kd": 0.046,
|
||||
"avg_score": 15.708,
|
||||
"deaths": 193,
|
||||
"games": 136,
|
||||
"kd": 0.041,
|
||||
"avg_score": 15.933,
|
||||
"aid": "pb-IF5XUm9eAg=="
|
||||
}
|
||||
}
|
||||
6
dist/ba_root/mods/stats/stats_page.html
vendored
6
dist/ba_root/mods/stats/stats_page.html
vendored
|
|
@ -20,10 +20,10 @@
|
|||
<tr>
|
||||
<td>1</td>
|
||||
<td style="text-align:center">PC402015</td>
|
||||
<td>2105</td>
|
||||
<td>2167</td>
|
||||
<td>8</td>
|
||||
<td>172</td>
|
||||
<td>134</td>
|
||||
<td>193</td>
|
||||
<td>136</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
|
|
|
|||
2
dist/ba_root/mods/tools/ServerUpdate.py
vendored
2
dist/ba_root/mods/tools/ServerUpdate.py
vendored
|
|
@ -4,7 +4,7 @@ import _thread
|
|||
import urllib.request
|
||||
from efro.terminal import Clr
|
||||
import json
|
||||
VERSION=64
|
||||
VERSION=65
|
||||
|
||||
def check():
|
||||
_thread.start_new_thread(updateProfilesJson,())
|
||||
|
|
|
|||
BIN
dist/ba_root/mods/tools/corelib.so
vendored
Normal file
BIN
dist/ba_root/mods/tools/corelib.so
vendored
Normal file
Binary file not shown.
23
dist/ba_root/mods/tools/elPatronPowerups.py
vendored
Normal file
23
dist/ba_root/mods/tools/elPatronPowerups.py
vendored
Normal file
File diff suppressed because one or more lines are too long
124
dist/ba_root/mods/tools/wavedash.py
vendored
Normal file
124
dist/ba_root/mods/tools/wavedash.py
vendored
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
"""Wavedash by TheMikirog
|
||||
|
||||
This is an early version of the plugin. Feedback appreciated!
|
||||
|
||||
"""
|
||||
|
||||
# ba_meta require api 6
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import ba
|
||||
import math
|
||||
import bastd
|
||||
from bastd.actor.spaz import Spaz
|
||||
|
||||
if TYPE_CHECKING:
|
||||
pass
|
||||
|
||||
# ba_meta export plugin
|
||||
class MikiWavedashTest(ba.Plugin):
|
||||
|
||||
|
||||
class FootConnectMessage:
|
||||
"""Spaz started touching the ground"""
|
||||
|
||||
class FootDisconnectMessage:
|
||||
"""Spaz stopped touching the ground"""
|
||||
|
||||
def wavedash(self) -> None:
|
||||
if not self.node:
|
||||
return
|
||||
|
||||
isMoving = abs(self.node.move_up_down) >= 0.5 or abs(self.node.move_left_right) >= 0.5
|
||||
|
||||
if self._dead or not self.grounded or not isMoving:
|
||||
return
|
||||
|
||||
if self.node.knockout > 0.0 or self.frozen or self.node.hold_node:
|
||||
return
|
||||
|
||||
t_ms = ba.time(timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
assert isinstance(t_ms, int)
|
||||
|
||||
if t_ms - self.last_wavedash_time_ms >= self._wavedash_cooldown:
|
||||
|
||||
move = [self.node.move_left_right, -self.node.move_up_down]
|
||||
vel = [self.node.velocity[0], self.node.velocity[2]]
|
||||
|
||||
move_length = math.hypot(move[0], move[1])
|
||||
vel_length = math.hypot(vel[0], vel[1])
|
||||
if vel_length < 1.25: return
|
||||
move_norm = [m/move_length for m in move]
|
||||
vel_norm = [v/vel_length for v in vel]
|
||||
dot = sum(x*y for x,y in zip(move_norm,vel_norm))
|
||||
turn_power = min(round(math.acos(dot) / math.pi,2)*1.3,1)
|
||||
if turn_power < 0.2: return
|
||||
|
||||
boost_power = math.sqrt(math.pow(vel[0],2) + math.pow(vel[1],2)) * 1.2
|
||||
boost_power = min(pow(boost_power,4),160)
|
||||
#print(boost_power * turn_power)
|
||||
|
||||
self.last_wavedash_time_ms = t_ms
|
||||
|
||||
# FX
|
||||
ba.emitfx(position=self.node.position,
|
||||
velocity=(vel[0]*0.5,-1,vel[1]*0.5),
|
||||
chunk_type='sweat',
|
||||
count=8,
|
||||
scale=boost_power / 160 * turn_power,
|
||||
spread=0.25);
|
||||
|
||||
# Boost itself
|
||||
pos = self.node.position
|
||||
for i in range(6):
|
||||
self.node.handlemessage('impulse',pos[0],-0.1+pos[1]+i*0.1,pos[2],
|
||||
0,0,0,
|
||||
boost_power * turn_power,
|
||||
boost_power * turn_power,0,0,
|
||||
move[0],0,move[1])
|
||||
|
||||
def new_spaz_init(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
||||
func(*args, **kwargs)
|
||||
|
||||
# args[0] = self
|
||||
args[0]._wavedash_cooldown = 30
|
||||
args[0].last_wavedash_time_ms = -9999
|
||||
args[0].grounded = 0
|
||||
|
||||
return wrapper
|
||||
bastd.actor.spaz.Spaz.__init__ = new_spaz_init(bastd.actor.spaz.Spaz.__init__)
|
||||
|
||||
def new_factory(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
func(*args, **kwargs)
|
||||
|
||||
args[0].roller_material.add_actions(
|
||||
conditions=('they_have_material', bastd.gameutils.SharedObjects.get().footing_material),
|
||||
actions=(('message', 'our_node', 'at_connect', MikiWavedashTest.FootConnectMessage),
|
||||
('message', 'our_node', 'at_disconnect', MikiWavedashTest.FootDisconnectMessage)))
|
||||
return wrapper
|
||||
bastd.actor.spazfactory.SpazFactory.__init__ = new_factory(bastd.actor.spazfactory.SpazFactory.__init__)
|
||||
|
||||
def new_handlemessage(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
if args[1] == MikiWavedashTest.FootConnectMessage:
|
||||
args[0].grounded += 1
|
||||
elif args[1] == MikiWavedashTest.FootDisconnectMessage:
|
||||
if args[0].grounded > 0: args[0].grounded -= 1
|
||||
|
||||
func(*args, **kwargs)
|
||||
return wrapper
|
||||
bastd.actor.spaz.Spaz.handlemessage = new_handlemessage(bastd.actor.spaz.Spaz.handlemessage)
|
||||
|
||||
def new_on_run(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
if args[0]._last_run_value < args[1] and args[1] > 0.8:
|
||||
MikiWavedashTest.wavedash(args[0])
|
||||
func(*args, **kwargs)
|
||||
return wrapper
|
||||
bastd.actor.spaz.Spaz.on_run = new_on_run(bastd.actor.spaz.Spaz.on_run)
|
||||
BIN
dist/bombsquad_headless
vendored
BIN
dist/bombsquad_headless
vendored
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue