Commit 3bdc6566 authored by 神楽坂玲奈's avatar 神楽坂玲奈

0.9.8, fix match

parent c1878166
......@@ -2,7 +2,7 @@ module Cacheable
@@all = {}
def new(id, *args)
@@all[self] ||= {}
if result = @@all[self][id]
if id and result = @@all[self][id]
result.set(id, *args)
result
else
......
......@@ -57,7 +57,7 @@ case file
require_relative 'server'
$game.user = User.new($1.to_sym, $1) if $1
$game.password = $2 if $2
room = Room.new(0, $5.to_s)
room = Room.new(nil, $5.to_s)
room.server = Server.new(nil, nil, $3, $4.to_i, !!$2)
Ygocore.run_ygocore room, true
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
require "fileutils"
require_relative 'card'
module Update
Version = '0.9.6'
Version = '0.9.8'
URL = "http://my-card.in/mycard/update.json?version=#{Version}"
class <<self
attr_reader :thumbnails, :images, :status
......
......@@ -56,7 +56,7 @@ class Window_LobbyButtons < Window_List
open('http://mycard-server.my-card.in:9997/match.json') { |f|
@waiting = false
if f.read =~ /^mycard:\/\/([\d\.]+):(\d+)\/(.*)$/
room = Room.new(0, $3.to_s)
room = Room.new(nil, $3.to_s)
room.server = Server.new(nil, nil, $1, $2.to_i, false)
$game.join(room)
else
......
......@@ -200,7 +200,7 @@ class Ygocore < Game
#end
def host(room_name, room_config)
room = Room.new(0, room_name)
room = Room.new(nil, room_name)
room.pvp = room_config[:pvp]
room.match = room_config[:match]
room.tag = room_config[:tag]
......
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