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
2a2cbaa9
Commit
2a2cbaa9
authored
Dec 09, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.8.2
parent
cd38339e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
231 additions
and
223 deletions
+231
-223
Rakefile
Rakefile
+64
-64
lib/scene_lobby.rb
lib/scene_lobby.rb
+20
-12
lib/update.rb
lib/update.rb
+146
-146
lib/ygocore/game.rb
lib/ygocore/game.rb
+1
-1
No files found.
Rakefile
View file @
2a2cbaa9
...
...
@@ -14,22 +14,22 @@ def list(path)
next
if
file
==
"."
or
file
==
".."
result
<<
"
#{
path
}
/
#{
file
}
"
result
.
concat
list
(
result
.
last
)
if
File
.
directory?
result
.
last
end
end
rescue
p
$!
result
end
spec
=
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'mycard'
s
.
version
=
'0.
7.4'
s
.
version
=
'0.
8.2'
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
summary
=
'a card game'
s
.
description
=
s
.
summary
s
.
author
=
'zh99998'
s
.
email
=
'zh99998@gmail.com'
s
.
homepage
=
'http://
card.touhou,cc'
s
.
homepage
=
'http://
my-card.in'
# s.executables = ['your_executable_here']
s
.
files
=
%w(LICENSE.txt README.txt
replay)
%w{lib audio data fonts
graphics ygocore}
.
each
{
|
dir
|
s
.
files
.
concat
list
(
dir
)}
s
.
files
=
%w(LICENSE.txt README.txt
config.yml replay)
%w{lib audio data fonts
locales graphics ygocore}
.
each
{
|
dir
|
s
.
files
.
concat
list
(
dir
)}
if
Windows
s
.
files
+=
%w(mycard.exe)
+
list
(
"ruby"
)
else
...
...
@@ -43,7 +43,7 @@ Gem::PackageTask.new(spec) do |p|
p
.
gem_spec
=
spec
if
Windows
p
.
need_zip
=
true
p
.
zip_command
=
'
../7z.exe a'
p
.
zip_command
=
'
7z a'
def
p
.
zip_file
"
#{
package_name
}
-win32.7z"
end
...
...
@@ -61,4 +61,4 @@ Rake::RDocTask.new do |rdoc|
rdoc
.
options
<<
'--line-numbers'
end
CLOBBER
.
include
%w(error-程序出错请到论坛反馈.txt log.log profile.log config.yml doc ygocore/pics)
+
list
(
'replay'
)
+
list
(
'ygocore/replay'
)
+
list
(
'.'
).
keep_if
{
|
file
|
File
.
basename
(
file
)
==
"Thumbs.db"
}
+
list
(
"graphics/avatars"
).
keep_if
{
|
file
|
File
.
basename
(
file
)
=~
/.*_(?:small|middle|large)\.png/
}
+
list
(
"ygocore/deck"
).
keep_if
{
|
file
|
File
.
basename
(
file
)
!=
'sample.ydk'
}
CLOBBER
.
include
%w(error-程序出错请到论坛反馈.txt log.log profile.log config.yml doc ygocore/pics)
+
list
(
'replay'
)
+
list
(
'ygocore/replay'
)
+
list
(
'.'
).
keep_if
{
|
file
|
File
.
basename
(
file
)
==
"Thumbs.db"
}
+
list
(
"graphics/avatars"
).
reject
{
|
file
|
File
.
basename
(
file
)
=~
/(?:error|loading)_(?:small|middle|large)\.png/
}
+
list
(
"ygocore/deck"
).
keep_if
{
|
file
|
File
.
basename
(
file
)
!=
'sample.ydk'
}
lib/scene_lobby.rb
View file @
2a2cbaa9
...
...
@@ -16,23 +16,26 @@ class Scene_Lobby < Scene
require_relative
'chatmessage'
require_relative
'scene_duel'
attr_reader
:chat_window
def
start
WM
::
set_caption
(
"MyCard v
#{
Update
::
Version
}
-
#{
$config
[
'game'
]
}
-
#{
$game
.
user
.
name
}
(
#{
$game
.
user
.
id
}
)"
,
"MyCard"
)
$game
.
refresh
@background
=
Graphics
.
load
(
'lobby'
,
'background'
,
false
)
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
@userlist
=
Window_UserList
.
new
(
24
,
204
,
$game
.
users
)
@roomlist
=
Window_RoomList
.
new
(
320
,
50
,
$game
.
rooms
)
@userinfo
=
Window_UserInfo
.
new
(
24
,
24
,
$game
.
user
)
@host_window
=
Window_LobbyButtons
.
new
(
678
,
18
)
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
@userlist
=
Window_UserList
.
new
(
24
,
204
,
$game
.
users
)
@roomlist
=
Window_RoomList
.
new
(
320
,
50
,
$game
.
rooms
)
@userinfo
=
Window_UserInfo
.
new
(
24
,
24
,
$game
.
user
)
@host_window
=
Window_LobbyButtons
.
new
(
678
,
18
)
@active_window
=
@roomlist
@chat_window
=
Window_Chat
.
new
(
313
,
$config
[
'screen'
][
'height'
]
-
225
,
698
,
212
)
@chat_window
=
Window_Chat
.
new
(
313
,
$config
[
'screen'
][
'height'
]
-
225
,
698
,
212
)
@count
=
0
super
end
def
bgm
"lobby.ogg"
end
def
handle
(
event
)
case
event
when
Event
::
KeyDown
...
...
@@ -62,10 +65,12 @@ class Scene_Lobby < Scene
case
event
when
Game_Event
::
AllUsers
@userlist
.
items
=
$game
.
users
when
Game_Event
::
AllRooms
@roomlist
.
items
=
$game
.
rooms
.
find_all
{
|
room
|
$game
.
filter
[
:servers
].
collect
{
|
server
|
server
.
id
}.
include?
(
room
.
server_id
)}
when
Game_Event
::
AllServers
@roomlist
.
items
=
$game
.
rooms
.
find_all
{
|
room
|
$game
.
filter
[
:servers
].
collect
{
|
server
|
server
.
id
}.
include?
(
room
.
server_id
)}
when
Game_Event
::
AllRooms
,
Game_Event
::
AllServers
@roomlist
.
items
=
$game
.
rooms
.
find_all
{
|
room
|
$game
.
filter
[
:servers
].
collect
{
|
server
|
server
.
id
}.
include?
(
room
.
server_id
)
and
$game
.
filter
[
:waiting_only
]
?
(
room
.
status
==
:
wait
)
:
true
and
$game
.
filter
[
:normal_only
]
?
(
!
room
.
tag?
&&
(
room
.
ot
==
0
)
&&
(
room
.
lp
=
8000
))
:
true
}
when
Game_Event
::
Join
join
(
event
.
room
)
when
Game_Event
::
Watch
...
...
@@ -77,9 +82,11 @@ class Scene_Lobby < Scene
super
end
end
def
join
(
room
)
$scene
=
Scene_Duel
.
new
(
room
)
end
def
update
@chat_window
.
update
@host_window
.
update
...
...
@@ -91,6 +98,7 @@ class Scene_Lobby < Scene
@count
+=
1
super
end
def
terminate
unless
$scene
.
is_a?
Scene_Lobby
or
$scene
.
is_a?
Scene_Duel
$game
.
exit
...
...
lib/update.rb
View file @
2a2cbaa9
...
...
@@ -2,7 +2,7 @@ require 'open-uri'
require
"fileutils"
require_relative
'card'
module
Update
Version
=
'0.8.
1'
Version
=
'0.8.
2'
URL
=
"http://my-card.in/mycard/update.json?version=
#{
Version
}
"
class
<<
self
attr_reader
:thumbnails
,
:images
,
:status
...
...
lib/ygocore/game.rb
View file @
2a2cbaa9
...
...
@@ -77,7 +77,7 @@ class Ygocore < Game
def
connect
@recv
=
Thread
.
new
do
EventMachine
::
run
{
EventMachine
::
connect
"
localhost
"
,
9997
,
Client
EventMachine
::
connect
"
mycard-server.my-card.in
"
,
9997
,
Client
}
end
end
...
...
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