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
xiaoye
mycard
Commits
a411afd0
Commit
a411afd0
authored
Jul 18, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.7.3, 官网地址更新.
parent
e899fee9
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
52 deletions
+50
-52
Rakefile
Rakefile
+1
-1
lib/association.rb
lib/association.rb
+1
-1
lib/resolution.rb
lib/resolution.rb
+0
-2
lib/update.rb
lib/update.rb
+7
-7
lib/window_lobbybuttons.rb
lib/window_lobbybuttons.rb
+1
-1
lib/ygocore/server.yml
lib/ygocore/server.yml
+2
-2
lib/ygocore/user.rb
lib/ygocore/user.rb
+38
-38
No files found.
Rakefile
View file @
a411afd0
...
...
@@ -20,7 +20,7 @@ end
spec
=
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'mycard'
s
.
version
=
'0.7.
0
'
s
.
version
=
'0.7.
3
'
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
summary
=
'a card game'
s
.
description
=
s
.
summary
...
...
lib/association.rb
View file @
a411afd0
...
...
@@ -45,7 +45,7 @@ module Association
if
clicked
==
:ok
yield
else
Widget_Msgbox
.
new
(
"mycard"
,
"
没有进行关联,要重新关联请删除config.yml
"
)
Widget_Msgbox
.
new
(
"mycard"
,
"
未进行关联,要重新关联请删除config.yml"
,
ok:
"确定
"
)
$config
[
'no_assoc'
]
=
true
Config
.
save
end
...
...
lib/resolution.rb
View file @
a411afd0
...
...
@@ -9,7 +9,6 @@ module Resolution
end
def
system
return
[
1024
,
768
]
if
Windows
require
'win32api'
get_system_metrics
=
Win32API
.
new
"User32.dll"
,
"GetSystemMetrics"
,
[
"L"
],
"L"
...
...
@@ -22,7 +21,6 @@ module Resolution
def
default
system_resolution
=
self
.
system
all
.
each
do
|
width
,
height
|
#p [width, height, system_resolution[0], system_resolution[1], (system_resolution[0] < width and system_resolution[1] < height)]
return
[
width
,
height
]
if
system_resolution
[
0
]
>
width
and
system_resolution
[
1
]
>
height
end
all
.
last
...
...
lib/update.rb
View file @
a411afd0
...
...
@@ -3,7 +3,7 @@ require "fileutils"
require_relative
'card'
module
Update
Version
=
'0.7.3'
URL
=
"http://
card.touhou.cc
/mycard/update.json?version=
#{
Version
}
"
URL
=
"http://
my-card.in
/mycard/update.json?version=
#{
Version
}
"
class
<<
self
attr_reader
:thumbnails
,
:images
,
:status
def
start
...
...
@@ -114,23 +114,23 @@ module Update
thread
=
Thread
.
new
do
while
number
=
@thumbnails
.
pop
@status
.
replace
"正在下载缩略卡图 (剩余
#{
@thumbnails
.
size
}
张)"
open
(
"http://
card.touhou.cc
/images/cards/ygocore/thumbnail/
#{
number
}
.jpg"
,
'rb'
)
do
|
remote
|
open
(
"http://
my-card.in
/images/cards/ygocore/thumbnail/
#{
number
}
.jpg"
,
'rb'
)
do
|
remote
|
next
if
File
.
file?
"ygocore/pics/thumbnail/
#{
number
}
.jpg"
#$log.debug('下载缩略卡图'){"http://
card.touhou.cc
/images/cards/ygocore/thumbnail/#{number}.jpg 到 ygocore/pics/thumbnail/#{number}.jpg" }
#$log.debug('下载缩略卡图'){"http://
my-card.in
/images/cards/ygocore/thumbnail/#{number}.jpg 到 ygocore/pics/thumbnail/#{number}.jpg" }
open
(
"ygocore/pics/thumbnail/
#{
number
}
.jpg"
,
'wb'
)
do
|
local
|
local
.
write
remote
.
read
end
end
rescue
$log
.
error
(
'下载缩略出错'
){
"http://
card.touhou.cc
/images/cards/ygocore/thumbnail/
#{
number
}
.jpg 到 ygocore/pics/thumbnail/
#{
number
}
.jpg"
}
end
rescue
$log
.
error
(
'下载缩略出错'
){
"http://
my-card.in
/images/cards/ygocore/thumbnail/
#{
number
}
.jpg 到 ygocore/pics/thumbnail/
#{
number
}
.jpg"
}
end
while
number
=
@images
.
pop
@status
.
replace
"正在下载完整卡图 (剩余
#{
@images
.
size
}
张)"
#$log.debug('下载完整卡图'){"http://
card.touhou.cc
/images/cards/ygocore/#{number}.jpg 到 ygocore/pics/#{number}.jpg" }
open
(
"http://
card.touhou.cc
/images/cards/ygocore/
#{
number
}
.jpg"
,
'rb'
)
do
|
remote
|
#$log.debug('下载完整卡图'){"http://
my-card.in
/images/cards/ygocore/#{number}.jpg 到 ygocore/pics/#{number}.jpg" }
open
(
"http://
my-card.in
/images/cards/ygocore/
#{
number
}
.jpg"
,
'rb'
)
do
|
remote
|
next
if
File
.
file?
"ygocore/pics/
#{
number
}
.jpg"
open
(
"ygocore/pics/
#{
number
}
.jpg"
,
'wb'
)
do
|
local
|
local
.
write
remote
.
read
end
end
rescue
$log
.
error
(
'下载完整卡图出错'
){
"http://
card.touhou.cc
/images/cards/ygocore/
#{
number
}
.jpg 到 ygocore/pics/
#{
number
}
.jpg"
}
end
rescue
$log
.
error
(
'下载完整卡图出错'
){
"http://
my-card.in
/images/cards/ygocore/
#{
number
}
.jpg 到 ygocore/pics/
#{
number
}
.jpg"
}
end
end
thread
.
priority
=
-
1
...
...
lib/window_lobbybuttons.rb
View file @
a411afd0
...
...
@@ -34,7 +34,7 @@ class Window_LobbyButtons < Window_List
case
@index
when
0
#常见问题
require_relative
'dialog'
Dialog
.
web
"http://
card.touhou.cc
/login?user[name]=
#{
CGI
.
escape
$game
.
user
.
name
}
&user[password]=
#{
CGI
.
escape
$game
.
password
}
&continue=/topics/1453"
Dialog
.
web
"http://
my-card.in
/login?user[name]=
#{
CGI
.
escape
$game
.
user
.
name
}
&user[password]=
#{
CGI
.
escape
$game
.
password
}
&continue=/topics/1453"
when
1
#卡组编辑
require_relative
'deck'
$game
.
class
.
deck_edit
...
...
lib/ygocore/server.yml
View file @
a411afd0
register
:
http://
card.touhou.cc
/register
register
:
http://
my-card.in
/register
api
:
http://122.0.65.71:7922/
index
:
http://
card.touhou.cc
/
index
:
http://
my-card.in
/
server
:
122.0.65.71
port
:
7911
\ No newline at end of file
lib/ygocore/user.rb
View file @
a411afd0
...
...
@@ -15,7 +15,7 @@ class User
end
def
space
if
@certified
Dialog
.
web
"http://
card.touhou.cc/users/
#{
CGI
.
escape
@id
.
to_s
}
"
Dialog
.
web
"http://
my-card.in/users/
#{
CGI
.
escape
@id
.
to_s
}
"
else
Widget_Msgbox
.
new
(
"查看资料"
,
"用户
#{
@name
}
没有注册"
,
:ok
=>
"确定"
)
end
...
...
@@ -28,7 +28,7 @@ class User
yield
result
Thread
.
new
do
require
'cgi'
open
(
"http://
card.touhou.cc/users/
#{
CGI
.
escape
@id
.
to_s
}
.png"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
open
(
"http://
my-card.in/users/
#{
CGI
.
escape
@id
.
to_s
}
.png"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
(
yield
Surface
.
load
(
cache
)
if
scene
==
$scene
)
rescue
nil
end
else
...
...
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