mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
1.7.13 , client_ping, player account privacy added
added _ba.get_client_ping(113) and _ba.hide_player_device_id(True) . to hide players device id from roster of clients.
This commit is contained in:
parent
59730e19b3
commit
e5034cbb6f
282 changed files with 35005 additions and 23205 deletions
15
dist/ba_data/python/efro/terminal.py
vendored
15
dist/ba_data/python/efro/terminal.py
vendored
|
|
@ -95,6 +95,7 @@ def _windows_enable_color() -> bool:
|
|||
import msvcrt
|
||||
import ctypes
|
||||
from ctypes import wintypes
|
||||
|
||||
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) # type: ignore
|
||||
|
||||
ERROR_INVALID_PARAMETER = 0x0057
|
||||
|
|
@ -111,7 +112,7 @@ def _windows_enable_color() -> bool:
|
|||
kernel32.SetConsoleMode.errcheck = _check_bool
|
||||
kernel32.SetConsoleMode.argtypes = (wintypes.HANDLE, wintypes.DWORD)
|
||||
|
||||
def set_conout_mode(new_mode: int, mask: int = 0xffffffff) -> int:
|
||||
def set_conout_mode(new_mode: int, mask: int = 0xFFFFFFFF) -> int:
|
||||
# don't assume StandardOutput is a console.
|
||||
# open CONOUT$ instead
|
||||
fdout = os.open('CONOUT$', os.O_RDWR)
|
||||
|
|
@ -146,6 +147,7 @@ def _windows_enable_color() -> bool:
|
|||
|
||||
class ClrBase:
|
||||
"""Base class for color convenience class."""
|
||||
|
||||
RST: ClassVar[str]
|
||||
BLD: ClassVar[str]
|
||||
UND: ClassVar[str]
|
||||
|
|
@ -198,6 +200,7 @@ class ClrAlways(ClrBase):
|
|||
This version has colors always enabled. Generally you should use Clr which
|
||||
points to the correct enabled/disabled class depending on the environment.
|
||||
"""
|
||||
|
||||
color_enabled = True
|
||||
|
||||
# Styles
|
||||
|
|
@ -253,6 +256,7 @@ class ClrNever(ClrBase):
|
|||
This version has colors disabled. Generally you should use Clr which
|
||||
points to the correct enabled/disabled class depending on the environment.
|
||||
"""
|
||||
|
||||
color_enabled = False
|
||||
|
||||
# Styles
|
||||
|
|
@ -303,8 +307,13 @@ class ClrNever(ClrBase):
|
|||
|
||||
|
||||
_envval = os.environ.get('EFRO_TERMCOLORS')
|
||||
_color_enabled: bool = (True if _envval == '1' else
|
||||
False if _envval == '0' else _default_color_enabled())
|
||||
_color_enabled: bool = (
|
||||
True
|
||||
if _envval == '1'
|
||||
else False
|
||||
if _envval == '0'
|
||||
else _default_color_enabled()
|
||||
)
|
||||
Clr: type[ClrBase]
|
||||
if _color_enabled:
|
||||
Clr = ClrAlways
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue