Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
28
Issues
28
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
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
赤子奈落
MDPro3
Commits
4482d224
Commit
4482d224
authored
Oct 10, 2025
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache mycard_apps.json
parent
04a89db7
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30977 additions
and
79 deletions
+30977
-79
.gitignore
.gitignore
+1
-0
Assets/Fonts/FZZYJW.asset
Assets/Fonts/FZZYJW.asset
+656
-10
Assets/Fonts/RenderFontChineseSimplified.asset
Assets/Fonts/RenderFontChineseSimplified.asset
+6885
-23
Assets/Fonts/SourceHanSansSC-Bold.asset
Assets/Fonts/SourceHanSansSC-Bold.asset
+4417
-10
Assets/Fonts/SourceHanSansSC-Medium.asset
Assets/Fonts/SourceHanSansSC-Medium.asset
+18904
-10
Assets/Prefabs/ServantUI/DeckEditorUIMobile.prefab
Assets/Prefabs/ServantUI/DeckEditorUIMobile.prefab
+8
-4
Assets/Scripts/MDPro3/Net/OnlineService.cs
Assets/Scripts/MDPro3/Net/OnlineService.cs
+67
-10
Assets/Scripts/MDPro3/Servant/MainMenu.cs
Assets/Scripts/MDPro3/Servant/MainMenu.cs
+3
-3
Assets/Tools/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
...ces/Fonts & Materials/LiberationSans SDF - Fallback.asset
+36
-9
No files found.
.gitignore
View file @
4482d224
...
...
@@ -61,3 +61,4 @@ Data/ur.ydk
/Assets/StreamingAssets/
/Assets/Wallpaper/
Data/lflist_genesys.conf
Data/mycard_apps.json
Assets/Fonts/FZZYJW.asset
View file @
4482d224
This diff is collapsed.
Click to expand it.
Assets/Fonts/RenderFontChineseSimplified.asset
View file @
4482d224
This diff is collapsed.
Click to expand it.
Assets/Fonts/SourceHanSansSC-Bold.asset
View file @
4482d224
This diff is collapsed.
Click to expand it.
Assets/Fonts/SourceHanSansSC-Medium.asset
View file @
4482d224
This diff is collapsed.
Click to expand it.
Assets/Prefabs/ServantUI/DeckEditorUIMobile.prefab
View file @
4482d224
...
...
@@ -11837,7 +11837,7 @@ MonoBehaviour:
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode:
1
m_TextWrappingMode:
0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
...
...
@@ -12409,7 +12409,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 7446650972608614846}
m_Direction: 2
m_Value: 1
m_Size: 0.7
31
5
m_Size: 0.7
19
5
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
...
...
@@ -53106,7 +53106,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 6524435541314575836}
m_Direction: 2
m_Value: 0
m_Size:
1
m_Size:
0.64285713
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
...
...
@@ -63866,7 +63866,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 4664753718165055069}
m_Direction: 2
m_Value: 0
m_Size:
1
m_Size:
0.6923077
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
...
...
@@ -69434,6 +69434,10 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3036679950856914851, guid: d4403fd2f98246942bb4edbb4b732ea1, type: 3}
propertyPath: m_Size
value: 0.9531484
objectReference: {fileID: 0}
- target: {fileID: 3039851360208839043, guid: d4403fd2f98246942bb4edbb4b732ea1, type: 3}
propertyPath: m_AnchorMax.y
value: 0
Assets/Scripts/MDPro3/Net/OnlineService.cs
View file @
4482d224
using
Cysharp.Threading.Tasks
;
using
Newtonsoft.Json
;
using
Percy
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
...
...
@@ -13,6 +15,7 @@ namespace MDPro3.Net
public
static
void
Initialize
()
{
_
=
InitializeGenesysLflist
();
_
=
InitializeMyCardAppsAsync
();
}
#
region
Genesys
lflist
...
...
@@ -21,6 +24,7 @@ namespace MDPro3.Net
private
const
string
PATH_GENESYS_LFLIST
=
"Data/lflist_genesys.conf"
;
private
static
readonly
List
<
int
>
genesysBannedCards
=
new
();
private
static
readonly
List
<
GenesysPoint
>
genesysPoints
=
new
();
private
static
int
officialGenesysLimit
=
100
;
private
static
async
UniTask
InitializeGenesysLflist
()
{
...
...
@@ -34,9 +38,7 @@ namespace MDPro3.Net
await
DownloadGenesysLflist
(
eTag
);
}
else
{
Program
.
Debug
(
"Genesys Lflist do not need update."
);
}
}
ParseGenesysLflist
();
...
...
@@ -138,19 +140,17 @@ namespace MDPro3.Net
/// <summary>
/// color for Genesys Points one card score
/// </summary>
/// <param name="gp"></param>
/// <returns></returns>
public
static
Color
GetGenesysPointColor
(
int
gp
)
{
if
(
gp
<
0
)
return
Color
.
red
;
if
(
gp
==
0
)
return
Color
.
gray
;
if
(
gp
<
10
)
if
(
gp
<
=
officialGenesysLimit
/
10
)
return
Color
.
green
;
if
(
gp
<
50
)
if
(
gp
<
=
officialGenesysLimit
/
2
)
return
Color
.
yellow
;
if
(
gp
<
100
)
if
(
gp
<
=
officialGenesysLimit
)
return
Color
.
magenta
;
return
Color
.
red
;
}
...
...
@@ -158,17 +158,74 @@ namespace MDPro3.Net
/// <summary>
/// color for Genesys Points total score
/// </summary>
/// <param name="gp"></param>
/// <returns></returns>
public
static
Color
GetGenesysPointsColor
(
int
gp
)
{
if
(
gp
<
100
)
if
(
gp
<
=
officialGenesysLimit
)
return
Color
.
white
;
return
Color
.
red
;
}
#
endregion
#
region
MyCard
Apps
private
const
string
URL_MYCARD_APPS
=
"https://cdntx.moecube.com/apps.json"
;
private
const
string
PATH_MYCARD_APPS
=
"Data/mycard_apps.json"
;
public
static
MyCardNews
myCardNews
;
private
static
async
UniTask
InitializeMyCardAppsAsync
()
{
var
eTag
=
await
GetETagAsync
(
URL_MYCARD_APPS
);
if
(!
string
.
IsNullOrEmpty
(
eTag
))
{
var
configTag
=
Config
.
Get
(
GetLocalETagKey
(
URL_MYCARD_APPS
),
Config
.
EMPTY_STRING
);
if
(!
string
.
Equals
(
eTag
,
configTag
,
StringComparison
.
Ordinal
))
{
Program
.
Debug
(
"Update MyCard Apps."
);
await
DownloadMyCardApps
(
eTag
);
}
else
Program
.
Debug
(
"MyCard Apps do not need update."
);
}
ParseMyCardNews
();
}
private
static
async
UniTask
DownloadMyCardApps
(
string
ETag
)
{
using
var
request
=
UnityWebRequest
.
Get
(
URL_MYCARD_APPS
);
request
.
timeout
=
15
;
await
request
.
SendWebRequest
();
if
(
request
.
result
==
UnityWebRequest
.
Result
.
Success
)
{
File
.
WriteAllText
(
PATH_MYCARD_APPS
,
request
.
downloadHandler
.
text
);
Config
.
Set
(
GetLocalETagKey
(
URL_MYCARD_APPS
),
ETag
);
Config
.
Save
();
}
else
Program
.
Debug
(
"下载MyCard apps.json失败。"
);
}
private
static
void
ParseMyCardNews
()
{
if
(!
File
.
Exists
(
PATH_MYCARD_APPS
))
return
;
var
json
=
File
.
ReadAllText
(
PATH_MYCARD_APPS
);
json
=
json
.
Replace
(
"\"news\":[]"
,
"\"news\":{}"
);
var
apps
=
JsonConvert
.
DeserializeObject
<
MyCardApp
[
]>
(
json
);
foreach
(
var
app
in
apps
)
if
(
app
.
id
==
"ygopro"
)
{
myCardNews
=
app
.
news
;
return
;
}
}
#
endregion
#
region
Online
Tools
private
static
string
GetLocalETagKey
(
string
url
)
=>
$"ETag_
{
url
.
GetHashCode
()}
"
;
...
...
Assets/Scripts/MDPro3/Servant/MainMenu.cs
View file @
4482d224
...
...
@@ -140,10 +140,10 @@ namespace MDPro3.Servant
private
IEnumerator
LoadMyCardNewsAsync
()
{
var
news
=
MyCard
.
GetNews
();
while
(!
news
.
IsCompleted
)
while
(
OnlineService
.
myCardNews
==
null
)
yield
return
null
;
GetUI
<
MainMenuUI
>().
News
.
news
=
news
.
Result
;
var
news
=
OnlineService
.
myCardNews
;
GetUI
<
MainMenuUI
>().
News
.
news
=
news
;
GetUI
<
MainMenuUI
>().
News
.
LoadNews
();
}
...
...
Assets/Tools/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
View file @
4482d224
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