Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
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
hex
ygopro2
Commits
ba1f7611
Commit
ba1f7611
authored
Dec 31, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MC 匹配安全更新;增加开局默认全时点设置;1月表更新
parent
d8a993a6
Pipeline
#42289
failed
Changes
12
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
905 additions
and
945 deletions
+905
-945
Assets/ArtSystem/gameInfo/gameInfo.cs
Assets/ArtSystem/gameInfo/gameInfo.cs
+1
-0
Assets/NGUI/Scripts/Interaction/UIPopupList.cs
Assets/NGUI/Scripts/Interaction/UIPopupList.cs
+4
-2
Assets/SibylSystem/MyCard/MyCard.cs
Assets/SibylSystem/MyCard/MyCard.cs
+32
-106
Assets/SibylSystem/MyCard/MyCardHelper.cs
Assets/SibylSystem/MyCard/MyCardHelper.cs
+166
-140
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+7
-13
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+1
-1
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
+5
-0
Assets/SibylSystem/Setting/Setting.cs
Assets/SibylSystem/Setting/Setting.cs
+9
-3
Assets/StreamingAssets/ygopro2-data.zip
Assets/StreamingAssets/ygopro2-data.zip
+0
-0
Assets/transUI/prefab/trans_setting.prefab
Assets/transUI/prefab/trans_setting.prefab
+1
-1
UserSettings/Layouts/CurrentMaximizeLayout.dwlt
UserSettings/Layouts/CurrentMaximizeLayout.dwlt
+446
-446
UserSettings/Layouts/default-2021.dwlt
UserSettings/Layouts/default-2021.dwlt
+233
-233
No files found.
Assets/ArtSystem/gameInfo/gameInfo.cs
View file @
ba1f7611
...
...
@@ -172,6 +172,7 @@ public class gameInfo : MonoBehaviour
public
void
on_toggle_smart
()
{
// Debug.Log("on_toggle_smart:");
SetExclusiveToggle
(
toggle_smart
);
}
...
...
Assets/NGUI/Scripts/Interaction/UIPopupList.cs
View file @
ba1f7611
...
...
@@ -202,6 +202,7 @@ public class UIPopupList : UIWidgetContainer
[
System
.
NonSerialized
]
protected
GameObject
mSelection
;
[
System
.
NonSerialized
]
protected
int
mOpenFrame
=
0
;
[
System
.
NonSerialized
]
protected
float
mInitialY
=
0f
;
// Deprecated functionality
[
HideInInspector
][
SerializeField
]
GameObject
eventReceiver
;
...
...
@@ -1095,6 +1096,7 @@ public class UIPopupList : UIWidgetContainer
pos
.
x
=
Mathf
.
Round
(
pos
.
x
);
pos
.
y
=
Mathf
.
Round
(
pos
.
y
);
t
.
localPosition
=
pos
;
mInitialY
=
pos
.
y
;
}
else
OnSelect
(
false
);
if
(
mChild
!=
null
)
...
...
@@ -1161,9 +1163,9 @@ public class UIPopupList : UIWidgetContainer
a
.
y
+=
l
;
a
.
z
=
0
;
timeScroller
=
Program
.
TimePassed
();
if
(
a
.
y
>
whole
)
if
(
a
.
y
>
mInitialY
)
{
a
.
y
=
whole
;
a
.
y
=
mInitialY
;
}
if
(
a
.
y
<
0
)
{
...
...
Assets/SibylSystem/MyCard/MyCard.cs
View file @
ba1f7611
...
...
@@ -13,9 +13,7 @@ public class MyCard : WindowServantSP
//const string mycardTiramisuAthleticPort = "8911";
//const string mycardTiramisuEntertainPort = "7911";
// 不再需要显式的 Thread 对象
// Thread requestThread = null;
private
Coroutine
requestCoroutine
=
null
;
// 用 Coroutine 对象来跟踪
private
Coroutine
requestCoroutine
=
null
;
MyCardHelper
mycardHelper
;
UIInput
inputUsername
;
UIInput
inputPsw
;
...
...
@@ -31,33 +29,24 @@ public class MyCard : WindowServantSP
inputUsername
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"name_"
);
inputPsw
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
);
mycardHelper
=
new
MyCardHelper
();
l
oadUser
();
L
oadUser
();
SetActiveFalse
();
}
void
s
aveUser
()
void
S
aveUser
()
{
Config
.
Set
(
"mycard_username"
,
inputUsername
.
value
);
Config
.
Set
(
"mycard_password"
,
inputPsw
.
value
);
Program
.
I
().
selectServer
.
name
=
inputUsername
.
value
;
}
void
l
oadUser
()
void
L
oadUser
()
{
inputUsername
.
value
=
Config
.
Get
(
"mycard_username"
,
"MyCard"
);
inputPsw
.
value
=
Config
.
Get
(
"mycard_password"
,
""
);
}
// public void terminateThread()
// {
// if (!isRequesting && requestThread == null)
// {
// return;
// }
// requestThread.Abort();
// requestThread = null;
// }
public
void
terminateRequest
()
public
void
TerminateRequest
()
{
if
(
requestCoroutine
!=
null
)
{
...
...
@@ -68,27 +57,12 @@ public class MyCard : WindowServantSP
}
}
// void onClickExit()
// {
// Program.I().shiftToServant(Program.I().menu);
// if (TcpHelper.tcpClient != null)
// {
// if (isRequesting) {
// terminateThread();
// }
// if (TcpHelper.tcpClient.Connected)
// {
// TcpHelper.tcpClient.Close();
// }
// }
// }
void
onClickExit
()
{
Program
.
I
().
shiftToServant
(
Program
.
I
().
menu
);
if
(
isRequesting
)
{
t
erminateRequest
();
T
erminateRequest
();
}
if
(
TcpHelper
.
tcpClient
!=
null
&&
TcpHelper
.
tcpClient
.
Connected
)
{
...
...
@@ -106,75 +80,13 @@ public class MyCard : WindowServantSP
Application
.
OpenURL
(
"https://ygobbs.com/"
);
}
// void matchThread(string username, string password, string matchType) {
// try {
// Program.PrintToChat(InterString.Get("正在登录至 MyCard。"));
// string failReason = "";
// bool res = mycardHelper.login(username, password, out failReason);
// if (!res) {
// Program.PrintToChat(InterString.Get("MyCard 登录失败。原因: ") + failReason);
// isRequesting = false;
// return;
// }
// Program.PrintToChat(InterString.Get("MyCard 登录成功,用户名: ") + mycardHelper.username);
// Program.PrintToChat(InterString.Get("正在请求匹配。匹配类型: ") + matchType);
// MatchResultObject matchResultObject = mycardHelper.requestMatch(matchType, out failReason);
// if (matchResultObject == null) {
// Program.PrintToChat(InterString.Get("匹配请求失败。原因: ") + failReason);
// isRequesting = false;
// return;
// }
// Program.PrintToChat(InterString.Get("匹配成功。正在进入房间。"));
// this.isMatching = true;
// (new Thread(() => { TcpHelper.join(matchResultObject.address, mycardHelper.username, matchResultObject.port.ToString(), matchResultObject.password, "0x" + String.Format("{0:X}", Config.ClientVersion)); })).Start();
// isRequesting = false;
// } catch (Exception e) {
// if (e.GetType() != typeof(ThreadAbortException)) {
// Program.PrintToChat(InterString.Get("未知错误: ") + e.Message);
// } else {
// Program.PrintToChat(InterString.Get("匹配已中断。"));
// }
// isRequesting = false;
// }
// }
// void startMatch(string matchType) {
// string username = inputUsername.value;
// string password = inputPsw.value;
// if (username == "" || password == "")
// {
// RMSshow_onlyYes("", InterString.Get("用户名或密码为空。"), null);
// return;
// }
// if (isRequesting)
// {
// terminateThread();
// }
// saveUser();
// isRequesting = true;
// Program.PrintToChat(InterString.Get("已开始匹配。"));
// requestThread = new Thread(() =>
// {
// matchThread(username, password, matchType);
// });
// requestThread.Start();
// }
// void onClickJoinAthletic() {
// startMatch("athletic");
// }
// void onClickJoinEntertain() {
// startMatch("entertain");
// }
IEnumerator
matchCoroutine
(
string
username
,
string
password
,
string
matchType
)
{
IEnumerator
MatchCoroutine
(
string
username
,
string
password
,
string
matchType
)
{
isRequesting
=
true
;
Program
.
PrintToChat
(
InterString
.
Get
(
"正在登录至 MyCard。"
));
bool
loginSuccess
=
false
;
string
failReason
=
""
;
// 启动并等待登录协程完成
yield
return
Program
.
I
().
StartCoroutine
(
mycardHelper
.
l
ogin
(
username
,
password
,
(
success
,
reason
)
=>
{
yield
return
Program
.
I
().
StartCoroutine
(
mycardHelper
.
L
ogin
(
username
,
password
,
(
success
,
reason
)
=>
{
loginSuccess
=
success
;
failReason
=
reason
;
}));
...
...
@@ -184,11 +96,23 @@ public class MyCard : WindowServantSP
yield
break
;
// 结束协程
}
Program
.
PrintToChat
(
InterString
.
Get
(
"MyCard 登录成功,用户名: "
)
+
mycardHelper
.
username
);
// Program.PrintToChat(InterString.Get("正在获取匹配秘钥。"));
yield
return
Program
.
I
().
StartCoroutine
(
mycardHelper
.
GetUserU16Secret
((
success
,
reason
)
=>
{
loginSuccess
=
success
;
failReason
=
reason
;
}));
if
(!
loginSuccess
)
{
Program
.
PrintToChat
(
InterString
.
Get
(
"获取用户密钥失败。请重新登录。原因: "
)
+
failReason
);
isRequesting
=
false
;
yield
break
;
// 结束协程
}
// Program.PrintToChat(InterString.Get("获取匹配秘钥成功。"));
Program
.
PrintToChat
(
InterString
.
Get
(
"正在请求匹配。匹配类型: "
)
+
matchType
);
MatchResultObject
matchResultObject
=
null
;
// 启动并等待匹配协程完成
yield
return
Program
.
I
().
StartCoroutine
(
mycardHelper
.
r
equestMatch
(
matchType
,
(
result
,
reason
)
=>
{
yield
return
Program
.
I
().
StartCoroutine
(
mycardHelper
.
R
equestMatch
(
matchType
,
(
result
,
reason
)
=>
{
matchResultObject
=
result
;
failReason
=
reason
;
}));
...
...
@@ -206,7 +130,8 @@ public class MyCard : WindowServantSP
isRequesting
=
false
;
requestCoroutine
=
null
;
}
void
startMatch
(
string
matchType
)
{
void
StartMatch
(
string
matchType
)
{
string
username
=
inputUsername
.
value
;
string
password
=
inputPsw
.
value
;
if
(
string
.
IsNullOrEmpty
(
username
)
||
string
.
IsNullOrEmpty
(
password
))
...
...
@@ -214,19 +139,20 @@ public class MyCard : WindowServantSP
RMSshow_onlyYes
(
""
,
InterString
.
Get
(
"用户名或密码为空。"
),
null
);
return
;
}
if
(
isRequesting
)
if
(
isRequesting
)
{
t
erminateRequest
();
T
erminateRequest
();
}
s
aveUser
();
S
aveUser
();
Program
.
PrintToChat
(
InterString
.
Get
(
"已开始匹配。"
));
// 启动协程,而不是线程
requestCoroutine
=
Program
.
I
().
StartCoroutine
(
matchCoroutine
(
username
,
password
,
matchType
));
}
requestCoroutine
=
Program
.
I
().
StartCoroutine
(
MatchCoroutine
(
username
,
password
,
matchType
));
}
void
onClickJoinAthletic
()
{
s
tartMatch
(
"athletic"
);
S
tartMatch
(
"athletic"
);
}
void
onClickJoinEntertain
()
{
s
tartMatch
(
"entertain"
);
S
tartMatch
(
"entertain"
);
}
}
Assets/SibylSystem/MyCard/MyCardHelper.cs
View file @
ba1f7611
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
ba1f7611
...
...
@@ -469,6 +469,13 @@ public class Ocgcore : ServantWithCardDescription
UIHelper
.
getByName
<
UIToggle
>(
gameInfo
.
gameObject
,
"ignore_"
).
value
=
false
;
UIHelper
.
getByName
<
UIToggle
>(
gameInfo
.
gameObject
,
"watch_"
).
value
=
false
;
}
if
(
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"full_"
,
"0"
)))
{
Program
.
go
(
1
,
()
=>
{
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
all
);
});
}
}
public
void
shiftCondition
(
Condition
condition
)
...
...
@@ -987,19 +994,6 @@ public class Ocgcore : ServantWithCardDescription
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
no
);
}
if
(
Input
.
GetKeyUp
(
KeyCode
.
C
)
==
true
)
{
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
}
if
(
Input
.
GetKeyUp
(
KeyCode
.
A
)
==
true
)
{
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
}
if
(
Input
.
GetKeyUp
(
KeyCode
.
S
)
==
true
)
{
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
}
if
(
Input
.
GetMouseButtonDown
(
2
))
{
if
(
Program
.
I
().
book
.
isShowed
)
...
...
Assets/SibylSystem/Program.cs
View file @
ba1f7611
...
...
@@ -1352,7 +1352,7 @@ public class Program : MonoBehaviour
FPS
=
FPS
.
Substring
(
0
,
5
);
}
catch
{
}
GUI
.
Label
(
new
Rect
(
Screen
.
safeArea
.
x
+
10
,
5
,
400
,
200
),
"[Ver 1.036.2-TCube 2
510
] "
+
"FPS: "
+
FPS
);
GUI
.
Label
(
new
Rect
(
Screen
.
safeArea
.
x
+
10
,
5
,
400
,
200
),
"[Ver 1.036.2-TCube 2
601
] "
+
"FPS: "
+
FPS
);
}
...
...
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
View file @
ba1f7611
...
...
@@ -128,6 +128,11 @@ public static class GameStringManager
Program
.
DEBUGLOG
(
e
);
}
}
if
(
a
==
""
)
{
a
=
"???"
;
}
return
a
;
}
...
...
Assets/SibylSystem/Setting/Setting.cs
View file @
ba1f7611
...
...
@@ -13,9 +13,9 @@ public class Setting : WindowServant2D
setting
=
gameObject
.
GetComponentInChildren
<
LAZYsetting
>();
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"screen_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"full_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"full_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"resize_"
,
resizeScreen
);
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
=
Screen
.
fullScreen
;
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"full_"
,
"0"
))
;
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreWatcher_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"ignoreWatcher_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"ignoreOP_"
).
value
=
UIHelper
.
fromStringToBool
(
...
...
@@ -277,7 +277,7 @@ public class Setting : WindowServant2D
Screen
.
SetResolution
(
int
.
Parse
(
mats
[
0
]),
int
.
Parse
(
mats
[
1
]),
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
Screen
.
fullScreen
);
}
Program
.
go
(
...
...
@@ -329,6 +329,12 @@ public class Setting : WindowServant2D
public
void
save
()
{
Config
.
Set
(
"full_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
)
);
Config
.
Set
(
"ignoreWatcher_"
,
UIHelper
.
fromBoolToString
(
...
...
Assets/StreamingAssets/ygopro2-data.zip
View file @
ba1f7611
No preview for this file type
Assets/transUI/prefab/trans_setting.prefab
View file @
ba1f7611
...
...
@@ -17712,7 +17712,7 @@ MonoBehaviour:
keepCrispWhenShrunk
:
1
mTrueTypeFont
:
{
fileID
:
12800000
,
guid
:
f775853fdfd14bb47934543e95c3bae3
,
type
:
3
}
mFont
:
{
fileID
:
0
}
mText
:
"
\u5
168\u5C4F\u6E38\u620F
"
mText
:
"
\u5
f00\u5c40\u9ed8\u8ba4\u5168\u65f6\u70b9
"
mFontSize
:
18
mFontStyle
:
0
mAlignment
:
0
...
...
UserSettings/Layouts/CurrentMaximizeLayout.dwlt
View file @
ba1f7611
This diff is collapsed.
Click to expand it.
UserSettings/Layouts/default-2021.dwlt
View file @
ba1f7611
This diff is collapsed.
Click to expand it.
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