Commit b078f4d7 authored by qq247321453's avatar qq247321453

Merge branch 'master' into cc

parents 1533b106 b542e0f0
...@@ -48,6 +48,15 @@ void DeckManager::LoadLFListSingle(const char* path) { ...@@ -48,6 +48,15 @@ void DeckManager::LoadLFListSingle(const char* path) {
fclose(fp); fclose(fp);
} }
} }
void DeckManager::LoadLFList(android::InitOptions *options) {
io::path workingDir = options->getWorkDir();
LoadLFListSingle((workingDir + path("/expansions/lflist.conf")).c_str());
LoadLFListSingle((workingDir + path("/lflist.conf")).c_str());
LFList nolimit;
nolimit.listName = L"N/A";
nolimit.hash = 0;
_lfList.push_back(nolimit);
}
const wchar_t* DeckManager::GetLFListName(int lfhash) { const wchar_t* DeckManager::GetLFListName(int lfhash) {
auto lit = std::find_if(_lfList.begin(), _lfList.end(), [lfhash](const ygo::LFList& list) { auto lit = std::find_if(_lfList.begin(), _lfList.end(), [lfhash](const ygo::LFList& list) {
return list.hash == lfhash; return list.hash == lfhash;
......
...@@ -36,6 +36,7 @@ public: ...@@ -36,6 +36,7 @@ public:
std::vector<LFList> _lfList; std::vector<LFList> _lfList;
void LoadLFListSingle(const char* path); void LoadLFListSingle(const char* path);
void LoadLFList(android::InitOptions *options);
const wchar_t* GetLFListName(int lfhash); const wchar_t* GetLFListName(int lfhash);
std::unordered_map<int, int>* GetLFListContent(int lfhash); std::unordered_map<int, int>* GetLFListContent(int lfhash);
int CheckDeck(Deck& deck, int lfhash, int rule); int CheckDeck(Deck& deck, int lfhash, int rule);
......
This diff is collapsed.
...@@ -134,8 +134,6 @@ public: ...@@ -134,8 +134,6 @@ public:
void stopBGM(); void stopBGM();
void playBGM(); void playBGM();
bool Initialize(ANDROID_APP app, android::InitOptions *options); bool Initialize(ANDROID_APP app, android::InitOptions *options);
#else
bool Initialize();
#endif #endif
void MainLoop(); void MainLoop();
void RefreshTimeDisplay(); void RefreshTimeDisplay();
...@@ -291,7 +289,7 @@ public: ...@@ -291,7 +289,7 @@ public:
irr::gui::CGUIImageButton* imgSettings; irr::gui::CGUIImageButton* imgSettings;
irr::gui::IGUIWindow* wSettings; irr::gui::IGUIWindow* wSettings;
irr::gui::IGUIImage* bgSettings; irr::gui::IGUIImage* bgSettings;
irr::gui::IGUIButton* btnCloseSettings;// irr::gui::CGUIImageButton* btnCloseSettings;//
//hint text //hint text
irr::gui::IGUIStaticText* stHintMsg; irr::gui::IGUIStaticText* stHintMsg;
irr::gui::IGUIStaticText* stTip; irr::gui::IGUIStaticText* stTip;
...@@ -379,7 +377,7 @@ public: ...@@ -379,7 +377,7 @@ public:
irr::gui::IGUIButton* btnHostPrepOB;// irr::gui::IGUIButton* btnHostPrepOB;//
irr::gui::IGUIStaticText* stHostPrepDuelist[4]; irr::gui::IGUIStaticText* stHostPrepDuelist[4];
irr::gui::IGUICheckBox* chkHostPrepReady[4]; irr::gui::IGUICheckBox* chkHostPrepReady[4];
irr::gui::IGUIButton* btnHostPrepKick[4];// irr::gui::CGUIImageButton* btnHostPrepKick[4];//
irr::gui::IGUIComboBox* cbCategorySelect; irr::gui::IGUIComboBox* cbCategorySelect;
irr::gui::IGUIComboBox* cbDeckSelect; irr::gui::IGUIComboBox* cbDeckSelect;
irr::gui::IGUIStaticText* stHostPrepRule; irr::gui::IGUIStaticText* stHostPrepRule;
......
...@@ -50,6 +50,7 @@ bool ImageManager::Initial(const path dir) { ...@@ -50,6 +50,7 @@ bool ImageManager::Initial(const path dir) {
tPlay = driver->getTexture((dir + path("/textures/extra/tplay.png")).c_str()); tPlay = driver->getTexture((dir + path("/textures/extra/tplay.png")).c_str());
tTalk = driver->getTexture((dir + path("/textures/extra/ttalk.png")).c_str()); tTalk = driver->getTexture((dir + path("/textures/extra/ttalk.png")).c_str());
tShut = driver->getTexture((dir + path("/textures/extra/tshut.png")).c_str()); tShut = driver->getTexture((dir + path("/textures/extra/tshut.png")).c_str());
tClose = driver->getTexture((dir + path("/textures/extra/tclose.png")).c_str());
tTitleBar = driver->getTexture((dir + path("/textures/extra/stitlebar.png")).c_str()); tTitleBar = driver->getTexture((dir + path("/textures/extra/stitlebar.png")).c_str());
tWindow = driver->getTexture((dir + path("/textures/extra/sWindow.png")).c_str()); tWindow = driver->getTexture((dir + path("/textures/extra/sWindow.png")).c_str());
tWindow_V = driver->getTexture((dir + path("/textures/extra/sWindow_V.png")).c_str()); tWindow_V = driver->getTexture((dir + path("/textures/extra/sWindow_V.png")).c_str());
......
...@@ -65,6 +65,7 @@ public: ...@@ -65,6 +65,7 @@ public:
irr::video::ITexture* tPlay; irr::video::ITexture* tPlay;
irr::video::ITexture* tTalk; irr::video::ITexture* tTalk;
irr::video::ITexture* tShut; irr::video::ITexture* tShut;
irr::video::ITexture* tClose;
irr::video::ITexture* tTitleBar; irr::video::ITexture* tTitleBar;
irr::video::ITexture* tWindow; irr::video::ITexture* tWindow;
irr::video::ITexture* tWindow_V; irr::video::ITexture* tWindow_V;
......
...@@ -338,6 +338,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -338,6 +338,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
int extra = replay.ReadInt32(); int extra = replay.ReadInt32();
for(int j = 0; j < extra; ++j) for(int j = 0; j < extra; ++j)
tmp_deck.extra.push_back(dataManager.GetCodePointer(replay.ReadInt32())); tmp_deck.extra.push_back(dataManager.GetCodePointer(replay.ReadInt32()));
FileSystem::SafeFileName(namebuf[i]);
myswprintf(filename, L"deck/%ls-%d %ls.ydk", ex_filename, i + 1, namebuf[i]); myswprintf(filename, L"deck/%ls-%d %ls.ydk", ex_filename, i + 1, namebuf[i]);
deckManager.SaveDeck(tmp_deck, filename); deckManager.SaveDeck(tmp_deck, filename);
} }
...@@ -345,7 +346,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -345,7 +346,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame->PopupElement(mainGame->wACMessage, 20); mainGame->PopupElement(mainGame->wACMessage, 20);
break; break;
} }
//TEST BOT MODE
case BUTTON_BOT_START: { case BUTTON_BOT_START: {
int sel = mainGame->lstBotList->getSelected(); int sel = mainGame->lstBotList->getSelected();
if(sel == -1) if(sel == -1)
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
class FileSystem { class FileSystem {
public: public:
static void SafeFileName(wchar_t* wfile) {
while((wfile = wcspbrk(wfile, L"<>:\"/\\|?*")) != NULL)
*wfile++ = '_';
}
static bool IsFileExists(const wchar_t* wfile) { static bool IsFileExists(const wchar_t* wfile) {
DWORD attr = GetFileAttributesW(wfile); DWORD attr = GetFileAttributesW(wfile);
return attr != INVALID_FILE_ATTRIBUTES && !(attr & FILE_ATTRIBUTE_DIRECTORY); return attr != INVALID_FILE_ATTRIBUTES && !(attr & FILE_ATTRIBUTE_DIRECTORY);
...@@ -112,6 +117,11 @@ public: ...@@ -112,6 +117,11 @@ public:
class FileSystem { class FileSystem {
public: public:
static void SafeFileName(wchar_t* wfile) {
while((wfile = wcspbrk(wfile, L"/")) != NULL)
*wfile++ = '_';
}
static bool IsFileExists(const char* file) { static bool IsFileExists(const char* file) {
struct stat fileStat; struct stat fileStat;
return (stat(file, &fileStat) == 0) && !S_ISDIR(fileStat.st_mode); return (stat(file, &fileStat) == 0) && !S_ISDIR(fileStat.st_mode);
......
...@@ -16,15 +16,23 @@ ...@@ -16,15 +16,23 @@
特别感谢: 尸体233,废话多,大毛,幻兽L 的支持与努力. 特别感谢: 尸体233,废话多,大毛,幻兽L 的支持与努力.
</pre> </pre>
<ul> <ul>
<li style="color:#ffff00">3.8.7</li> <li style="color:#ffff00">3.8.8</li>
</ul> </ul>
<pre> <pre>
更新: 更新:
1.更新ygo内核; 1.更新ygo内核;
2.新卡1106+KICO+VJ; 2.新卡SR12+T1105+DBGC+VJ;
3.新增残局lua文件用本app打开进入对局; 3.升级ygopro版本号为1035.3;
4.新增录像yrp文件用本app打开进入观看; 4.卡池添加简中归属分类;
5.新增发送yrp文件到QQ微信等应用; 5.先行卡补丁可以在列表中选择删除;
6.查看大卡图时长按支持分享那张卡图;
7.分享卡组时支持分享ydk文件;
变更:
1.修正相同玩家ID的录像只能提取一方的问题;
2.退出ygopro时如果mobile进程被杀则重新唤醒;
3.修正不通过本软件替换数据库而导致的卡组编辑闪退问题;
4.卡组编辑增加一些新手引导;
5.ygopro的禁卡表设置从卡组管理移到设置。
</pre> </pre>
<h3 style="color:#ff0000">注意</h3> <h3 style="color:#ff0000">注意</h3>
<pre> <pre>
......
...@@ -9,8 +9,8 @@ android { ...@@ -9,8 +9,8 @@ android {
minSdkVersion 21 minSdkVersion 21
//noinspection ExpiredTargetSdkVersion //noinspection ExpiredTargetSdkVersion
targetSdkVersion 29 targetSdkVersion 29
versionCode 390901604 versionCode 380800907
versionName "3.9.9" versionName "3.8.8"
flavorDimensions "versionCode" flavorDimensions "versionCode"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
ndk { ndk {
......
...@@ -157,9 +157,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -157,9 +157,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
$(R.id.btn_nav_list).setOnClickListener((v) -> doMenu(R.id.action_card_list)); $(R.id.btn_nav_list).setOnClickListener((v) -> doMenu(R.id.action_card_list));
// //
final File _file; final File _file;
//打开指定卡组 //打开指定卡组
if (!TextUtils.isEmpty(preLoadFile) && (mPreLoadFile = new File(preLoadFile)).exists()) { if (!TextUtils.isEmpty(preLoadFile) && (mPreLoadFile = new File(preLoadFile)).exists()) {
//外面卡组 //外面卡组
_file = mPreLoadFile; _file = mPreLoadFile;
} else { } else {
mPreLoadFile = null; mPreLoadFile = null;
...@@ -167,7 +167,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -167,7 +167,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
if(TextUtils.isEmpty(path)){ if(TextUtils.isEmpty(path)){
_file = null; _file = null;
} else { } else {
//最后卡组 //最后卡组
_file = new File(path); _file = new File(path);
} }
} }
...@@ -260,13 +260,13 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -260,13 +260,13 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
DialogPlus dlg = DialogPlus.show(this, null, getString(R.string.loading)); DialogPlus dlg = DialogPlus.show(this, null, getString(R.string.loading));
VUiKit.defer().when(() -> { VUiKit.defer().when(() -> {
DataManager.get().load(true); DataManager.get().load(true);
//默认第一个卡表 //默认第一个卡表
if (mLimitManager.getCount() > 0) { if (mLimitManager.getCount() > 0) {
mCardLoader.setLimitList(mLimitManager.getTopLimit()); mCardLoader.setLimitList(mLimitManager.getTopLimit());
} }
File file = ydk; File file = ydk;
if (file == null || !file.exists()) { if (file == null || !file.exists()) {
//当默认卡组不存在的时候 //当默认卡组不存在的时候
List<File> files = getYdkFiles(); List<File> files = getYdkFiles();
if (files != null && files.size() > 0) { if (files != null && files.size() > 0) {
file = files.get(0); file = files.get(0);
...@@ -288,15 +288,15 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -288,15 +288,15 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
mCardSelector.initItems(); mCardSelector.initItems();
initLimitListSpinners(mLimitSpinner, mCardLoader.getLimitList()); initLimitListSpinners(mLimitSpinner, mCardLoader.getLimitList());
initDecksListSpinners(mDeckSpinner, rs.source); initDecksListSpinners(mDeckSpinner, rs.source);
//设置当前卡组 //设置当前卡组
setCurDeck(rs); setCurDeck(rs);
//设置收藏夹 //设置收藏夹
mCardSelector.showFavorites(false); mCardSelector.showFavorites(false);
}); });
} }
/** /**
* 设置当前卡组 * 设置当前卡组
*/ */
private void setCurDeck(DeckInfo deckInfo) { private void setCurDeck(DeckInfo deckInfo) {
if (deckInfo == null) { if (deckInfo == null) {
...@@ -307,7 +307,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -307,7 +307,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
String name = IOUtils.tirmName(file.getName(), Constants.YDK_FILE_EX); String name = IOUtils.tirmName(file.getName(), Constants.YDK_FILE_EX);
setActionBarSubTitle(name); setActionBarSubTitle(name);
// if (inDeckDir(file)) { // if (inDeckDir(file)) {
//记住最后打开的卡组 //记住最后打开的卡组
mSettings.setLastDeckPath(file.getAbsolutePath()); mSettings.setLastDeckPath(file.getAbsolutePath());
tv_deck.setText(name); tv_deck.setText(name);
...@@ -383,7 +383,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -383,7 +383,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
@Override @Override
public void onItemDoubleClick(View view, int pos) { public void onItemDoubleClick(View view, int pos) {
//拖拽中,就不显示 //拖拽中,就不显示
if (isShowDrawer()) { if (isShowDrawer()) {
return; return;
} }
...@@ -627,7 +627,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -627,7 +627,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
// mDeckAdapater.notifyDataSetChanged(); // mDeckAdapater.notifyDataSetChanged();
// break; // break;
case R.id.action_search: case R.id.action_search:
//弹条件对话框 //弹条件对话框
showSearch(true); showSearch(true);
break; break;
case R.id.action_card_list: case R.id.action_card_list:
...@@ -642,7 +642,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -642,7 +642,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
break; break;
case R.id.action_save: case R.id.action_save:
if (mPreLoadFile != null && mPreLoadFile == mDeckAdapater.getYdkFile()) { if (mPreLoadFile != null && mPreLoadFile == mDeckAdapater.getYdkFile()) {
//需要保存到deck文件夹 //需要保存到deck文件夹
inputDeckName(mPreLoadFile, null, true); inputDeckName(mPreLoadFile, null, true);
} else { } else {
if (mDeckAdapater.getYdkFile() == null) { if (mDeckAdapater.getYdkFile() == null) {
...@@ -709,7 +709,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -709,7 +709,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
} }
break; break;
case R.id.action_unsort: case R.id.action_unsort:
//打乱 //打乱
mDeckAdapater.unSort(); mDeckAdapater.unSort();
break; break;
case R.id.action_sort: case R.id.action_sort:
...@@ -729,7 +729,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -729,7 +729,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
builder.setMessageGravity(Gravity.CENTER_HORIZONTAL); builder.setMessageGravity(Gravity.CENTER_HORIZONTAL);
builder.setLeftButtonListener((dlg, rs) -> { builder.setLeftButtonListener((dlg, rs) -> {
dlg.dismiss(); dlg.dismiss();
//复制当前卡组 //复制当前卡组
inputDeckName(old, savePath, true); inputDeckName(old, savePath, true);
}); });
builder.setRightButtonListener((dlg, rs) -> { builder.setRightButtonListener((dlg, rs) -> {
...@@ -757,11 +757,11 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -757,11 +757,11 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
builderShareLoading.setMessage(R.string.Pre_share); builderShareLoading.setMessage(R.string.Pre_share);
builderShareLoading.show(); builderShareLoading.show();
//先排序 //先排序
// mDeckAdapater.sort(); // mDeckAdapater.sort();
//保存 //保存
// if (mPreLoadFile != null && mPreLoadFile == mDeckAdapater.getYdkFile()) { // if (mPreLoadFile != null && mPreLoadFile == mDeckAdapater.getYdkFile()) {
// //需要保存到deck文件夹 // //需要保存到deck文件夹
// inputDeckName(mPreLoadFile, null, true); // inputDeckName(mPreLoadFile, null, true);
// } else { // } else {
// if (mDeckAdapater.getYdkFile() == null) { // if (mDeckAdapater.getYdkFile() == null) {
...@@ -770,27 +770,27 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -770,27 +770,27 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
// save(mDeckAdapater.getYdkFile()); // save(mDeckAdapater.getYdkFile());
// } // }
// } // }
// //保存成功后重新加载卡组 // //保存成功后重新加载卡组
// File file = getSelectDeck(mDeckSpinner); // File file = getSelectDeck(mDeckSpinner);
// if (file != null) { // if (file != null) {
// loadDeckFromFile(file); // loadDeckFromFile(file);
// } // }
//延时半秒,使整体看起来更流畅 //延时半秒,使整体看起来更流畅
new Handler().postDelayed(this::shareDeck1, 500); new Handler().postDelayed(this::shareDeck1, 500);
} }
private void shareDeck1() { private void shareDeck1() {
//开启绘图缓存 //开启绘图缓存
mRecyclerView.setDrawingCacheEnabled(true); mRecyclerView.setDrawingCacheEnabled(true);
//这个方法可调可不调,因为在getDrawingCache()里会自动判断有没有缓存有没有准备好, //这个方法可调可不调,因为在getDrawingCache()里会自动判断有没有缓存有没有准备好,
//如果没有,会自动调用buildDrawingCache() //如果没有,会自动调用buildDrawingCache()
mRecyclerView.buildDrawingCache(); mRecyclerView.buildDrawingCache();
//获取绘图缓存 这里直接创建了一个新的bitmap //获取绘图缓存 这里直接创建了一个新的bitmap
//因为我们在最后需要释放缓存资源,会释放掉缓存中创建的bitmap对象 //因为我们在最后需要释放缓存资源,会释放掉缓存中创建的bitmap对象
Bitmap bitmap = BitmapUtil.drawBg4Bitmap(Color.parseColor("#e6f3fd"), Bitmap.createBitmap(mRecyclerView.getDrawingCache(), 0, 0, mRecyclerView.getMeasuredWidth(), Bitmap bitmap = BitmapUtil.drawBg4Bitmap(Color.parseColor("#e6f3fd"), Bitmap.createBitmap(mRecyclerView.getDrawingCache(), 0, 0, mRecyclerView.getMeasuredWidth(),
mRecyclerView.getMeasuredHeight())); mRecyclerView.getMeasuredHeight()));
//清理绘图缓存,释放资源 //清理绘图缓存,释放资源
mRecyclerView.destroyDrawingCache(); mRecyclerView.destroyDrawingCache();
// shotRecyclerView(mRecyclerView) // shotRecyclerView(mRecyclerView)
...@@ -817,7 +817,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -817,7 +817,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
stopService(new Intent(this, DuelAssistantService.class)); stopService(new Intent(this, DuelAssistantService.class));
YGOUtil.copyMessage(this, et_code.getText().toString().trim()); YGOUtil.copyMessage(this, et_code.getText().toString().trim());
showToast(getString(R.string.deck_text_copyed)); showToast(getString(R.string.deck_text_copyed));
//复制完毕开启决斗助手 //复制完毕开启决斗助手
YGOUtil.startDuelService(this); YGOUtil.startDuelService(this);
}); });
...@@ -844,7 +844,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -844,7 +844,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
}); });
//复制前关闭决斗助手 //复制前关闭决斗助手
// String label = TextUtils.isEmpty(deck.getName()) ? getString(R.string.share_deck) : deck.getName(); // String label = TextUtils.isEmpty(deck.getName()) ? getString(R.string.share_deck) : deck.getName();
...@@ -1075,9 +1075,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi ...@@ -1075,9 +1075,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
addMenuButton(mMenuIds, menu, R.id.action_sort, R.string.sort, R.drawable.sort); addMenuButton(mMenuIds, menu, R.id.action_sort, R.string.sort, R.drawable.sort);
addMenuButton(mMenuIds, menu, R.id.action_deck_backup_n_restore, R.string.deck_backup_n_restore, R.drawable.downloadimages); addMenuButton(mMenuIds, menu, R.id.action_deck_backup_n_restore, R.string.deck_backup_n_restore, R.drawable.downloadimages);
//设置展开或隐藏的延时。 默认值为 800ms。 //设置展开或隐藏的延时。 默认值为 800ms。
menu.setDuration(150); menu.setDuration(150);
//设置每两个子按钮之间动画的延时(ms为单位)。 比如,如果延时设为0,那么所有子按钮都会同时展开或隐藏,默认值为100ms。 //设置每两个子按钮之间动画的延时(ms为单位)。 比如,如果延时设为0,那么所有子按钮都会同时展开或隐藏,默认值为100ms。
menu.setDelay(10); menu.setDelay(10);
menu.setOnBoomListener(new DefaultOnBoomListener() { menu.setOnBoomListener(new DefaultOnBoomListener() {
......
...@@ -82,9 +82,9 @@ public class StringManager implements Closeable { ...@@ -82,9 +82,9 @@ public class StringManager implements Closeable {
InputStreamReader in = null; InputStreamReader in = null;
try { try {
in = new InputStreamReader(inputStream, "utf-8"); in = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
BufferedReader reader = new BufferedReader(in); BufferedReader reader = new BufferedReader(in);
String line = null; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
if (line.startsWith("#") || (!line.startsWith(PRE_SYSTEM) && !line.startsWith(PRE_SETNAME))) { if (line.startsWith("#") || (!line.startsWith(PRE_SYSTEM) && !line.startsWith(PRE_SETNAME))) {
continue; continue;
...@@ -133,7 +133,7 @@ public class StringManager implements Closeable { ...@@ -133,7 +133,7 @@ public class StringManager implements Closeable {
inputStream = new FileInputStream(file); inputStream = new FileInputStream(file);
in = new InputStreamReader(inputStream, StandardCharsets.UTF_8); in = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
BufferedReader reader = new BufferedReader(in); BufferedReader reader = new BufferedReader(in);
String line = null; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
if (line.startsWith("#") || (!line.startsWith(PRE_SYSTEM) && !line.startsWith(PRE_SETNAME))) { if (line.startsWith("#") || (!line.startsWith(PRE_SYSTEM) && !line.startsWith(PRE_SETNAME))) {
continue; continue;
......
...@@ -4,6 +4,8 @@ package ocgcore.data; ...@@ -4,6 +4,8 @@ package ocgcore.data;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import androidx.annotation.NonNull;
import ocgcore.enums.CardType; import ocgcore.enums.CardType;
public class Card extends CardData implements Parcelable { public class Card extends CardData implements Parcelable {
...@@ -137,6 +139,7 @@ public class Card extends CardData implements Parcelable { ...@@ -137,6 +139,7 @@ public class Card extends CardData implements Parcelable {
return c.Code == this.Code || c.Alias == this.Code || c.Code == this.Alias; return c.Code == this.Code || c.Alias == this.Code || c.Code == this.Alias;
} }
@NonNull
@Override @Override
public String toString() { public String toString() {
return "Card{" + return "Card{" +
......
...@@ -3,10 +3,9 @@ package ocgcore.data; ...@@ -3,10 +3,9 @@ package ocgcore.data;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import ocgcore.enums.CardAttribute; import androidx.annotation.NonNull;
import ocgcore.enums.CardOt;
public class CardData implements Parcelable{ public class CardData implements Parcelable {
public CardData() { public CardData() {
} }
...@@ -28,6 +27,7 @@ public class CardData implements Parcelable{ ...@@ -28,6 +27,7 @@ public class CardData implements Parcelable{
public int RightScale; public int RightScale;
public long Category; public long Category;
@NonNull
@Override @Override
public String toString() { public String toString() {
return "CardData{" + return "CardData{" +
......
...@@ -312,4 +312,10 @@ ...@@ -312,4 +312,10 @@
<string name="title_delete_ex">확장 삭제</string> <string name="title_delete_ex">확장 삭제</string>
<string name="file_installed">문건 나왔습니다.</string> <string name="file_installed">문건 나왔습니다.</string>
<string name="ask_delete_ex">지우려면 확인을 클릭하십시오.</string> <string name="ask_delete_ex">지우려면 확인을 클릭하십시오.</string>
<string name="label_ot_OCG">OCG</string>
<string name="label_ot_TCG">TCG</string>
<string name="label_ot_SC_OCG">SC_OCG</string>
<string name="label_ot_All">모든 카드</string>
<string name="label_ot_No_Exclusive">ID 없는 카드</string>
<string name="label_ot_CUSTOM">커스텀 카드</string>
</resources> </resources>
...@@ -99,6 +99,12 @@ ...@@ -99,6 +99,12 @@
<string name="hit_def">DEF</string> <string name="hit_def">DEF</string>
<string name="label_race">种族</string> <string name="label_race">种族</string>
<string name="label_ot">专属</string> <string name="label_ot">专属</string>
<string name="label_ot_OCG">OCG</string>
<string name="label_ot_TCG">TCG</string>
<string name="label_ot_SC_OCG">简体中文</string>
<string name="label_ot_CUSTOM">自定义卡片</string>
<string name="label_ot_No_Exclusive">无独有卡</string>
<string name="label_ot_All">全部卡片</string>
<string name="label_limit">不限制</string> <string name="label_limit">不限制</string>
<string name="label_limitlist">禁卡表</string> <string name="label_limitlist">禁卡表</string>
<string name="label_type">卡片类型</string> <string name="label_type">卡片类型</string>
......
...@@ -315,4 +315,10 @@ ...@@ -315,4 +315,10 @@
<string name="about_delete_ex">if you need to delte all expansion cards</string> <string name="about_delete_ex">if you need to delte all expansion cards</string>
<string name="file_installed">file loaded</string> <string name="file_installed">file loaded</string>
<string name="ask_delete_ex">Click OK to confirm the deletion</string> <string name="ask_delete_ex">Click OK to confirm the deletion</string>
<string name="label_ot_TCG">TCG</string>
<string name="label_ot_OCG">OCG</string>
<string name="label_ot_All">All</string>
<string name="label_ot_CUSTOM">Custom</string>
<string name="label_ot_No_Exclusive">No exclusive</string>
<string name="label_ot_SC_OCG">SChinese OCG</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment