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
f7529ebb
Commit
f7529ebb
authored
Feb 26, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into ai-play
parents
e345b2ae
55f6e999
Pipeline
#33381
failed with stages
in 9 minutes and 2 seconds
Changes
11
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
188 additions
and
95 deletions
+188
-95
data-manager/DataManager.js
data-manager/DataManager.js
+3
-3
data-manager/DataManager.ts
data-manager/DataManager.ts
+3
-3
data-manager/DeckEncoder.js
data-manager/DeckEncoder.js
+2
-0
data-manager/DeckEncoder.ts
data-manager/DeckEncoder.ts
+3
-1
data-manager/entities/RandomDuelScore.js
data-manager/entities/RandomDuelScore.js
+1
-2
data-manager/entities/RandomDuelScore.ts
data-manager/entities/RandomDuelScore.ts
+2
-3
data/default_config.json
data/default_config.json
+4
-1
data/i18n.json
data/i18n.json
+2
-0
data/structs.json
data/structs.json
+2
-1
ygopro-server.coffee
ygopro-server.coffee
+71
-34
ygopro-server.js
ygopro-server.js
+95
-47
No files found.
data-manager/DataManager.js
View file @
f7529ebb
...
...
@@ -726,12 +726,12 @@ class DataManager {
newScore
.
name
=
name
;
return
await
this
.
saveRandomDuelScore
(
newScore
);
}
async
getRandomDuelScoreDisplay
(
name
)
{
async
getRandomDuelScoreDisplay
(
name
,
displayName
)
{
const
score
=
await
this
.
getRandomDuelScore
(
name
);
if
(
!
score
)
{
return
`
${
name
.
split
(
"
$
"
)[
0
]
}
\${random_score_blank}`
;
return
`
${
displayName
}
\${random_score_blank}`
;
}
return
score
.
getScoreText
();
return
score
.
getScoreText
(
displayName
);
}
async
randomDuelPlayerWin
(
name
)
{
const
score
=
await
this
.
getOrCreateRandomDuelScore
(
name
);
...
...
data-manager/DataManager.ts
View file @
f7529ebb
...
...
@@ -723,12 +723,12 @@ export class DataManager {
newScore
.
name
=
name
;
return
await
this
.
saveRandomDuelScore
(
newScore
);
}
async
getRandomDuelScoreDisplay
(
name
:
string
)
{
async
getRandomDuelScoreDisplay
(
name
:
string
,
displayName
:
string
)
{
const
score
=
await
this
.
getRandomDuelScore
(
name
);
if
(
!
score
)
{
return
`
${
name
.
split
(
"
$
"
)[
0
]
}
\${random_score_blank}`
;
return
`
${
displayName
}
\${random_score_blank}`
;
}
return
score
.
getScoreText
();
return
score
.
getScoreText
(
displayName
);
}
async
randomDuelPlayerWin
(
name
:
string
)
{
const
score
=
await
this
.
getOrCreateRandomDuelScore
(
name
);
...
...
data-manager/DeckEncoder.js
View file @
f7529ebb
...
...
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports
.
decodeDeck
=
exports
.
encodeDeck
=
void
0
;
const
assert_1
=
__importDefault
(
require
(
"
assert
"
));
function
encodeDeck
(
deck
)
{
deck
.
main
??
=
[];
deck
.
side
??
=
[];
let
pointer
=
0
;
const
bufferSize
=
(
2
+
deck
.
main
.
length
+
deck
.
side
.
length
)
*
4
;
const
buffer
=
Buffer
.
allocUnsafe
(
bufferSize
);
...
...
data-manager/DeckEncoder.ts
View file @
f7529ebb
...
...
@@ -6,6 +6,8 @@ export interface Deck {
}
export
function
encodeDeck
(
deck
:
Deck
)
{
deck
.
main
??
=
[];
deck
.
side
??
=
[];
let
pointer
=
0
;
const
bufferSize
=
(
2
+
deck
.
main
.
length
+
deck
.
side
.
length
)
*
4
;
const
buffer
=
Buffer
.
allocUnsafe
(
bufferSize
);
...
...
data-manager/entities/RandomDuelScore.js
View file @
f7529ebb
...
...
@@ -33,8 +33,7 @@ let RandomDuelScore = class RandomDuelScore extends CreateAndUpdateTimeBase_1.Cr
++
this
.
fleeCount
;
this
.
lose
();
}
getScoreText
()
{
const
displayName
=
this
.
getDisplayName
();
getScoreText
(
displayName
)
{
const
total
=
this
.
winCount
+
this
.
loseCount
;
if
(
this
.
winCount
<
2
&&
total
<
3
)
{
return
`
${
displayName
}
\${random_score_not_enough}`
;
...
...
data-manager/entities/RandomDuelScore.ts
View file @
f7529ebb
...
...
@@ -40,8 +40,7 @@ export class RandomDuelScore extends CreateAndUpdateTimeBase {
this
.
lose
();
}
getScoreText
()
{
const
displayName
=
this
.
getDisplayName
();
getScoreText
(
displayName
:
string
)
{
const
total
=
this
.
winCount
+
this
.
loseCount
;
if
(
this
.
winCount
<
2
&&
total
<
3
)
{
return
`
${
displayName
}
\${random_score_not_enough}`
;
...
...
data/default_config.json
View file @
f7529ebb
...
...
@@ -16,7 +16,9 @@
"draw_count"
:
1
,
"time_limit"
:
180
,
"no_watch"
:
false
,
"auto_death"
:
false
"auto_death"
:
false
,
"bo5"
:
false
,
"sideins"
:
false
},
"modules"
:
{
"welcome"
:
"MyCard YGOPro Server"
,
...
...
@@ -90,6 +92,7 @@
"record_match_scores"
:
false
,
"post_match_scores"
:
false
,
"post_match_accesskey"
:
"123456"
,
"disable_chat"
:
false
,
"blank_pass_modes"
:
{
"S"
:
true
,
"M"
:
true
,
...
...
data/i18n.json
View file @
f7529ebb
...
...
@@ -211,6 +211,7 @@
"refresh_failed"
:
"Refresh field failed."
,
"banned_athletic_deck_part1"
:
"Entertainment Mode does not allow top "
,
"banned_athletic_deck_part2"
:
" popular meta decks. Please change your deck."
,
"chat_disabled"
:
"Chat is disabled in this room."
,
"using_athletic_deck"
:
" is using a competitive deck."
},
"es-es"
:
{
...
...
@@ -571,6 +572,7 @@
"refresh_fail"
:
"刷新场面失败。"
,
"banned_athletic_deck_part1"
:
"娱乐匹配中禁止使用使用数前"
,
"banned_athletic_deck_part2"
:
"的竞技卡组。请更换卡组。"
,
"chat_disabled"
:
"本房间禁止聊天。"
,
"using_athletic_deck"
:
" 正在使用竞技卡组。"
},
"ko-kr"
:
{
...
...
data/structs.json
View file @
f7529ebb
...
...
@@ -78,7 +78,8 @@
],
"STOC_HS_PlayerEnter"
:
[
{
"name"
:
"name"
,
"type"
:
"unsigned short"
,
"length"
:
20
,
"encoding"
:
"UTF-16LE"
},
{
"name"
:
"pos"
,
"type"
:
"unsigned char"
}
{
"name"
:
"pos"
,
"type"
:
"unsigned char"
},
{
"name"
:
"padding"
,
"type"
:
"unsigned char"
}
],
"STOC_HS_PlayerChange"
:
[
{
"name"
:
"status"
,
"type"
:
"unsigned char"
}
...
...
ygopro-server.coffee
View file @
f7529ebb
This diff is collapsed.
Click to expand it.
ygopro-server.js
View file @
f7529ebb
This diff is collapsed.
Click to expand it.
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