BEAMP -> BeamMP

This commit is contained in:
2023-07-12 20:56:14 +03:00
parent f364f29d79
commit 541849642c
8 changed files with 19 additions and 19 deletions

View File

@@ -7,8 +7,8 @@
"stop": "Сервер остановлен!",
"": "Server auth",
"auth_need_key": "Нужен BEAMP ключ для запуска!",
"auth_empty_key": "BEAMP ключ пустой!",
"auth_need_key": "Нужен BeamMP ключ для запуска!",
"auth_empty_key": "BeamMP ключ пустой!",
"auth_cannot_open_browser": "Не получилось открыть браузер: {}",
"auth_use_link": "Используй эту ссылку: {}",
@@ -17,7 +17,7 @@
"GUI_no": "Нет",
"GUI_ok": "Окей",
"GUI_cancel": "Отмена",
"GUI_need_key_message": "Нужен BEAMP ключ для запуска!\nХотите открыть ссылку в браузере для получения ключа?",
"GUI_need_key_message": "Нужен BeamMP ключ для запуска!\nХотите открыть ссылку в браузере для получения ключа?",
"GUI_enter_key_message": "Пожалуйста введите ключ:",
"GUI_cannot_open_browser": "Не получилось открыть браузер.\nИспользуй эту ссылку: {}",

View File

@@ -43,7 +43,7 @@ Server:
server_ip: 0.0.0.0
server_port: 30814
```
* Если поставить `private: false` и не установить `key`, то сервер запросит BEAMP ключ, без него не запустится.
* Введя BEAMP ключ сервер появится в списке лаунчера.
* Если поставить `private: false` и не установить `key`, то сервер запросит BeamMP ключ, без него не запустится.
* Введя BeamMP ключ сервер появится в списке лаунчера.
* Взять ключ можно тут: [https://beammp.com/k/keys](https://beammp.com/k/keys)

View File

@@ -67,13 +67,13 @@ ev.builtins_hook()
log.info(i18n.hello)
log.info(i18n.config_path.format(config_path))
log.debug("Initializing BEAMP Server system...")
log.debug("Initializing BeamMP Server system...")
# Key handler..
if not config.Auth['private'] and not config.Auth['key']:
log.warn(i18n.auth_need_key)
url = "https://beammp.com/k/keys"
if shortcuts.yes_no_dialog(
title='BEAMP Server Key',
title='BeamMP Server Key',
text=i18n.GUI_need_key_message,
yes_text=i18n.GUI_yes,
no_text=i18n.GUI_no).run():
@@ -84,12 +84,12 @@ if not config.Auth['private'] and not config.Auth['key']:
log.error(i18n.auth_cannot_open_browser.format(e))
log.info(i18n.auth_use_link.format(url))
shortcuts.message_dialog(
title='BEAMP Server Key',
title='BeamMP Server Key',
text=i18n.GUI_cannot_open_browser.format(url),
ok_text=i18n.GUI_ok).run()
config.Auth['key'] = shortcuts.input_dialog(
title='BEAMP Server Key',
title='BeamMP Server Key',
text=i18n.GUI_enter_key_message,
ok_text=i18n.GUI_ok,
cancel_text=i18n.GUI_cancel).run()

View File

@@ -61,7 +61,7 @@ class Client:
async def tcp_send(self, data):
# TNetwork.cpp; Line: 383
# BEAMP TCP protocol sends a header of 4 bytes, followed by the data.
# BeamMP TCP protocol sends a header of 4 bytes, followed by the data.
# [][][][][][]...[]
# ^------^^---...-^
# size data
@@ -160,7 +160,7 @@ class Core:
self.web_stop = None
self.client_major_version = "2.0"
self.BEAMP_version = "3.2.0"
self.BeamMP_version = "3.2.0"
def get_client(self, sock=None, cid=None):
if cid:
@@ -224,7 +224,7 @@ class Core:
while self.run:
data = {"uuid": config.Auth["key"], "players": len(self.clients), "maxplayers": config.Game["players"],
"port": config.Server["server_port"], "map": f"/levels/{config.Game['map']}/info.json",
"private": config.Auth['private'], "version": self.BEAMP_version,
"private": config.Auth['private'], "version": self.BeamMP_version,
"clientversion": self.client_major_version,
"name": config.Server["name"], "modlist": modlist, "modstotalsize": modstotalsize,
"modstotal": modstotal, "playerslist": "", "desc": config.Server['description'], "pass": False}

View File

@@ -55,7 +55,7 @@ class Core:
self.web_thread: Thread = None
self.web_stop: Callable = lambda: None
self.client_major_version = "2.0"
self.BEAMP_version = "3.2.0"
self.BeamMP_version = "3.2.0"
def insert_client(self, client: Client) -> None: ...
def create_client(self, *args, **kwargs) -> Client: ...
async def check_alive(self) -> None: ...

View File

@@ -21,7 +21,7 @@ class EventsSystem:
self.log.debug(f"register_event({event_name}, {event_func}):")
if not callable(event_func):
self.log.error(f"Cannot add event '{event_name}'. "
f"Use `BEAMP.add_event({event_name}', function)` instead. Skipping it...")
f"Use `KuiToi.add_event({event_name}', function)` instead. Skipping it...")
return
if event_name not in self.__events:
self.__events.update({str(event_name): [event_func]})

View File

@@ -8,7 +8,7 @@ class KuiToi:
def __init__(self, name=None):
if name is None:
raise Exception("BEAMP: Name is required")
raise Exception("BeamMP: Name is required")
self.log = get_logger(f"PluginsLoader | {name}")
self.name = name
@@ -43,7 +43,7 @@ class PluginsLoader:
plugin.print = print
file = os.path.join(self.__plugins_dir, file)
with open(f'{file}', 'r') as f:
code = f.read().replace("import BEAMP\n", "")
code = f.read().replace("import KuiToi\n", "")
exec(code, plugin.__dict__)
plugin.load()
self.__plugins.update({file[:-3]: plugin})

View File

@@ -7,8 +7,8 @@
"stop": "Сервер остановлен!",
"": "Server auth",
"auth_need_key": "Нужен BEAMP ключ для запуска!",
"auth_empty_key": "BEAMP ключ пустой!",
"auth_need_key": "Нужен BeamMP ключ для запуска!",
"auth_empty_key": "BeamMP ключ пустой!",
"auth_cannot_open_browser": "Не получилось открыть браузер: {}",
"auth_use_link": "Используй эту ссылку: {}",
@@ -17,7 +17,7 @@
"GUI_no": "Нет",
"GUI_ok": "Окей",
"GUI_cancel": "Отмена",
"GUI_need_key_message": "Нужен BEAMP ключ для запуска!\nХотите открыть ссылку в браузере для получения ключа?",
"GUI_need_key_message": "Нужен BeamMP ключ для запуска!\nХотите открыть ссылку в браузере для получения ключа?",
"GUI_enter_key_message": "Пожалуйста введите ключ:",
"GUI_cannot_open_browser": "Не получилось открыть браузер.\nИспользуй эту ссылку: {}",