Compare commits

...

31 Commits

Author SHA1 Message Date
MrZ_26
3a3d062e5c 版本推进 2023-02-09 04:04:22 +08:00
C₂₉H₂₅N₃O₅
2ee9ed237f Added Zundamon voicepack (#846) 2023-02-09 03:55:10 +08:00
MrFaq2018
9159661945 Update lang_es.lua (#850) 2023-02-09 03:54:32 +08:00
MrZ_26
0efd2c8044 开启竖屏选项时1P玩家强行放大至两倍 2023-02-09 03:51:44 +08:00
MrZ_26
0aaa5822fb 更新翻译人员列表 2023-02-09 03:37:16 +08:00
MrZ_26
2b258aeaed 修复团队战结束判定错误 2023-02-09 03:33:12 +08:00
ShardNguyen
0d7a80f2b5 Vietnamese Translation (#835) 2023-02-09 03:15:43 +08:00
MrZ_26
d433d98c04 更新一个中文tip和赞助名单 2023-02-06 11:18:55 +08:00
MrZ_26
180dc12460 删除一小段无效代码 2023-02-02 15:28:17 +08:00
MrZ_26
dd1d0b4126 删除关于成就系统的tip #841 2023-01-28 00:17:32 +08:00
MrZ_26
f1517fad1a 模式地图界面按f2开关显示网格(方便看位置) close #827 2023-01-25 03:21:30 +08:00
sakurw
62ed279f07 Update lang_ja.lua (#840) 2023-01-25 03:00:41 +08:00
MrZ_26
6925d59f87 修复手动登录失败后还会多余地执行一次去login场景 2023-01-25 02:54:18 +08:00
MrZ_26
848cc41c72 版本推进 2023-01-23 02:16:13 +08:00
MrZ_26
f212076604 整理代码
新增没做完的公告页面
因为一些神秘token问题连接失败后会要求重新登录
2023-01-23 02:14:10 +08:00
scdhh
ee4fd51e0f Add more supported languages to the installer (#839) 2023-01-23 01:50:05 +08:00
MrZ_26
f96b4f6724 把授权链接放到main里另外两个url处 2023-01-23 01:24:35 +08:00
ParticleG
7b6f2f826a 使用Release版本的官网地址 2023-01-23 01:11:43 +08:00
Particle_G
8ed4fd6cba Merge pull request #838 from 26F-Studio/ci-api-new
Ci api new close #821
2023-01-23 01:09:58 +08:00
ParticleG
b914cb26be 使用v1版本的Windows CI 2023-01-23 00:59:56 +08:00
ParticleG
97472e9a17 更新API端口 2023-01-23 00:48:20 +08:00
ParticleG
8b61bd7d8a - Update workflow 2023-01-19 14:33:46 +08:00
ParticleG
1699a2b68a - Update workflow 2023-01-19 01:02:38 +08:00
ParticleG
969aa87a10 调用WIndows Action前更新Tenplate 2023-01-15 12:37:17 +08:00
ParticleG
b3dfa7d7ce 上传Windows安装包 2023-01-15 11:00:24 +08:00
scdhh
483de50169 Update main.yml 2023-01-15 01:13:41 +08:00
ParticleG
96762ffa5c 更新Windows安装包CI 2023-01-15 01:06:39 +08:00
MrZ_26
88d05c2354 修正一些新登录界面小问题 2023-01-15 01:00:17 +08:00
ParticleG
8aac152ee6 使用新的登录和鉴权API 2023-01-12 18:07:24 +08:00
ParticleG
d83779662a 更新登录界面 2023-01-12 16:31:17 +08:00
ParticleG
c19e656d46 删除密码登录场景 2023-01-09 17:34:35 +08:00
113 changed files with 1392 additions and 580 deletions

View File

@@ -193,7 +193,7 @@ jobs:
dir: ./libAndroid
- name: Build Android packages
id: build-packages
uses: love-actions/love-actions-android@v1
uses: love-actions/love-actions-android@main
with:
app-name: ${{ needs.get-info.outputs.app-name }}
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
@@ -205,6 +205,7 @@ jobs:
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
resource-path: ./.github/build/android/${{ env.BUILD_TYPE }}/res
extra-assets: ./libAndroid/
custom-scheme: studio26f://oauth
product-name: ${{ steps.process-app-name.outputs.product-name }}
version-string: ${{ needs.get-info.outputs.version-string }}
version-code: ${{ needs.get-info.outputs.version-code }}
@@ -681,6 +682,19 @@ jobs:
with:
platform: Windows
dir: ./ColdClear
- name: Update Windows template
shell: python3 {0}
run: |
version_string = "${{ needs.get-info.outputs.version-string }}"
file_version = (f"{version_string.replace('.', ',')},0")
with open("./.github/build/windows/${{ env.BUILD_TYPE }}/template.rc", "r+", encoding="utf8") as file:
data = file.read()
data = data\
.replace("@Version", version_string)\
.replace("@FileVersion", file_version)
file.seek(0)
file.truncate()
file.write(data)
- name: Build Windows packages
id: build-packages
uses: love-actions/love-actions-windows@v1
@@ -691,7 +705,9 @@ jobs:
extra-assets-x86: ./ColdClear/x86/CCloader.dll ./ColdClear/x86/cold_clear.dll
extra-assets-x64: ./ColdClear/x64/CCloader.dll ./ColdClear/x64/cold_clear.dll
product-name: ${{ steps.process-app-name.outputs.product-name }}
version-string: ${{ needs.get-info.outputs.version-string }}
app-id: ${{ secrets.WINDOWS_APP_ID }}
project-website: https://www.studio26f.org/
installer-languages: ChineseSimplified.isl ChineseTraditional.isl English.isl Spanish.isl French.isl Indonesian.isl Japanese.isl Portuguese.isl
output-folder: ${{ env.OUTPUT_FOLDER }}
- name: Upload 32-bit artifact
uses: actions/upload-artifact@v3
@@ -703,6 +719,11 @@ jobs:
with:
name: ${{ needs.get-info.outputs.base-name }}_Windows_x64
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
- name: Upload installer artifact
uses: actions/upload-artifact@v3
with:
name: ${{ needs.get-info.outputs.base-name }}_Windows_installer
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_installer.exe
- name: Prepare for release
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
shell: bash
@@ -710,6 +731,7 @@ jobs:
mkdir -p ${{ env.RELEASE_FOLDER }}
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x86.zip ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x86.zip
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x64.zip
cp ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_installer.exe ${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_installer.exe
- name: Upload release
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
uses: ncipollo/release-action@v1
@@ -718,6 +740,7 @@ jobs:
artifacts: |
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x86.zip
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_x64.zip
${{ env.RELEASE_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_Windows_installer.exe
body: ${{ needs.get-info.outputs.update-note }}
name: ${{ needs.get-info.outputs.update-title }}
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}

View File

@@ -25,7 +25,7 @@ TIME=love.timer.getTime
-- Global Vars & Settings
SFXPACKS={'chiptune'}
VOCPACKS={'miya','mono','xiaoya','miku'}
VOCPACKS={'miya','mono','xiaoya','miku','zundamon'}
FIRSTLAUNCH=false
DAILYLAUNCH=false
@@ -272,6 +272,7 @@ IMG.init{
xiaoyaCH='media/image/characters/xiaoya.png',
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
mikuCH='media/image/characters/miku.png',
zundamonCH='media/image/characters/zundamon.png',
z={
character='media/image/characters/z_character.png',
screen1='media/image/characters/z_screen1.png',
@@ -502,6 +503,7 @@ LANG.init('zh',
ja=require'parts.language.lang_ja',
symbol=require'parts.language.lang_symbol',
zh_code=require'parts.language.lang_zh_code',
vi=require'parts.language.lang_vi',
-- 1. Add language file to LANG folder;
-- 2. Require it;
-- 3. Add a button in parts/scenes/lang.lua;
@@ -601,6 +603,8 @@ for _,fileName in next,fs.getDirectoryItems('replay') do
end
table.sort(REPLAY,function(a,b) return a.fileName>b.fileName end)
AUTHURL="https://studio26f.org/oauth?product=techmino"
AUTHHOST="cafuuchino1.3322.org:8081"
WS.switchHost('cafuuchino1.3322.org','10026','/techmino/ws/v1')
HTTP.setHost("cafuuchino1.3322.org:10026")
HTTP.setThreadCount(1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -715,14 +715,7 @@ do-- function freshPlayerPosition(sudden)
end end
return l
end)(),
[MATH.inf]=(function()
local l={main={340,75,1}}
for y=-3,3 do for x=0,6 do
table.insert(l,{290-47*x,340+92*y,.075})
table.insert(l,{940+47*x,340+92*y,.075})
end end
return l
end)(),
[MATH.inf]={main={340,75,1}},
},
dead={
[1]={{340,75,1}},
@@ -890,7 +883,15 @@ do-- function freshPlayerPosition(sudden)
if alive then
for i=1,#L do
L[i][method](L[i],unpack(posList[i==1 and 'main' or i-1]))
if i==1 then
if SETTING.portrait then-- WARNING: Brutly scaling up to 2x only for 1P, will cause many other visual issues.
L[i][method](L[i],36,-260,2)
else
L[i][method](L[i],unpack(posList['main']))
end
else
L[i][method](L[i],unpack(posList[i-1]))
end
end
else
for i=1,#L do

View File

@@ -587,10 +587,8 @@ do-- Userdata tables
USER=setmetatable({-- User infomation
__data={
uid=false,
email=false,
password=false,
rToken=false,
aToken=false,
oToken=false,
},
},{
__index=function(self,k)

View File

@@ -334,9 +334,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"Performances",
"Electric283",
@@ -744,21 +744,11 @@ return {
music="BGMs",
label="label",
},
login_pw={
login={
title="Sign In",
login_mail="Login with E-mail/Sign Up",
email="Email Address",
password="Password",
showEmail="Show Email",
login="Log In",
},
login_mail={
title="Sign In/Sign Up",
login_pw="Password Sign In",
email="Email Address",
send="Send code",
code="Verification Code",
verify="Verify",
ticket="Auth Ticket",
authorize="Open Authorizing Page",
submit="Submit",
},
reset_password={
title="Reset Password",
@@ -952,7 +942,6 @@ return {
"6next 1hold!",
"6next 6hold?!",
"A choke a day keeps record away",
"Achievement system coming soon!",
"ALL SPIN!",
"Am G F G",
"B2B2B???",

View File

@@ -17,7 +17,7 @@ return {
playedLong="[Anti-adicción] Estuviste jugando un buen rato hoy. Recuerda descansar de vez en cuando.",
playedTooMuch="[Anti-adicción] ¡Has jugado mucho por hoy! No puedes jugar más.",
settingWarn="¡Ten cuidado con modificar esto!",
-- settingWarn2="This setting takes effect after restart",
settingWarn2="Los ajustes se aplicarán luego de reiniciar",
atkModeName={"Al azar","Medallas","KOs","Atacantes"},
royale_remain="$1 Jugadores Restantes",
@@ -187,7 +187,7 @@ return {
leaveRoom="$1 salió de la sala.",
roomRemoved="Sala removida",
ready="LISTO",
spectating="Espectando",
spectating="Especteando",
@@ -334,9 +334,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"Performances",
"Electric283",
@@ -532,8 +532,8 @@ return {
power="Inf. de Batería",
clean="Fast Draw",
fullscreen="Pant. Completa",
-- portrait="Portrait",
-- msaa="MSAA level",
portrait="Vertical",
msaa="Nivel de MSAA",
bg_on="Fondo Normal",
bg_off="Sin Fondo",
@@ -736,21 +736,11 @@ return {
music="BGMs",
label="Etiq.",
},
login_pw={
title="Entrar",
login_mail="Registrarse/Pedir código",
email="Correo Elec.",
password="Contraseña",
showEmail="Mostrar Correo",
login="Entrar",
},
login_mail={
title="Entrar/Registrarse",
login_pw="Ingr. con Contraseña",
email="Correo Elec.",
send="Enviar código",
code="Código de Verif.",
verify="Verificar",
login={
title="Registrarse",
ticket="Ticket de Verif.",
authorize="Abrir página de Verificación",
submit="Enviar",
},
reset_password={
title="Restablecer Contraseña",

View File

@@ -302,9 +302,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"Performance",
"Electric283",
@@ -699,21 +699,11 @@ return {
music="Musique",
-- label="label",
},
login_pw={
title="Connexion",
-- login_mail="Login with E-mail/Sign Up",
email="E-mail",
password="Mot de passe",
-- showEmail="Show Email",
login="Connexion",
},
login_mail={
title="Connexion/Enregistrement",
-- login_pw="Password Sign In",
email="E-mail",
-- send="Send code",
-- code="Verification Code",
-- verify="Verify",
login={
-- title="Sign In",
-- ticket="Auth Ticket",
-- authorize="Open Authorizing Page",
-- submit="Submit",
},
reset_password={
-- title="Reset Password",

View File

@@ -335,9 +335,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"Pertunjukan",
"Electric283",
@@ -745,21 +745,11 @@ return {
music="Musik",
label="label",
},
login_pw={
title="Masuk",
-- login_mail="Login with E-mail/Sign Up",
email="Alamat Email",
password="Password",
showEmail="Tunjukkan Email",
login="Masuk",
},
login_mail={
title="Masuk/Daftar",
-- login_pw="Password Sign In",
email="Alamat Email",
-- send="Send code",
-- code="Verification Code",
-- verify="Verify",
login={
-- title="Sign In",
-- ticket="Auth Ticket",
-- authorize="Open Authorizing Page",
-- submit="Submit",
},
reset_password={
-- title="Reset Password",

View File

@@ -336,9 +336,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"パフォーマンス",
"Electric283",
@@ -746,21 +746,11 @@ return {
music="",
label="ラベル",
},
login_pw={
title="ログイン",
login_mail="アカウントを登録/パスワードを忘れた",
email="Eメールアドレ",
password="パスワード",
showEmail="Eメールアドレスを表示",
login="ログイン",
},
login_mail={
title="サインイン/サインアップ",
login_pw="パスワードでログイン",
email="Eメールアドレス",
send="認証コード送信",
code="認証コード",
verify="認証",
logi={
title="サインイン",
ticket="認証チケット",
authorize="認証ページにアクセ",
submit="送信",
},
reset_password={
title="パスワード再設定",
@@ -990,6 +980,7 @@ getTip={refuseCopy=true,
"B2B2B2Bは可能?",
"Back-to-Back Techrash, 10 REN, PC!",
"音楽や効果音の制作に協力いただける方は大歓迎です!",
"ここに流れるネタも募集中です!",
"Bridge Clearが間もなく実装されます!",
"Color Clearが間もなく実装されます!",
"DASとARRを低くすると、速くなるけど操作が難しくなる!",
@@ -1014,10 +1005,12 @@ getTip={refuseCopy=true,
"Techminoは\"Technique\"\"Tetromino\"を掛け合わせ造語です!",
"Techminoプレイヤーの未来はあなた達のものです!",
"TetroDictionary is now available in English.",
"TetroDictionaryの日本語版もあります",
" while (false)",
"ZS JL T O I",
"ゲーム内にはモード選択マップからじゃ入れない隠しモードがいくつかあります!",
"このゲームでは全てのSpinに火力補正があります!",
"テクミのAll spin気持ちよすぎだろ!!",
"このゲームのほとんどの楽曲はBeepboxを用いて作曲されました!",
"サーバーが不規則に落ちます",
"スタッフロールの背景に流れている名前はスポンサーの名前です!",
@@ -1060,6 +1053,7 @@ getTip={refuseCopy=true,
{C.R,"\"DMCA濫用\""},
{C.R,"DD",C.Z," 砲=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"D",C.Z,""},
{C.R,"DT",C.Z," 砲=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z,""},
{C.R,"DKS",C.Z,"=",C.P,"TS",C.R,"T",C.Z,"+",C.R,"DT",C.Z,""},
{C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR ",C.P,"LLL ",C.C,"FFF ",C.Y,"RfR ",C.Y,"RRf ",C.Y,"rFF"},
{C.Y,"O-Spin Triple!"},
{C.Z,"なんだって? ",C.lC,"X-Spin?"},

View File

@@ -323,9 +323,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"Performance",
"Electric283",
@@ -734,21 +734,11 @@ return {
-- music="BGMs",
-- label="label",
},
login_pw={
title="Log in",
-- login_mail="Login with E-mail/Sign Up",
email="Endereço De Email",
password="Senha",
-- showEmail="Show Email",
login="Log in",
},
login_mail={
title="Log in/Registrar",
-- login_pw="Password Sign In",
email="Endereço De Email",
-- send="Send code",
-- code="Verification Code",
-- verify="Verify",
login={
-- title="Sign In",
-- ticket="Auth Ticket",
-- authorize="Open Authorizing Page",
-- submit="Submit",
},
reset_password={
-- title="Reset Password",

View File

@@ -485,21 +485,11 @@ return {
music="~~~",
label="...",
},
login_pw={
title="Log in",
-- login_mail="Login with E-mail/Sign Up",
email="@",
password="*",
showEmail="?",
login="",
},
login_mail={
title="Log in/Sign up",
login_pw="*** →",
email="@",
send="",
code="",
verify="!",
login={
title="Sign In",
ticket="***",
authorize="**?",
submit="<!>",
},
reset_password={
title="R ***",

1059
parts/language/lang_vi.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -335,9 +335,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"演出",
"Electric283",
@@ -744,21 +744,11 @@ return {
path="打开存储目录",
save="用户档案管理",
},
login_pw={
login={
title="登录",
login_mail="邮箱登录/注册",
email="邮箱",
password="密码",
showEmail="显示邮箱",
login="登录",
},
login_mail={
title="登录/注册",
login_pw="密码登录",
email="邮箱",
send="发送验证码",
code="验证码",
verify="验证邮箱",
ticket="登录口令",
authorize="去官网获取口令",
submit="登录",
},
reset_password={
title="重置密码",
@@ -1078,6 +1068,7 @@ return {
"Techmino 濂界帺锛",
"Techmino console了解一下",
"Techmino: App意外退出。",
"Techmino: 耗电异常 ——在后台阻止系统休眠",
"Techmino.exe 已停止工作",
"TechminOS coming s∞n",
"viod main[]",

View File

@@ -283,10 +283,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
-- "XMiao",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"演出",
"Electric283",
@@ -693,21 +692,11 @@ return {
path="OpenPath();",
save="DataManagement();",
},
login_pw={
title="LogIn.UI",
login_mail="Login_mail_sign_up()",
email="Email=",
password="Password=",
showEmail="ShowEmail",
login="Login();",
},
login_mail={
title="LogIn_Register.UI",
login_pw="Login_pw();",
email="Email=",
send="Send();",
code="V-code=",
verify="Verify();",
login={
title="SignIn.UI",
ticket="Ticket=",
authorize="Authorize()",
submit="Submit()",
},
reset_password={
title="Reset_Password.UI",

View File

@@ -335,9 +335,9 @@ return {
"ScF",
"C₂₉H₂₅N₃O₅",
"NOT_A_ROBOT",
"sakurw",
"Airun",
"幽灵3383",
"XMiao",
"sakurw, Airun, 幽灵3383",
"Shard Nguyễn, Squishy và cộng đồng TVN",
"",
"Performances",
"Electric283",
@@ -744,21 +744,11 @@ return {
path="打開存儲目錄",
save="用戶資料管理",
},
login_pw={
login={
title="登錄",
login_mail="電郵登錄/注册",
email="電郵",
password="密碼",
showEmail="顯示郵箱",
login="登錄",
},
login_mail={
title="登錄/註冊",
login_pw="密碼登錄",
email="電郵",
send="發送驗證碼",
code="驗證碼",
verify="驗證郵箱",
ticket="登錄口令",
authorize="去官網獲取口令",
submit="登錄",
},
reset_password={
title="重設密碼",

View File

@@ -119,255 +119,43 @@ local function getMsg(request,timeout)
end
end
end
function NET.getCode(email)
if not TASK.lock('getCode') then return end
function NET.login(auto)
if not TASK.lock('login') then return end
TASK.new(function()
WAIT{
quit=function()
TASK.unlock('getCode')
HTTP.deletePool('getCode')
end,
timeout=12.6,
}
local res=getMsg({
pool='getCode',
path='/techmino/api/v1/auth/verify/email',
body={email=email},
},12.6)
if res and res.code==200 then
MES.new('info',text.checkEmail,5)
end
WAIT.interrupt()
end)
end
function NET.codeLogin(email,code)
if not TASK.lock('codeLogin') then return end
TASK.new(function()
WAIT{
quit=function()
TASK.unlock('codeLogin')
HTTP.deletePool('codeLogin')
end,
timeout=6.26,
}
local res=getMsg({
pool='codeLogin',
path='/techmino/api/v1/auth/login/email',
body={
email=email,
code=code,
},
},6.26)
if res then
if res.code==200 then
USER.rToken=res.data.refreshToken
USER.aToken=res.data.accessToken
saveUser()
NET.ws_connect()
SCN.swapTo('net_menu')
elseif res.code==201 then
USER.rToken=res.data.refreshToken
USER.aToken=res.data.accessToken
saveUser()
SCN.pop()SCN.push('net_menu')
SCN.go('reset_password',nil,code)
end
end
WAIT.interrupt()
end)
end
function NET.setPW(code,pw)
if not TASK.lock('setPW') then return end
TASK.new(function()
WAIT{
quit=function()
TASK.unlock('setPW')
HTTP.deletePool('setPW')
end,
timeout=6.26,
}
local salt do
local res=getMsg({
pool='pwLogin',
path='/techmino/api/v1/auth/seed/email',
body={
email=USER.email,
},
},6.26)
if res and res.code==200 then
salt=res.data
else
WAIT.interrupt()
return
end
end
pw=HASH.pbkdf2(HASH.sha3_256,pw,salt,260)
local res=getMsg({
pool='setPW',
method='PUT',
path='/techmino/api/v1/auth/reset/email',
body={
email=USER.email,
code=code,
newPassword=pw,
},
},6.26)
if res then
if res.code==200 then
USER.password=pw
saveUser()
SCN.back()
end
end
WAIT.interrupt()
end)
end
function NET.autoLogin()
if not TASK.lock('autoLogin') then return end
TASK.new(function()
WAIT{
quit=function()
TASK.unlock('autoLogin')
HTTP.deletePool('autoLogin')
TASK.unlock('login')
HTTP.deletePool('login')
end,
timeout=12.6,
}
if USER.aToken then
local res=getMsg({
pool='autoLogin',
path='/techmino/api/v1/auth/check',
pool='login',
url=AUTHHOST,
path='/studio26f/api/v1/auth/check',
headers={["x-access-token"]=USER.aToken},
},6.26)
if res then
if res.code==200 then
USER.uid=res.data
saveUser()
NET.ws_connect()
SCN.go('net_menu')
WAIT.interrupt()
return
if res and math.floor(res.code/100)==2 then
USER.uid=res.data.playerId
if res.data.accessToken then
USER.aToken=res.data.accessToken
end
else
saveUser()
NET.ws_connect()
if not auto then-- Quit login menu
SCN.pop()
end
SCN.go('net_menu')
WAIT.interrupt()
return
end
end
if USER.rToken then
local res=getMsg({
pool='autoLogin',
path='/techmino/api/v1/auth/refresh',
headers={["x-refresh-token"]=USER.rToken},
},6.26)
if res then
if res.code==200 then
USER.rToken=res.data.refreshToken
USER.aToken=res.data.accessToken
saveUser()
NET.ws_connect()
SCN.go('net_menu')
WAIT.interrupt()
return
end
else
WAIT.interrupt()
return
end
end
if USER.password then
local res=getMsg({
pool='pwLogin',
path='/techmino/api/v1/auth/login/email',
body={
email=USER.email,
password=USER.password,
},
},6.26)
if res then
if res.code==200 then
USER.rToken=res.data.refreshToken
USER.aToken=res.data.accessToken
saveUser()
NET.ws_connect()
SCN.go('net_menu')
WAIT.interrupt()
return
end
else
WAIT.interrupt()
end
end
SCN.go('login_pw')
WAIT.interrupt()
end)
end
function NET.pwLogin(email,pw)
if not TASK.lock('pwLogin') then return end
TASK.new(function()
WAIT{
quit=function()
TASK.unlock('pwLogin')
HTTP.deletePool('pwLogin')
end,
timeout=12.6,
}
TEST.yieldT(.26)
local salt do
local res=getMsg({
pool='pwLogin',
path='/techmino/api/v1/auth/seed/email',
body={
email=email,
},
},6.26)
if res and res.code==200 then
salt=res.data
else
WAIT.interrupt()
return
end
end
pw=HASH.pbkdf2(HASH.sha3_256,pw,salt,260)
do
local res=getMsg({
pool='pwLogin',
path='/techmino/api/v1/auth/login/email',
body={
email=email,
password=pw,
},
},6.26)
if res then
if res.code==200 then
USER.email=email
USER.password=pw
USER.rToken=res.data.refreshToken
USER.aToken=res.data.accessToken
saveUser()
NET.ws_connect()
SCN.swapTo('net_menu')
end
end
if auto then
SCN.go('login')
end
WAIT.interrupt()
@@ -377,7 +165,8 @@ function NET.getUserInfo(uid)
TASK.new(function()
local res=getMsg({
pool='getInfo',
path='/techmino/api/v1/player/info?playerId='..uid,
url=AUTHHOST,
path='/studio26f/api/v1/player/info?playerId='..uid,
},6.26)
if res and res.code==200 and type(res.data)=='table' then
@@ -389,7 +178,8 @@ function NET.getAvatar(uid)
TASK.new(function()
local res=getMsg({
pool='getInfo',
path='/techmino/api/v1/player/avatar?playerId='..uid,
url=AUTHHOST,
path='/studio26f/api/v1/player/avatar?playerId='..uid,
},6.26)
if res and res.code==200 and type(res.data)=='string' then
@@ -397,6 +187,20 @@ function NET.getAvatar(uid)
end
end)
end
function NET.getNotice(lang,count)
WAIT{timeout=6.26}
TASK.new(function()
local res=getMsg({
pool='getNotice',
path='/techmino/api/v1/notice?language='..(lang or 'zh_cn')..'&lastCount='..(count or 5),
},6.26)
if res and res.code==200 and type(res.data)=='string' then
local dataStr=""
SCN.go('notice',nil,dataStr)
end
end)
end
--------------------------<NEW WS API>
local actMap={
global_getOnlineCount= 1000,
@@ -759,7 +563,7 @@ end
function NET.ws_connect()
if WS.status('game')=='dead' then
WS.connect('game','',{['x-access-token']=USER.aToken},6)
WS.connect('game','',{['x-access-token']=USER.oToken},6)
TASK.removeTask_code(NET.ws_update)
TASK.new(NET.ws_update)
end
@@ -772,6 +576,8 @@ function NET.ws_update()
while true do
TEST.yieldT(1/26)
if WS.status('game')=='dead' then
USER.aToken=false
USER.oToken=false
TEST.yieldUntilNextScene()
GAME.playing=false
SCN.backTo('main')
@@ -785,11 +591,15 @@ function NET.ws_update()
local res=getMsg({
pool='getUID',
path='/techmino/api/v1/auth/check',
headers={["x-access-token"]=USER.aToken},
headers={["x-access-token"]=USER.oToken},
},6.26)
if res and res.code==200 then
USER.uid=res.data
if res and math.floor(res.code/100)==2 then
USER.uid=res.data.playerId
if res.data.accessToken then
USER.oToken=res.data.accessToken
end
saveUser()
else
TEST.yieldUntilNextScene()
GAME.playing=false

Some files were not shown because too many files have changed in this diff Show More