Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
95d97598
Commit
95d97598
authored
Dec 18, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持读取expansions文件夹里多个禁卡表文件
parent
b0afcea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
mobile/src/main/java/ocgcore/LimitManager.java
mobile/src/main/java/ocgcore/LimitManager.java
+16
-12
No files found.
mobile/src/main/java/ocgcore/LimitManager.java
View file @
95d97598
...
...
@@ -80,18 +80,16 @@ public class LimitManager implements Closeable {
// 清理旧数据,不让缓存干扰读取结果
mLimitLists
.
clear
();
mLimitNames
.
clear
();
// 创建主资源路径下的限制文件对象
File
stringFile
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
Constants
.
CORE_LIMIT_PATH
);
boolean
rs1
=
true
;
boolean
rs2
=
true
;
boolean
res3
=
true
;
boolean
expansion_rs2
=
true
;
boolean
expansion_zip_rs1
=
true
;
boolean
default_res3
=
true
;
// 如果需要读取扩展包数据,则加载扩展包中的限制文件
if
(
AppsSettings
.
get
().
isReadExpansions
())
{
File
stringFile2
=
new
File
(
AppsSettings
.
get
().
getExpansionsPath
(),
Constants
.
CORE_LIMIT_PATH
);
rs1
=
loadFile
(
stringFile2
);
File
[]
files
=
AppsSettings
.
get
().
getExpansionsPath
().
listFiles
();
if
(
files
!=
null
)
{
for
(
File
file
:
files
)
{
// 1.读取扩展卡压缩包中的lflist.conf文件
if
(
file
.
isFile
()
&&
(
file
.
getName
().
endsWith
(
".zip"
)
||
file
.
getName
().
endsWith
(
Constants
.
YPK_FILE_EX
)))
{
Log
.
e
(
"LimitManager"
,
"读取压缩包"
);
try
{
...
...
@@ -102,25 +100,31 @@ public class LimitManager implements Closeable {
entry
=
entris
.
nextElement
();
if
(!
entry
.
isDirectory
())
{
if
(
entry
.
getName
().
contains
(
"lflist"
)
&&
entry
.
getName
().
endsWith
(
".conf"
))
{
rs2
&=
loadFile
(
zipFile
.
getInputStream
(
entry
));
expansion_zip_rs1
&=
loadFile
(
zipFile
.
getInputStream
(
entry
));
}
}
}
}
catch
(
IOException
e
)
{
LogUtil
.
e
(
"LimitManager"
,
"读取压缩包失败"
,
e
);
res3
=
false
;
default_
res3
=
false
;
}
}
if
(
file
.
isFile
()
&&
file
.
getName
().
contains
(
"lflist"
)
&&
file
.
getName
().
endsWith
(
".conf"
))
{
expansion_rs2
=
loadFile
(
file
);
}
}
}
}
res3
=
loadFile
(
stringFile
);
// 3.加载主资源路径(ygocore文件夹)下的lflist.conf文件对象,这是内置默认文件
File
ygocore_lflist
=
new
File
(
AppsSettings
.
get
().
getResourcePath
(),
Constants
.
CORE_LIMIT_PATH
);
default_res3
=
loadFile
(
ygocore_lflist
);
LimitList
blank_list
=
new
LimitList
(
"N/A"
);
mLimitLists
.
put
(
"N/A"
,
blank_list
);
mLimitNames
.
add
(
"N/A"
);
++
mCount
;
Log
.
e
(
"LimitManager加载情况"
,
"rs1="
+
rs1
+
" rs2="
+
rs2
+
" res3="
+
res3
);
return
rs1
&&
rs2
&&
res3
;
Log
.
e
(
"LimitManager加载情况"
,
"rs1="
+
expansion_zip_rs1
+
" rs2="
+
expansion_rs2
+
" res3="
+
default_
res3
);
return
expansion_zip_rs1
&&
expansion_rs2
&&
default_
res3
;
}
/**
...
...
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