Commit 2a2cbaa9 authored by 神楽坂玲奈's avatar 神楽坂玲奈

0.8.2

parent cd38339e
...@@ -14,22 +14,22 @@ def list(path) ...@@ -14,22 +14,22 @@ def list(path)
next if file == "." or file == ".." next if file == "." or file == ".."
result << "#{path}/#{file}" result << "#{path}/#{file}"
result.concat list(result.last) if File.directory? result.last result.concat list(result.last) if File.directory? result.last
end end rescue p $!
result result
end end
spec = Gem::Specification.new do |s| spec = Gem::Specification.new do |s|
s.name = 'mycard' s.name = 'mycard'
s.version = '0.7.4' s.version = '0.8.2'
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
s.author = 'zh99998' s.author = 'zh99998'
s.email = 'zh99998@gmail.com' s.email = 'zh99998@gmail.com'
s.homepage = 'http://card.touhou,cc' s.homepage = 'http://my-card.in'
# s.executables = ['your_executable_here'] # s.executables = ['your_executable_here']
s.files = %w(LICENSE.txt README.txt replay) s.files = %w(LICENSE.txt README.txt config.yml replay)
%w{lib audio data fonts graphics ygocore}.each{|dir|s.files.concat list(dir)} %w{lib audio data fonts locales graphics ygocore}.each{|dir|s.files.concat list(dir)}
if Windows if Windows
s.files += %w(mycard.exe) + list("ruby") s.files += %w(mycard.exe) + list("ruby")
else else
...@@ -43,7 +43,7 @@ Gem::PackageTask.new(spec) do |p| ...@@ -43,7 +43,7 @@ Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec p.gem_spec = spec
if Windows if Windows
p.need_zip = true p.need_zip = true
p.zip_command = '../7z.exe a' p.zip_command = '7z a'
def p.zip_file def p.zip_file
"#{package_name}-win32.7z" "#{package_name}-win32.7z"
end end
...@@ -61,4 +61,4 @@ Rake::RDocTask.new do |rdoc| ...@@ -61,4 +61,4 @@ Rake::RDocTask.new do |rdoc|
rdoc.options << '--line-numbers' rdoc.options << '--line-numbers'
end 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'}
...@@ -16,23 +16,26 @@ class Scene_Lobby < Scene ...@@ -16,23 +16,26 @@ class Scene_Lobby < Scene
require_relative 'chatmessage' require_relative 'chatmessage'
require_relative 'scene_duel' require_relative 'scene_duel'
attr_reader :chat_window attr_reader :chat_window
def start def start
WM::set_caption("MyCard v#{Update::Version} - #{$config['game']} - #{$game.user.name}(#{$game.user.id})", "MyCard") WM::set_caption("MyCard v#{Update::Version} - #{$config['game']} - #{$game.user.name}(#{$game.user.id})", "MyCard")
$game.refresh $game.refresh
@background = Graphics.load('lobby', 'background', false) @background = Graphics.load('lobby', 'background', false)
Surface.blit(@background,0,0,0,0,$screen,0,0) Surface.blit(@background, 0, 0, 0, 0, $screen, 0, 0)
@userlist = Window_UserList.new(24,204,$game.users) @userlist = Window_UserList.new(24, 204, $game.users)
@roomlist = Window_RoomList.new(320,50,$game.rooms) @roomlist = Window_RoomList.new(320, 50, $game.rooms)
@userinfo = Window_UserInfo.new(24,24, $game.user) @userinfo = Window_UserInfo.new(24, 24, $game.user)
@host_window = Window_LobbyButtons.new(678,18) @host_window = Window_LobbyButtons.new(678, 18)
@active_window = @roomlist @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 @count = 0
super super
end end
def bgm def bgm
"lobby.ogg" "lobby.ogg"
end end
def handle(event) def handle(event)
case event case event
when Event::KeyDown when Event::KeyDown
...@@ -62,10 +65,12 @@ class Scene_Lobby < Scene ...@@ -62,10 +65,12 @@ class Scene_Lobby < Scene
case event case event
when Game_Event::AllUsers when Game_Event::AllUsers
@userlist.items = $game.users @userlist.items = $game.users
when Game_Event::AllRooms 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)} @roomlist.items = $game.rooms.find_all { |room|
when Game_Event::AllServers $game.filter[:servers].collect { |server| server.id }.include?(room.server_id) and
@roomlist.items = $game.rooms.find_all{|room|$game.filter[:servers].collect{|server|server.id}.include?(room.server_id)} $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 when Game_Event::Join
join(event.room) join(event.room)
when Game_Event::Watch when Game_Event::Watch
...@@ -77,9 +82,11 @@ class Scene_Lobby < Scene ...@@ -77,9 +82,11 @@ class Scene_Lobby < Scene
super super
end end
end end
def join(room) def join(room)
$scene = Scene_Duel.new(room) $scene = Scene_Duel.new(room)
end end
def update def update
@chat_window.update @chat_window.update
@host_window.update @host_window.update
...@@ -91,6 +98,7 @@ class Scene_Lobby < Scene ...@@ -91,6 +98,7 @@ class Scene_Lobby < Scene
@count += 1 @count += 1
super super
end end
def terminate def terminate
unless $scene.is_a? Scene_Lobby or $scene.is_a? Scene_Duel unless $scene.is_a? Scene_Lobby or $scene.is_a? Scene_Duel
$game.exit $game.exit
......
...@@ -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.1' Version = '0.8.2'
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
......
...@@ -77,7 +77,7 @@ class Ygocore < Game ...@@ -77,7 +77,7 @@ class Ygocore < Game
def connect def connect
@recv = Thread.new do @recv = Thread.new do
EventMachine::run { EventMachine::run {
EventMachine::connect "localhost", 9997, Client EventMachine::connect "mycard-server.my-card.in", 9997, Client
} }
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment