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
9aeaa05d
Commit
9aeaa05d
authored
Aug 19, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
larger looplimit
parent
55afc8da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
7 deletions
+25
-7
YGOProMessages.ts
YGOProMessages.ts
+23
-5
ygopro.coffee
ygopro.coffee
+1
-1
ygopro.js
ygopro.js
+1
-1
No files found.
YGOProMessages.ts
View file @
9aeaa05d
...
...
@@ -8,7 +8,7 @@ import net from "net";
class
Handler
{
handler
:
(
buffer
:
Buffer
,
info
:
any
,
datas
:
Buffer
[],
params
:
any
)
=>
Promise
<
boolean
>
;
private
handler
:
(
buffer
:
Buffer
,
info
:
any
,
datas
:
Buffer
[],
params
:
any
)
=>
Promise
<
boolean
>
;
synchronous
:
boolean
;
constructor
(
handler
:
(
buffer
:
Buffer
,
info
:
any
,
datas
:
Buffer
[],
params
:
any
)
=>
Promise
<
boolean
>
,
synchronous
:
boolean
)
{
this
.
handler
=
handler
;
...
...
@@ -46,14 +46,32 @@ export interface HandleResult {
feedback
:
Feedback
;
}
export
interface
Constants
{
TYPES
:
Record
<
string
,
number
>
;
RACES
:
Record
<
string
,
number
>
;
ATTRIBUTES
:
Record
<
string
,
number
>
;
LINK_MARKERS
:
Record
<
string
,
number
>
;
DUEL_STAGE
:
Record
<
string
,
number
>
;
COLORS
:
Record
<
string
,
number
>
;
TIMING
:
Record
<
string
,
string
>
;
NETWORK
:
Record
<
string
,
string
>
;
NETPLAYER
:
Record
<
string
,
string
>
;
CTOS
:
Record
<
string
,
string
>
;
STOC
:
Record
<
string
,
string
>
;
PLAYERCHANGE
:
Record
<
string
,
string
>
;
ERRMSG
:
Record
<
string
,
string
>
;
MODE
:
Record
<
string
,
string
>
;
MSG
:
Record
<
string
,
string
>
;
}
export
class
YGOProMessagesHelper
{
handlers
:
HandlerList
;
structs
:
Map
<
string
,
Struct
>
;
structs_declaration
:
any
;
typedefs
:
any
;
proto_structs
:
any
;
constants
:
any
;
structs_declaration
:
Record
<
string
,
Struct
>
;
typedefs
:
Record
<
string
,
string
>
;
proto_structs
:
Record
<
'
CTOS
'
|
'
STOC
'
,
Record
<
string
,
string
>>
;
constants
:
Constants
;
singleHandleLimit
:
number
;
constructor
(
singleHandleLimit
?:
number
)
{
...
...
ygopro.coffee
View file @
9aeaa05d
...
...
@@ -8,7 +8,7 @@ loadJSON = require('load-json-file').sync
@
i18ns
=
loadJSON
'./data/i18n.json'
YGOProMessagesHelper
=
require
(
"./YGOProMessages.js"
).
YGOProMessagesHelper
# 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
@
helper
=
new
YGOProMessagesHelper
()
@
helper
=
new
YGOProMessagesHelper
(
9000
)
@
structs
=
@
helper
.
structs
@
structs_declaration
=
@
helper
.
structs_declaration
...
...
ygopro.js
View file @
9aeaa05d
...
...
@@ -16,7 +16,7 @@
YGOProMessagesHelper
=
require
(
"
./YGOProMessages.js
"
).
YGOProMessagesHelper
;
// 为 SRVPro2 准备的库,这里拿这个库只用来测试,SRVPro1 对异步支持不是特别完善,因此不会有很多异步优化
this
.
helper
=
new
YGOProMessagesHelper
();
this
.
helper
=
new
YGOProMessagesHelper
(
9000
);
this
.
structs
=
this
.
helper
.
structs
;
...
...
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