Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
e77701fc
Commit
e77701fc
authored
Dec 20, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.8.5, xmpp
parent
ff51a04b
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
466 additions
and
459 deletions
+466
-459
Rakefile
Rakefile
+1
-1
lib/main.rb
lib/main.rb
+134
-134
lib/scene_lobby.rb
lib/scene_lobby.rb
+1
-1
lib/update.rb
lib/update.rb
+1
-1
lib/window_chat.rb
lib/window_chat.rb
+175
-175
lib/window_userinfo.rb
lib/window_userinfo.rb
+35
-35
lib/ygocore/event.rb
lib/ygocore/event.rb
+6
-6
lib/ygocore/game.rb
lib/ygocore/game.rb
+113
-106
No files found.
Rakefile
View file @
e77701fc
...
@@ -20,7 +20,7 @@ end
...
@@ -20,7 +20,7 @@ end
spec
=
Gem
::
Specification
.
new
do
|
s
|
spec
=
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'mycard'
s
.
name
=
'mycard'
s
.
version
=
'0.8.
4
'
s
.
version
=
'0.8.
5
'
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
summary
=
'a card game'
s
.
summary
=
'a card game'
s
.
description
=
s
.
summary
s
.
description
=
s
.
summary
...
...
lib/main.rb
View file @
e77701fc
...
@@ -58,7 +58,7 @@ begin
...
@@ -58,7 +58,7 @@ begin
if
log
==
"STDOUT"
#调试用
if
log
==
"STDOUT"
#调试用
log
=
STDOUT
log
=
STDOUT
end
end
$log
=
Logger
.
new
(
log
)
$log
=
Logger
.
new
(
log
,
1
,
1024000
)
$log
.
level
=
Logger
.
const_get
log_level
$log
.
level
=
Logger
.
const_get
log_level
#性能分析
#性能分析
...
...
lib/scene_lobby.rb
View file @
e77701fc
...
@@ -66,7 +66,7 @@ class Scene_Lobby < Scene
...
@@ -66,7 +66,7 @@ class Scene_Lobby < Scene
when
Game_Event
::
AllUsers
when
Game_Event
::
AllUsers
@userlist
.
items
=
$game
.
users
@userlist
.
items
=
$game
.
users
when
Game_Event
::
AllRooms
,
Game_Event
::
AllServers
when
Game_Event
::
AllRooms
,
Game_Event
::
AllServers
@roomlist
.
items
=
p
$game
.
rooms
.
find_all
{
|
room
|
@roomlist
.
items
=
$game
.
rooms
.
find_all
{
|
room
|
$game
.
filter
[
:servers
].
include?
(
room
.
server
)
and
$game
.
filter
[
:servers
].
include?
(
room
.
server
)
and
$game
.
filter
[
:waiting_only
]
?
(
room
.
status
==
:
wait
)
:
true
and
$game
.
filter
[
:waiting_only
]
?
(
room
.
status
==
:
wait
)
:
true
and
$game
.
filter
[
:normal_only
]
?
(
!
room
.
tag?
&&
(
room
.
ot
==
0
)
&&
(
room
.
lp
=
8000
))
:
true
$game
.
filter
[
:normal_only
]
?
(
!
room
.
tag?
&&
(
room
.
ot
==
0
)
&&
(
room
.
lp
=
8000
))
:
true
...
...
lib/update.rb
View file @
e77701fc
...
@@ -2,7 +2,7 @@ require 'open-uri'
...
@@ -2,7 +2,7 @@ require 'open-uri'
require
"fileutils"
require
"fileutils"
require_relative
'card'
require_relative
'card'
module
Update
module
Update
Version
=
'0.8.
4
'
Version
=
'0.8.
5
'
URL
=
"http://my-card.in/mycard/update.json?version=
#{
Version
}
"
URL
=
"http://my-card.in/mycard/update.json?version=
#{
Version
}
"
class
<<
self
class
<<
self
attr_reader
:thumbnails
,
:images
,
:status
attr_reader
:thumbnails
,
:images
,
:status
...
...
lib/window_chat.rb
View file @
e77701fc
...
@@ -27,7 +27,7 @@ class Window_Chat < Window_Scrollable
...
@@ -27,7 +27,7 @@ class Window_Chat < Window_Scrollable
if
!
@chat_input
.
value
.
empty?
if
!
@chat_input
.
value
.
empty?
chatmessage
=
ChatMessage
.
new
(
$game
.
user
,
@chat_input
.
value
,
@channel
)
chatmessage
=
ChatMessage
.
new
(
$game
.
user
,
@chat_input
.
value
,
@channel
)
$game
.
chat
chatmessage
$game
.
chat
chatmessage
Game_Event
.
push
Game_Event
::
Chat
.
new
(
chatmessage
)
# if $game.show_chat_self
Game_Event
.
push
Game_Event
::
Chat
.
new
(
chatmessage
)
if
!
$game
.
is_a?
Ygocore
true
true
end
end
end
end
...
...
lib/window_userinfo.rb
View file @
e77701fc
...
@@ -24,7 +24,7 @@ class Window_UserInfo < Window
...
@@ -24,7 +24,7 @@ class Window_UserInfo < Window
end
end
@font
.
draw_blended_utf8
(
@contents
,
@user
.
name
,
160
,
12
,
0x00
,
0x00
,
0x00
)
unless
@user
.
name
.
empty?
@font
.
draw_blended_utf8
(
@contents
,
@user
.
name
,
160
,
12
,
0x00
,
0x00
,
0x00
)
unless
@user
.
name
.
empty?
@font
.
draw_blended_utf8
(
@contents
,
"id:
#{
@user
.
id
}
"
,
160
,
12
+
16
*
2
,
0x00
,
0x00
,
0x00
)
@font
.
draw_blended_utf8
(
@contents
,
@user
.
id
.
to_s
,
160
,
12
+
16
*
2
,
0x00
,
0x00
,
0x00
)
unless
@user
.
id
.
to_s
.
empty?
@font
.
draw_blended_utf8
(
@contents
,
"Lv:
#{
@user
.
level
}
"
,
160
,
12
+
16
*
3
,
0x00
,
0x00
,
0x00
)
if
@user
.
respond_to?
:level
and
@user
.
level
#TODO:规范化,level是iduel专属的,但是又不太想让iduel来重定义这个window
@font
.
draw_blended_utf8
(
@contents
,
"Lv:
#{
@user
.
level
}
"
,
160
,
12
+
16
*
3
,
0x00
,
0x00
,
0x00
)
if
@user
.
respond_to?
:level
and
@user
.
level
#TODO:规范化,level是iduel专属的,但是又不太想让iduel来重定义这个window
@font
.
draw_blended_utf8
(
@contents
,
"经验:
#{
@user
.
exp
}
"
,
160
,
12
+
16
*
4
,
0x00
,
0x00
,
0x00
)
if
@user
.
respond_to?
:exp
and
@user
.
exp
@font
.
draw_blended_utf8
(
@contents
,
"经验:
#{
@user
.
exp
}
"
,
160
,
12
+
16
*
4
,
0x00
,
0x00
,
0x00
)
if
@user
.
respond_to?
:exp
and
@user
.
exp
end
end
...
...
lib/ygocore/event.rb
View file @
e77701fc
class
Game_Event
class
Game_Event
def
self
.
parse
(
header
,
data
)
def
self
.
parse
(
header
,
data
)
case
header
case
header
when
:login
#
when :login
if
data
#
if data
Login
.
new
parse_user
data
#
Login.new parse_user data
else
#
else
Error
.
new
(
'登录'
,
'用户名或密码错误'
)
#
Error.new('登录', '用户名或密码错误')
end
#
end
#when :rooms
#when :rooms
#AllRooms.new data.collect{|room|parse_room(room)}
#AllRooms.new data.collect{|room|parse_room(room)}
#when :rooms_update
#when :rooms_update
...
...
lib/ygocore/game.rb
View file @
e77701fc
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