Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
YGOProUnity_V2
Commits
a0c8e33c
Commit
a0c8e33c
authored
Aug 22, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update loading datas
parent
c44377fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
67 deletions
+43
-67
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+37
-64
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
+6
-3
No files found.
Assets/SibylSystem/Program.cs
View file @
a0c8e33c
...
...
@@ -287,46 +287,53 @@ public class Program : MonoBehaviour
});
go
(
300
,
()
=>
{
InterString
.
initialize
(
"config/translation.conf"
);
InterString
.
initialize
(
"config/translation.conf"
);
GameTextureManager
.
initialize
();
Config
.
initialize
(
"config/config.conf"
);
if
(!
Directory
.
Exists
(
"expansions"
))
{
Directory
.
CreateDirectory
(
"expansions"
);
}
var
fileInfos
=
(
new
DirectoryInfo
(
"
data
"
)).
GetFiles
();
for
(
int
i
=
0
;
i
<
fileInfos
.
Length
;
i
++
)
var
fileInfos
=
(
new
DirectoryInfo
(
"
expansions
"
)).
GetFiles
();
for
each
(
FileInfo
file
in
fileInfos
)
{
if
(
file
Infos
[
i
].
Name
.
Length
>
4
)
if
(
file
.
Name
.
ToLower
().
EndsWith
(
".ypk"
)
)
{
if
(
fileInfos
[
i
].
Name
.
Substring
(
fileInfos
[
i
].
Name
.
Length
-
4
,
4
)
==
".zip"
)
{
GameZipManager
.
Zips
.
Add
(
new
Ionic
.
Zip
.
ZipFile
(
"data/"
+
fileInfos
[
i
].
Name
));
}
GameZipManager
.
Zips
.
Add
(
new
Ionic
.
Zip
.
ZipFile
(
"expansions/"
+
file
.
Name
));
}
if
(
file
.
Name
.
ToLower
().
EndsWith
(
".conf"
))
{
GameStringManager
.
initialize
(
"expansions/"
+
file
.
Name
);
}
if
(
file
.
Name
.
ToLower
().
EndsWith
(
".cdb"
))
{
YGOSharp
.
CardsManager
.
initialize
(
"expansions/"
+
file
.
Name
);
}
}
fileInfos
=
(
new
DirectoryInfo
(
"expansions"
)).
GetFiles
();
for
(
int
i
=
0
;
i
<
fileInfos
.
Length
;
i
++)
fileInfos
=
(
new
DirectoryInfo
(
"data"
)).
GetFiles
();
foreach
(
FileInfo
file
in
fileInfos
)
{
if
(
file
Infos
[
i
].
Name
.
Length
>
4
)
if
(
file
.
Name
.
ToLower
().
EndsWith
(
".zip"
)
)
{
if
(
fileInfos
[
i
].
Name
.
Substring
(
fileInfos
[
i
].
Name
.
Length
-
4
,
4
)
==
".ypk"
)
{
GameZipManager
.
Zips
.
Add
(
new
Ionic
.
Zip
.
ZipFile
(
"expansions/"
+
fileInfos
[
i
].
Name
));
}
GameZipManager
.
Zips
.
Add
(
new
Ionic
.
Zip
.
ZipFile
(
"data/"
+
file
.
Name
));
}
}
GameTextureManager
.
initialize
();
Config
.
initialize
(
"config/config.conf"
);
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
{
foreach
(
string
file
in
zip
.
EntryFileNames
)
{
if
(
file
.
EndsWith
(
".conf"
))
if
(
file
.
ToLower
().
EndsWith
(
".conf"
))
{
MemoryStream
ms
=
new
MemoryStream
();
ZipEntry
e
=
zip
[
file
];
e
.
Extract
(
ms
);
GameStringManager
.
initializeContent
(
Encoding
.
UTF8
.
GetString
(
ms
.
ToArray
()));
}
if
(
file
.
EndsWith
(
".cdb"
))
if
(
file
.
ToLower
().
EndsWith
(
".cdb"
))
{
ZipEntry
e
=
zip
[
file
];
string
tempfile
=
Path
.
Combine
(
Path
.
GetTempPath
(),
file
);
...
...
@@ -337,56 +344,18 @@ public class Program : MonoBehaviour
}
}
GameStringManager
.
initialize
(
"config/strings.conf"
);
if
(
File
.
Exists
(
"cdb/strings.conf"
))
{
GameStringManager
.
initialize
(
"cdb/strings.conf"
);
}
if
(
File
.
Exists
(
"diy/strings.conf"
))
{
GameStringManager
.
initialize
(
"diy/strings.conf"
);
}
YGOSharp
.
BanlistManager
.
initialize
(
"config/lflist.conf"
);
fileInfos
=
(
new
DirectoryInfo
(
"cdb"
)).
GetFiles
();
for
(
int
i
=
0
;
i
<
fileInfos
.
Length
;
i
++)
{
if
(
fileInfos
[
i
].
Name
.
Length
>
4
)
{
if
(
fileInfos
[
i
].
Name
.
Substring
(
fileInfos
[
i
].
Name
.
Length
-
4
,
4
)
==
".cdb"
)
{
YGOSharp
.
CardsManager
.
initialize
(
"cdb/"
+
fileInfos
[
i
].
Name
);
}
}
}
if
(
Directory
.
Exists
(
"diy"
))
{
fileInfos
=
(
new
DirectoryInfo
(
"diy"
)).
GetFiles
();
for
(
int
i
=
0
;
i
<
fileInfos
.
Length
;
i
++)
{
if
(
fileInfos
[
i
].
Name
.
Length
>
4
)
{
if
(
fileInfos
[
i
].
Name
.
Substring
(
fileInfos
[
i
].
Name
.
Length
-
4
,
4
)
==
".cdb"
)
{
YGOSharp
.
CardsManager
.
initialize
(
"diy/"
+
fileInfos
[
i
].
Name
);
}
}
}
}
GameStringManager
.
initialize
(
"data/strings.conf"
);
YGOSharp
.
CardsManager
.
initialize
(
"data/cards.cdb"
);
YGOSharp
.
BanlistManager
.
initialize
(
"data/lflist.conf"
);
if
(
Directory
.
Exists
(
"pack"
))
{
fileInfos
=
(
new
DirectoryInfo
(
"pack"
)).
GetFiles
();
for
(
int
i
=
0
;
i
<
fileInfos
.
Length
;
i
++
)
for
each
(
FileInfo
file
in
fileInfos
)
{
if
(
file
Infos
[
i
].
Name
.
Length
>
3
)
if
(
file
.
Name
.
ToLower
().
EndsWith
(
".db"
)
)
{
if
(
fileInfos
[
i
].
Name
.
Substring
(
fileInfos
[
i
].
Name
.
Length
-
3
,
3
)
==
".db"
)
{
YGOSharp
.
PacksManager
.
initialize
(
"pack/"
+
fileInfos
[
i
].
Name
);
}
YGOSharp
.
PacksManager
.
initialize
(
"pack/"
+
file
.
Name
);
}
}
YGOSharp
.
PacksManager
.
initializeSec
();
...
...
@@ -1039,6 +1008,10 @@ public class Program : MonoBehaviour
//adeUnityEngine.Debug.Log(e);
}
Menu
.
deleteShell
();
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
{
zip
.
Dispose
();
}
}
public
void
quit
()
...
...
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
View file @
a0c8e33c
...
...
@@ -67,10 +67,13 @@ public static class GameStringManager
a
.
content
+=
mats
[
i
]
+
" "
;
}
a
.
content
=
a
.
content
.
Substring
(
0
,
a
.
content
.
Length
-
1
);
hashedStrings
.
Add
(
a
);
if
(
a
.
region
==
"setname"
)
if
(
get
(
a
.
region
,
a
.
hashCode
)
==
""
)
{
xilies
.
Add
(
a
);
hashedStrings
.
Add
(
a
);
if
(
a
.
region
==
"setname"
)
{
xilies
.
Add
(
a
);
}
}
}
}
...
...
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