mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
fixed end, nv n tint cmd
This commit is contained in:
parent
2a07c0c840
commit
88129dc7a8
1 changed files with 104 additions and 140 deletions
|
|
@ -41,108 +41,81 @@ def ExcelCommand(command, arguments, clientid, accountid):
|
||||||
Returns:
|
Returns:
|
||||||
None
|
None
|
||||||
"""
|
"""
|
||||||
if command in ['recents']:
|
match command:
|
||||||
|
case 'recents':
|
||||||
get_recents(clientid)
|
get_recents(clientid)
|
||||||
if command in ['info']:
|
case 'info':
|
||||||
get_player_info(arguments, clientid)
|
get_player_info(arguments, clientid)
|
||||||
if command in ['maxplayers', 'max']:
|
case 'maxplayers' | 'max':
|
||||||
changepartysize(arguments)
|
changepartysize(arguments)
|
||||||
if command in ['createteam']:
|
case 'createteam':
|
||||||
create_team(arguments)
|
create_team(arguments)
|
||||||
elif command == 'playlist':
|
case 'playlist':
|
||||||
changeplaylist(arguments)
|
changeplaylist(arguments)
|
||||||
elif command == 'kick':
|
case 'kick':
|
||||||
kick(arguments)
|
kick(arguments)
|
||||||
elif command == 'ban':
|
case 'ban':
|
||||||
ban(arguments)
|
ban(arguments)
|
||||||
elif command in ['end', 'next']:
|
case 'end' | 'next':
|
||||||
end(arguments)
|
end(arguments)
|
||||||
elif command == 'kickvote':
|
case 'kickvote':
|
||||||
kikvote(arguments, clientid)
|
kikvote(arguments, clientid)
|
||||||
elif command == 'hideid':
|
case 'hideid':
|
||||||
hide_player_spec()
|
hide_player_spec()
|
||||||
elif command == "showid":
|
case 'showid':
|
||||||
show_player_spec()
|
show_player_spec()
|
||||||
elif command == 'lm':
|
case 'lm':
|
||||||
last_msgs(clientid)
|
last_msgs(clientid)
|
||||||
|
case 'gp':
|
||||||
elif command == 'gp':
|
|
||||||
get_profiles(arguments, clientid)
|
get_profiles(arguments, clientid)
|
||||||
|
case 'party':
|
||||||
elif command == 'party':
|
|
||||||
party_toggle(arguments)
|
party_toggle(arguments)
|
||||||
|
case 'quit' | 'restart':
|
||||||
elif command in ['quit', 'restart']:
|
|
||||||
quit(arguments)
|
quit(arguments)
|
||||||
|
case 'mute' | 'mutechat':
|
||||||
elif command in ['mute', 'mutechat']:
|
|
||||||
mute(arguments)
|
mute(arguments)
|
||||||
|
case 'unmute' | 'unmutechat':
|
||||||
elif command in ['unmute', 'unmutechat']:
|
|
||||||
un_mute(arguments)
|
un_mute(arguments)
|
||||||
|
case 'remove' | 'rm':
|
||||||
elif command in ['remove', 'rm']:
|
|
||||||
remove(arguments)
|
remove(arguments)
|
||||||
|
case 'sm' | 'slow' | 'slowmo':
|
||||||
elif command in ['sm', 'slow', 'slowmo']:
|
|
||||||
slow_motion()
|
slow_motion()
|
||||||
|
case 'nv' | 'night':
|
||||||
elif command in ['nv', 'night']:
|
|
||||||
nv(arguments)
|
nv(arguments)
|
||||||
|
case 'tint':
|
||||||
elif command in ['dv', 'day']:
|
|
||||||
dv(arguments)
|
|
||||||
|
|
||||||
elif command == 'tint':
|
|
||||||
tint(arguments)
|
tint(arguments)
|
||||||
|
case 'pause' | 'pausegame':
|
||||||
elif command in ['pause', 'pausegame']:
|
|
||||||
pause()
|
pause()
|
||||||
|
case 'cameraMode' | 'camera_mode' | 'rotate_camera':
|
||||||
elif command in ['cameraMode', 'camera_mode', 'rotate_camera']:
|
|
||||||
rotate_camera()
|
rotate_camera()
|
||||||
|
case 'createrole':
|
||||||
elif command == 'createrole':
|
|
||||||
create_role(arguments)
|
create_role(arguments)
|
||||||
|
case 'addrole':
|
||||||
elif command == 'addrole':
|
|
||||||
add_role_to_player(arguments)
|
add_role_to_player(arguments)
|
||||||
|
case 'removerole':
|
||||||
elif command == 'removerole':
|
|
||||||
remove_role_from_player(arguments)
|
remove_role_from_player(arguments)
|
||||||
|
case 'getroles':
|
||||||
elif command == 'getroles':
|
|
||||||
get_roles_of_player(arguments, clientid)
|
get_roles_of_player(arguments, clientid)
|
||||||
|
case 'addcommand' | 'addcmd':
|
||||||
elif command in ['addcommand', 'addcmd']:
|
|
||||||
add_command_to_role(arguments)
|
add_command_to_role(arguments)
|
||||||
|
case 'removecommand' | 'removecmd':
|
||||||
elif command in ['removecommand', 'removecmd']:
|
|
||||||
remove_command_to_role(arguments)
|
remove_command_to_role(arguments)
|
||||||
|
case 'changetag':
|
||||||
elif command == 'changetag':
|
|
||||||
change_role_tag(arguments)
|
change_role_tag(arguments)
|
||||||
|
case 'customtag':
|
||||||
elif command == 'customtag':
|
|
||||||
set_custom_tag(arguments)
|
set_custom_tag(arguments)
|
||||||
|
case 'customeffect' | 'effect':
|
||||||
elif command in ['customeffect', 'effect']:
|
|
||||||
set_custom_effect(arguments)
|
set_custom_effect(arguments)
|
||||||
|
case 'removetag':
|
||||||
elif command in ['removetag']:
|
|
||||||
remove_custom_tag(arguments)
|
remove_custom_tag(arguments)
|
||||||
|
case 'removeeffect':
|
||||||
elif command in ['removeeffect']:
|
|
||||||
remove_custom_effect(arguments)
|
remove_custom_effect(arguments)
|
||||||
|
case 'spectators':
|
||||||
# elif command in ['add', 'whitelist']:
|
|
||||||
# whitelst_it(accountid, arguments)
|
|
||||||
|
|
||||||
elif command == 'spectators':
|
|
||||||
spectators(arguments)
|
spectators(arguments)
|
||||||
|
case 'lobbytime':
|
||||||
elif command == 'lobbytime':
|
|
||||||
change_lobby_check_time(arguments)
|
change_lobby_check_time(arguments)
|
||||||
|
case _:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def create_team(arguments):
|
def create_team(arguments):
|
||||||
|
|
@ -287,8 +260,9 @@ def party_toggle(arguments):
|
||||||
def end(arguments):
|
def end(arguments):
|
||||||
if arguments == [] or arguments == ['']:
|
if arguments == [] or arguments == ['']:
|
||||||
try:
|
try:
|
||||||
with _babase.Context(_babase.get_foreground_host_activity()):
|
game = bs.get_foreground_host_activity()
|
||||||
_babase.get_foreground_host_activity().end_game()
|
with game.context:
|
||||||
|
game.end_game()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -389,49 +363,39 @@ def slow_motion():
|
||||||
|
|
||||||
|
|
||||||
def nv(arguments):
|
def nv(arguments):
|
||||||
activity = _babase.get_foreground_host_activity()
|
def is_close(a, b, tol=1e-5):
|
||||||
|
return all(abs(x - y) < tol for x, y in zip(a, b))
|
||||||
|
|
||||||
if arguments == [] or arguments == ['']:
|
try:
|
||||||
|
activity = bs.get_foreground_host_activity()
|
||||||
|
nv_tint = (0.5, 0.5, 1.0)
|
||||||
|
nv_ambient = (1.5, 1.5, 1.5)
|
||||||
|
|
||||||
if activity.globalsnode.tint != (0.5, 0.7, 1.0):
|
if is_close(activity.globalsnode.tint, nv_tint):
|
||||||
activity.globalsnode.tint = (0.5, 0.7, 1.0)
|
|
||||||
else:
|
|
||||||
# will fix this soon
|
|
||||||
pass
|
|
||||||
|
|
||||||
elif arguments[0] == 'off':
|
|
||||||
if activity.globalsnode.tint != (0.5, 0.7, 1.0):
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def dv(arguments):
|
|
||||||
activity = _babase.get_foreground_host_activity()
|
|
||||||
|
|
||||||
if arguments == [] or arguments == ['']:
|
|
||||||
|
|
||||||
if activity.globalsnode.tint != (1, 1, 1):
|
|
||||||
activity.globalsnode.tint = (1, 1, 1)
|
activity.globalsnode.tint = (1, 1, 1)
|
||||||
|
#adding ambient color to imitate moonlight reflection on objects
|
||||||
|
activity.globalsnode.ambient_color = (1, 1, 1)
|
||||||
|
#print(activity.globalsnode.tint)
|
||||||
else:
|
else:
|
||||||
# will fix this soon
|
activity.globalsnode.tint = nv_tint
|
||||||
pass
|
activity.globalsnode.ambient_color = nv_ambient
|
||||||
|
#print(activity.globalsnode.tint)
|
||||||
elif arguments[0] == 'off':
|
except:
|
||||||
if activity.globalsnode.tint != (1, 1, 1):
|
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def tint(arguments):
|
def tint(arguments):
|
||||||
|
print(len(arguments))
|
||||||
activity = _babase.get_foreground_host_activity()
|
|
||||||
|
|
||||||
if len(arguments) == 3:
|
if len(arguments) == 3:
|
||||||
if all(isinstance(val, (int, float)) for val in arguments):
|
args = arguments
|
||||||
activity.globalsnode.tint = (
|
r, g, b = float(args[0]), float(args[1]), float(args[2])
|
||||||
arguments[0], arguments[1], arguments[2])
|
try:
|
||||||
|
# print(dir(activity.globalsnode))
|
||||||
|
print(r, g, b)
|
||||||
|
activity = bs.get_foreground_host_activity()
|
||||||
|
activity.globalsnode.tint = (r, g, b)
|
||||||
|
except:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def pause():
|
def pause():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue