qwq
This commit is contained in:
parent
9d97b2fa99
commit
510d1573c0
@ -14,7 +14,8 @@ local world = ____global.world
|
|||||||
local ____launcher = require("code.screens.launcher")
|
local ____launcher = require("code.screens.launcher")
|
||||||
local mouseButtonMenu = ____launcher.mouseButtonMenu
|
local mouseButtonMenu = ____launcher.mouseButtonMenu
|
||||||
local function textGen()
|
local function textGen()
|
||||||
return {header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 = "退出游戏"}
|
return { header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 =
|
||||||
|
"退出游戏" }
|
||||||
end
|
end
|
||||||
local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
||||||
local screen
|
local screen
|
||||||
@ -68,7 +69,8 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
|||||||
screen:attach(wrapper)
|
screen:attach(wrapper)
|
||||||
local ____self_2 = mouseButtonMenu(
|
local ____self_2 = mouseButtonMenu(
|
||||||
wrapper,
|
wrapper,
|
||||||
{main = ST:populate(
|
{
|
||||||
|
main = ST:populate(
|
||||||
3,
|
3,
|
||||||
function(i)
|
function(i)
|
||||||
local content = ({ text.header, text.button1, text.button2 })[i + 1]
|
local content = ({ text.header, text.button1, text.button2 })[i + 1]
|
||||||
@ -114,7 +116,8 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
)},
|
)
|
||||||
|
},
|
||||||
"main"
|
"main"
|
||||||
)
|
)
|
||||||
____self_2["then"](
|
____self_2["then"](
|
||||||
|
@ -4,19 +4,32 @@ from tempfile import TemporaryDirectory
|
|||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
import datetime
|
||||||
from tools import convert_zh_to_tw, import_translation_json
|
from tools import convert_zh_to_tw, import_translation_json
|
||||||
|
|
||||||
# Wasneet聲明
|
# Wasneet聲明
|
||||||
# 這個版本完全是依照「能跑就行」原則寫的,不准糾我錯!
|
# 這個版本完全是依照「能跑就行」原則寫的,不准糾我錯!
|
||||||
|
|
||||||
# ========== 配置区域 ==========
|
# ==============================
|
||||||
IMPORTLANG = "zh_CN" # 語言選項
|
IMPORTLANG = input("语言?(跳过则语言默认为zh_CN)") # 語言選項
|
||||||
VERSION = "V1.1" # 版本號
|
if len(IMPORTLANG) == 0:
|
||||||
WEBLATE_PATH = "/Deskto/psoutertale-weblate" # WEBLATE文件夾路徑(須修改!)
|
IMPORTLANG = "zh_CN"
|
||||||
SOURCE_DIR = Path("F:/Deskto/Petrichor-PSTVL").resolve()
|
VERSION = "v" + input("版本号?(跳过则记录构建日期)") # 版本號
|
||||||
|
if len(VERSION) == 1:
|
||||||
|
VERSION = "构建于" + str(datetime.date.today())
|
||||||
|
WEBLATE_PATH = os.path.abspath("../weblate")
|
||||||
|
BUILD_PATH = os.path.abspath("..") # MDR留:其他有地方不认字符串啊qwq,以我的能力只会分开写了
|
||||||
|
SOURCE_DIR = Path("../source").resolve()
|
||||||
|
|
||||||
|
# 删除过时构建
|
||||||
|
os.chdir(BUILD_PATH) # MDR留:抄的qwq
|
||||||
|
for file in os.listdir(BUILD_PATH):
|
||||||
|
if re.match(r'.+.love', file):
|
||||||
|
os.remove(file)
|
||||||
# ==============================
|
# ==============================
|
||||||
|
|
||||||
os.chdir("translate")
|
os.chdir(SOURCE_DIR / "translate")
|
||||||
# 拉取weblate仓库更改
|
# 拉取weblate仓库更改
|
||||||
print("🟡「提示」 Weblate文本獲取中...")
|
print("🟡「提示」 Weblate文本獲取中...")
|
||||||
os.system(f"cd {WEBLATE_PATH} && git pull")
|
os.system(f"cd {WEBLATE_PATH} && git pull")
|
||||||
@ -31,7 +44,7 @@ for lua_file in src_text_path.glob("*.lua"):
|
|||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
PROJECT_ROOT = SOURCE_DIR
|
PROJECT_ROOT = SOURCE_DIR
|
||||||
LANG_IMAGES = SOURCE_DIR / "images" / IMPORTLANG
|
LANG_IMAGES = SOURCE_DIR / "images" / IMPORTLANG
|
||||||
BUILD_OUTPUT = SOURCE_DIR / "translate" / "gamebuild" / f"Petrichor-{VERSION}.love"
|
BUILD_OUTPUT = f"{BUILD_PATH}/PETRICHOR-{IMPORTLANG} {VERSION}.love"
|
||||||
src_text_path = PROJECT_ROOT / "translate" / "src"
|
src_text_path = PROJECT_ROOT / "translate" / "src"
|
||||||
|
|
||||||
# 7z校驗
|
# 7z校驗
|
||||||
|
@ -14,7 +14,8 @@ local world = ____global.world
|
|||||||
local ____launcher = require("code.screens.launcher")
|
local ____launcher = require("code.screens.launcher")
|
||||||
local mouseButtonMenu = ____launcher.mouseButtonMenu
|
local mouseButtonMenu = ____launcher.mouseButtonMenu
|
||||||
local function textGen()
|
local function textGen()
|
||||||
return {header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 = "退出游戏"}
|
return { header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 =
|
||||||
|
"退出游戏" }
|
||||||
end
|
end
|
||||||
local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
||||||
local screen
|
local screen
|
||||||
@ -68,7 +69,8 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
|||||||
screen:attach(wrapper)
|
screen:attach(wrapper)
|
||||||
local ____self_2 = mouseButtonMenu(
|
local ____self_2 = mouseButtonMenu(
|
||||||
wrapper,
|
wrapper,
|
||||||
{main = ST:populate(
|
{
|
||||||
|
main = ST:populate(
|
||||||
3,
|
3,
|
||||||
function(i)
|
function(i)
|
||||||
local content = ({ text.header, text.button1, text.button2 })[i + 1]
|
local content = ({ text.header, text.button1, text.button2 })[i + 1]
|
||||||
@ -114,7 +116,8 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
)},
|
)
|
||||||
|
},
|
||||||
"main"
|
"main"
|
||||||
)
|
)
|
||||||
____self_2["then"](
|
____self_2["then"](
|
||||||
|
Loading…
x
Reference in New Issue
Block a user