mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 08:34:43 +01:00
Compare commits
2 Commits
f61f4eed51
...
986259d96b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
986259d96b | ||
|
|
97454de75e |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cultivation",
|
"name": "cultivation",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^1.0.0-rc.5",
|
"@tauri-apps/api": "^1.0.0-rc.5",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "简体中文",
|
"lang_name": "简体中文",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "启动",
|
"launch_button": "启动",
|
||||||
"gc_enable": "以 Grasscutter 模式连接",
|
"gc_enable": "以 Grasscutter 模式连接",
|
||||||
"https_enable": "使用 HTTPS",
|
"https_enable": "使用 HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "繁體中文",
|
"lang_name": "繁體中文",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "啟動",
|
"launch_button": "啟動",
|
||||||
"gc_enable": "以Grasscutter模式連接",
|
"gc_enable": "以Grasscutter模式連接",
|
||||||
"https_enable": "使用 HTTPS",
|
"https_enable": "使用 HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Deutsch",
|
"lang_name": "Deutsch",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Starten",
|
"launch_button": "Starten",
|
||||||
"gc_enable": "Mit Grasscutter verbinden",
|
"gc_enable": "Mit Grasscutter verbinden",
|
||||||
"https_enable": "HTTPS verwenden",
|
"https_enable": "HTTPS verwenden",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "English",
|
"lang_name": "English",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Launch",
|
"launch_button": "Launch",
|
||||||
"gc_enable": "Connect to Grasscutter",
|
"gc_enable": "Connect to Grasscutter",
|
||||||
"https_enable": "Use HTTPS",
|
"https_enable": "Use HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Español",
|
"lang_name": "Español",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Launch",
|
"launch_button": "Launch",
|
||||||
"gc_enable": "Conectar Via Grasscutter",
|
"gc_enable": "Conectar Via Grasscutter",
|
||||||
"https_enable": "Usar HTTPS",
|
"https_enable": "Usar HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Francais",
|
"lang_name": "Francais",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Lancer",
|
"launch_button": "Lancer",
|
||||||
"gc_enable": "Se connecter avec Grasscutter",
|
"gc_enable": "Se connecter avec Grasscutter",
|
||||||
"https_enable": "Utiliser HTTPS",
|
"https_enable": "Utiliser HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Indonesia",
|
"lang_name": "Indonesia",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Luncurkan",
|
"launch_button": "Luncurkan",
|
||||||
"gc_enable": "Terhubung Melalui GrassCutter",
|
"gc_enable": "Terhubung Melalui GrassCutter",
|
||||||
"ip_placeholder": "Alamat Server...",
|
"ip_placeholder": "Alamat Server...",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "日本語",
|
"lang_name": "日本語",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "起動",
|
"launch_button": "起動",
|
||||||
"gc_enable": "Grasscutterに接続",
|
"gc_enable": "Grasscutterに接続",
|
||||||
"https_enable": "HTTPS接続を使用",
|
"https_enable": "HTTPS接続を使用",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "한국어",
|
"lang_name": "한국어",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "게임 시작",
|
"launch_button": "게임 시작",
|
||||||
"gc_enable": "Grasscutter 연결",
|
"gc_enable": "Grasscutter 연결",
|
||||||
"https_enable": "HTTPS 사용",
|
"https_enable": "HTTPS 사용",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Latviešu",
|
"lang_name": "Latviešu",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Palaist",
|
"launch_button": "Palaist",
|
||||||
"gc_enable": "Savienot ar Grasscutter",
|
"gc_enable": "Savienot ar Grasscutter",
|
||||||
"https_enable": "Izm. HTTPS",
|
"https_enable": "Izm. HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Nederlands",
|
"lang_name": "Nederlands",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Start",
|
"launch_button": "Start",
|
||||||
"gc_enable": "Verbind Met Grasscutter",
|
"gc_enable": "Verbind Met Grasscutter",
|
||||||
"https_enable": "Gebruik HTTPS",
|
"https_enable": "Gebruik HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Русский",
|
"lang_name": "Русский",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Запустить",
|
"launch_button": "Запустить",
|
||||||
"gc_enable": "Подключиться с Grasscutter",
|
"gc_enable": "Подключиться с Grasscutter",
|
||||||
"https_enable": "Исп. HTTPS",
|
"https_enable": "Исп. HTTPS",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Tiếng Việt",
|
"lang_name": "Tiếng Việt",
|
||||||
"main": {
|
"main": {
|
||||||
"title": "Cultivation: Thorny Edition",
|
"title": "Cultivation",
|
||||||
"launch_button": "Khởi Chạy",
|
"launch_button": "Khởi Chạy",
|
||||||
"gc_enable": "Kết nối qua Grasscutter",
|
"gc_enable": "Kết nối qua Grasscutter",
|
||||||
"https_enable": "Dùng HTTPS",
|
"https_enable": "Dùng HTTPS",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Cultivation",
|
"productName": "Cultivation",
|
||||||
"version": "1.7.1"
|
"version": "1.7.2"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Work in progress area! These numbers may be outdated, so please do not use them as reference. Latest
|
Work in progress area! These numbers may be outdated, so please do not use them as reference. Latest
|
||||||
version: Grasscutter 1.7.4 (4.0) / Forks (6.1) - Cultivation 1.7.1
|
version: Grasscutter 1.7.4 (4.0) / Forks (6.1) - Cultivation 1.7.2
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -177,6 +177,19 @@ async function readConfigFile() {
|
|||||||
configFilePath = local + 'cultivation/configuration.json'
|
configFilePath = local + 'cultivation/configuration.json'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dataFiles = await fs.readDir(local + 'cultivation')
|
||||||
|
|
||||||
|
// Ensure config exists
|
||||||
|
if (!dataFiles.find((fileOrDir) => fileOrDir?.name === 'configuration.json')) {
|
||||||
|
// Create config file
|
||||||
|
const file: fs.FsTextFileOption = {
|
||||||
|
path: configFilePath,
|
||||||
|
contents: JSON.stringify(defaultConfig),
|
||||||
|
}
|
||||||
|
|
||||||
|
await fs.writeFile(file)
|
||||||
|
}
|
||||||
|
|
||||||
// Read existing config to get profile name
|
// Read existing config to get profile name
|
||||||
const raw = await fs.readTextFile(configFilePath)
|
const raw = await fs.readTextFile(configFilePath)
|
||||||
const cfg = <Configuration>JSON.parse(raw)
|
const cfg = <Configuration>JSON.parse(raw)
|
||||||
@@ -206,19 +219,6 @@ async function readConfigFile() {
|
|||||||
await fs.createDir(local + 'cultivation/grasscutter').catch((e) => console.log(e))
|
await fs.createDir(local + 'cultivation/grasscutter').catch((e) => console.log(e))
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataFiles = await fs.readDir(local + 'cultivation')
|
|
||||||
|
|
||||||
// Ensure config exists
|
|
||||||
if (!dataFiles.find((fileOrDir) => fileOrDir?.name === 'configuration.json')) {
|
|
||||||
// Create config file
|
|
||||||
const file: fs.FsTextFileOption = {
|
|
||||||
path: configFilePath,
|
|
||||||
contents: JSON.stringify(defaultConfig),
|
|
||||||
}
|
|
||||||
|
|
||||||
await fs.writeFile(file)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Finally, read the file
|
// Finally, read the file
|
||||||
return await fs.readTextFile(configFilePath)
|
return await fs.readTextFile(configFilePath)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user