[+] Also enable shop name display in SDGA when CustomPlaceName is set

pull/52/head
Clansty 2024-09-02 23:15:25 +08:00
parent a3afb1a2b8
commit e3c0fe5e78
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
3 changed files with 16 additions and 2 deletions

View File

@ -48,7 +48,8 @@ ExtendTimer=true
ImmediateSave=true
# Prevent accidental touch of the Test button
TestProof=false
# Custom shop name in photo (SDEZ only)
# Custom shop name in photo
# Also enable shop name display in SDGA
CustomPlaceName=""
[Performance]

View File

@ -54,7 +54,8 @@ ExtendTimer=true
ImmediateSave=true
# 防止你不小心按到 Test 键Test 键需要长按 1 秒才能生效
TestProof=false
# 自定义拍照的店铺名称(仅 SDEZ
# 自定义拍照的店铺名称
# 同时在 SDGA 中会启用店铺名称的显示(但是不会在游戏里有设置)
CustomPlaceName=""
# ===================================

View File

@ -17,4 +17,16 @@ public class CustomPlaceName
__instance.ShopData.ShopName = AquaMai.AppConfig.UX.CustomPlaceName;
__instance.ShopData.ShopNickName = AquaMai.AppConfig.UX.CustomPlaceName;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(ResultCardBaseController), "Initialize")]
public static void Initialize(ResultCardBaseController __instance)
{
if (string.IsNullOrEmpty(AquaMai.AppConfig.UX.CustomPlaceName))
{
return;
}
__instance.SetVisibleStoreName(true);
}
}