mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
Change references to anime game to generic references
This commit is contained in:
parent
19a35fce2d
commit
f9eb06c3e7
@ -19,7 +19,7 @@ Grasscutter launcher for easily switching between Official and Private servers
|
||||
|
||||
1. Download the zip file
|
||||
2. Extract the zip file somewhere
|
||||
3. Run `GrassClipper.exe`, install the proxy server, and set your `Genshin Impact Game` folder!
|
||||
3. Run `GrassClipper.exe`, install the proxy server, and set your game folder!
|
||||
|
||||
# Setup (for Development)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Play on Grasscutter",
|
||||
"launchLocalServer": "Launch Local Server",
|
||||
|
||||
"genshinFolderSet": "Set \"Genshin Impact Game\" folder",
|
||||
"gameFolderSet": "Set game folder",
|
||||
"grasscutterFileSet": "Set \"Grasscutter\" .jar file",
|
||||
"folderNotSet": "Not set",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "Install",
|
||||
"proxyInstallDeny": "No thanks",
|
||||
|
||||
"genshinFolderDialog": "Select Genshin Impact Game folder",
|
||||
"gameFolderDialog": "Select game folder",
|
||||
"grasscutterFileDialog": "Select Grasscutter server jar file"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Jugar en Grasscutter",
|
||||
"launchLocalServer": "Iniciar servidor local",
|
||||
|
||||
"genshinFolderSet": "Establece el folder \"Genshin Impact Game\"",
|
||||
"gameFolderSet": "Establece el folder game",
|
||||
"grasscutterFileSet": "Establece el archivo .jar de \"Grasscutter\"",
|
||||
"folderNotSet": "No establecido",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "Instalar",
|
||||
"proxyInstallDeny": "No gracias",
|
||||
|
||||
"genshinFolderDialog": "Selecciona la carpeta Genshin Impact game",
|
||||
"gameFolderDialog": "Selecciona la carpeta game",
|
||||
"grasscutterFileDialog": "Selecciona el archivo .jar de Grasscutter"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Jouer sur Grasscutter",
|
||||
"launchLocalServer": "Lancer le serveur en local",
|
||||
|
||||
"genshinFolderSet": "Définir le dossier \"Genshin Impact Game\"",
|
||||
"gameFolderSet": "Définir le dossier game",
|
||||
"grasscutterFileSet": "Définir le fichier .jar \"Grasscutter\"",
|
||||
"folderNotSet": "Pas encore défini",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "Installer",
|
||||
"proxyInstallDeny": "Non merci",
|
||||
|
||||
"genshinFolderDialog": "Sélectionnez le dossier contenant Genshin Impact",
|
||||
"gameFolderDialog": "Sélectionnez le dossier contenant le game",
|
||||
"grasscutterFileDialog": "Selectionnez le fichier jar du serveur de Grasscutter"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Mainkan Grasscutter",
|
||||
"launchLocalServer": "Luncurkan Local Server",
|
||||
|
||||
"genshinFolderSet": "Atur folder \"Genshin Impact Game\"",
|
||||
"gameFolderSet": "Atur folder game",
|
||||
"grasscutterFileSet": "Atur file \"Grasscutter\" .jar",
|
||||
"folderNotSet": "Belum diatur",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "Install",
|
||||
"proxyInstallDeny": "Tidak terima kasih",
|
||||
|
||||
"genshinFolderDialog": "Pilih folder Genshin Impact Game",
|
||||
"gameFolderDialog": "Pilih folder game",
|
||||
"grasscutterFileDialog": "Pilih file jar server Grasscutter"
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Op Grasscutter spelen",
|
||||
"launchLocalServer": "Lokale server starten",
|
||||
|
||||
"genshinFolderSet": "Selecteer de \"Genshin Impact Game\" folder",
|
||||
"gameFolderSet": "Selecteer de game folder",
|
||||
"grasscutterFileSet": "Selecteer het \"Grasscutter\" .jar bestand",
|
||||
"folderNotSet": "Niet geselecteerd",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "Installeren",
|
||||
"proxyInstallDeny": "Nee dank je",
|
||||
|
||||
"genshinFolderDialog": "Selecteer de Genshin Impact Game folder",
|
||||
"gameFolderDialog": "Selecteer de game folder",
|
||||
"grasscutterFileDialog": "Selecteer het Grasscutter server jar bestand"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Jogar (Grasscutter)",
|
||||
"launchLocalServer": "Abrir Servidor Local",
|
||||
|
||||
"genshinFolderSet": "Definir a pasta: \"Genshin Impact Game\" ",
|
||||
"gameFolderSet": "Definir a game pasta ",
|
||||
"grasscutterFileSet": "Definir o arquivo .jar de \"Grasscutter\" ",
|
||||
"folderNotSet": "Não Definida",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "Instalar",
|
||||
"proxyInstallDeny": "Não obrigado",
|
||||
|
||||
"genshinFolderDialog": "Selecione a pasta Genshin Impact Game",
|
||||
"gameFolderDialog": "Selecione a game pasta",
|
||||
"grasscutterFileDialog": "Selecione o arquivo jar do Grasscutter"
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "Grasscutter",
|
||||
"launchLocalServer": "Khởi động Grasscutter",
|
||||
|
||||
"genshinFolderSet": "Chỉnh địa điểm thư mục \"Genshin Impact Game\"",
|
||||
"gameFolderSet": "Chỉnh địa điểm thư mục trò chơi",
|
||||
"grasscutterFileSet": "Chỉnh địa điểm file \"Grasscutter\"",
|
||||
"folderNotSet": "Chưa chỉnh file",
|
||||
|
||||
@ -35,6 +35,6 @@
|
||||
"proxyInstallBtn": "Có",
|
||||
"proxyInstallDeny": "Không",
|
||||
|
||||
"genshinFolderDialog": "Chọn thư mục có chứa game",
|
||||
"gameFolderDialog": "Chọn thư mục có chứa trò chơi",
|
||||
"grasscutterFileDialog": "Chọn file Grasscutter"
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"playPrivate": "在 Grasscutter 上播放",
|
||||
"launchLocalServer": "启动本地服务器",
|
||||
|
||||
"genshinFolderSet": "选择 \"原神\" 文件夹",
|
||||
"gameFolderSet": "选择 \"原神\" 文件夹",
|
||||
"grasscutterFileSet": "选择 \"Grasscutter\" .jar 文件",
|
||||
"folderNotSet": "没有设置原神文件夹或Grasscutter文件",
|
||||
|
||||
@ -34,6 +34,6 @@
|
||||
"proxyInstallBtn": "安装",
|
||||
"proxyInstallDeny": "不用了,谢谢",
|
||||
|
||||
"genshinFolderDialog": "选择原神文件夹",
|
||||
"gameFolderDialog": "选择原神文件夹",
|
||||
"grasscutterFileDialog": "选择Grasscutter服务器jar文件"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
##
|
||||
#
|
||||
# Genshin Impact script for mitmproxy
|
||||
# Anime game script for mitmproxy
|
||||
#
|
||||
# https://github.com/MlgmXyysd/
|
||||
#
|
||||
@ -24,7 +24,7 @@ import string
|
||||
from mitmproxy import ctx
|
||||
from mitmproxy import http
|
||||
|
||||
class MlgmXyysd_Genshin_Impact_Proxy:
|
||||
class MlgmXyysd_Anime_Game_Proxy:
|
||||
|
||||
def load(self, loader):
|
||||
loader.add_option(
|
||||
@ -77,5 +77,5 @@ class MlgmXyysd_Genshin_Impact_Proxy:
|
||||
flow.request.host = REMOTE_HOST
|
||||
|
||||
addons = [
|
||||
MlgmXyysd_Genshin_Impact_Proxy()
|
||||
MlgmXyysd_Anime_Game_Proxy()
|
||||
]
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -117,8 +117,8 @@
|
||||
<div id="bottomBar">
|
||||
<div class="bottomSection">
|
||||
<div>
|
||||
<button class="smolBtn" onclick="setGenshinImpactFolder()" id="genshinFolderSet">Set "Genshin Impact Game" folder</button>
|
||||
<span id="genshinPath" style="margin-top: 4px;"></span>
|
||||
<button class="smolBtn" onclick="setGameFolder()" id="gameFolderSet">Set game folder</button>
|
||||
<span id="gamePath" style="margin-top: 4px;"></span>
|
||||
</div>
|
||||
<div style="display: none;">
|
||||
<button class="smolBtn" onclick="setGrasscutterFolder()" id="grasscutterFileSet">Set "Grasscutter" .jar file</button>
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
async function getCfg() {
|
||||
const defaultConf = {
|
||||
genshinImpactFolder: '',
|
||||
gamefolder: '',
|
||||
serverFolder: '',
|
||||
lastConnect: '',
|
||||
enableKillswitch: false,
|
||||
@ -61,15 +61,15 @@ async function proxyIsInstalled() {
|
||||
*
|
||||
* @returns {Promise<String>}
|
||||
*/
|
||||
async function getGenshinExecName() {
|
||||
// Scan genshin dir
|
||||
async function getGameExecName() {
|
||||
// Scan game dir
|
||||
const config = await getCfg()
|
||||
const genshinDir = await filesystem.readDirectory(config.genshinImpactFolder)
|
||||
const gameDir = await filesystem.readDirectory(config.gamefolder)
|
||||
|
||||
// Find the executable
|
||||
const genshinExec = genshinDir.find(file => file.entry.endsWith('.exe'))
|
||||
const gameExec = gameDir.find(file => file.entry.endsWith('.exe'))
|
||||
|
||||
return genshinExec.entry
|
||||
return gameExec.entry
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,9 +33,9 @@ async function enableButtons() {
|
||||
/**
|
||||
* Disable buttons when the game folder is not set
|
||||
*/
|
||||
async function handleGenshinFolderNotSet() {
|
||||
async function handleGameNotSet() {
|
||||
// Set buttons to greyed out and disable
|
||||
document.querySelector('#genshinPath').innerHTML = localeObj.folderNotSet
|
||||
document.querySelector('#gamePath').innerHTML = localeObj.folderNotSet
|
||||
|
||||
// Set official server background to default
|
||||
document.querySelector('#firstPanel').style.backgroundImage = `url("../bg/private/default.png")`
|
||||
@ -68,11 +68,11 @@ async function handleServerNotSet() {
|
||||
/**
|
||||
* Show the game folder under the select button
|
||||
*/
|
||||
async function displayGenshinFolder() {
|
||||
const elm = document.querySelector('#genshinPath')
|
||||
async function displayGameFolder() {
|
||||
const elm = document.querySelector('#gamePath')
|
||||
const config = await getCfg()
|
||||
|
||||
elm.innerHTML = config.genshinImpactFolder
|
||||
elm.innerHTML = config.gamefolder
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,17 +126,17 @@ async function setBackgroundImage() {
|
||||
await filesystem.createDirectory(NL_CWD + '/resources/bg/official')
|
||||
}
|
||||
|
||||
if (config.genshinImpactFolder) {
|
||||
if (config.gamefolder) {
|
||||
// See if bg folder exists in parent dir
|
||||
const parentDir = await filesystem.readDirectory(config.genshinImpactFolder + '/..')
|
||||
const parentDir = await filesystem.readDirectory(config.gamefolder + '/..')
|
||||
|
||||
if (parentDir.find(dir => dir.entry === 'bg')) {
|
||||
|
||||
const officialImages = (await filesystem.readDirectory(config.genshinImpactFolder + '/../bg')).filter(file => file.type === 'FILE')
|
||||
const officialImages = (await filesystem.readDirectory(config.gamefolder + '/../bg')).filter(file => file.type === 'FILE')
|
||||
|
||||
if (officialImages.length > 0) {
|
||||
for (const bg of officialImages) {
|
||||
const path = config.genshinImpactFolder.replace('\\', '/') + '/../bg/' + bg.entry
|
||||
const path = config.gamefolder.replace('\\', '/') + '/../bg/' + bg.entry
|
||||
|
||||
// See if the file exists already
|
||||
const currentBgs = (await filesystem.readDirectory(NL_CWD + '/resources/bg/official/')).filter(file => file.type === 'FILE')
|
||||
@ -259,7 +259,7 @@ async function closeSettings() {
|
||||
settings.style.display = 'none'
|
||||
|
||||
// In case we installed the proxy server
|
||||
if (await proxyIsInstalled() && config.genshinImpactFolder) {
|
||||
if (await proxyIsInstalled() && config.gamefolder) {
|
||||
const playPriv = document.querySelector('#playPrivate')
|
||||
|
||||
playPriv.classList.remove('disabled')
|
||||
@ -314,8 +314,8 @@ async function displayServerLaunchSection() {
|
||||
/**
|
||||
* Set the game folder by opening a folder picker
|
||||
*/
|
||||
async function setGenshinImpactFolder() {
|
||||
const folder = await Neutralino.os.showFolderDialog(localeObj.genshinFolderDialog)
|
||||
async function setGameFolder() {
|
||||
const folder = await Neutralino.os.showFolderDialog(localeObj.gameFolderDialog)
|
||||
|
||||
// Set the folder in our configuration
|
||||
const config = await getCfg()
|
||||
@ -325,17 +325,17 @@ async function setGenshinImpactFolder() {
|
||||
const gameFolder = folderList.filter(file => file.entry.includes('Genshin Impact Game'))
|
||||
|
||||
if (gameFolder.length > 0) {
|
||||
config.genshinImpactFolder = folder + '\\Genshin Impact Game'
|
||||
config.gamefolder = folder + '\\Genshin Impact Game'
|
||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||
} else {
|
||||
config.genshinImpactFolder = folder
|
||||
config.gamefolder = folder
|
||||
}
|
||||
|
||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||
|
||||
// Refresh background and path
|
||||
setBackgroundImage()
|
||||
displayGenshinFolder()
|
||||
displayGameFolder()
|
||||
enableButtons()
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ async function setGrasscutterFolder() {
|
||||
async function launchOfficial() {
|
||||
const config = await getCfg()
|
||||
|
||||
Neutralino.os.execCommand(config.genshinImpactFolder + '/' + await getGenshinExecName())
|
||||
Neutralino.os.execCommand(config.gamefolder + '/' + await getGameExecName())
|
||||
}
|
||||
|
||||
/**
|
||||
@ -380,7 +380,7 @@ async function launchPrivate() {
|
||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||
|
||||
// Pass IP and game folder to the private server launcher
|
||||
Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}/${await getGenshinExecName()}" "${NL_CWD}" ${config.enableKillswitch}`).catch(e => console.log(e))
|
||||
Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} "${config.gamefolder}/${await getGameExecName()}" "${NL_CWD}" ${config.enableKillswitch}`).catch(e => console.log(e))
|
||||
}
|
||||
|
||||
async function launchLocalServer() {
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
setBackgroundImage();
|
||||
displayGenshinFolder();
|
||||
displayGameFolder();
|
||||
displayServerFolder();
|
||||
|
||||
// Set title version
|
||||
@ -68,8 +68,8 @@
|
||||
// Ensure we do the translation at the very end, after everything else has loaded
|
||||
await doTranslation()
|
||||
|
||||
if (!config.genshinImpactFolder) {
|
||||
handleGenshinFolderNotSet()
|
||||
if (!config.gamefolder) {
|
||||
handleGameNotSet()
|
||||
}
|
||||
|
||||
if (!config.serverFolder) {
|
||||
|
@ -32,7 +32,7 @@ async function doTranslation() {
|
||||
set('serverLaunch', localeObj.launchLocalServer)
|
||||
|
||||
// File select buttons
|
||||
set('genshinFolderSet', localeObj.genshinFolderSet)
|
||||
set('gameFolderSet', localeObj.gameFolderSet)
|
||||
set('grasscutterFileSet', localeObj.grasscutterFileSet)
|
||||
|
||||
// Private options
|
||||
|
@ -304,7 +304,7 @@ body {
|
||||
height: 10%;
|
||||
}
|
||||
|
||||
#genshinPath, #serverPath {
|
||||
#gamePath, #serverPath {
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user