Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
MyCard
srvpro
Commits
9f5be989
Commit
9f5be989
authored
Mar 13, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-mdpro3-deck' of git.mycard.moe:mycard/srvpro
parents
f536fc66
716bc5c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
ygopro-server.coffee
ygopro-server.coffee
+2
-2
ygopro-server.js
ygopro-server.js
+2
-2
ygopro-tournament.js
ygopro-tournament.js
+2
-2
No files found.
ygopro-server.coffee
View file @
9f5be989
...
...
@@ -3352,7 +3352,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
found_deck
=
deck
if
found_deck
deck_text
=
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,{
encoding
:
"ASCII"
})
deck_array
=
deck_text
.
split
(
"
\n
"
)
deck_array
=
deck_text
.
split
(
/\r?\n/
)
deck_main
=
[]
deck_side
=
[]
current_deck
=
deck_main
...
...
@@ -3360,7 +3360,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
if
line
.
indexOf
(
"!side"
)
>=
0
current_deck
=
deck_side
card
=
parseInt
(
line
)
current_deck
.
push
(
card
)
unless
isNaN
(
card
)
current_deck
.
push
(
card
)
unless
isNaN
(
card
)
or
line
.
endsWith
(
"#"
)
if
_
.
isEqual
(
buff_main
,
deck_main
)
and
_
.
isEqual
(
buff_side
,
deck_side
)
deckbuf
=
deck_main
.
concat
(
deck_side
)
struct
.
set
(
"mainc"
,
deck_main
.
length
)
...
...
ygopro-server.js
View file @
9f5be989
...
...
@@ -4502,7 +4502,7 @@
deck_text
=
(
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,
{
encoding
:
"
ASCII
"
}));
deck_array
=
deck_text
.
split
(
"
\n
"
);
deck_array
=
deck_text
.
split
(
/
\r?\n
/
);
deck_main
=
[];
deck_side
=
[];
current_deck
=
deck_main
;
...
...
@@ -4512,7 +4512,7 @@
current_deck
=
deck_side
;
}
card
=
parseInt
(
line
);
if
(
!
isNaN
(
card
))
{
if
(
!
(
isNaN
(
card
)
||
line
.
endsWith
(
"
#
"
)
))
{
current_deck
.
push
(
card
);
}
}
...
...
ygopro-tournament.js
View file @
9f5be989
...
...
@@ -75,7 +75,7 @@ const readDeck = async function(deck_name, deck_full_path) {
const
deck
=
{};
deck
.
name
=
deck_name
;
deck_text
=
await
fs
.
promises
.
readFile
(
deck_full_path
,
{
encoding
:
"
ASCII
"
});
deck_array
=
deck_text
.
split
(
"
\n
"
);
deck_array
=
deck_text
.
split
(
/
\r?\n
/
);
deck
.
main
=
[];
deck
.
extra
=
[];
deck
.
side
=
[];
...
...
@@ -89,7 +89,7 @@ const readDeck = async function(deck_name, deck_full_path) {
current_deck
=
deck
.
side
;
}
card
=
parseInt
(
line
);
if
(
!
isNaN
(
card
))
{
if
(
!
isNaN
(
card
)
&&
!
line
.
endsWith
(
"
#
"
)
)
{
current_deck
.
push
(
card
);
}
}
...
...
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