mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-28 01:01:45 -03:00
v2.4.5: Add multi-instance setting for mod developers
Allow running multiple game clients simultaneously via a new "Allow multiple game instances" toggle in Settings. When enabled, skips the Electron single-instance lock and the pre-launch process kill, so existing game instances stay alive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -592,6 +592,18 @@
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="settings-option">
|
||||
<label class="settings-checkbox">
|
||||
<input type="checkbox" id="allowMultiInstanceCheck" />
|
||||
<span class="checkmark"></span>
|
||||
<div class="checkbox-content">
|
||||
<div class="checkbox-title" data-i18n="settings.allowMultiInstance">Allow multiple game instances</div>
|
||||
<div class="checkbox-description" data-i18n="settings.allowMultiInstanceDescription">
|
||||
Allow running multiple game clients at the same time (useful for mod development)
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="settings-option">
|
||||
<label class="settings-checkbox">
|
||||
<input type="checkbox" id="launcherHwAccelCheck" />
|
||||
|
||||
@@ -6,6 +6,7 @@ let browseJavaBtn;
|
||||
let settingsPlayerName;
|
||||
let discordRPCCheck;
|
||||
let closeLauncherCheck;
|
||||
let allowMultiInstanceCheck;
|
||||
let launcherHwAccelCheck;
|
||||
let gpuPreferenceRadios;
|
||||
let gameBranchRadios;
|
||||
@@ -171,6 +172,7 @@ function setupSettingsElements() {
|
||||
settingsPlayerName = document.getElementById('settingsPlayerName');
|
||||
discordRPCCheck = document.getElementById('discordRPCCheck');
|
||||
closeLauncherCheck = document.getElementById('closeLauncherCheck');
|
||||
allowMultiInstanceCheck = document.getElementById('allowMultiInstanceCheck');
|
||||
launcherHwAccelCheck = document.getElementById('launcherHwAccelCheck');
|
||||
gpuPreferenceRadios = document.querySelectorAll('input[name="gpuPreference"]');
|
||||
gameBranchRadios = document.querySelectorAll('input[name="gameBranch"]');
|
||||
@@ -218,6 +220,10 @@ function setupSettingsElements() {
|
||||
closeLauncherCheck.addEventListener('change', saveCloseLauncher);
|
||||
}
|
||||
|
||||
if (allowMultiInstanceCheck) {
|
||||
allowMultiInstanceCheck.addEventListener('change', saveAllowMultiInstance);
|
||||
}
|
||||
|
||||
if (launcherHwAccelCheck) {
|
||||
launcherHwAccelCheck.addEventListener('change', saveLauncherHwAccel);
|
||||
}
|
||||
@@ -415,6 +421,30 @@ async function loadCloseLauncher() {
|
||||
}
|
||||
}
|
||||
|
||||
async function saveAllowMultiInstance() {
|
||||
try {
|
||||
if (window.electronAPI && window.electronAPI.saveAllowMultiInstance && allowMultiInstanceCheck) {
|
||||
const enabled = allowMultiInstanceCheck.checked;
|
||||
await window.electronAPI.saveAllowMultiInstance(enabled);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error saving multi-instance setting:', error);
|
||||
}
|
||||
}
|
||||
|
||||
async function loadAllowMultiInstance() {
|
||||
try {
|
||||
if (window.electronAPI && window.electronAPI.loadAllowMultiInstance) {
|
||||
const enabled = await window.electronAPI.loadAllowMultiInstance();
|
||||
if (allowMultiInstanceCheck) {
|
||||
allowMultiInstanceCheck.checked = enabled;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error loading multi-instance setting:', error);
|
||||
}
|
||||
}
|
||||
|
||||
async function saveLauncherHwAccel() {
|
||||
try {
|
||||
if (window.electronAPI && window.electronAPI.saveLauncherHardwareAcceleration && launcherHwAccelCheck) {
|
||||
@@ -587,6 +617,7 @@ async function loadAllSettings() {
|
||||
await loadCurrentUuid();
|
||||
await loadDiscordRPC();
|
||||
await loadCloseLauncher();
|
||||
await loadAllowMultiInstance();
|
||||
await loadLauncherHwAccel();
|
||||
await loadGpuPreference();
|
||||
await loadVersionBranch();
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "سلوك المشغل",
|
||||
"closeOnStart": "إغلاق المشغل عند بدء اللعبة",
|
||||
"closeOnStartDescription": "إغلاق المشغل تلقائياً بعد تشغيل Hytale",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "تسريع الأجهزة (Hardware Acceleration)",
|
||||
"hwAccelDescription": "تفعيل تسريع الأجهزة للمشغل",
|
||||
"gameBranch": "فرع اللعبة",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Launcher-Verhalten",
|
||||
"closeOnStart": "Launcher beim Spielstart schließen",
|
||||
"closeOnStartDescription": "Schließe den Launcher automatisch, nachdem Hytale gestartet wurde",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Hardware-Beschleunigung",
|
||||
"hwAccelDescription": "Hardware-Beschleunigung für den Launcher aktivieren",
|
||||
"gameBranch": "Spiel-Branch",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Launcher Behavior",
|
||||
"closeOnStart": "Close Launcher on game start",
|
||||
"closeOnStartDescription": "Automatically close the launcher after Hytale has launched",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Hardware Acceleration",
|
||||
"hwAccelDescription": "Enable hardware acceleration for the launcher",
|
||||
"gameBranch": "Game Branch",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Comportamiento del Launcher",
|
||||
"closeOnStart": "Cerrar Launcher al iniciar el juego",
|
||||
"closeOnStartDescription": "Cierra automáticamente el launcher después de que Hytale se haya iniciado",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Aceleración por Hardware",
|
||||
"hwAccelDescription": "Habilitar aceleración por hardware para el launcher",
|
||||
"gameBranch": "Rama del Juego",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Comportement du Launcher",
|
||||
"closeOnStart": "Fermer le Launcher au démarrage du jeu",
|
||||
"closeOnStartDescription": "Fermer automatiquement le launcher après le lancement d'Hytale",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Accélération Matérielle",
|
||||
"hwAccelDescription": "Activer l'accélération matérielle pour le launcher",
|
||||
"gameBranch": "Branche du Jeu",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Perilaku Launcher",
|
||||
"closeOnStart": "Tutup launcher saat game dimulai",
|
||||
"closeOnStartDescription": "Tutup launcher secara otomatis setelah Hytale diluncurkan",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Akselerasi Perangkat Keras",
|
||||
"hwAccelDescription": "Aktifkan akselerasi perangkat keras untuk launcher`",
|
||||
"gameBranch": "Cabang Game",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Zachowanie Launchera",
|
||||
"closeOnStart": "Zamknij Launcher przy starcie gry",
|
||||
"closeOnStartDescription": "Automatycznie zamknij launcher po uruchomieniu Hytale",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Przyspieszenie Sprzętowe",
|
||||
"hwAccelDescription": "Włącz przyspieszenie sprzętowe dla launchera",
|
||||
"gameBranch": "Gałąź Gry",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Comportamento do Lançador",
|
||||
"closeOnStart": "Fechar Lançador ao iniciar o jogo",
|
||||
"closeOnStartDescription": "Fechar automaticamente o lançador após o Hytale ter sido iniciado",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Aceleração de Hardware",
|
||||
"hwAccelDescription": "Ativar aceleração de hardware para o lançador",
|
||||
"gameBranch": "Versão do Jogo",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Поведение лаунчера",
|
||||
"closeOnStart": "Закрыть лаунчер при старте игры",
|
||||
"closeOnStartDescription": "Автоматически закрыть лаунчер после запуска Hytale",
|
||||
"allowMultiInstance": "Несколько копий игры",
|
||||
"allowMultiInstanceDescription": "Разрешить запуск нескольких клиентов одновременно (полезно для разработки модов)",
|
||||
"hwAccel": "Аппаратное ускорение",
|
||||
"hwAccelDescription": "Включить аппаратное ускорение для лаунчера",
|
||||
"gameBranch": "Ветка игры",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Launcher-beteende",
|
||||
"closeOnStart": "Stäng launcher vid spelstart",
|
||||
"closeOnStartDescription": "Stäng automatiskt launcher efter att Hytale har startats",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Hårdvaruacceleration",
|
||||
"hwAccelDescription": "Aktivera hårdvaruacceleration för launchern",
|
||||
"gameBranch": "Spelgren",
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
"closeLauncher": "Başlatıcı Davranışı",
|
||||
"closeOnStart": "Oyun başlatıldığında Başlatıcıyı Kapat",
|
||||
"closeOnStartDescription": "Hytale başlatıldıktan sonra başlatıcıyı otomatik olarak kapatın",
|
||||
"allowMultiInstance": "Allow multiple game instances",
|
||||
"allowMultiInstanceDescription": "Allow running multiple game clients at the same time (useful for mod development)",
|
||||
"hwAccel": "Donanım Hızlandırma",
|
||||
"hwAccelDescription": "Başlatıcı için donanım hızlandırmasını etkinleştir",
|
||||
"gameBranch": "Oyun Dalı",
|
||||
|
||||
Reference in New Issue
Block a user