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
d96633c0
Commit
d96633c0
authored
Sep 10, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打开方式增加.conf,放到expansions文件夹
parent
91a63fe0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
11 deletions
+33
-11
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+9
-0
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
+22
-9
mobile/src/main/java/ocgcore/LimitManager.java
mobile/src/main/java/ocgcore/LimitManager.java
+1
-1
mobile/src/main/java/ocgcore/StringManager.java
mobile/src/main/java/ocgcore/StringManager.java
+1
-1
No files found.
mobile/src/main/AndroidManifest.xml
View file @
d96633c0
...
@@ -105,6 +105,15 @@
...
@@ -105,6 +105,15 @@
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\..*\.yrp"
/>
<data
android:pathPattern=
".*\.conf"
/>
<data
android:pathPattern=
".*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\.conf"
/>
<data
android:pathPattern=
".*\..*\..*\..*\..*\..*\..*\..*\..*\.conf"
/>
</intent-filter>
</intent-filter>
<intent-filter>
<intent-filter>
...
...
mobile/src/main/java/cn/garymb/ygomobile/GameUriManager.java
View file @
d96633c0
...
@@ -2,6 +2,8 @@ package cn.garymb.ygomobile;
...
@@ -2,6 +2,8 @@ package cn.garymb.ygomobile;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_OPEN_DECK
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_OPEN_DECK
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_OPEN_GAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_OPEN_GAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_EXPANSIONS
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_LIMIT_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_REPLAY_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_REPLAY_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_SINGLE_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
CORE_SINGLE_PATH
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
QUERY_NAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
QUERY_NAME
;
...
@@ -27,21 +29,25 @@ import java.util.Locale;
...
@@ -27,21 +29,25 @@ import java.util.Locale;
import
cn.garymb.ygodata.YGOGameOptions
;
import
cn.garymb.ygodata.YGOGameOptions
;
import
cn.garymb.ygomobile.bean.Deck
;
import
cn.garymb.ygomobile.bean.Deck
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.home.Home
Fragment
;
import
cn.garymb.ygomobile.ui.home.Home
Activity
;
import
cn.garymb.ygomobile.ui.home.MainActivity
;
import
cn.garymb.ygomobile.ui.home.MainActivity
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.FileUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
ocgcore.DataManager
;
import
ocgcore.DataManager
;
import
ocgcore.LimitManager
;
import
ocgcore.StringManager
;
public
class
GameUriManager
{
public
class
GameUriManager
{
private
final
Activity
activity
;
private
final
Activity
activity
;
private
HomeFragment
homeFragment
;
private
LimitManager
limitManager
;
private
String
fname
;
private
String
Manager
stringManager
;
public
GameUriManager
(
Activity
activity
)
{
public
GameUriManager
(
Activity
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
(
HomeActivity
)
activity
;
limitManager
=
new
LimitManager
();
stringManager
=
new
StringManager
();
}
}
public
boolean
doIntent
(
Intent
intent
)
{
public
boolean
doIntent
(
Intent
intent
)
{
...
@@ -162,6 +168,9 @@ public class GameUriManager {
...
@@ -162,6 +168,9 @@ public class GameUriManager {
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_REPLAY_PATH
,
name
);
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_REPLAY_PATH
,
name
);
}
else
if
(
name
.
toLowerCase
(
Locale
.
US
).
endsWith
(
".lua"
))
{
}
else
if
(
name
.
toLowerCase
(
Locale
.
US
).
endsWith
(
".lua"
))
{
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_SINGLE_PATH
,
name
);
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_SINGLE_PATH
,
name
);
}
else
if
(
name
.
toLowerCase
(
Locale
.
US
).
endsWith
(
".conf"
))
{
String
rename
=
name
.
contains
(
"lflist"
)
?
CORE_LIMIT_PATH
:
name
;
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/"
+
CORE_EXPANSIONS
,
rename
);
}
else
{
}
else
{
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/temp"
,
name
);
local
=
new
File
(
AppsSettings
.
get
().
getResourcePath
()
+
"/temp"
,
name
);
}
}
...
@@ -207,6 +216,7 @@ public class GameUriManager {
...
@@ -207,6 +216,7 @@ public class GameUriManager {
boolean
isYpk
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".ypk"
);
boolean
isYpk
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".ypk"
);
boolean
isYrp
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".yrp"
);
boolean
isYrp
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".yrp"
);
boolean
isLua
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".lua"
);
boolean
isLua
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".lua"
);
boolean
isConf
=
file
.
getName
().
toLowerCase
(
Locale
.
US
).
endsWith
(
".conf"
);
Log
.
i
(
Constants
.
TAG
,
"open file:"
+
uri
+
"->"
+
file
.
getAbsolutePath
());
Log
.
i
(
Constants
.
TAG
,
"open file:"
+
uri
+
"->"
+
file
.
getAbsolutePath
());
if
(
isYdk
)
{
if
(
isYdk
)
{
startSetting
.
putExtra
(
Intent
.
EXTRA_TEXT
,
file
.
getAbsolutePath
());
startSetting
.
putExtra
(
Intent
.
EXTRA_TEXT
,
file
.
getAbsolutePath
());
...
@@ -234,6 +244,10 @@ public class GameUriManager {
...
@@ -234,6 +244,10 @@ public class GameUriManager {
}
else
{
}
else
{
Log
.
w
(
Constants
.
TAG
,
"game is running"
);
Log
.
w
(
Constants
.
TAG
,
"game is running"
);
}
}
}
else
if
(
isConf
)
{
limitManager
.
load
();
stringManager
.
load
();
Toast
.
makeText
(
activity
,
activity
.
getString
(
R
.
string
.
restart_app
),
Toast
.
LENGTH_LONG
).
show
();
}
}
}
else
{
}
else
{
String
host
=
uri
.
getHost
();
String
host
=
uri
.
getHost
();
...
@@ -246,11 +260,11 @@ public class GameUriManager {
...
@@ -246,11 +260,11 @@ public class GameUriManager {
doOpenPath
(
name
);
doOpenPath
(
name
);
}
else
{
}
else
{
YGODAUtil
.
deDeckListener
(
uri
,
(
uri1
,
mainList
,
exList
,
sideList
,
isCompleteDeck
,
exception
)
->
{
YGODAUtil
.
deDeckListener
(
uri
,
(
uri1
,
mainList
,
exList
,
sideList
,
isCompleteDeck
,
exception
)
->
{
if
(!
TextUtils
.
isEmpty
(
exception
)){
if
(!
TextUtils
.
isEmpty
(
exception
))
{
YGOUtil
.
show
(
"卡组解析失败,原因为:"
+
exception
);
YGOUtil
.
show
(
"卡组解析失败,原因为:"
+
exception
);
return
;
return
;
}
}
Deck
deckInfo
=
new
Deck
(
uri
,
mainList
,
exList
,
sideList
);
Deck
deckInfo
=
new
Deck
(
uri
,
mainList
,
exList
,
sideList
);
File
file
=
deckInfo
.
saveTemp
(
AppsSettings
.
get
().
getDeckDir
());
File
file
=
deckInfo
.
saveTemp
(
AppsSettings
.
get
().
getDeckDir
());
if
(!
deckInfo
.
isCompleteDeck
())
{
if
(!
deckInfo
.
isCompleteDeck
())
{
YGOUtil
.
show
(
"当前卡组缺少完整信息,将只显示已有卡片"
);
YGOUtil
.
show
(
"当前卡组缺少完整信息,将只显示已有卡片"
);
...
@@ -263,8 +277,7 @@ public class GameUriManager {
...
@@ -263,8 +277,7 @@ public class GameUriManager {
YGODAUtil
.
deRoomListener
(
uri
,
(
host1
,
port
,
password
,
exception
)
->
{
YGODAUtil
.
deRoomListener
(
uri
,
(
host1
,
port
,
password
,
exception
)
->
{
if
(
TextUtils
.
isEmpty
(
exception
))
if
(
TextUtils
.
isEmpty
(
exception
))
if
(
activity
instanceof
MainActivity
)
{
if
(
activity
instanceof
MainActivity
)
{
homeFragment
=
new
HomeFragment
();
((
HomeActivity
)
activity
).
fragment_home
.
quickjoinRoom
(
host1
,
port
,
password
);
homeFragment
.
quickjoinRoom
(
host1
,
port
,
password
);
}
else
{
}
else
{
YGOUtil
.
show
(
exception
);
YGOUtil
.
show
(
exception
);
}
}
...
...
mobile/src/main/java/ocgcore/LimitManager.java
View file @
d96633c0
...
@@ -26,7 +26,7 @@ public class LimitManager implements Closeable {
...
@@ -26,7 +26,7 @@ public class LimitManager implements Closeable {
private
final
List
<
String
>
mLimitNames
=
new
ArrayList
<>();
private
final
List
<
String
>
mLimitNames
=
new
ArrayList
<>();
private
int
mCount
;
private
int
mCount
;
LimitManager
()
{
public
LimitManager
()
{
}
}
...
...
mobile/src/main/java/ocgcore/StringManager.java
View file @
d96633c0
...
@@ -36,7 +36,7 @@ public class StringManager implements Closeable {
...
@@ -36,7 +36,7 @@ public class StringManager implements Closeable {
private
final
SparseArray
<
String
>
mSystem
=
new
SparseArray
<>();
private
final
SparseArray
<
String
>
mSystem
=
new
SparseArray
<>();
private
final
List
<
CardSet
>
mCardSets
=
new
ArrayList
<>();
private
final
List
<
CardSet
>
mCardSets
=
new
ArrayList
<>();
StringManager
()
{
public
StringManager
()
{
}
}
...
...
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