1.Compatibility fix, for ChestInventoryChangedEvent

2.Add disable MonoMod settings(for Android version that not support it)
3.Add log file size settings
This commit is contained in:
ZaneYork 2020-04-19 14:39:40 +08:00
parent b505f2ed04
commit 4f62270ccb
20 changed files with 110 additions and 29 deletions

View File

@ -12,8 +12,8 @@ android {
applicationId "com.zane.smapiinstaller" applicationId "com.zane.smapiinstaller"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 28 targetSdkVersion 28
versionCode 35 versionCode 36
versionName "1.4.4" versionName "1.4.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true

View File

@ -1,5 +1,5 @@
{ {
"version": 12, "version": 13,
"contents": [ "contents": [
{ {
"type": "COMPAT", "type": "COMPAT",
@ -13,9 +13,9 @@
"type": "COMPAT", "type": "COMPAT",
"name": "SMAPI for Galaxy Store", "name": "SMAPI for Galaxy Store",
"assetPath": "compat/samsung_138/", "assetPath": "compat/samsung_138/",
"description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.5", "description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.6",
"url": "http://zaneyork.cn/download/compat/smapi_samsung_138_7.zip", "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_8.zip",
"hash": "141ac038ff831ece5e6627dc29a45deddc131a008b3cfdecc678d1da2c0ee7a0" "hash": "9def0e6f711c46e50cd962d10aa0ccf6014026a7cc544be42922ac9b49172a38"
}, },
{ {
"type": "LOCALE", "type": "LOCALE",

View File

@ -1,5 +1,5 @@
{ {
"version": 12, "version": 13,
"contents": [ "contents": [
{ {
"type": "COMPAT", "type": "COMPAT",
@ -13,9 +13,9 @@
"type": "COMPAT", "type": "COMPAT",
"name": "SMAPI for Galaxy Store", "name": "SMAPI for Galaxy Store",
"assetPath": "compat/samsung_138/", "assetPath": "compat/samsung_138/",
"description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.5", "description": "SMAPI compat package for game 1.4.4.138 - latest, SMAPI 3.4.1.6",
"url": "http://zaneyork.cn/download/compat/smapi_samsung_138_7.zip", "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_8.zip",
"hash": "141ac038ff831ece5e6627dc29a45deddc131a008b3cfdecc678d1da2c0ee7a0" "hash": "9def0e6f711c46e50cd962d10aa0ccf6014026a7cc544be42922ac9b49172a38"
}, },
{ {
"type": "LOCALE", "type": "LOCALE",

View File

@ -1,5 +1,5 @@
{ {
"version": 12, "version": 13,
"contents": [ "contents": [
{ {
"type": "COMPAT", "type": "COMPAT",
@ -13,9 +13,9 @@
"type": "COMPAT", "type": "COMPAT",
"name": "SMAPI三星商店兼容包", "name": "SMAPI三星商店兼容包",
"assetPath": "compat/samsung_138/", "assetPath": "compat/samsung_138/",
"description": "SMAPI三星商店兼容包 适用版本1.4.4.138至今, SMAPI 3.4.1.5", "description": "SMAPI三星商店兼容包 适用版本1.4.4.138至今, SMAPI 3.4.1.6",
"url": "http://zaneyork.cn/download/compat/smapi_samsung_138_7.zip", "url": "http://zaneyork.cn/download/compat/smapi_samsung_138_8.zip",
"hash": "141ac038ff831ece5e6627dc29a45deddc131a008b3cfdecc678d1da2c0ee7a0" "hash": "9def0e6f711c46e50cd962d10aa0ccf6014026a7cc544be42922ac9b49172a38"
}, },
{ {
"type": "LOCALE", "type": "LOCALE",

View File

@ -163,6 +163,7 @@ public class MainActivity extends AppCompatActivity {
menu.findItem(R.id.settings_verbose_logging).setChecked(config.isVerboseLogging()); menu.findItem(R.id.settings_verbose_logging).setChecked(config.isVerboseLogging());
menu.findItem(R.id.settings_check_for_updates).setChecked(config.isCheckForUpdates()); menu.findItem(R.id.settings_check_for_updates).setChecked(config.isCheckForUpdates());
menu.findItem(R.id.settings_developer_mode).setChecked(config.isDeveloperMode()); menu.findItem(R.id.settings_developer_mode).setChecked(config.isDeveloperMode());
menu.findItem(R.id.settings_disable_mono_mod).setChecked(config.isDisableMonoMod());
Constants.MOD_PATH = config.getModsPath(); Constants.MOD_PATH = config.getModsPath();
return super.onPrepareOptionsMenu(menu); return super.onPrepareOptionsMenu(menu);
} }
@ -188,6 +189,9 @@ public class MainActivity extends AppCompatActivity {
case R.id.settings_developer_mode: case R.id.settings_developer_mode:
config.setDeveloperMode(item.isChecked()); config.setDeveloperMode(item.isChecked());
break; break;
case R.id.settings_disable_mono_mod:
config.setDisableMonoMod(item.isChecked());
break;
case R.id.settings_set_mod_path: case R.id.settings_set_mod_path:
DialogUtils.showInputDialog(toolbar, R.string.input, R.string.input_mods_path, Constants.MOD_PATH, Constants.MOD_PATH, (dialog, input) -> { DialogUtils.showInputDialog(toolbar, R.string.input, R.string.input_mods_path, Constants.MOD_PATH, Constants.MOD_PATH, (dialog, input) -> {
if (StringUtils.isNoneBlank(input)) { if (StringUtils.isNoneBlank(input)) {
@ -203,6 +207,24 @@ public class MainActivity extends AppCompatActivity {
} }
}); });
return true; return true;
case R.id.settings_set_max_log_size:
DialogUtils.showInputDialog(toolbar, R.string.input, R.string.settings_set_max_log_size, String.valueOf(config.getMaxLogSize()), String.valueOf(config.getMaxLogSize()), (dialog, input) -> {
if (StringUtils.isNoneBlank(input)) {
try {
int size = Integer.parseInt(input.toString());
config.setMaxLogSize(size);
manager.flushConfig();
}
catch (Exception ignored){
}
}
else {
config.setMaxLogSize(Integer.MAX_VALUE);
manager.flushConfig();
}
});
return true;
case R.id.settings_language: case R.id.settings_language:
selectLanguageLogic(); selectLanguageLogic();
return true; return true;

View File

@ -63,7 +63,7 @@ public class Constants {
/** /**
* SMAPI版本 * SMAPI版本
*/ */
public static final String SMAPI_VERSION = "3.4.1.5"; public static final String SMAPI_VERSION = "3.4.1.6";
/** /**
* 平台 * 平台

View File

@ -28,6 +28,18 @@ public class FrameworkConfig {
@JsonProperty("DeveloperMode") @JsonProperty("DeveloperMode")
private boolean DeveloperMode = false; private boolean DeveloperMode = false;
/**
* 禁用MonoMod
*/
@JsonProperty("DisableMonoMod")
private boolean DisableMonoMod = false;
/**
* 最大日志大小
*/
@JsonProperty("MaxLogSize")
private int MaxLogSize = Integer.MAX_VALUE;
/** /**
* Mod存放位置 * Mod存放位置
*/ */

View File

@ -0,0 +1,5 @@
package com.zane.smapiinstaller.logic;
public class SaveValidator {
}

View File

@ -62,6 +62,32 @@
android:text="@string/button_qq_group_2_text" /> android:text="@string/button_qq_group_2_text" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/img_tieba"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/global"
android:contentDescription="@string/icon_desc" />
<Button
android:id="@+id/button_tieba"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/img_tieba"
app:layout_constraintEnd_toEndOf="parent"
style="@style/Widget.AppCompat.Button.Borderless"
android:gravity="center"
android:textSize="24sp"
android:text="@string/button_tieba_sdvandroid" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -139,7 +165,4 @@
android:textSize="24sp" android:textSize="24sp"
android:text="@string/button_donation_text" /> android:text="@string/button_donation_text" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>

View File

@ -24,6 +24,11 @@
android:orderInCategory="102" android:orderInCategory="102"
android:title="@string/settings_developer_mode" android:title="@string/settings_developer_mode"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/settings_disable_mono_mod"
android:orderInCategory="103"
android:title="@string/settings_disable_mono_mod"
app:showAsAction="never" />
</group> </group>
<item <item
android:id="@+id/settings_set_mod_path" android:id="@+id/settings_set_mod_path"
@ -31,13 +36,18 @@
android:title="@string/settings_set_mod_path" android:title="@string/settings_set_mod_path"
app:showAsAction="never" /> app:showAsAction="never" />
<item <item
android:id="@+id/settings_language" android:id="@+id/settings_set_max_log_size"
android:orderInCategory="104" android:orderInCategory="104"
android:title="@string/settings_set_max_log_size"
app:showAsAction="never" />
<item
android:id="@+id/settings_language"
android:orderInCategory="105"
android:title="@string/settings_set_language" android:title="@string/settings_set_language"
app:showAsAction="never" /> app:showAsAction="never" />
<item <item
android:id="@+id/settings_translation_service" android:id="@+id/settings_translation_service"
android:orderInCategory="105" android:orderInCategory="106"
android:title="@string/settings_translation_service" android:title="@string/settings_translation_service"
app:showAsAction="never" /> app:showAsAction="never" />
</menu> </menu>

View File

@ -61,7 +61,7 @@
<string name="settings_verbose_logging">Registro detallado</string> <string name="settings_verbose_logging">Registro detallado</string>
<string name="signing_package">Firmando paquete deinstalación</string> <string name="signing_package">Firmando paquete deinstalación</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">Versión SMAPI: 3.4.1.5</string> <string name="smapi_version">Versión SMAPI: 3.4.1.6</string>
<string name="text_install_tip1">Nota: Requiere la versión del juego 1.4.5.138 o superior</string> <string name="text_install_tip1">Nota: Requiere la versión del juego 1.4.5.138 o superior</string>
<string name="text_install_tip2">El cuerpo del juego debe instalarse durante la actualización o instalación</string> <string name="text_install_tip2">El cuerpo del juego debe instalarse durante la actualización o instalación</string>
<string name="unpacking_smapi_files">Desempacando</string> <string name="unpacking_smapi_files">Desempacando</string>

View File

@ -61,7 +61,7 @@
<string name="settings_verbose_logging">Journalisation détaillée</string> <string name="settings_verbose_logging">Journalisation détaillée</string>
<string name="signing_package">Signature</string> <string name="signing_package">Signature</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">Version SMAPI: 3.4.1.5</string> <string name="smapi_version">Version SMAPI: 3.4.1.6</string>
<string name="text_install_tip1">Remarques: La version du jeu 1.4.5.138 ou ultérieure est requise.</string> <string name="text_install_tip1">Remarques: La version du jeu 1.4.5.138 ou ultérieure est requise.</string>
<string name="text_install_tip2">Le jeu de base est requis lors de la mise à jour / installation.</string> <string name="text_install_tip2">Le jeu de base est requis lors de la mise à jour / installation.</string>
<string name="unpacking_smapi_files">Déballage</string> <string name="unpacking_smapi_files">Déballage</string>

View File

@ -61,7 +61,7 @@
<string name="settings_verbose_logging">Catatan Terperinci</string> <string name="settings_verbose_logging">Catatan Terperinci</string>
<string name="signing_package">Menandatangani</string> <string name="signing_package">Menandatangani</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">Versi SMAPI: 3.4.1.5</string> <string name="smapi_version">Versi SMAPI: 3.4.1.6</string>
<string name="text_install_tip1">Catatan: Dibutuhkan Stardew Valley versi 1.4.5.138 atau yang lebih baru.</string> <string name="text_install_tip1">Catatan: Dibutuhkan Stardew Valley versi 1.4.5.138 atau yang lebih baru.</string>
<string name="text_install_tip2">Permainan dasar diperlukan saat memperbarui/menginstal.</string> <string name="text_install_tip2">Permainan dasar diperlukan saat memperbarui/menginstal.</string>
<string name="unpacking_smapi_files">Membongkar</string> <string name="unpacking_smapi_files">Membongkar</string>

View File

@ -61,7 +61,7 @@
<string name="settings_verbose_logging">자세한 로그</string> <string name="settings_verbose_logging">자세한 로그</string>
<string name="signing_package">설치 패키지 서명</string> <string name="signing_package">설치 패키지 서명</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">SMAPI버전: 3.4.1.5</string> <string name="smapi_version">SMAPI버전: 3.4.1.6</string>
<string name="text_install_tip1">참고 : 게임 버전 1.4.5.138 이상이 필요합니다</string> <string name="text_install_tip1">참고 : 게임 버전 1.4.5.138 이상이 필요합니다</string>
<string name="text_install_tip2">업데이트 또는 설치 중에 게임 본체를 설치해야합니다</string> <string name="text_install_tip2">업데이트 또는 설치 중에 게임 본체를 설치해야합니다</string>
<string name="unpacking_smapi_files">포장 풀기</string> <string name="unpacking_smapi_files">포장 풀기</string>

View File

@ -61,7 +61,7 @@
<string name="settings_verbose_logging">Log detalhado</string> <string name="settings_verbose_logging">Log detalhado</string>
<string name="signing_package">Assinatura</string> <string name="signing_package">Assinatura</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">Versão SMAPI: 3.4.1.5</string> <string name="smapi_version">Versão SMAPI: 3.4.1.6</string>
<string name="text_install_tip1">Notas: É necessária a versão do jogo 1.4.5.138 ou posterior.</string> <string name="text_install_tip1">Notas: É necessária a versão do jogo 1.4.5.138 ou posterior.</string>
<string name="text_install_tip2">O jogo base é necessário ao atualizar / instalar.</string> <string name="text_install_tip2">O jogo base é necessário ao atualizar / instalar.</string>
<string name="unpacking_smapi_files">Desembalar</string> <string name="unpacking_smapi_files">Desembalar</string>

View File

@ -61,7 +61,7 @@
<string name="settings_verbose_logging">การบันทึกอย่างละเอียด</string> <string name="settings_verbose_logging">การบันทึกอย่างละเอียด</string>
<string name="signing_package">การลงชื่อ</string> <string name="signing_package">การลงชื่อ</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">เวอร์ชั่น SMAPI: 3.4.1.5</string> <string name="smapi_version">เวอร์ชั่น SMAPI: 3.4.1.6</string>
<string name="text_install_tip1">หมายเหตุ: จำเป็นต้องใช้เวอร์ชั่นเกม 1.4.5.138 หรือใหม่กว่า</string> <string name="text_install_tip1">หมายเหตุ: จำเป็นต้องใช้เวอร์ชั่นเกม 1.4.5.138 หรือใหม่กว่า</string>
<string name="text_install_tip2">จำเป็นต้องมีเกมพื้นฐานเมื่อทำการอัพเดต / ติดตั้ง</string> <string name="text_install_tip2">จำเป็นต้องมีเกมพื้นฐานเมื่อทำการอัพเดต / ติดตั้ง</string>
<string name="unpacking_smapi_files">แกะกล่อง</string> <string name="unpacking_smapi_files">แกะกล่อง</string>

View File

@ -60,7 +60,7 @@
<string name="settings_verbose_logging">詳細日誌</string> <string name="settings_verbose_logging">詳細日誌</string>
<string name="signing_package">正在簽名安裝包</string> <string name="signing_package">正在簽名安裝包</string>
<string name="smapi_game_name">SMAPI星露穀物語</string> <string name="smapi_game_name">SMAPI星露穀物語</string>
<string name="smapi_version">SMAPI版本: 3.4.1.5</string> <string name="smapi_version">SMAPI版本: 3.4.1.6</string>
<string name="text_install_tip1">注意需要不低於1.4.5.138版本的遊戲本體</string> <string name="text_install_tip1">注意需要不低於1.4.5.138版本的遊戲本體</string>
<string name="text_install_tip2">更新或安裝期間需要安裝遊戲本體</string> <string name="text_install_tip2">更新或安裝期間需要安裝遊戲本體</string>
<string name="unpacking_smapi_files">正在解包</string> <string name="unpacking_smapi_files">正在解包</string>
@ -72,4 +72,7 @@
<string name="parser">格式化</string> <string name="parser">格式化</string>
<string name="mod_version_update_checking">正在檢查MOD更新</string> <string name="mod_version_update_checking">正在檢查MOD更新</string>
<string name="smapi_version_runing">最近運行: %s</string> <string name="smapi_version_runing">最近運行: %s</string>
<string name="button_tieba_sdvandroid">贴吧: 星露谷安卓</string>
<string name="settings_disable_mono_mod">禁用MonoMod</string>
<string name="settings_set_max_log_size">最大日志大小</string>
</resources> </resources>

View File

@ -60,7 +60,7 @@
<string name="settings_verbose_logging">详细日志</string> <string name="settings_verbose_logging">详细日志</string>
<string name="signing_package">正在签名安装包</string> <string name="signing_package">正在签名安装包</string>
<string name="smapi_game_name">SMAPI星露谷物语</string> <string name="smapi_game_name">SMAPI星露谷物语</string>
<string name="smapi_version">SMAPI版本: 3.4.1.5</string> <string name="smapi_version">SMAPI版本: 3.4.1.6</string>
<string name="text_install_tip1">注意需要不低于1.4.5.138版本的游戏本体</string> <string name="text_install_tip1">注意需要不低于1.4.5.138版本的游戏本体</string>
<string name="text_install_tip2">更新或安装期间需要安装游戏本体</string> <string name="text_install_tip2">更新或安装期间需要安装游戏本体</string>
<string name="unpacking_smapi_files">正在解包</string> <string name="unpacking_smapi_files">正在解包</string>
@ -72,4 +72,7 @@
<string name="parser">格式化</string> <string name="parser">格式化</string>
<string name="mod_version_update_checking">正在检查MOD更新</string> <string name="mod_version_update_checking">正在检查MOD更新</string>
<string name="smapi_version_runing">最近运行: %s</string> <string name="smapi_version_runing">最近运行: %s</string>
<string name="button_tieba_sdvandroid">贴吧: 星露谷安卓</string>
<string name="settings_disable_mono_mod">禁用MonoMod</string>
<string name="settings_set_max_log_size">最大日志大小</string>
</resources> </resources>

View File

@ -60,7 +60,7 @@
<string name="settings_verbose_logging">Verbose Logging</string> <string name="settings_verbose_logging">Verbose Logging</string>
<string name="signing_package">Signing</string> <string name="signing_package">Signing</string>
<string name="smapi_game_name">SMAPI Stardew Valley</string> <string name="smapi_game_name">SMAPI Stardew Valley</string>
<string name="smapi_version">SMAPI Version: 3.4.1.5</string> <string name="smapi_version">SMAPI Version: 3.4.1.6</string>
<string name="text_install_tip1">Notes: Game version 1.4.5.138 or later is required.</string> <string name="text_install_tip1">Notes: Game version 1.4.5.138 or later is required.</string>
<string name="text_install_tip2">The base game is required when updating/installing.</string> <string name="text_install_tip2">The base game is required when updating/installing.</string>
<string name="unpacking_smapi_files">Unpacking</string> <string name="unpacking_smapi_files">Unpacking</string>
@ -76,4 +76,7 @@
<string name="parser">Parser</string> <string name="parser">Parser</string>
<string name="mod_version_update_checking">Checking for mod updates</string> <string name="mod_version_update_checking">Checking for mod updates</string>
<string name="smapi_version_runing">Latest running: %s</string> <string name="smapi_version_runing">Latest running: %s</string>
<string name="button_tieba_sdvandroid">Tieba: SDV Android</string>
<string name="settings_disable_mono_mod">Disable MonoMod</string>
<string name="settings_set_max_log_size">Max Log Size</string>
</resources> </resources>