Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro2
Commits
eb43a5c8
Commit
eb43a5c8
authored
Feb 14, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint
parent
cfb22b15
Pipeline
#43204
passed with stages
in 48 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
9 deletions
+21
-9
src/constants/trans.ts
src/constants/trans.ts
+6
-3
src/feats/player-status-notify.ts
src/feats/player-status-notify.ts
+4
-1
src/feats/reconnect.ts
src/feats/reconnect.ts
+1
-1
src/ocgcore-worker/ocgcore-worker.ts
src/ocgcore-worker/ocgcore-worker.ts
+5
-1
src/utility/can-increase-time.ts
src/utility/can-increase-time.ts
+5
-1
src/utility/is-update-message.ts
src/utility/is-update-message.ts
+0
-1
src/utility/shuffle-decks-by-seed.ts
src/utility/shuffle-decks-by-seed.ts
+0
-1
No files found.
src/constants/trans.ts
View file @
eb43a5c8
...
@@ -15,8 +15,10 @@ export const TRANSLATIONS = {
...
@@ -15,8 +15,10 @@ export const TRANSLATIONS = {
left_game
:
'
quited game
'
,
left_game
:
'
quited game
'
,
disconnect_from_game
:
'
disconnected from the game
'
,
disconnect_from_game
:
'
disconnected from the game
'
,
reconnect_to_game
:
'
reconnected to the game
'
,
reconnect_to_game
:
'
reconnected to the game
'
,
reconnect_kicked
:
"
You are kicked out because you're logged in on other devices.
"
,
reconnect_kicked
:
pre_reconnecting_to_room
:
'
You will be reconnected to your previous game. Please pick your previous deck.
'
,
"
You are kicked out because you're logged in on other devices.
"
,
pre_reconnecting_to_room
:
'
You will be reconnected to your previous game. Please pick your previous deck.
'
,
deck_incorrect_reconnect
:
'
Please pick your previous deck.
'
,
deck_incorrect_reconnect
:
'
Please pick your previous deck.
'
,
reconnect_failed
:
'
Reconnect failed.
'
,
reconnect_failed
:
'
Reconnect failed.
'
,
reconnecting_to_room
:
'
Reconnecting to server...
'
,
reconnecting_to_room
:
'
Reconnecting to server...
'
,
...
@@ -37,7 +39,8 @@ export const TRANSLATIONS = {
...
@@ -37,7 +39,8 @@ export const TRANSLATIONS = {
disconnect_from_game
:
'
断开了连接
'
,
disconnect_from_game
:
'
断开了连接
'
,
reconnect_to_game
:
'
重新连接了
'
,
reconnect_to_game
:
'
重新连接了
'
,
reconnect_kicked
:
'
你的账号已经在其他设备登录,你被迫下线。
'
,
reconnect_kicked
:
'
你的账号已经在其他设备登录,你被迫下线。
'
,
pre_reconnecting_to_room
:
'
你有未完成的对局,即将重新连接,请选择你在本局决斗中使用的卡组并准备。
'
,
pre_reconnecting_to_room
:
'
你有未完成的对局,即将重新连接,请选择你在本局决斗中使用的卡组并准备。
'
,
deck_incorrect_reconnect
:
'
请选择你在本局决斗中使用的卡组。
'
,
deck_incorrect_reconnect
:
'
请选择你在本局决斗中使用的卡组。
'
,
reconnect_failed
:
'
重新连接失败。
'
,
reconnect_failed
:
'
重新连接失败。
'
,
reconnecting_to_room
:
'
正在重新连接到服务器……
'
,
reconnecting_to_room
:
'
正在重新连接到服务器……
'
,
...
...
src/feats/player-status-notify.ts
View file @
eb43a5c8
...
@@ -17,7 +17,10 @@ export class PlayerStatusNotify {
...
@@ -17,7 +17,10 @@ export class PlayerStatusNotify {
const
room
=
event
.
room
;
const
room
=
event
.
room
;
if
(
client
.
pos
===
NetPlayerType
.
OBSERVER
)
{
if
(
client
.
pos
===
NetPlayerType
.
OBSERVER
)
{
// 观战者离开
// 观战者离开
await
room
.
sendChat
(
`
${
client
.
name
}
#{quit_watch}`
,
ChatColor
.
LIGHTBLUE
);
await
room
.
sendChat
(
`
${
client
.
name
}
#{quit_watch}`
,
ChatColor
.
LIGHTBLUE
,
);
}
else
{
}
else
{
// 玩家离开
// 玩家离开
await
room
.
sendChat
(
`
${
client
.
name
}
#{left_game}`
,
ChatColor
.
LIGHTBLUE
);
await
room
.
sendChat
(
`
${
client
.
name
}
#{left_game}`
,
ChatColor
.
LIGHTBLUE
);
...
...
src/feats/reconnect.ts
View file @
eb43a5c8
...
@@ -300,7 +300,7 @@ export class Reconnect {
...
@@ -300,7 +300,7 @@ export class Reconnect {
// 清理旧客户端
// 清理旧客户端
oldClient
.
roomName
=
undefined
;
oldClient
.
roomName
=
undefined
;
oldClient
.
pos
=
-
1
;
oldClient
.
pos
=
-
1
;
// kick reconnect 的区别:通知旧客户端被踢(不 await)
// kick reconnect 的区别:通知旧客户端被踢(不 await)
oldClient
oldClient
.
sendChat
(
'
#{reconnect_kicked}
'
,
ChatColor
.
RED
)
.
sendChat
(
'
#{reconnect_kicked}
'
,
ChatColor
.
RED
)
...
...
src/ocgcore-worker/ocgcore-worker.ts
View file @
eb43a5c8
...
@@ -32,7 +32,11 @@ import { OcgcoreWorkerOptions } from './ocgcore-worker-options';
...
@@ -32,7 +32,11 @@ import { OcgcoreWorkerOptions } from './ocgcore-worker-options';
import
{
Subject
}
from
'
rxjs
'
;
import
{
Subject
}
from
'
rxjs
'
;
import
{
calculateDuelOptions
}
from
'
../utility/calculate-duel-options
'
;
import
{
calculateDuelOptions
}
from
'
../utility/calculate-duel-options
'
;
import
initSqlJs
from
'
sql.js
'
;
import
initSqlJs
from
'
sql.js
'
;
import
{
YGOProMessages
,
YGOProMsgResponseBase
,
YGOProMsgRetry
}
from
'
ygopro-msg-encode
'
;
import
{
YGOProMessages
,
YGOProMsgResponseBase
,
YGOProMsgRetry
,
}
from
'
ygopro-msg-encode
'
;
const
{
OcgcoreScriptConstants
}
=
_OcgcoreConstants
;
const
{
OcgcoreScriptConstants
}
=
_OcgcoreConstants
;
...
...
src/utility/can-increase-time.ts
View file @
eb43a5c8
...
@@ -6,7 +6,11 @@ export const canIncreaseTime = (gameMsg: number, response?: Buffer) => {
...
@@ -6,7 +6,11 @@ export const canIncreaseTime = (gameMsg: number, response?: Buffer) => {
case
OcgcoreCommonConstants
.
MSG_SELECT_UNSELECT_CARD
:
case
OcgcoreCommonConstants
.
MSG_SELECT_UNSELECT_CARD
:
return
false
;
return
false
;
case
OcgcoreCommonConstants
.
MSG_SELECT_CHAIN
:
case
OcgcoreCommonConstants
.
MSG_SELECT_CHAIN
:
return
response
!=
null
&&
response
.
length
>=
4
&&
response
.
readInt32LE
(
0
)
!==
-
1
;
return
(
response
!=
null
&&
response
.
length
>=
4
&&
response
.
readInt32LE
(
0
)
!==
-
1
);
case
OcgcoreCommonConstants
.
MSG_SELECT_IDLECMD
:
{
case
OcgcoreCommonConstants
.
MSG_SELECT_IDLECMD
:
{
if
(
response
==
null
||
response
.
length
<
4
)
{
if
(
response
==
null
||
response
.
length
<
4
)
{
return
false
;
return
false
;
...
...
src/utility/is-update-message.ts
View file @
eb43a5c8
...
@@ -7,4 +7,3 @@ import {
...
@@ -7,4 +7,3 @@ import {
export
const
isUpdateMessage
=
(
message
:
YGOProMsgBase
)
=>
export
const
isUpdateMessage
=
(
message
:
YGOProMsgBase
)
=>
message
instanceof
YGOProMsgUpdateData
||
message
instanceof
YGOProMsgUpdateData
||
message
instanceof
YGOProMsgUpdateCard
;
message
instanceof
YGOProMsgUpdateCard
;
src/utility/shuffle-decks-by-seed.ts
View file @
eb43a5c8
...
@@ -46,4 +46,3 @@ export const shuffleDecksBySeed = (decks: YGOProDeck[], seed: number[]) => {
...
@@ -46,4 +46,3 @@ export const shuffleDecksBySeed = (decks: YGOProDeck[], seed: number[]) => {
return
cloned
;
return
cloned
;
});
});
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment