This commit is contained in:
MDR 2025-04-21 04:11:21 +08:00
parent 9d97b2fa99
commit 510d1573c0
9 changed files with 1235 additions and 1216 deletions

File diff suppressed because it is too large Load Diff

View File

@ -294,85 +294,85 @@ local function textGen(pager)
name = function() return accessor.item_glove1 and accessor.item_glove2 and "Work Gloves" or "Work Glove" end,
info = function()
return accessor.item_glove1 and accessor.item_glove2 and ({
"<p:player>(An insulated glove. Good for handling dangerous items.)"
}) or ({
"<p:player>(A pair of insulated gloves. Good for handling dangerous items.)"
})
"<p:player>(An insulated glove. Good for handling dangerous items.)"
}) or ({
"<p:player>(A pair of insulated gloves. Good for handling dangerous items.)"
})
end
},
item_boots = {
name = function() return accessor.item_boot1 and accessor.item_boot2 and "Work Boots" or "Work Boot" end,
info = function()
return accessor.item_boot1 and accessor.item_boot2 and ({
"<p:player>(A sturdy, high-topped boot. Good for traversing hazards.)"
}) or ({
"<p:player>(A pair of sturdy, high-topped boots. Good for traversing hazards.)"
})
"<p:player>(A sturdy, high-topped boot. Good for traversing hazards.)"
}) or ({
"<p:player>(A pair of sturdy, high-topped boots. Good for traversing hazards.)"
})
end
},
ponder_arrival = pager:create(0, {
"<p:player><f:sad>...",
"<p:player><f:sad>(The forest is beautiful...)"
}, {
"<p:player><f:sad>...",
"<p:player><f:sigh>(I have to keep going...)",
"<p:player>(Standing around won't get me any closer to home.)"
}),
"<p:player><f:sad>...",
"<p:player><f:sad>(The forest is beautiful...)"
}, {
"<p:player><f:sad>...",
"<p:player><f:sigh>(I have to keep going...)",
"<p:player>(Standing around won't get me any closer to home.)"
}),
ponder_chase = pager:create(0, {
"<p:player><f:side>(If I could just talk to them...)",
"<p:player><f:determined2>(... there's no time to lose!)"
}, {
"<p:player><f:determined>(... I've got to catch up to them!)"
}),
"<p:player><f:side>(If I could just talk to them...)",
"<p:player><f:determined2>(... there's no time to lose!)"
}, {
"<p:player><f:determined>(... I've got to catch up to them!)"
}),
ponder_gate = {
"<p:player><f:side>...",
"<p:player><f:side>(I need a closer look at that gate...)"
},
"<p:player><f:side>...",
"<p:player><f:side>(I need a closer look at that gate...)"
},
ponder_shock = function()
return {
"<p:player><f:side>(... hm...)",
unpack(accessor.item_glove1 and accessor.item_glove2 and accessor.item_boot1 and accessor.item_boot2 and
({
"<p:player><f:side>(I have these gloves... and these boots...)",
"<p:player>(Oh! I can use these to climb the gate safely!)"
}) or
"<p:player><f:side>(I have these gloves... and these boots...)",
"<p:player>(Oh! I can use these to climb the gate safely!)"
}) or
(accessor.item_glove1 and accessor.item_glove2 and ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have these gloves... and this boot...)",
"<p:player>(With one more boot, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these gloves...)",
"<p:player>(If I had something to protect my feet, I could climb the gate safely.)"
})) or (accessor.item_boot1 and accessor.item_boot2 and ((accessor.item_glove1 or accessor.item_glove2) and ({
"<p:player><f:side>(I have these boots... and this glove...)",
"<p:player>(With one more glove, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these boots...)",
"<p:player>(If I had something to protect my hands, I could climb the gate safely.)"
})) or ((accessor.item_glove1 or accessor.item_glove2) and ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this glove... and this boot...)",
"<p:player>(If only I could duplicate them, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have this glove...)",
"<p:player><f:side>(If I had another glove, and something to protect my feet...)",
"<p:player>(... I could climb the gate safely.)"
})) or ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this boot...)",
"<p:player><f:side>(If I had another boot, and something to protect my hands...)",
"<p:player>(... I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(If I had some extra gear to protect myself...)",
"<p:player>(... I could climb the gate safely.)"
}))))))
"<p:player><f:side>(I have these gloves... and this boot...)",
"<p:player>(With one more boot, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these gloves...)",
"<p:player>(If I had something to protect my feet, I could climb the gate safely.)"
})) or (accessor.item_boot1 and accessor.item_boot2 and ((accessor.item_glove1 or accessor.item_glove2) and ({
"<p:player><f:side>(I have these boots... and this glove...)",
"<p:player>(With one more glove, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these boots...)",
"<p:player>(If I had something to protect my hands, I could climb the gate safely.)"
})) or ((accessor.item_glove1 or accessor.item_glove2) and ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this glove... and this boot...)",
"<p:player>(If only I could duplicate them, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have this glove...)",
"<p:player><f:side>(If I had another glove, and something to protect my feet...)",
"<p:player>(... I could climb the gate safely.)"
})) or ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this boot...)",
"<p:player><f:side>(If I had another boot, and something to protect my hands...)",
"<p:player>(... I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(If I had some extra gear to protect myself...)",
"<p:player>(... I could climb the gate safely.)"
}))))))
}
end,
ponder_gear = {
"<p:player><f:side>(... I think, with this extra gear I've found...)",
"<p:player>(... climbing the gate should be safe.)"
},
"<p:player><f:side>(... I think, with this extra gear I've found...)",
"<p:player>(... climbing the gate should be safe.)"
},
ponder_unlock = {
"<p:player>(... hm.)",
"<p:player><f:sigh>(Better get going before someone closes the gate again.)"
},
"<p:player>(... hm.)",
"<p:player><f:sigh>(Better get going before someone closes the gate again.)"
},
ponder_factory = pager:create(0, {
"<p:player><f:side>...让我猜的话,\n这儿看着像座糖浆厂。)",
"<p:player>(不太确定,反正肯定是某种工厂。)",
@ -389,25 +389,25 @@ local function textGen(pager)
pipewerx3 = "(Arrange the pipes to connect\nthe two endpoints.)",
pipewerx4 = "(Press [X] to exit.)",
system1 = {
"Platform Engaged.",
"Selecting Mode: Transit",
"Selecting Destination: CRIMSON",
"Transit In Progress..."
},
"Platform Engaged.",
"Selecting Mode: Transit",
"Selecting Destination: CRIMSON",
"Transit In Progress..."
},
system2 = "`~1!2@3#4$5%6^7&8*9(0)-_=+[]\\|;:'\",<.>/?",
arrival1 = {
"<p:player><f:sweat>..."
},
arrival2 = {
"<p:player><f:side>(It's the same as before...)",
"<p:player><f:sweat4>(... guess I... didn't really know what I was expecting.)"
},
"<p:player><f:side>(It's the same as before...)",
"<p:player><f:sweat4>(... guess I... didn't really know what I was expecting.)"
},
arrival3 = {
"<p:player><f:what>Whoa."
},
"<p:player><f:what>Whoa."
},
arrival4 = {
"<p:player><f:what>That's big."
},
"<p:player><f:what>That's big."
},
arrival5 = {
"<p:player><f:sigh>(哎,说到底,这儿不是家啊。)",
"<p:player>(起码... 不用困在怪房子里了。)",
@ -418,174 +418,174 @@ local function textGen(pager)
"<p:player><f:sigh>(...但愿我能找到把伞吧。)"
},
stowaway1 = {
"<p:player><f:sweat>...",
"<p:player><f:sweat3>H... hello?"
},
"<p:player><f:sweat>...",
"<p:player><f:sweat3>H... hello?"
},
stowaway2 = {
"<p:player><f:sad2>Wait, don't go! I..."
},
"<p:player><f:sad2>Wait, don't go! I..."
},
stowaway3 = {
"<p:player><f:determined>... get back here!"
},
"<p:player><f:determined>... get back here!"
},
stowaway4 = {
"<p:player><f:determined2>Hey, you!"
},
"<p:player><f:determined2>Hey, you!"
},
stowaway5 = {
"<p:player><f:sweat3>(There's nothing to be afraid of...)"
},
"<p:player><f:sweat3>(There's nothing to be afraid of...)"
},
stowaway6 = {
"<p:player><f:upset2>No, no, no!"
},
"<p:player><f:upset2>No, no, no!"
},
stowaway7 = {
"<p:player><f:annoyed>(... slam the gate on me, why don't you...)"
},
"<p:player><f:annoyed>(... slam the gate on me, why don't you...)"
},
bushitem1 = {
"<p:player><f:side>(There's something buried in here...)",
"<p:none>Pick it up?"
},
"<p:player><f:side>(There's something buried in here...)",
"<p:none>Pick it up?"
},
bushitem2 = {
"Yes",
"No"
},
"Yes",
"No"
},
glover0 = "Work Glove",
glover1 = {
"<p:player><f:surprise>(A glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:sodesuka>(Feels... tough.)"
},
"<p:player><f:surprise>(A glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:sodesuka>(Feels... tough.)"
},
glover2 = {
"<p:player><f:surprise>(Another glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove."
},
"<p:player><f:surprise>(Another glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove."
},
glovey1 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(A glove!)",
"<p:player><f:sodesuka>(Feels... tough.)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(A glove!)",
"<p:player><f:sodesuka>(Feels... tough.)"
},
glovey2 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(Another glove!)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(Another glove!)"
},
bootey1 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player>(... a single boot.)",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player>(... a single boot.)",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
bootey2 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Ah, there it is.)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Ah, there it is.)"
},
booter0 = "Work Boot",
booter1 = {
"<p:player>(... a single boot.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
"<p:player>(... a single boot.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
booter2 = {
"<p:player><f:sigh>(Ah, there it is.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot."
},
"<p:player><f:sigh>(Ah, there it is.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot."
},
drillie1 = pager:create(0, {
"<p:player><f:sigh>(I could just use this drill to open the gate...)",
"<p:player>(... but in doing so, its batteries would be completely drained.)",
"<p:player><f:confused>(Would I be able to replace them?)"
}, {
"<p:player><f:confused>(Should I use the drill to open the gate, or save it for later?)"
}),
"<p:player><f:sigh>(I could just use this drill to open the gate...)",
"<p:player>(... but in doing so, its batteries would be completely drained.)",
"<p:player><f:confused>(Would I be able to replace them?)"
}, {
"<p:player><f:confused>(Should I use the drill to open the gate, or save it for later?)"
}),
drillie2 = {
"Use The Drill",
"Find Another Way"
},
"Use The Drill",
"Find Another Way"
},
drillie3 = {
"<p:player>..."
},
drillie4 = {
"<p:player><f:sigh>(... that did the trick.)"
},
"<p:player><f:sigh>(... that did the trick.)"
},
gateclimb0 = "Gate",
gateclimb1 = {
"<p:player><f:side>...",
"<p:player><f:surprise>(Ah! Of course!)",
"<p:player><f:determined2>(I'll just climb over it!)"
},
"<p:player><f:side>...",
"<p:player><f:surprise>(Ah! Of course!)",
"<p:player><f:determined2>(I'll just climb over it!)"
},
gateclimb2a = {
"<p:player><f:annoyed>... ugh..."
},
"<p:player><f:annoyed>... ugh..."
},
gateclimb2b = {
"<p:player><f:sweat5>(... guess I'll have to find something else.)"
},
"<p:player><f:sweat5>(... guess I'll have to find something else.)"
},
gateclimb2c = {
"<p:player><f:side>(Wait. I have these gloves and boots...)",
"<p:player>(I could try again with the extra gear to protect myself.)",
"<p:none>Climb over the gate?"
},
"<p:player><f:side>(Wait. I have these gloves and boots...)",
"<p:player>(I could try again with the extra gear to protect myself.)",
"<p:none>Climb over the gate?"
},
gateclimb3 = {
"<p:player><f:sweat>(It's electrically charged.)"
},
"<p:player><f:sweat>(It's electrically charged.)"
},
gateclimb4 = {
"<p:player><f:sigh>(Can't climb over the gate without extra gear.)"
},
"<p:player><f:sigh>(Can't climb over the gate without extra gear.)"
},
gateclimb5 = pager:create(
0,
function()
local ____array_0 = __TS__SparseArrayNew(unpack(accessor.event_redleaf_gateclimb == 2 and ({
"<p:player>(I have the extra gear I need to protect myself.)"
}) or ({
"<p:player><f:side>(Wait. I have these gloves and boots now...)",
"<p:player>(I could try again with the extra gear to protect myself.)"
})))
"<p:player>(I have the extra gear I need to protect myself.)"
}) or ({
"<p:player><f:side>(Wait. I have these gloves and boots now...)",
"<p:player>(I could try again with the extra gear to protect myself.)"
})))
__TS__SparseArrayPush(____array_0, "<p:none>Climb over the gate?")
return { __TS__SparseArraySpread(____array_0) }
end,
{
"<p:none>Climb over the gate?"
}
"<p:none>Climb over the gate?"
}
),
gateclimb6 = {
"Yes",
"No"
},
"Yes",
"No"
},
gateclimb7 = {
"<p:player><f:sigh>(Third climb's the charm. placeholder :3)"
},
"<p:player><f:sigh>(Third climb's the charm. placeholder :3)"
},
gateclimb8 = {
"<p:player><f:determined2>(Alright!)"
},
"<p:player><f:determined2>(Alright!)"
},
gateclimb9 = {
"<p:player><f:confused>(Is this... a factory?)"
},
"<p:player><f:confused>(Is this... a factory?)"
},
gateclimb10 = {
"<p:player><f:sodesuka>(Time to find out what that rascal was up to.)"
}
"<p:player><f:sodesuka>(Time to find out what that rascal was up to.)"
}
},
trivia = {
tree = {
"<p:player><f:surprise>It's a tree! (placeholder :3)"
},
"<p:player><f:surprise>It's a tree! (placeholder :3)"
},
barrel = {
"<p:player><f:side>Barrel barrel barrel- (placeholder :3)"
},
"<p:player><f:side>Barrel barrel barrel- (placeholder :3)"
},
lid = {
"<p:player><f:annoyed>A lid. (placeholder :3)"
},
"<p:player><f:annoyed>A lid. (placeholder :3)"
},
facsign = {
"<p:player>\"REDLEAF INDUSTRIES\"\n\"Factory Grounds Nearby\""
},
"<p:player>\"REDLEAF INDUSTRIES\"\n\"Factory Grounds Nearby\""
},
sapsign = {
"<p:player>\"Kotokura Syrup Exports\"\n\"Redleaf Industries\""
},
"<p:player>\"Kotokura Syrup Exports\"\n\"Redleaf Industries\""
},
carsign = pager:create(0, {
"<p:player><f:sweat>\"Danger: Industrial Vehicles\"",
"<p:player><f:side>(Guess I should be careful...)"
}, {
"<p:player><f:sweat>\"Danger: Industrial Vehicles\""
}),
"<p:player><f:sweat>\"Danger: Industrial Vehicles\"",
"<p:player><f:side>(Guess I should be careful...)"
}, {
"<p:player><f:sweat>\"Danger: Industrial Vehicles\""
}),
powertower = {
"<p:player><f:confused>A powertower? (placeholder :3)"
},
"<p:player><f:confused>A powertower? (placeholder :3)"
},
placeholder2 = pager:create(0, {
"<p:player>placeholder :3"
})
"<p:player>placeholder :3"
})
},
trivia_tooltip = {
tree = "Tree",

View File

@ -14,13 +14,14 @@ local world = ____global.world
local ____launcher = require("code.screens.launcher")
local mouseButtonMenu = ____launcher.mouseButtonMenu
local function textGen()
return {header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 = "退出游戏"}
return { header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 =
"退出游戏" }
end
local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
local screen
screen = ____bindingPattern0.screen
local text = textGen()
local state = {acquitted = false, debug = false}
local state = { acquitted = false, debug = false }
return {
text = text,
state = state,
@ -47,12 +48,12 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
__TS__New(STRectangle, {
alpha = 0.5,
anchor = 0.5,
size = {x = 240, y = 180},
size = { x = 240, y = 180 },
color = 0,
priority = -3
}),
__TS__New(STRectangle, {anchor = 0.5, size = {x = 180, y = 90}, color = 0, priority = -2}),
__TS__New(STContainer, {priority = -1}):addDrawer(function(self)
__TS__New(STRectangle, { anchor = 0.5, size = { x = 180, y = 90 }, color = 0, priority = -2 }),
__TS__New(STContainer, { priority = -1 }):addDrawer(function(self)
love.graphics.setLineWidth(1 / 3)
love.graphics.rectangle(
"line",
@ -68,53 +69,55 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
screen:attach(wrapper)
local ____self_2 = mouseButtonMenu(
wrapper,
{main = ST:populate(
3,
function(i)
local content = ({text.header, text.button1, text.button2})[i + 1]
local metadata
metadata = {
disabled = i == 0,
action = function(____, controller)
repeat
local ____switch12 = i
local ____cond12 = ____switch12 == 1
if ____cond12 then
controller["goto"](controller, nil)
metadata.disabled = true
state.acquitted = false
break
end
____cond12 = ____cond12 or ____switch12 == 2
if ____cond12 then
love.event.quit()
break
end
until true
end
}
local position = 0.5
return __TS__New(
STHitbox,
{
anchor = 0.5,
metadata = metadata,
position = {
x = (i == 0 and 0 or ST:spread(45, i - 1, 2)) - position,
y = (i == 0 and -8 or 24) - position
},
size = i == 0 and 0 or assets["f$fives"]:compute(content),
children = {__TS__New(STText, {
anchor = 0.5,
justify = i == 0 and 0.5 or nil,
font = i == 0 and assets["f$helloplayer"] or assets["f$fives"],
position = position,
content = content
})}
{
main = ST:populate(
3,
function(i)
local content = ({ text.header, text.button1, text.button2 })[i + 1]
local metadata
metadata = {
disabled = i == 0,
action = function(____, controller)
repeat
local ____switch12 = i
local ____cond12 = ____switch12 == 1
if ____cond12 then
controller["goto"](controller, nil)
metadata.disabled = true
state.acquitted = false
break
end
____cond12 = ____cond12 or ____switch12 == 2
if ____cond12 then
love.event.quit()
break
end
until true
end
}
)
end
)},
local position = 0.5
return __TS__New(
STHitbox,
{
anchor = 0.5,
metadata = metadata,
position = {
x = (i == 0 and 0 or ST:spread(45, i - 1, 2)) - position,
y = (i == 0 and -8 or 24) - position
},
size = i == 0 and 0 or assets["f$fives"]:compute(content),
children = { __TS__New(STText, {
anchor = 0.5,
justify = i == 0 and 0.5 or nil,
font = i == 0 and assets["f$helloplayer"] or assets["f$fives"],
position = position,
content = content
}) }
}
)
end
)
},
"main"
)
____self_2["then"](

View File

@ -15,16 +15,16 @@ local function textGen()
return {
"<p:player>(A pail. Good for collecting things.)",
unpack(accessor.event_home_bucket and ({
"<p:player><f:sigh>(Apart from rainwater, apparently.)"
}) or ({}))
"<p:player><f:sigh>(Apart from rainwater, apparently.)"
}) or ({}))
}
end
},
item_card = {
name = "Library Card",
info = {
"<p:player>(A library card with a blued, jeweled strip.)"
}
"<p:player>(A library card with a blued, jeweled strip.)"
}
},
item_drill = {
name = "一把电钻",
@ -52,8 +52,8 @@ local function textGen()
"<p:player><f:sigh>(走你。)"
},
info2a = {
"<p:player><f:wink>(A worn plushie.)"
},
"<p:player><f:wink>(A worn plushie.)"
},
info2b = {
"拿下来",
"算了"

View File

@ -4,19 +4,32 @@ from tempfile import TemporaryDirectory
import subprocess
import shutil
import os
import re
import datetime
from tools import convert_zh_to_tw, import_translation_json
# Wasneet聲明
# 這個版本完全是依照「能跑就行」原則寫的,不准糾我錯!
# ========== 配置区域 ==========
IMPORTLANG = "zh_CN" # 語言選項
VERSION = "V1.1" # 版本號
WEBLATE_PATH = "/Deskto/psoutertale-weblate" # WEBLATE文件夾路徑須修改
SOURCE_DIR = Path("F:/Deskto/Petrichor-PSTVL").resolve()
# ==============================
IMPORTLANG = input("语言?(跳过则语言默认为zh_CN)") # 語言選項
if len(IMPORTLANG) == 0:
IMPORTLANG = "zh_CN"
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仓库更改
print("🟡「提示」 Weblate文本獲取中...")
os.system(f"cd {WEBLATE_PATH} && git pull")
@ -31,7 +44,7 @@ for lua_file in src_text_path.glob("*.lua"):
os.chdir("..")
PROJECT_ROOT = SOURCE_DIR
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"
# 7z校驗
@ -79,4 +92,4 @@ with TemporaryDirectory() as tmpdir:
print(f"🔴「錯誤」 裝箱失敗,退出碼:{exit_code}")
exit(1)
print(f"\n🟢「提示」 裝箱好啦!給你放在{BUILD_OUTPUT}了,記得看一眼嗷。")
print(f"\n🟢「提示」 裝箱好啦!給你放在{BUILD_OUTPUT}了,記得看一眼嗷。")

View File

@ -14,13 +14,14 @@ local world = ____global.world
local ____launcher = require("code.screens.launcher")
local mouseButtonMenu = ____launcher.mouseButtonMenu
local function textGen()
return {header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 = "退出游戏"}
return { header = "(确定要退出吗?)\n{color=0xff3f3f}(本世界未保存的数据\n将会丢失。)", button1 = "继续游玩", button2 =
"退出游戏" }
end
local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
local screen
screen = ____bindingPattern0.screen
local text = textGen()
local state = {acquitted = false, debug = false}
local state = { acquitted = false, debug = false }
return {
text = text,
state = state,
@ -47,12 +48,12 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
__TS__New(STRectangle, {
alpha = 0.5,
anchor = 0.5,
size = {x = 240, y = 180},
size = { x = 240, y = 180 },
color = 0,
priority = -3
}),
__TS__New(STRectangle, {anchor = 0.5, size = {x = 180, y = 90}, color = 0, priority = -2}),
__TS__New(STContainer, {priority = -1}):addDrawer(function(self)
__TS__New(STRectangle, { anchor = 0.5, size = { x = 180, y = 90 }, color = 0, priority = -2 }),
__TS__New(STContainer, { priority = -1 }):addDrawer(function(self)
love.graphics.setLineWidth(1 / 3)
love.graphics.rectangle(
"line",
@ -68,53 +69,55 @@ local function acquit(assets, atlas, batch, ____debug, ____bindingPattern0)
screen:attach(wrapper)
local ____self_2 = mouseButtonMenu(
wrapper,
{main = ST:populate(
3,
function(i)
local content = ({text.header, text.button1, text.button2})[i + 1]
local metadata
metadata = {
disabled = i == 0,
action = function(____, controller)
repeat
local ____switch12 = i
local ____cond12 = ____switch12 == 1
if ____cond12 then
controller["goto"](controller, nil)
metadata.disabled = true
state.acquitted = false
break
end
____cond12 = ____cond12 or ____switch12 == 2
if ____cond12 then
love.event.quit()
break
end
until true
end
}
local position = 0.5
return __TS__New(
STHitbox,
{
anchor = 0.5,
metadata = metadata,
position = {
x = (i == 0 and 0 or ST:spread(45, i - 1, 2)) - position,
y = (i == 0 and -8 or 24) - position
},
size = i == 0 and 0 or assets["f$fives"]:compute(content),
children = {__TS__New(STText, {
anchor = 0.5,
justify = i == 0 and 0.5 or nil,
font = i == 0 and assets["f$helloplayer"] or assets["f$fives"],
position = position,
content = content
})}
{
main = ST:populate(
3,
function(i)
local content = ({ text.header, text.button1, text.button2 })[i + 1]
local metadata
metadata = {
disabled = i == 0,
action = function(____, controller)
repeat
local ____switch12 = i
local ____cond12 = ____switch12 == 1
if ____cond12 then
controller["goto"](controller, nil)
metadata.disabled = true
state.acquitted = false
break
end
____cond12 = ____cond12 or ____switch12 == 2
if ____cond12 then
love.event.quit()
break
end
until true
end
}
)
end
)},
local position = 0.5
return __TS__New(
STHitbox,
{
anchor = 0.5,
metadata = metadata,
position = {
x = (i == 0 and 0 or ST:spread(45, i - 1, 2)) - position,
y = (i == 0 and -8 or 24) - position
},
size = i == 0 and 0 or assets["f$fives"]:compute(content),
children = { __TS__New(STText, {
anchor = 0.5,
justify = i == 0 and 0.5 or nil,
font = i == 0 and assets["f$helloplayer"] or assets["f$fives"],
position = position,
content = content
}) }
}
)
end
)
},
"main"
)
____self_2["then"](

File diff suppressed because it is too large Load Diff

View File

@ -15,16 +15,16 @@ local function textGen()
return {
"<p:player>(A pail. Good for collecting things.)",
unpack(accessor.event_home_bucket and ({
"<p:player><f:sigh>(Apart from rainwater, apparently.)"
}) or ({}))
"<p:player><f:sigh>(Apart from rainwater, apparently.)"
}) or ({}))
}
end
},
item_card = {
name = "Library Card",
info = {
"<p:player>(A library card with a blued, jeweled strip.)"
}
"<p:player>(A library card with a blued, jeweled strip.)"
}
},
item_drill = {
name = "一把电钻",
@ -52,8 +52,8 @@ local function textGen()
"<p:player><f:sigh>(走你。)"
},
info2a = {
"<p:player><f:wink>(A worn plushie.)"
},
"<p:player><f:wink>(A worn plushie.)"
},
info2b = {
"拿下来",
"算了"

View File

@ -294,85 +294,85 @@ local function textGen(pager)
name = function() return accessor.item_glove1 and accessor.item_glove2 and "Work Gloves" or "Work Glove" end,
info = function()
return accessor.item_glove1 and accessor.item_glove2 and ({
"<p:player>(An insulated glove. Good for handling dangerous items.)"
}) or ({
"<p:player>(A pair of insulated gloves. Good for handling dangerous items.)"
})
"<p:player>(An insulated glove. Good for handling dangerous items.)"
}) or ({
"<p:player>(A pair of insulated gloves. Good for handling dangerous items.)"
})
end
},
item_boots = {
name = function() return accessor.item_boot1 and accessor.item_boot2 and "Work Boots" or "Work Boot" end,
info = function()
return accessor.item_boot1 and accessor.item_boot2 and ({
"<p:player>(A sturdy, high-topped boot. Good for traversing hazards.)"
}) or ({
"<p:player>(A pair of sturdy, high-topped boots. Good for traversing hazards.)"
})
"<p:player>(A sturdy, high-topped boot. Good for traversing hazards.)"
}) or ({
"<p:player>(A pair of sturdy, high-topped boots. Good for traversing hazards.)"
})
end
},
ponder_arrival = pager:create(0, {
"<p:player><f:sad>...",
"<p:player><f:sad>(The forest is beautiful...)"
}, {
"<p:player><f:sad>...",
"<p:player><f:sigh>(I have to keep going...)",
"<p:player>(Standing around won't get me any closer to home.)"
}),
"<p:player><f:sad>...",
"<p:player><f:sad>(The forest is beautiful...)"
}, {
"<p:player><f:sad>...",
"<p:player><f:sigh>(I have to keep going...)",
"<p:player>(Standing around won't get me any closer to home.)"
}),
ponder_chase = pager:create(0, {
"<p:player><f:side>(If I could just talk to them...)",
"<p:player><f:determined2>(... there's no time to lose!)"
}, {
"<p:player><f:determined>(... I've got to catch up to them!)"
}),
"<p:player><f:side>(If I could just talk to them...)",
"<p:player><f:determined2>(... there's no time to lose!)"
}, {
"<p:player><f:determined>(... I've got to catch up to them!)"
}),
ponder_gate = {
"<p:player><f:side>...",
"<p:player><f:side>(I need a closer look at that gate...)"
},
"<p:player><f:side>...",
"<p:player><f:side>(I need a closer look at that gate...)"
},
ponder_shock = function()
return {
"<p:player><f:side>(... hm...)",
unpack(accessor.item_glove1 and accessor.item_glove2 and accessor.item_boot1 and accessor.item_boot2 and
({
"<p:player><f:side>(I have these gloves... and these boots...)",
"<p:player>(Oh! I can use these to climb the gate safely!)"
}) or
"<p:player><f:side>(I have these gloves... and these boots...)",
"<p:player>(Oh! I can use these to climb the gate safely!)"
}) or
(accessor.item_glove1 and accessor.item_glove2 and ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have these gloves... and this boot...)",
"<p:player>(With one more boot, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these gloves...)",
"<p:player>(If I had something to protect my feet, I could climb the gate safely.)"
})) or (accessor.item_boot1 and accessor.item_boot2 and ((accessor.item_glove1 or accessor.item_glove2) and ({
"<p:player><f:side>(I have these boots... and this glove...)",
"<p:player>(With one more glove, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these boots...)",
"<p:player>(If I had something to protect my hands, I could climb the gate safely.)"
})) or ((accessor.item_glove1 or accessor.item_glove2) and ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this glove... and this boot...)",
"<p:player>(If only I could duplicate them, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have this glove...)",
"<p:player><f:side>(If I had another glove, and something to protect my feet...)",
"<p:player>(... I could climb the gate safely.)"
})) or ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this boot...)",
"<p:player><f:side>(If I had another boot, and something to protect my hands...)",
"<p:player>(... I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(If I had some extra gear to protect myself...)",
"<p:player>(... I could climb the gate safely.)"
}))))))
"<p:player><f:side>(I have these gloves... and this boot...)",
"<p:player>(With one more boot, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these gloves...)",
"<p:player>(If I had something to protect my feet, I could climb the gate safely.)"
})) or (accessor.item_boot1 and accessor.item_boot2 and ((accessor.item_glove1 or accessor.item_glove2) and ({
"<p:player><f:side>(I have these boots... and this glove...)",
"<p:player>(With one more glove, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have these boots...)",
"<p:player>(If I had something to protect my hands, I could climb the gate safely.)"
})) or ((accessor.item_glove1 or accessor.item_glove2) and ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this glove... and this boot...)",
"<p:player>(If only I could duplicate them, I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(I have this glove...)",
"<p:player><f:side>(If I had another glove, and something to protect my feet...)",
"<p:player>(... I could climb the gate safely.)"
})) or ((accessor.item_boot1 or accessor.item_boot2) and ({
"<p:player><f:side>(I have this boot...)",
"<p:player><f:side>(If I had another boot, and something to protect my hands...)",
"<p:player>(... I could climb the gate safely.)"
}) or ({
"<p:player><f:side>(If I had some extra gear to protect myself...)",
"<p:player>(... I could climb the gate safely.)"
}))))))
}
end,
ponder_gear = {
"<p:player><f:side>(... I think, with this extra gear I've found...)",
"<p:player>(... climbing the gate should be safe.)"
},
"<p:player><f:side>(... I think, with this extra gear I've found...)",
"<p:player>(... climbing the gate should be safe.)"
},
ponder_unlock = {
"<p:player>(... hm.)",
"<p:player><f:sigh>(Better get going before someone closes the gate again.)"
},
"<p:player>(... hm.)",
"<p:player><f:sigh>(Better get going before someone closes the gate again.)"
},
ponder_factory = pager:create(0, {
"<p:player><f:side>...让我猜的话,\n这儿看着像座糖浆厂。)",
"<p:player>(不太确定,反正肯定是某种工厂。)",
@ -389,25 +389,25 @@ local function textGen(pager)
pipewerx3 = "(Arrange the pipes to connect\nthe two endpoints.)",
pipewerx4 = "(Press [X] to exit.)",
system1 = {
"Platform Engaged.",
"Selecting Mode: Transit",
"Selecting Destination: CRIMSON",
"Transit In Progress..."
},
"Platform Engaged.",
"Selecting Mode: Transit",
"Selecting Destination: CRIMSON",
"Transit In Progress..."
},
system2 = "`~1!2@3#4$5%6^7&8*9(0)-_=+[]\\|;:'\",<.>/?",
arrival1 = {
"<p:player><f:sweat>..."
},
arrival2 = {
"<p:player><f:side>(It's the same as before...)",
"<p:player><f:sweat4>(... guess I... didn't really know what I was expecting.)"
},
"<p:player><f:side>(It's the same as before...)",
"<p:player><f:sweat4>(... guess I... didn't really know what I was expecting.)"
},
arrival3 = {
"<p:player><f:what>Whoa."
},
"<p:player><f:what>Whoa."
},
arrival4 = {
"<p:player><f:what>That's big."
},
"<p:player><f:what>That's big."
},
arrival5 = {
"<p:player><f:sigh>(哎,说到底,这儿不是家啊。)",
"<p:player>(起码... 不用困在怪房子里了。)",
@ -418,174 +418,174 @@ local function textGen(pager)
"<p:player><f:sigh>(...但愿我能找到把伞吧。)"
},
stowaway1 = {
"<p:player><f:sweat>...",
"<p:player><f:sweat3>H... hello?"
},
"<p:player><f:sweat>...",
"<p:player><f:sweat3>H... hello?"
},
stowaway2 = {
"<p:player><f:sad2>Wait, don't go! I..."
},
"<p:player><f:sad2>Wait, don't go! I..."
},
stowaway3 = {
"<p:player><f:determined>... get back here!"
},
"<p:player><f:determined>... get back here!"
},
stowaway4 = {
"<p:player><f:determined2>Hey, you!"
},
"<p:player><f:determined2>Hey, you!"
},
stowaway5 = {
"<p:player><f:sweat3>(There's nothing to be afraid of...)"
},
"<p:player><f:sweat3>(There's nothing to be afraid of...)"
},
stowaway6 = {
"<p:player><f:upset2>No, no, no!"
},
"<p:player><f:upset2>No, no, no!"
},
stowaway7 = {
"<p:player><f:annoyed>(... slam the gate on me, why don't you...)"
},
"<p:player><f:annoyed>(... slam the gate on me, why don't you...)"
},
bushitem1 = {
"<p:player><f:side>(There's something buried in here...)",
"<p:none>Pick it up?"
},
"<p:player><f:side>(There's something buried in here...)",
"<p:none>Pick it up?"
},
bushitem2 = {
"Yes",
"No"
},
"Yes",
"No"
},
glover0 = "Work Glove",
glover1 = {
"<p:player><f:surprise>(A glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:sodesuka>(Feels... tough.)"
},
"<p:player><f:surprise>(A glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:sodesuka>(Feels... tough.)"
},
glover2 = {
"<p:player><f:surprise>(Another glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove."
},
"<p:player><f:surprise>(Another glove!)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove."
},
glovey1 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(A glove!)",
"<p:player><f:sodesuka>(Feels... tough.)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(A glove!)",
"<p:player><f:sodesuka>(Feels... tough.)"
},
glovey2 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(Another glove!)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Glove.",
"<p:player><f:surprise>(Another glove!)"
},
bootey1 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player>(... a single boot.)",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player>(... a single boot.)",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
bootey2 = {
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Ah, there it is.)"
},
"<p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Ah, there it is.)"
},
booter0 = "Work Boot",
booter1 = {
"<p:player>(... a single boot.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
"<p:player>(... a single boot.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot.",
"<p:player><f:sigh>(Surely there's another one around, right?)"
},
booter2 = {
"<p:player><f:sigh>(Ah, there it is.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot."
},
"<p:player><f:sigh>(Ah, there it is.)",
"<h:a><p:none>{color=0xa289dc}Dysu{color=0xffffff} got the Work Boot."
},
drillie1 = pager:create(0, {
"<p:player><f:sigh>(I could just use this drill to open the gate...)",
"<p:player>(... but in doing so, its batteries would be completely drained.)",
"<p:player><f:confused>(Would I be able to replace them?)"
}, {
"<p:player><f:confused>(Should I use the drill to open the gate, or save it for later?)"
}),
"<p:player><f:sigh>(I could just use this drill to open the gate...)",
"<p:player>(... but in doing so, its batteries would be completely drained.)",
"<p:player><f:confused>(Would I be able to replace them?)"
}, {
"<p:player><f:confused>(Should I use the drill to open the gate, or save it for later?)"
}),
drillie2 = {
"Use The Drill",
"Find Another Way"
},
"Use The Drill",
"Find Another Way"
},
drillie3 = {
"<p:player>..."
},
drillie4 = {
"<p:player><f:sigh>(... that did the trick.)"
},
"<p:player><f:sigh>(... that did the trick.)"
},
gateclimb0 = "Gate",
gateclimb1 = {
"<p:player><f:side>...",
"<p:player><f:surprise>(Ah! Of course!)",
"<p:player><f:determined2>(I'll just climb over it!)"
},
"<p:player><f:side>...",
"<p:player><f:surprise>(Ah! Of course!)",
"<p:player><f:determined2>(I'll just climb over it!)"
},
gateclimb2a = {
"<p:player><f:annoyed>... ugh..."
},
"<p:player><f:annoyed>... ugh..."
},
gateclimb2b = {
"<p:player><f:sweat5>(... guess I'll have to find something else.)"
},
"<p:player><f:sweat5>(... guess I'll have to find something else.)"
},
gateclimb2c = {
"<p:player><f:side>(Wait. I have these gloves and boots...)",
"<p:player>(I could try again with the extra gear to protect myself.)",
"<p:none>Climb over the gate?"
},
"<p:player><f:side>(Wait. I have these gloves and boots...)",
"<p:player>(I could try again with the extra gear to protect myself.)",
"<p:none>Climb over the gate?"
},
gateclimb3 = {
"<p:player><f:sweat>(It's electrically charged.)"
},
"<p:player><f:sweat>(It's electrically charged.)"
},
gateclimb4 = {
"<p:player><f:sigh>(Can't climb over the gate without extra gear.)"
},
"<p:player><f:sigh>(Can't climb over the gate without extra gear.)"
},
gateclimb5 = pager:create(
0,
function()
local ____array_0 = __TS__SparseArrayNew(unpack(accessor.event_redleaf_gateclimb == 2 and ({
"<p:player>(I have the extra gear I need to protect myself.)"
}) or ({
"<p:player><f:side>(Wait. I have these gloves and boots now...)",
"<p:player>(I could try again with the extra gear to protect myself.)"
})))
"<p:player>(I have the extra gear I need to protect myself.)"
}) or ({
"<p:player><f:side>(Wait. I have these gloves and boots now...)",
"<p:player>(I could try again with the extra gear to protect myself.)"
})))
__TS__SparseArrayPush(____array_0, "<p:none>Climb over the gate?")
return { __TS__SparseArraySpread(____array_0) }
end,
{
"<p:none>Climb over the gate?"
}
"<p:none>Climb over the gate?"
}
),
gateclimb6 = {
"Yes",
"No"
},
"Yes",
"No"
},
gateclimb7 = {
"<p:player><f:sigh>(Third climb's the charm. placeholder :3)"
},
"<p:player><f:sigh>(Third climb's the charm. placeholder :3)"
},
gateclimb8 = {
"<p:player><f:determined2>(Alright!)"
},
"<p:player><f:determined2>(Alright!)"
},
gateclimb9 = {
"<p:player><f:confused>(Is this... a factory?)"
},
"<p:player><f:confused>(Is this... a factory?)"
},
gateclimb10 = {
"<p:player><f:sodesuka>(Time to find out what that rascal was up to.)"
}
"<p:player><f:sodesuka>(Time to find out what that rascal was up to.)"
}
},
trivia = {
tree = {
"<p:player><f:surprise>It's a tree! (placeholder :3)"
},
"<p:player><f:surprise>It's a tree! (placeholder :3)"
},
barrel = {
"<p:player><f:side>Barrel barrel barrel- (placeholder :3)"
},
"<p:player><f:side>Barrel barrel barrel- (placeholder :3)"
},
lid = {
"<p:player><f:annoyed>A lid. (placeholder :3)"
},
"<p:player><f:annoyed>A lid. (placeholder :3)"
},
facsign = {
"<p:player>\"REDLEAF INDUSTRIES\"\n\"Factory Grounds Nearby\""
},
"<p:player>\"REDLEAF INDUSTRIES\"\n\"Factory Grounds Nearby\""
},
sapsign = {
"<p:player>\"Kotokura Syrup Exports\"\n\"Redleaf Industries\""
},
"<p:player>\"Kotokura Syrup Exports\"\n\"Redleaf Industries\""
},
carsign = pager:create(0, {
"<p:player><f:sweat>\"Danger: Industrial Vehicles\"",
"<p:player><f:side>(Guess I should be careful...)"
}, {
"<p:player><f:sweat>\"Danger: Industrial Vehicles\""
}),
"<p:player><f:sweat>\"Danger: Industrial Vehicles\"",
"<p:player><f:side>(Guess I should be careful...)"
}, {
"<p:player><f:sweat>\"Danger: Industrial Vehicles\""
}),
powertower = {
"<p:player><f:confused>A powertower? (placeholder :3)"
},
"<p:player><f:confused>A powertower? (placeholder :3)"
},
placeholder2 = pager:create(0, {
"<p:player>placeholder :3"
})
"<p:player>placeholder :3"
})
},
trivia_tooltip = {
tree = "Tree",