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
a621b36b
Commit
a621b36b
authored
Feb 18, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix redtext
parent
e6ea8446
Pipeline
#43324
passed with stages
in 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
src/ocgcore-worker/ocgcore-worker.ts
src/ocgcore-worker/ocgcore-worker.ts
+8
-6
src/room/room.ts
src/room/room.ts
+9
-1
No files found.
src/ocgcore-worker/ocgcore-worker.ts
View file @
a621b36b
...
@@ -29,7 +29,7 @@ import {
...
@@ -29,7 +29,7 @@ import {
TransportEncoder
,
TransportEncoder
,
}
from
'
yuzuthread
'
;
}
from
'
yuzuthread
'
;
import
{
OcgcoreWorkerOptions
}
from
'
./ocgcore-worker-options
'
;
import
{
OcgcoreWorkerOptions
}
from
'
./ocgcore-worker-options
'
;
import
{
Subject
}
from
'
rxjs
'
;
import
{
ReplaySubject
,
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
{
import
{
...
@@ -38,8 +38,10 @@ import {
...
@@ -38,8 +38,10 @@ import {
YGOProMsgRetry
,
YGOProMsgRetry
,
}
from
'
ygopro-msg-encode
'
;
}
from
'
ygopro-msg-encode
'
;
import
*
as
fs
from
'
node:fs
'
;
import
*
as
fs
from
'
node:fs
'
;
import
{
isMainThread
}
from
'
node:worker_threads
'
;
const
{
OcgcoreScriptConstants
}
=
_OcgcoreConstants
;
const
{
OcgcoreScriptConstants
}
=
_OcgcoreConstants
;
const
OCGCORE_MESSAGE_REPLAY_BUFFER_SIZE
=
128
;
// Serializable types for transport (noParse mode: only send binary data)
// Serializable types for transport (noParse mode: only send binary data)
interface
SerializableProcessResult
{
interface
SerializableProcessResult
{
...
@@ -75,10 +77,10 @@ export class OcgcoreWorker {
...
@@ -75,10 +77,10 @@ export class OcgcoreWorker {
constructor
(
private
options
:
OcgcoreWorkerOptions
)
{}
constructor
(
private
options
:
OcgcoreWorkerOptions
)
{}
message$
=
new
Subject
<
{
message$
=
new
Replay
Subject
<
{
message
:
string
;
message
:
string
;
type
:
OcgcoreMessageType
;
type
:
OcgcoreMessageType
;
}
>
();
}
>
(
OCGCORE_MESSAGE_REPLAY_BUFFER_SIZE
);
registry$
=
new
Subject
<
Record
<
string
,
string
>>
();
registry$
=
new
Subject
<
Record
<
string
,
string
>>
();
// this only exists in the worker thread
// this only exists in the worker thread
...
@@ -105,9 +107,9 @@ export class OcgcoreWorker {
...
@@ -105,9 +107,9 @@ export class OcgcoreWorker {
this
.
ocgcore
=
await
createOcgcoreWrapper
(
this
.
ocgcore
=
await
createOcgcoreWrapper
(
wasmBinary
?
{
wasmBinary
}
:
undefined
,
wasmBinary
?
{
wasmBinary
}
:
undefined
,
);
);
this
.
ocgcore
.
setMessageHandler
(
(
_
,
message
,
type
)
=>
this
.
ocgcore
.
setMessageHandler
(
async
(
_
,
message
,
type
)
=>
{
this
.
handleMessage
(
message
,
type
),
await
this
.
handleMessage
(
message
,
type
);
);
}
);
// Load script reader and card reader
// Load script reader and card reader
const
sqlJs
=
await
initSqlJs
();
const
sqlJs
=
await
initSqlJs
();
...
...
src/room/room.ts
View file @
a621b36b
...
@@ -1412,15 +1412,23 @@ export class Room {
...
@@ -1412,15 +1412,23 @@ export class Room {
this
.
duelStage
=
DuelStage
.
Dueling
;
this
.
duelStage
=
DuelStage
.
Dueling
;
this
.
ocgcore
.
message$
.
subscribe
((
msg
)
=>
{
this
.
ocgcore
.
message$
.
subscribe
((
msg
)
=>
{
this
.
logger
.
info
(
{
message
:
msg
.
message
,
type
:
msg
.
type
},
'
Received message from OCGCoreWorker
'
,
);
if
(
if
(
msg
.
type
===
OcgcoreMessageType
.
DebugMessage
&&
msg
.
type
===
OcgcoreMessageType
.
DebugMessage
&&
!
this
.
ctx
.
config
.
getBoolean
(
'
OCGCORE_DEBUG_LOG
'
)
!
this
.
ctx
.
config
.
getBoolean
(
'
OCGCORE_DEBUG_LOG
'
)
)
{
)
{
return
;
return
;
}
}
this
.
allPlayers
.
forEach
((
p
)
=>
p
.
sendChat
(
`Debug:
${
msg
.
message
}
`
)
);
this
.
sendChat
(
`Debug:
${
msg
.
message
}
`
,
ChatColor
.
RED
);
});
});
this
.
ocgcore
.
registry$
.
subscribe
((
registry
)
=>
{
this
.
ocgcore
.
registry$
.
subscribe
((
registry
)
=>
{
this
.
logger
.
debug
(
{
registry
},
'
Received registry update from OCGCoreWorker
'
,
);
Object
.
assign
(
this
.
registry
,
registry
);
Object
.
assign
(
this
.
registry
,
registry
);
});
});
...
...
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