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
36a6f898
Commit
36a6f898
authored
Jun 06, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.6.9 修正上一个版本导入ydk崩溃的问题
parent
6909e6cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Rakefile
Rakefile
+1
-1
lib/update.rb
lib/update.rb
+1
-1
lib/ygocore/game.rb
lib/ygocore/game.rb
+2
-2
No files found.
Rakefile
View file @
36a6f898
...
@@ -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.6.
8
'
s
.
version
=
'0.6.
9
'
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/update.rb
View file @
36a6f898
...
@@ -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.6.
8
'
Version
=
'0.6.
9
'
URL
=
"http://card.touhou.cc/mycard/update.json?version=
#{
Version
}
"
URL
=
"http://card.touhou.cc/mycard/update.json?version=
#{
Version
}
"
class
<<
self
class
<<
self
attr_reader
:thumbnails
,
:images
,
:status
attr_reader
:thumbnails
,
:images
,
:status
...
...
lib/ygocore/game.rb
View file @
36a6f898
...
@@ -193,11 +193,11 @@ class Ygocore < Game
...
@@ -193,11 +193,11 @@ class Ygocore < Game
file
=
Dialog
.
get_open_file
(
"导入卡组"
,
"所有支持的卡组 (*.txt;*.deck;*.ydk)"
=>
"*.ydk;*.txt;*.deck"
,
"OcgSoft卡组 (*.txt;*.deck)"
=>
"*.txt;*.deck"
,
"ygocore卡组 (*.ydk)"
=>
"*.ydk"
)
file
=
Dialog
.
get_open_file
(
"导入卡组"
,
"所有支持的卡组 (*.txt;*.deck;*.ydk)"
=>
"*.ydk;*.txt;*.deck"
,
"OcgSoft卡组 (*.txt;*.deck)"
=>
"*.txt;*.deck"
,
"ygocore卡组 (*.ydk)"
=>
"*.ydk"
)
if
!
file
.
empty?
if
!
file
.
empty?
#fix for stdlib File.extname
#fix for stdlib File.extname
file
=~
/(\.deck|\.txt|\.y
rp
)$/i
file
=~
/(\.deck|\.txt|\.y
dk
)$/i
extname
=
$1
extname
=
$1
Dir
.
mkdir
"ygocore/deck"
unless
File
.
directory?
(
"ygocore/deck"
)
Dir
.
mkdir
"ygocore/deck"
unless
File
.
directory?
(
"ygocore/deck"
)
open
(
"ygocore/deck/
#{
File
.
basename
(
file
,
extname
)
+
".ydk"
}
"
,
'w'
)
do
|
dest
|
open
(
"ygocore/deck/
#{
File
.
basename
(
file
,
extname
)
+
".ydk"
}
"
,
'w'
)
do
|
dest
|
if
file
=~
/(\.deck|\.txt)$/
if
file
=~
/(\.deck|\.txt)$/
i
deck
=
Deck
.
load
(
file
)
deck
=
Deck
.
load
(
file
)
dest
.
puts
(
"#main"
)
dest
.
puts
(
"#main"
)
deck
.
main
.
each
{
|
card
|
dest
.
puts
card
.
number
}
deck
.
main
.
each
{
|
card
|
dest
.
puts
card
.
number
}
...
...
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