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
f67de5fb
Commit
f67de5fb
authored
Nov 11, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
customizable waiting time
parent
0cefc4cb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
data/default_config.json
data/default_config.json
+2
-0
ygopro-server.coffee
ygopro-server.coffee
+3
-3
ygopro-server.js
ygopro-server.js
+3
-3
No files found.
data/default_config.json
View file @
f67de5fb
...
...
@@ -64,6 +64,7 @@
"random_duel"
:
{
"enabled"
:
false
,
"no_rematch_check"
:
false
,
"ready_time"
:
20
,
"hang_timeout"
:
90
},
"cloud_replay"
:
{
...
...
@@ -132,6 +133,7 @@
"mode"
:
"entertain"
,
"comment"
:
"mode: athletic / entertain"
,
"accesskey"
:
"233"
,
"ready_time"
:
30
,
"post_score"
:
false
,
"get_score"
:
false
},
...
...
ygopro-server.coffee
View file @
f67de5fb
...
...
@@ -2291,12 +2291,12 @@ ygopro.stoc_follow 'HS_PLAYER_CHANGE', false, (buffer, info, client, server)->
room
.
waiting_for_player
=
p2
if
room
.
waiting_for_player
!=
room
.
waiting_for_player2
room
.
waiting_for_player2
=
room
.
waiting_for_player
room
.
waiting_for_player_time
=
20
room
.
waiting_for_player_time
=
settings
.
modules
.
arena_mode
.
ready_time
room
.
waiting_for_player_interval
=
setInterval
(()
->
wait_room_start_arena
(
ROOM_all
[
client
.
rid
]);
return
),
1000
else
if
!
room
.
waiting_for_player
and
room
.
waiting_for_player_interval
clearInterval
room
.
waiting_for_player_interval
room
.
waiting_for_player_interval
=
null
room
.
waiting_for_player_time
=
20
room
.
waiting_for_player_time
=
settings
.
modules
.
arena_mode
.
ready_time
else
room
.
ready_player_count_without_host
=
0
for
player
in
room
.
players
...
...
@@ -2306,7 +2306,7 @@ ygopro.stoc_follow 'HS_PLAYER_CHANGE', false, (buffer, info, client, server)->
room
.
ready_player_count_without_host
+=
player
.
is_ready
if
room
.
ready_player_count_without_host
>=
room
.
max_player
-
1
#log.info "all ready"
setTimeout
(()
->
wait_room_start
(
ROOM_all
[
client
.
rid
],
20
);
return
),
1000
setTimeout
(()
->
wait_room_start
(
ROOM_all
[
client
.
rid
],
settings
.
modules
.
random_duel
.
ready_time
);
return
),
1000
return
ygopro
.
ctos_follow
'REQUEST_FIELD'
,
true
,
(
buffer
,
info
,
client
,
server
)
->
...
...
ygopro-server.js
View file @
f67de5fb
...
...
@@ -2795,14 +2795,14 @@
}
if
(
room
.
waiting_for_player
!==
room
.
waiting_for_player2
)
{
room
.
waiting_for_player2
=
room
.
waiting_for_player
;
room
.
waiting_for_player_time
=
20
;
room
.
waiting_for_player_time
=
settings
.
modules
.
arena_mode
.
ready_time
;
room
.
waiting_for_player_interval
=
setInterval
((
function
()
{
wait_room_start_arena
(
ROOM_all
[
client
.
rid
]);
}),
1000
);
}
else
if
(
!
room
.
waiting_for_player
&&
room
.
waiting_for_player_interval
)
{
clearInterval
(
room
.
waiting_for_player_interval
);
room
.
waiting_for_player_interval
=
null
;
room
.
waiting_for_player_time
=
20
;
room
.
waiting_for_player_time
=
settings
.
modules
.
arena_mode
.
ready_time
;
}
}
else
{
room
.
ready_player_count_without_host
=
0
;
...
...
@@ -2818,7 +2818,7 @@
}
if
(
room
.
ready_player_count_without_host
>=
room
.
max_player
-
1
)
{
setTimeout
((
function
()
{
wait_room_start
(
ROOM_all
[
client
.
rid
],
20
);
wait_room_start
(
ROOM_all
[
client
.
rid
],
settings
.
modules
.
random_duel
.
ready_time
);
}),
1000
);
}
}
...
...
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