From 541849642c61e562579c71dee4bc936be60fee1a Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Wed, 12 Jul 2023 20:56:14 +0300 Subject: [PATCH] BEAMP -> BeamMP --- docs/ru/multilanguage/example.json | 6 +++--- docs/ru/setup/readme.md | 4 ++-- src/core/__init__.py | 8 ++++---- src/core/core.py | 6 +++--- src/core/core.pyi | 2 +- src/modules/EventsSystem/events_system.py | 2 +- src/modules/PluginsLoader/plugins_loader.py | 4 ++-- src/modules/i18n/files/ru.json | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/ru/multilanguage/example.json b/docs/ru/multilanguage/example.json index c8e30a8..294f44a 100644 --- a/docs/ru/multilanguage/example.json +++ b/docs/ru/multilanguage/example.json @@ -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Используй эту ссылку: {}", diff --git a/docs/ru/setup/readme.md b/docs/ru/setup/readme.md index 654b3a3..45b1ed2 100644 --- a/docs/ru/setup/readme.md +++ b/docs/ru/setup/readme.md @@ -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) diff --git a/src/core/__init__.py b/src/core/__init__.py index 3c93bea..57489f0 100644 --- a/src/core/__init__.py +++ b/src/core/__init__.py @@ -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() diff --git a/src/core/core.py b/src/core/core.py index 0155a6c..a8f5d37 100644 --- a/src/core/core.py +++ b/src/core/core.py @@ -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} diff --git a/src/core/core.pyi b/src/core/core.pyi index 0d1509d..ffbc114 100644 --- a/src/core/core.pyi +++ b/src/core/core.pyi @@ -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: ... diff --git a/src/modules/EventsSystem/events_system.py b/src/modules/EventsSystem/events_system.py index f62decc..78f2a59 100644 --- a/src/modules/EventsSystem/events_system.py +++ b/src/modules/EventsSystem/events_system.py @@ -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]}) diff --git a/src/modules/PluginsLoader/plugins_loader.py b/src/modules/PluginsLoader/plugins_loader.py index a5fd72b..a32fd00 100644 --- a/src/modules/PluginsLoader/plugins_loader.py +++ b/src/modules/PluginsLoader/plugins_loader.py @@ -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}) diff --git a/src/modules/i18n/files/ru.json b/src/modules/i18n/files/ru.json index c8e30a8..294f44a 100644 --- a/src/modules/i18n/files/ru.json +++ b/src/modules/i18n/files/ru.json @@ -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Используй эту ссылку: {}",