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
b2c66f0a
Commit
b2c66f0a
authored
Feb 17, 2026
by
purerosefallen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refa hostinfo
parent
b658bd0a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
234 additions
and
133 deletions
+234
-133
src/feats/cloud-replay/cloud-replay-service.ts
src/feats/cloud-replay/cloud-replay-service.ts
+1
-0
src/feats/random-duel/provider.ts
src/feats/random-duel/provider.ts
+48
-0
src/room/default-hostinfo-provder.ts
src/room/default-hostinfo-provder.ts
+185
-133
No files found.
src/feats/cloud-replay/cloud-replay-service.ts
View file @
b2c66f0a
...
@@ -458,6 +458,7 @@ export class CloudReplayService {
...
@@ -458,6 +458,7 @@ export class CloudReplayService {
...
hostInfo
,
...
hostInfo
,
mode
:
mode
:
hostInfo
.
mode
>
2
?
(
this
.
isTagMode
(
hostInfo
)
?
2
:
1
)
:
hostInfo
.
mode
,
hostInfo
.
mode
>
2
?
(
this
.
isTagMode
(
hostInfo
)
?
2
:
1
)
:
hostInfo
.
mode
,
lflist
:
0
,
};
};
}
}
...
...
src/feats/random-duel/provider.ts
View file @
b2c66f0a
...
@@ -10,6 +10,7 @@ import { Client } from '../../client';
...
@@ -10,6 +10,7 @@ import { Client } from '../../client';
import
{
MAX_ROOM_NAME_LENGTH
}
from
'
../../constants/room
'
;
import
{
MAX_ROOM_NAME_LENGTH
}
from
'
../../constants/room
'
;
import
{
import
{
DuelStage
,
DuelStage
,
DefaultHostInfoProvider
,
OnRoomFinalize
,
OnRoomFinalize
,
OnRoomJoinPlayer
,
OnRoomJoinPlayer
,
OnRoomLeavePlayer
,
OnRoomLeavePlayer
,
...
@@ -98,6 +99,7 @@ export class RandomDuelProvider {
...
@@ -98,6 +99,7 @@ export class RandomDuelProvider {
private
waitForPlayerProvider
=
this
.
ctx
.
get
(()
=>
WaitForPlayerProvider
);
private
waitForPlayerProvider
=
this
.
ctx
.
get
(()
=>
WaitForPlayerProvider
);
private
clientKeyProvider
=
this
.
ctx
.
get
(()
=>
ClientKeyProvider
);
private
clientKeyProvider
=
this
.
ctx
.
get
(()
=>
ClientKeyProvider
);
private
hidePlayerNameProvider
=
this
.
ctx
.
get
(()
=>
HidePlayerNameProvider
);
private
hidePlayerNameProvider
=
this
.
ctx
.
get
(()
=>
HidePlayerNameProvider
);
private
defaultHostInfoProvider
=
this
.
ctx
.
get
(()
=>
DefaultHostInfoProvider
);
enabled
=
this
.
ctx
.
config
.
getBoolean
(
'
ENABLE_RANDOM_DUEL
'
);
enabled
=
this
.
ctx
.
config
.
getBoolean
(
'
ENABLE_RANDOM_DUEL
'
);
noRematchCheck
=
this
.
ctx
.
config
.
getBoolean
(
'
RANDOM_DUEL_NO_REMATCH_CHECK
'
);
noRematchCheck
=
this
.
ctx
.
config
.
getBoolean
(
'
RANDOM_DUEL_NO_REMATCH_CHECK
'
);
...
@@ -120,6 +122,7 @@ export class RandomDuelProvider {
...
@@ -120,6 +122,7 @@ export class RandomDuelProvider {
if
(
!
this
.
enabled
)
{
if
(
!
this
.
enabled
)
{
return
;
return
;
}
}
this
.
registerRandomRoomModes
();
this
.
waitForPlayerProvider
.
registerTick
({
this
.
waitForPlayerProvider
.
registerTick
({
roomFilter
:
(
room
)
=>
!!
room
.
randomType
,
roomFilter
:
(
room
)
=>
!!
room
.
randomType
,
raadyTimeoutMs
:
this
.
waitForPlayerReadyTimeoutMs
,
raadyTimeoutMs
:
this
.
waitForPlayerReadyTimeoutMs
,
...
@@ -280,6 +283,51 @@ export class RandomDuelProvider {
...
@@ -280,6 +283,51 @@ export class RandomDuelProvider {
return
uniqModes
;
return
uniqModes
;
}
}
private
registerRandomRoomModes
()
{
this
.
defaultHostInfoProvider
.
registerRoomMode
(
'
(OOR|OCGONLYRANDOM)
'
,
{
rule
:
0
,
lflist
:
0
,
})
.
registerRoomMode
(
'
(OR|OCGRANDOM)
'
,
{
rule
:
5
,
lflist
:
0
,
})
.
registerRoomMode
(
'
(CR|CCGRANDOM)
'
,
{
rule
:
2
,
lflist
:
-
1
,
})
.
registerRoomMode
(
'
(TOR|TCGONLYRANDOM)
'
,
{
rule
:
1
,
})
.
registerRoomMode
(
'
(TR|TCGRANDOM)
'
,
{
rule
:
5
,
})
.
registerRoomMode
(
'
(OOMR|OCGONLYMATCHRANDOM)
'
,
{
rule
:
0
,
lflist
:
0
,
mode
:
1
,
})
.
registerRoomMode
(
'
(OMR|OCGMATCHRANDOM)
'
,
{
rule
:
5
,
lflist
:
0
,
mode
:
1
,
})
.
registerRoomMode
(
'
(CMR|CCGMATCHRANDOM)
'
,
{
rule
:
2
,
lflist
:
-
1
,
mode
:
1
,
})
.
registerRoomMode
(
'
(TOMR|TCGONLYMATCHRANDOM)
'
,
{
rule
:
1
,
mode
:
1
,
})
.
registerRoomMode
(
'
(TMR|TCGMATCHRANDOM)
'
,
{
rule
:
5
,
mode
:
1
,
});
}
private
resolveSupportedTypes
()
{
private
resolveSupportedTypes
()
{
return
new
Set
([...
BUILTIN_RANDOM_TYPES
,
...
this
.
blankPassModes
]);
return
new
Set
([...
BUILTIN_RANDOM_TYPES
,
...
this
.
blankPassModes
]);
}
}
...
...
src/room/default-hostinfo-provder.ts
View file @
b2c66f0a
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