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
xiaoye
mycard
Commits
55e3947e
Commit
55e3947e
authored
Mar 06, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ygocore
parent
bda578b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
4 deletions
+9
-4
install.sh
install.sh
+0
-0
lib/main.rb
lib/main.rb
+1
-1
lib/window_announcements.rb
lib/window_announcements.rb
+1
-1
lib/window_roomlist.rb
lib/window_roomlist.rb
+2
-0
lib/window_userinfo.rb
lib/window_userinfo.rb
+1
-1
lib/ygocore/game.rb
lib/ygocore/game.rb
+4
-1
No files found.
install.sh
100755 → 100644
View file @
55e3947e
File mode changed from 100755 to 100644
lib/main.rb
View file @
55e3947e
...
@@ -6,7 +6,7 @@ begin
...
@@ -6,7 +6,7 @@ begin
def
load_config
(
file
=
"config.yml"
)
def
load_config
(
file
=
"config.yml"
)
require
'yaml'
require
'yaml'
$config
=
YAML
.
load_file
(
"config.yml"
)
rescue
{}
$config
=
YAML
.
load_file
(
"config.yml"
)
rescue
{}
$config
||=
{}
$config
=
{}
unless
$config
.
is_a?
Hash
$config
[
'bgm'
]
=
true
if
$config
[
'bgm'
].
nil?
$config
[
'bgm'
]
=
true
if
$config
[
'bgm'
].
nil?
$config
[
'screen'
]
||=
{}
$config
[
'screen'
]
||=
{}
$config
[
'screen'
][
'width'
]
||=
1024
$config
[
'screen'
][
'width'
]
||=
1024
...
...
lib/window_announcements.rb
View file @
55e3947e
...
@@ -15,7 +15,7 @@ class Window_Announcements < Window
...
@@ -15,7 +15,7 @@ class Window_Announcements < Window
def
refresh
def
refresh
clear
clear
return
unless
@item
return
unless
@item
if
@transforming
if
@transforming
and
@last_item
@font
.
style
=
TTF
::
STYLE_NORMAL
@font
.
style
=
TTF
::
STYLE_NORMAL
@font
.
draw_blended_utf8
(
@contents
,
@last_item
.
title
,
0
,
-
@transforming
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
@last_item
.
title
,
0
,
-
@transforming
,
*
@color
)
@time_font
.
draw_blended_utf8
(
@contents
,
@last_item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
-
@transforming
+
4
,
*
@time_color
)
if
@last_item
.
time
@time_font
.
draw_blended_utf8
(
@contents
,
@last_item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
-
@transforming
+
4
,
*
@time_color
)
if
@last_item
.
time
...
...
lib/window_roomlist.rb
View file @
55e3947e
...
@@ -38,6 +38,7 @@ class Window_RoomList < Window_Scrollable
...
@@ -38,6 +38,7 @@ class Window_RoomList < Window_Scrollable
self
.
index
=
(
y
-
@y
)
/
WLH
+
@scroll
self
.
index
=
(
y
-
@y
)
/
WLH
+
@scroll
end
end
def
clicked
def
clicked
return
if
@last_clicked
and
Time
.
now
-
@last_clicked
<
3
#ygocore 加入房间时可能弹Tk窗询问主程序位置 防止重复点击
return
unless
@index
and
room
=
@items
[
@index
]
return
unless
@index
and
room
=
@items
[
@index
]
if
room
.
full?
if
room
.
full?
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入观战"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入观战"
)
...
@@ -46,5 +47,6 @@ class Window_RoomList < Window_Scrollable
...
@@ -46,5 +47,6 @@ class Window_RoomList < Window_Scrollable
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入房间"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入房间"
)
$game
.
join
room
$game
.
join
room
end
end
@last_clicked
=
Time
.
now
end
end
end
end
\ No newline at end of file
lib/window_userinfo.rb
View file @
55e3947e
...
@@ -23,7 +23,7 @@ class Window_UserInfo < Window
...
@@ -23,7 +23,7 @@ class Window_UserInfo < Window
@contents
.
put
(
@avatar_boarder
,
0
,
0
)
@contents
.
put
(
@avatar_boarder
,
0
,
0
)
end
end
@font
.
draw_blended_utf8
(
@contents
,
@user
.
name
,
160
,
12
,
0x00
,
0x00
,
0x00
)
@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
,
"id:
#{
@user
.
id
}
"
,
160
,
12
+
16
*
2
,
0x00
,
0x00
,
0x00
)
@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
...
...
lib/ygocore/game.rb
View file @
55e3947e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
load
File
.
expand_path
(
'window_login.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'window_login.rb'
,
File
.
dirname
(
__FILE__
))
require
'open-uri'
require
'open-uri'
class
Ygocore
<
Game
class
Ygocore
<
Game
Register_Url
=
'http://sh.convnet.net:79
22/?userregist=NEW
'
Register_Url
=
'http://sh.convnet.net:79
55/regist.html
'
Port
=
7911
Port
=
7911
Server
=
'221.226.68.62'
Server
=
'221.226.68.62'
...
@@ -21,6 +21,9 @@ class Ygocore < Game
...
@@ -21,6 +21,9 @@ class Ygocore < Game
load
File
.
expand_path
(
'room.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'room.rb'
,
File
.
dirname
(
__FILE__
))
end
end
def
login
(
username
,
password
)
def
login
(
username
,
password
)
if
username
.
empty?
return
Widget_Msgbox
.
new
(
"登陆"
,
"请输入用户名"
,
:ok
=>
"确定"
)
end
connect
connect
@password
=
password
@password
=
password
Game_Event
.
push
Game_Event
::
Login
.
new
(
User
.
new
(
username
.
to_sym
,
username
))
Game_Event
.
push
Game_Event
::
Login
.
new
(
User
.
new
(
username
.
to_sym
,
username
))
...
...
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