diff --git a/electron_wegame/wegame.js b/electron_wegame/wegame.js index 17072aa3..05a0e186 100644 --- a/electron_wegame/wegame.js +++ b/electron_wegame/wegame.js @@ -1,5 +1,5 @@ const railsdk = require("./wegame_sdk/railsdk.js"); -const { dialog, remote, ipcMain } = require("electron"); +const { dialog, app, remote, ipcMain } = require("electron"); function init(isDev) { console.log("Step 1: wegame: init"); @@ -39,7 +39,7 @@ function init(isDev) { event.state === railsdk.RailSystemState.kSystemStatePlatformExit || event.state === railsdk.RailSystemState.kSystemStateGameExitByAntiAddiction ) { - remote.app.exit(); + app.exit(); } } }); @@ -48,9 +48,12 @@ function init(isDev) { function listen() { console.log("wegame: listen"); ipcMain.handle("profanity-check", async (event, data) => { + if (data.length === 0) { + return ""; + } const result = railsdk.RailUtils.DirtyWordsFilter(data, true); if (result.check_result.dirty_type !== 0 /** kRailDirtyWordsTypeNormalAllowWords */) { - return result.check_result; + return result.check_result.replace_string; } return data; diff --git a/translations/base-ru.yaml b/translations/base-ru.yaml index 3661be37..7160808d 100644 --- a/translations/base-ru.yaml +++ b/translations/base-ru.yaml @@ -1108,10 +1108,10 @@ keybindings: placementDisableAutoOrientation: Отключить автоопределение направления placeMultiple: Оставаться в режиме размещения placeInverse: Инвертировать автоопределение направления конвейеров - constant_producer: Constant Producer - goal_acceptor: Goal Acceptor - block: Block - massSelectClear: Clear belts + constant_producer: Постоянный генератор + goal_acceptor: Приёмник предметов + block: Блок + massSelectClear: Очистить конвейеры about: title: Об игре body: >- @@ -1245,11 +1245,11 @@ puzzleMenu: постоянные производители не доставляют фигуры напрямую приемникам цели. difficulties: - easy: Лего + easy: Легко medium: Средне hard: Сложно - dlcHint: Purchased the DLC already? Make sure it is activated by right clicking - shapez.io in your library, selecting Properties > DLCs. + dlcHint: Уже купили DLC? Проверьте, что оно активировано, нажав правый клик на + shapez.io в своей библиотеке, и далее Свойства > Доп. Контент backendErrors: ratelimit: Вы слишком часто выполняете свои действия. Подождите немного. invalid-api-key: Не удалось связаться с сервером, попробуйте diff --git a/version b/version index c9929e36..3c80e4f0 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.4.2 \ No newline at end of file +1.4.3 \ No newline at end of file