Commit e77701fc authored by 神楽坂玲奈's avatar 神楽坂玲奈

0.8.5, xmpp

parent ff51a04b
...@@ -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
......
...@@ -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
#性能分析 #性能分析
......
...@@ -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
......
...@@ -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
......
...@@ -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
......
...@@ -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
......
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
......
This diff is collapsed.
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