[+] Custom shop name in photo

pull/52/head
Clansty 2024-09-02 23:02:47 +08:00
parent ac94b6d917
commit a3afb1a2b8
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
6 changed files with 27 additions and 0 deletions

View File

@ -292,6 +292,7 @@
<Compile Include="Performance\ImproveLoadSpeed.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Main.cs" />
<Compile Include="UX\CustomPlaceName.cs" />
<Compile Include="UX\CustomVersionString.cs" />
<Compile Include="UX\DemoMaster.cs" />
<Compile Include="UX\ExtendTimer.cs" />

View File

@ -48,6 +48,8 @@ ExtendTimer=true
ImmediateSave=true
# Prevent accidental touch of the Test button
TestProof=false
# Custom shop name in photo (SDEZ only)
CustomPlaceName=""
[Performance]
# Disable some useless delays to speed up the game boot process

View File

@ -54,6 +54,8 @@ ExtendTimer=true
ImmediateSave=true
# 防止你不小心按到 Test 键Test 键需要长按 1 秒才能生效
TestProof=false
# 自定义拍照的店铺名称(仅 SDEZ
CustomPlaceName=""
# ===================================
# 一些性能优化

View File

@ -34,6 +34,7 @@ namespace AquaMai
public bool LoadLocalBga { get; set; }
public bool TestProof { get; set; }
public string CustomVersionString { get; set; }
public string CustomPlaceName { get; set; }
public string ExecOnIdle { get; set; }
public string ExecOnEntry { get; set; }
}

View File

@ -79,6 +79,7 @@ namespace AquaMai
// These don't need to be configurable
Patch(typeof(FixCharaCrash));
Patch(typeof(CustomVersionString));
Patch(typeof(CustomPlaceName));
Patch(typeof(DisableReboot));
Patch(typeof(RunCommandOnEvents));
Patch(typeof(BasicFix));

View File

@ -0,0 +1,20 @@
using HarmonyLib;
using Manager;
namespace AquaMai.UX;
public class CustomPlaceName
{
[HarmonyPostfix]
[HarmonyPatch(typeof(OperationManager), "CheckAuth_Proc")]
public static void CheckAuth_Proc(OperationManager __instance)
{
if (string.IsNullOrEmpty(AquaMai.AppConfig.UX.CustomPlaceName))
{
return;
}
__instance.ShopData.ShopName = AquaMai.AppConfig.UX.CustomPlaceName;
__instance.ShopData.ShopNickName = AquaMai.AppConfig.UX.CustomPlaceName;
}
}