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
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
srvpro
Commits
716bc5c6
Commit
716bc5c6
authored
Feb 24, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for mdpro3 deck
parent
75b91036
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 @
716bc5c6
...
@@ -3352,7 +3352,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
...
@@ -3352,7 +3352,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
found_deck
=
deck
found_deck
=
deck
if
found_deck
if
found_deck
deck_text
=
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,{
encoding
:
"ASCII"
})
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_main
=
[]
deck_side
=
[]
deck_side
=
[]
current_deck
=
deck_main
current_deck
=
deck_main
...
@@ -3360,7 +3360,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
...
@@ -3360,7 +3360,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
if
line
.
indexOf
(
"!side"
)
>=
0
if
line
.
indexOf
(
"!side"
)
>=
0
current_deck
=
deck_side
current_deck
=
deck_side
card
=
parseInt
(
line
)
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
)
if
_
.
isEqual
(
buff_main
,
deck_main
)
and
_
.
isEqual
(
buff_side
,
deck_side
)
deckbuf
=
deck_main
.
concat
(
deck_side
)
deckbuf
=
deck_main
.
concat
(
deck_side
)
struct
.
set
(
"mainc"
,
deck_main
.
length
)
struct
.
set
(
"mainc"
,
deck_main
.
length
)
...
...
ygopro-server.js
View file @
716bc5c6
...
@@ -4502,7 +4502,7 @@
...
@@ -4502,7 +4502,7 @@
deck_text
=
(
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,
{
deck_text
=
(
await
fs
.
promises
.
readFile
(
settings
.
modules
.
tournament_mode
.
deck_path
+
found_deck
,
{
encoding
:
"
ASCII
"
encoding
:
"
ASCII
"
}));
}));
deck_array
=
deck_text
.
split
(
"
\n
"
);
deck_array
=
deck_text
.
split
(
/
\r?\n
/
);
deck_main
=
[];
deck_main
=
[];
deck_side
=
[];
deck_side
=
[];
current_deck
=
deck_main
;
current_deck
=
deck_main
;
...
@@ -4512,7 +4512,7 @@
...
@@ -4512,7 +4512,7 @@
current_deck
=
deck_side
;
current_deck
=
deck_side
;
}
}
card
=
parseInt
(
line
);
card
=
parseInt
(
line
);
if
(
!
isNaN
(
card
))
{
if
(
!
(
isNaN
(
card
)
||
line
.
endsWith
(
"
#
"
)
))
{
current_deck
.
push
(
card
);
current_deck
.
push
(
card
);
}
}
}
}
...
...
ygopro-tournament.js
View file @
716bc5c6
...
@@ -73,7 +73,7 @@ const readDeck = async function(deck_name, deck_full_path) {
...
@@ -73,7 +73,7 @@ const readDeck = async function(deck_name, deck_full_path) {
const
deck
=
{};
const
deck
=
{};
deck
.
name
=
deck_name
;
deck
.
name
=
deck_name
;
deck_text
=
await
fs
.
promises
.
readFile
(
deck_full_path
,
{
encoding
:
"
ASCII
"
});
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
.
main
=
[];
deck
.
extra
=
[];
deck
.
extra
=
[];
deck
.
side
=
[];
deck
.
side
=
[];
...
@@ -87,7 +87,7 @@ const readDeck = async function(deck_name, deck_full_path) {
...
@@ -87,7 +87,7 @@ const readDeck = async function(deck_name, deck_full_path) {
current_deck
=
deck
.
side
;
current_deck
=
deck
.
side
;
}
}
card
=
parseInt
(
line
);
card
=
parseInt
(
line
);
if
(
!
isNaN
(
card
))
{
if
(
!
isNaN
(
card
)
&&
!
line
.
endsWith
(
"
#
"
)
)
{
current_deck
.
push
(
card
);
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