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
66fd1cd1
Commit
66fd1cd1
authored
Jan 10, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'i18n-temp'
parents
2396832c
d2cb3f5b
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
356 additions
and
164 deletions
+356
-164
config.json
config.json
+1
-0
i18n.json
i18n.json
+170
-0
ygopro-server.coffee
ygopro-server.coffee
+86
-82
ygopro-server.js
ygopro-server.js
+84
-80
ygopro.coffee
ygopro.coffee
+5
-0
ygopro.js
ygopro.js
+10
-2
No files found.
config.json
View file @
66fd1cd1
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
"welcome"
:
"MyCard YGOPro Server"
,
"welcome"
:
"MyCard YGOPro Server"
,
"update"
:
"请更新游戏版本"
,
"update"
:
"请更新游戏版本"
,
"stop"
:
false
,
"stop"
:
false
,
"lang"
:
"zh-cn"
,
"tips"
:
{
"tips"
:
{
"enabled"
:
true
,
"enabled"
:
true
,
"get"
:
false
"get"
:
false
...
...
i18n.json
0 → 100644
View file @
66fd1cd1
This diff is collapsed.
Click to expand it.
ygopro-server.coffee
View file @
66fd1cd1
This diff is collapsed.
Click to expand it.
ygopro-server.js
View file @
66fd1cd1
This diff is collapsed.
Click to expand it.
ygopro.coffee
View file @
66fd1cd1
...
@@ -4,6 +4,8 @@ _.mixin(_.str.exports())
...
@@ -4,6 +4,8 @@ _.mixin(_.str.exports())
Struct
=
require
(
'./struct.js'
).
Struct
Struct
=
require
(
'./struct.js'
).
Struct
i18ns
=
require
'./i18n.json'
#常量/类型声明
#常量/类型声明
structs_declaration
=
require
'./structs.json'
#结构体声明
structs_declaration
=
require
'./structs.json'
#结构体声明
typedefs
=
require
'./typedefs.json'
#类型声明
typedefs
=
require
'./typedefs.json'
#类型声明
...
@@ -116,6 +118,9 @@ for name, declaration of structs_declaration
...
@@ -116,6 +118,9 @@ for name, declaration of structs_declaration
for
line
in
_
.
lines
(
msg
)
for
line
in
_
.
lines
(
msg
)
if
player
>=
10
if
player
>=
10
line
=
"[System]: "
+
line
line
=
"[System]: "
+
line
for
o
,
r
of
i18ns
[
client
.
lang
]
re
=
new
RegExp
(
"
\\
$
\\
{"
+
o
+
"
\\
}"
,
'g'
)
line
=
line
.
replace
(
re
,
r
)
@
stoc_send
client
,
'CHAT'
,
{
@
stoc_send
client
,
'CHAT'
,
{
player
:
player
player
:
player
msg
:
line
msg
:
line
...
...
ygopro.js
View file @
66fd1cd1
// Generated by CoffeeScript 1.12.1
// Generated by CoffeeScript 1.12.1
(
function
()
{
(
function
()
{
var
Struct
,
_
,
declaration
,
field
,
i
,
len
,
name
,
result
,
structs_declaration
,
type
,
typedefs
;
var
Struct
,
_
,
declaration
,
field
,
i
,
i18ns
,
len
,
name
,
result
,
structs_declaration
,
type
,
typedefs
;
_
=
require
(
'
underscore
'
);
_
=
require
(
'
underscore
'
);
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
Struct
=
require
(
'
./struct.js
'
).
Struct
;
Struct
=
require
(
'
./struct.js
'
).
Struct
;
i18ns
=
require
(
'
./i18n.json
'
);
structs_declaration
=
require
(
'
./structs.json
'
);
structs_declaration
=
require
(
'
./structs.json
'
);
typedefs
=
require
(
'
./typedefs.json
'
);
typedefs
=
require
(
'
./typedefs.json
'
);
...
@@ -167,7 +169,7 @@
...
@@ -167,7 +169,7 @@
};
};
this
.
stoc_send_chat
=
function
(
client
,
msg
,
player
)
{
this
.
stoc_send_chat
=
function
(
client
,
msg
,
player
)
{
var
j
,
len1
,
line
,
ref
;
var
j
,
len1
,
line
,
o
,
r
,
re
,
ref
,
ref1
;
if
(
player
==
null
)
{
if
(
player
==
null
)
{
player
=
8
;
player
=
8
;
}
}
...
@@ -181,6 +183,12 @@
...
@@ -181,6 +183,12 @@
if
(
player
>=
10
)
{
if
(
player
>=
10
)
{
line
=
"
[System]:
"
+
line
;
line
=
"
[System]:
"
+
line
;
}
}
ref1
=
i18ns
[
client
.
lang
];
for
(
o
in
ref1
)
{
r
=
ref1
[
o
];
re
=
new
RegExp
(
"
\\
$
\\
{
"
+
o
+
"
\\
}
"
,
'
g
'
);
line
=
line
.
replace
(
re
,
r
);
}
this
.
stoc_send
(
client
,
'
CHAT
'
,
{
this
.
stoc_send
(
client
,
'
CHAT
'
,
{
player
:
player
,
player
:
player
,
msg
:
line
msg
:
line
...
...
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